mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 10:04:21 +00:00
Bug Fix for SF# 2013921 - Movement in Submission Workflow Causes Skipped Steps
THIS PATCH WAS ONLY TESTED ON 1.5.x BRANCH. However, I've updated it for Trunk to hopefully support the new "resource/*" in the URL of the XMLUI submission process. It's untested, as I couldn't get Trunk's XMLUI to work. This changes the Submission workflow to use URLs of the form resource/$/submit/*.continue (where the final part is the continuation id). In addition, the submission process also makes use of Cocoon's Page Local functionality to save the state of individual pages in the submission process. This ensures that if the user clicks the browser "back button", previous state information can be reloaded (so the flow no longer gets confused as to the current state). git-svn-id: http://scm.dspace.org/svn/repo/trunk@3021 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -113,7 +113,7 @@ public class CCLicenseStep extends AbstractSubmissionStep
|
|||||||
// Build the url to and from creative commons
|
// Build the url to and from creative commons
|
||||||
Item item = submission.getItem();
|
Item item = submission.getItem();
|
||||||
Collection collection = submission.getCollection();
|
Collection collection = submission.getCollection();
|
||||||
String actionURL = IdentifierService.getURL(collection).toString() + "/submit";
|
String actionURL = IdentifierService.getURL(collection).toString() + "/submit/" + knot.getId() + ".continue";
|
||||||
|
|
||||||
Request request = ObjectModelHelper.getRequest(objectModel);
|
Request request = ObjectModelHelper.getRequest(objectModel);
|
||||||
boolean https = request.isSecure();
|
boolean https = request.isSecure();
|
||||||
@@ -177,7 +177,6 @@ public class CCLicenseStep extends AbstractSubmissionStep
|
|||||||
// add standard control/paging buttons
|
// add standard control/paging buttons
|
||||||
addControlButtons(form);
|
addControlButtons(form);
|
||||||
|
|
||||||
onsiteDiv.addHidden("submission-continue").setValue(knot.getId());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -176,7 +176,7 @@ public class DescribeStep extends AbstractSubmissionStep
|
|||||||
// Obtain the inputs (i.e. metadata fields we are going to display)
|
// Obtain the inputs (i.e. metadata fields we are going to display)
|
||||||
Item item = submission.getItem();
|
Item item = submission.getItem();
|
||||||
Collection collection = submission.getCollection();
|
Collection collection = submission.getCollection();
|
||||||
String actionURL = IdentifierService.getURL(collection).toString() + "/submit";
|
String actionURL = IdentifierService.getURL(collection).toString() + "/submit/" + knot.getId() + ".continue";
|
||||||
|
|
||||||
DCInputSet inputSet = null;
|
DCInputSet inputSet = null;
|
||||||
DCInput[] inputs = {};
|
DCInput[] inputs = {};
|
||||||
@@ -274,9 +274,6 @@ public class DescribeStep extends AbstractSubmissionStep
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
div.addHidden("submission-continue").setValue(knot.getId());
|
|
||||||
|
|
||||||
|
|
||||||
// add standard control/paging buttons
|
// add standard control/paging buttons
|
||||||
addControlButtons(form);
|
addControlButtons(form);
|
||||||
}
|
}
|
||||||
|
@@ -140,7 +140,7 @@ public class EditFileStep extends AbstractStep
|
|||||||
UIException, SQLException, IOException, AuthorizeException
|
UIException, SQLException, IOException, AuthorizeException
|
||||||
{
|
{
|
||||||
Collection collection = submission.getCollection();
|
Collection collection = submission.getCollection();
|
||||||
String actionURL = IdentifierService.getURL(collection).toString() + "/submit";
|
String actionURL = IdentifierService.getURL(collection).toString() + "/submit/" + knot.getId() + ".continue";
|
||||||
|
|
||||||
// Get the bitstream and all the various formats
|
// Get the bitstream and all the various formats
|
||||||
BitstreamFormat currentFormat = bitstream.getFormat();
|
BitstreamFormat currentFormat = bitstream.getFormat();
|
||||||
@@ -220,8 +220,6 @@ public class EditFileStep extends AbstractStep
|
|||||||
actions.addButton("submit_save").setValue(T_submit_save);
|
actions.addButton("submit_save").setValue(T_submit_save);
|
||||||
actions.addButton("submit_edit_cancel").setValue(T_submit_cancel);
|
actions.addButton("submit_edit_cancel").setValue(T_submit_cancel);
|
||||||
|
|
||||||
div.addHidden("submission-continue").setValue(knot.getId());
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -124,7 +124,7 @@ public class InitialQuestionsStep extends AbstractSubmissionStep
|
|||||||
// Get any metadata that may be removed by unselecting one of these options.
|
// Get any metadata that may be removed by unselecting one of these options.
|
||||||
Item item = submission.getItem();
|
Item item = submission.getItem();
|
||||||
Collection collection = submission.getCollection();
|
Collection collection = submission.getCollection();
|
||||||
String actionURL = IdentifierService.getURL(collection).toString() + "/submit";
|
String actionURL = IdentifierService.getURL(collection).toString() + "/submit/" + knot.getId() + ".continue";
|
||||||
|
|
||||||
DCValue[] titles = item.getDC("title", "alternative", Item.ANY);
|
DCValue[] titles = item.getDC("title", "alternative", Item.ANY);
|
||||||
|
|
||||||
@@ -254,7 +254,6 @@ public class InitialQuestionsStep extends AbstractSubmissionStep
|
|||||||
//add standard control/paging buttons
|
//add standard control/paging buttons
|
||||||
addControlButtons(form);
|
addControlButtons(form);
|
||||||
|
|
||||||
div.addHidden("submission-continue").setValue(knot.getId());
|
|
||||||
//Since we already warn users about the metadata pruning to happen
|
//Since we already warn users about the metadata pruning to happen
|
||||||
//if they uncheck an already checked box, then
|
//if they uncheck an already checked box, then
|
||||||
//we can let the prune process occur immediately!
|
//we can let the prune process occur immediately!
|
||||||
|
@@ -147,7 +147,7 @@ public class LicenseStep extends AbstractSubmissionStep
|
|||||||
|
|
||||||
// Get the full text for the actuial licese
|
// Get the full text for the actuial licese
|
||||||
Collection collection = submission.getCollection();
|
Collection collection = submission.getCollection();
|
||||||
String actionURL = IdentifierService.getURL(collection).toString() + "/submit";
|
String actionURL = IdentifierService.getURL(collection).toString() + "/submit/" + knot.getId() + ".continue";
|
||||||
String licenseText = collection.getLicense();
|
String licenseText = collection.getLicense();
|
||||||
|
|
||||||
Division div = body.addInteractiveDivision("submit-license",actionURL, Division.METHOD_POST,"primary submission");
|
Division div = body.addInteractiveDivision("submit-license",actionURL, Division.METHOD_POST,"primary submission");
|
||||||
@@ -180,8 +180,6 @@ public class LicenseStep extends AbstractSubmissionStep
|
|||||||
|
|
||||||
//add standard control/paging buttons
|
//add standard control/paging buttons
|
||||||
addControlButtons(controls);
|
addControlButtons(controls);
|
||||||
|
|
||||||
div.addHidden("submission-continue").setValue(knot.getId());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -95,7 +95,7 @@ public class ResumeStep extends AbstractStep
|
|||||||
// Get any metadata that may be removed by unselecting one of these options.
|
// Get any metadata that may be removed by unselecting one of these options.
|
||||||
Item item = submission.getItem();
|
Item item = submission.getItem();
|
||||||
Collection collection = submission.getCollection();
|
Collection collection = submission.getCollection();
|
||||||
String actionURL = IdentifierService.getURL(collection).toString() + "/submit";
|
String actionURL = IdentifierService.getURL(collection).toString() + "/submit/" + knot.getId() + ".continue";
|
||||||
|
|
||||||
Request request = ObjectModelHelper.getRequest(objectModel);
|
Request request = ObjectModelHelper.getRequest(objectModel);
|
||||||
String showfull = request.getParameter("showfull");
|
String showfull = request.getParameter("showfull");
|
||||||
@@ -129,7 +129,5 @@ public class ResumeStep extends AbstractStep
|
|||||||
org.dspace.app.xmlui.wing.element.Item actions = form.addItem();
|
org.dspace.app.xmlui.wing.element.Item actions = form.addItem();
|
||||||
actions.addButton("submit_resume").setValue(T_submit_resume);
|
actions.addButton("submit_resume").setValue(T_submit_resume);
|
||||||
actions.addButton("submit_cancel").setValue(T_submit_cancel);
|
actions.addButton("submit_cancel").setValue(T_submit_cancel);
|
||||||
|
|
||||||
div.addHidden("submission-continue").setValue(knot.getId());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -138,7 +138,7 @@ public class ReviewStep extends AbstractSubmissionStep
|
|||||||
{
|
{
|
||||||
// Get actionable URL
|
// Get actionable URL
|
||||||
Collection collection = submission.getCollection();
|
Collection collection = submission.getCollection();
|
||||||
String actionURL = IdentifierService.getURL(collection).toString() + "/submit";
|
String actionURL = IdentifierService.getURL(collection).toString() + "/submit/" + knot.getId() + ".continue";
|
||||||
|
|
||||||
SubmissionConfig subConfig = submissionInfo.getSubmissionConfig();
|
SubmissionConfig subConfig = submissionInfo.getSubmissionConfig();
|
||||||
|
|
||||||
@@ -217,8 +217,6 @@ public class ReviewStep extends AbstractSubmissionStep
|
|||||||
// Part C:
|
// Part C:
|
||||||
// add standard control/paging buttons
|
// add standard control/paging buttons
|
||||||
addControlButtons(review);
|
addControlButtons(review);
|
||||||
|
|
||||||
div.addHidden("submission-continue").setValue(knot.getId());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -96,7 +96,7 @@ public class SaveOrRemoveStep extends AbstractStep
|
|||||||
UIException, SQLException, IOException, AuthorizeException
|
UIException, SQLException, IOException, AuthorizeException
|
||||||
{
|
{
|
||||||
Collection collection = submission.getCollection();
|
Collection collection = submission.getCollection();
|
||||||
String actionURL = IdentifierService.getURL(collection).toString() + "/submit";
|
String actionURL = IdentifierService.getURL(collection).toString() + "/submit/" + knot.getId() + ".continue";
|
||||||
|
|
||||||
Division div = body.addInteractiveDivision("submit-save-or-cancel",actionURL, Division.METHOD_POST,"primary submission");
|
Division div = body.addInteractiveDivision("submit-save-or-cancel",actionURL, Division.METHOD_POST,"primary submission");
|
||||||
div.setHead(T_submission_head);
|
div.setHead(T_submission_head);
|
||||||
@@ -112,8 +112,5 @@ public class SaveOrRemoveStep extends AbstractStep
|
|||||||
org.dspace.app.xmlui.wing.element.Item actions = saveOrCancel.addItem();
|
org.dspace.app.xmlui.wing.element.Item actions = saveOrCancel.addItem();
|
||||||
actions.addButton("submit_save").setValue(T_submit_save);
|
actions.addButton("submit_save").setValue(T_submit_save);
|
||||||
actions.addButton("submit_remove").setValue(T_submit_remove);
|
actions.addButton("submit_remove").setValue(T_submit_remove);
|
||||||
|
|
||||||
div.addHidden("submission-continue").setValue(knot.getId());
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -107,7 +107,8 @@ public class SelectCollectionStep extends AbstractSubmissionStep
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
Collection[] collections; // List of possible collections.
|
Collection[] collections; // List of possible collections.
|
||||||
ResolvableIdentifier eid = IdentifierService.resolve(context, handle);
|
String actionURL = contextPath + "/submit/" + knot.getId() + ".continue";
|
||||||
|
ResolvableIdentifier eid = IdentifierService.resolve(context, handle);
|
||||||
|
|
||||||
DSpaceObject dso = null;
|
DSpaceObject dso = null;
|
||||||
if (eid != null)
|
if (eid != null)
|
||||||
@@ -126,7 +127,7 @@ public class SelectCollectionStep extends AbstractSubmissionStep
|
|||||||
|
|
||||||
// Basic form with a drop down list of all the collections
|
// Basic form with a drop down list of all the collections
|
||||||
// you can submit too.
|
// you can submit too.
|
||||||
Division div = body.addInteractiveDivision("select-collection",contextPath+"/submit",Division.METHOD_POST,"primary submission");
|
Division div = body.addInteractiveDivision("select-collection",actionURL,Division.METHOD_POST,"primary submission");
|
||||||
div.setHead(T_submission_head);
|
div.setHead(T_submission_head);
|
||||||
|
|
||||||
List list = div.addList("select-collection", List.TYPE_FORM);
|
List list = div.addList("select-collection", List.TYPE_FORM);
|
||||||
@@ -146,8 +147,6 @@ public class SelectCollectionStep extends AbstractSubmissionStep
|
|||||||
|
|
||||||
Button submit = list.addItem().addButton("submit");
|
Button submit = list.addItem().addButton("submit");
|
||||||
submit.setValue(T_submit_next);
|
submit.setValue(T_submit_next);
|
||||||
|
|
||||||
div.addHidden("submission-continue").setValue(knot.getId());
|
|
||||||
}
|
}
|
||||||
catch (IdentifierException e)
|
catch (IdentifierException e)
|
||||||
{
|
{
|
||||||
|
@@ -186,7 +186,7 @@ public class UploadStep extends AbstractSubmissionStep
|
|||||||
// Get a list of all files in the original bundle
|
// Get a list of all files in the original bundle
|
||||||
Item item = submission.getItem();
|
Item item = submission.getItem();
|
||||||
Collection collection = submission.getCollection();
|
Collection collection = submission.getCollection();
|
||||||
String actionURL = IdentifierService.getURL(collection).toString() + "/submit";
|
String actionURL = IdentifierService.getURL(collection).toString() + "/submit/" + knot.getId() + ".continue";
|
||||||
boolean workflow = submission instanceof WorkflowItem;
|
boolean workflow = submission instanceof WorkflowItem;
|
||||||
Bundle[] bundles = item.getBundles("ORIGINAL");
|
Bundle[] bundles = item.getBundles("ORIGINAL");
|
||||||
Bitstream[] bitstreams = new Bitstream[0];
|
Bitstream[] bitstreams = new Bitstream[0];
|
||||||
@@ -324,9 +324,6 @@ public class UploadStep extends AbstractSubmissionStep
|
|||||||
// Part C:
|
// Part C:
|
||||||
// add standard control/paging buttons
|
// add standard control/paging buttons
|
||||||
addControlButtons(upload);
|
addControlButtons(upload);
|
||||||
|
|
||||||
div.addHidden("submission-continue").setValue(knot.getId());
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -109,22 +109,26 @@
|
|||||||
|
|
||||||
<!-- Start a new submission, unscoped -->
|
<!-- Start a new submission, unscoped -->
|
||||||
<map:match pattern="submit">
|
<map:match pattern="submit">
|
||||||
<map:match type="request" pattern="submission-continue">
|
|
||||||
<map:call continuation="{1}"/>
|
|
||||||
</map:match>
|
|
||||||
<map:call function="doSubmission"/>
|
<map:call function="doSubmission"/>
|
||||||
</map:match>
|
</map:match>
|
||||||
|
|
||||||
<!-- New Submission's flow -->
|
<!-- Continue creating a new submission, unscoped -->
|
||||||
|
<map:match pattern="submit/*.continue">
|
||||||
|
<map:call continuation="{1}"/>
|
||||||
|
</map:match>
|
||||||
|
|
||||||
|
<!-- Start a new submission to specific collection -->
|
||||||
<map:match pattern="resource/$/submit" type="IdentifierMatcher">
|
<map:match pattern="resource/$/submit" type="IdentifierMatcher">
|
||||||
<map:match type="request" pattern="submission-continue">
|
|
||||||
<map:call continuation="{1}"/>
|
|
||||||
</map:match>
|
|
||||||
<map:call function="doSubmission">
|
<map:call function="doSubmission">
|
||||||
<map:parameter name="handle" value="{1}"/>
|
<map:parameter name="handle" value="{1}"/>
|
||||||
</map:call>
|
</map:call>
|
||||||
</map:match>
|
</map:match>
|
||||||
|
|
||||||
|
<!-- Continue an existing submission-->
|
||||||
|
<map:match pattern="resource/$/submit/*.continue" type="IdentifierMatcher">
|
||||||
|
<map:call continuation="{2}"/>
|
||||||
|
</map:match>
|
||||||
|
|
||||||
<!-- Workflow task "flow" -->
|
<!-- Workflow task "flow" -->
|
||||||
<map:match pattern="resource/$/workflow" type="IdentifierMatcher">
|
<map:match pattern="resource/$/workflow" type="IdentifierMatcher">
|
||||||
<map:match type="request" pattern="submission-continue">
|
<map:match type="request" pattern="submission-continue">
|
||||||
|
@@ -273,20 +273,26 @@ function doSubmission()
|
|||||||
* workspaceID - the in progress submission's Workspace ID
|
* workspaceID - the in progress submission's Workspace ID
|
||||||
* stepAndPage - the Step and Page number to start on (e.g. "1.1")
|
* stepAndPage - the Step and Page number to start on (e.g. "1.1")
|
||||||
*/
|
*/
|
||||||
function submissionControl(collectionHandle, workspaceID, stepAndPage)
|
function submissionControl(collectionHandle, workspaceID, initStepAndPage)
|
||||||
{
|
{
|
||||||
//load initial submission information
|
//load initial submission information
|
||||||
var submissionInfo = getSubmissionInfo(workspaceID);
|
var submissionInfo = getSubmissionInfo(workspaceID);
|
||||||
|
|
||||||
var progressIterator = 0;
|
//Initialize a Cocoon Local Page to save current state information
|
||||||
|
//(This lets us handle when users click the browser "back button"
|
||||||
|
// by caching the state of that previous page, etc.)
|
||||||
|
var state = cocoon.createPageLocal();
|
||||||
|
state.progressIterator = 0; //initialize our progress indicator
|
||||||
|
|
||||||
//this is array of all the steps/pages in current submission process
|
//this is array of all the steps/pages in current submission process
|
||||||
//it's used to step back and forth between pages!
|
//it's used to step back and forth between pages!
|
||||||
var stepsInSubmission = getSubmissionSteps(submissionInfo);
|
var stepsInSubmission = getSubmissionSteps(submissionInfo);
|
||||||
|
|
||||||
//if we didn't have a page passed in, go to first page in process
|
//if we didn't have a page passed in, go to first page in process
|
||||||
if(stepAndPage==null)
|
if(initStepAndPage==null)
|
||||||
stepAndPage = stepsInSubmission[0];
|
state.stepAndPage = stepsInSubmission[0];
|
||||||
|
else
|
||||||
|
state.stepAndPage = initStepAndPage;
|
||||||
|
|
||||||
var response_flag = 0;
|
var response_flag = 0;
|
||||||
|
|
||||||
@@ -294,14 +300,14 @@ function submissionControl(collectionHandle, workspaceID, stepAndPage)
|
|||||||
// Loop forever, exit cases such as save, remove, or completed
|
// Loop forever, exit cases such as save, remove, or completed
|
||||||
// will call cocoon.exit() stopping execution.
|
// will call cocoon.exit() stopping execution.
|
||||||
|
|
||||||
cocoon.log.debug("Current step & page=" + stepAndPage, null);
|
cocoon.log.debug("Current step & page=" + state.stepAndPage, null);
|
||||||
cocoon.log.debug("Current ERROR Fields=" + getErrorFields(), null);
|
cocoon.log.debug("Current ERROR Fields=" + getErrorFields(), null);
|
||||||
|
|
||||||
//----------------------------------------------------------
|
//----------------------------------------------------------
|
||||||
// #1: Actually load the next page in the process
|
// #1: Actually load the next page in the process
|
||||||
//-----------------------------------------------------------
|
//-----------------------------------------------------------
|
||||||
//split out step and page (e.g. 1.2 is page 2 of step 1)
|
//split out step and page (e.g. 1.2 is page 2 of step 1)
|
||||||
var fields = String(stepAndPage).split(".");
|
var fields = String(state.stepAndPage).split(".");
|
||||||
var step = fields[0];
|
var step = fields[0];
|
||||||
var page = fields[1];
|
var page = fields[1];
|
||||||
|
|
||||||
@@ -313,7 +319,7 @@ function submissionControl(collectionHandle, workspaceID, stepAndPage)
|
|||||||
|
|
||||||
//Pass it all the info it needs, including any response/error flags
|
//Pass it all the info it needs, including any response/error flags
|
||||||
//in case an error occurred
|
//in case an error occurred
|
||||||
response_flag = doNextPage(collectionHandle, workspaceID, stepConfig, stepAndPage, response_flag);
|
response_flag = doNextPage(collectionHandle, workspaceID, stepConfig, state.stepAndPage, response_flag);
|
||||||
|
|
||||||
//----------------------------------------------------------
|
//----------------------------------------------------------
|
||||||
// #2: Determine which page/step the user should be sent to next
|
// #2: Determine which page/step the user should be sent to next
|
||||||
@@ -322,13 +328,13 @@ function submissionControl(collectionHandle, workspaceID, stepAndPage)
|
|||||||
// Only step forward to next page if no errors on this page
|
// Only step forward to next page if no errors on this page
|
||||||
if ((cocoon.request.get(AbstractProcessingStep.NEXT_BUTTON) || !stepHasUI(stepConfig)) && (response_flag==AbstractProcessingStep.STATUS_COMPLETE))
|
if ((cocoon.request.get(AbstractProcessingStep.NEXT_BUTTON) || !stepHasUI(stepConfig)) && (response_flag==AbstractProcessingStep.STATUS_COMPLETE))
|
||||||
{
|
{
|
||||||
progressIterator++;
|
state.progressIterator++;
|
||||||
|
|
||||||
var totalSteps = stepsInSubmission.length;
|
var totalSteps = stepsInSubmission.length;
|
||||||
var inWorkflow = submissionInfo.isInWorkflow();
|
var inWorkflow = submissionInfo.isInWorkflow();
|
||||||
|
|
||||||
//check if we've completed the submission
|
//check if we've completed the submission
|
||||||
if(progressIterator >= totalSteps)
|
if(state.progressIterator >= totalSteps)
|
||||||
{
|
{
|
||||||
if(inWorkflow==false)
|
if(inWorkflow==false)
|
||||||
{
|
{
|
||||||
@@ -344,8 +350,8 @@ function submissionControl(collectionHandle, workspaceID, stepAndPage)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
stepAndPage = stepsInSubmission[progressIterator];
|
state.stepAndPage = stepsInSubmission[state.progressIterator];
|
||||||
cocoon.log.debug("Next Step & Page=" + stepAndPage);
|
cocoon.log.debug("Next Step & Page=" + state.stepAndPage);
|
||||||
}
|
}
|
||||||
}//User clicked "<- Previous" button
|
}//User clicked "<- Previous" button
|
||||||
else if (cocoon.request.get(AbstractProcessingStep.PREVIOUS_BUTTON))
|
else if (cocoon.request.get(AbstractProcessingStep.PREVIOUS_BUTTON))
|
||||||
@@ -355,13 +361,13 @@ function submissionControl(collectionHandle, workspaceID, stepAndPage)
|
|||||||
//Need to find the previous step which HAS a user interface.
|
//Need to find the previous step which HAS a user interface.
|
||||||
while(stepBack)
|
while(stepBack)
|
||||||
{
|
{
|
||||||
progressIterator--;
|
state.progressIterator--;
|
||||||
if(progressIterator<0)
|
if(state.progressIterator<0)
|
||||||
stepBack = false;
|
stepBack = false;
|
||||||
|
|
||||||
stepAndPage = stepsInSubmission[progressIterator];
|
state.stepAndPage = stepsInSubmission[state.progressIterator];
|
||||||
|
|
||||||
var prevStep = String(stepAndPage).split(".")[0];
|
var prevStep = String(state.stepAndPage).split(".")[0];
|
||||||
var prevStepConfig = submissionInfo.getSubmissionConfig().getStep(prevStep);
|
var prevStepConfig = submissionInfo.getSubmissionConfig().getStep(prevStep);
|
||||||
|
|
||||||
if(!stepHasUI(prevStepConfig))
|
if(!stepHasUI(prevStepConfig))
|
||||||
@@ -370,7 +376,7 @@ function submissionControl(collectionHandle, workspaceID, stepAndPage)
|
|||||||
stepBack = false;
|
stepBack = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
cocoon.log.debug("Previous Step & Page=" + stepAndPage);
|
cocoon.log.debug("Previous Step & Page=" + state.stepAndPage);
|
||||||
}
|
}
|
||||||
// User clicked "Save/Cancel" Button
|
// User clicked "Save/Cancel" Button
|
||||||
else if (cocoon.request.get(AbstractProcessingStep.CANCEL_BUTTON))
|
else if (cocoon.request.get(AbstractProcessingStep.CANCEL_BUTTON))
|
||||||
@@ -399,16 +405,16 @@ function submissionControl(collectionHandle, workspaceID, stepAndPage)
|
|||||||
//only allow a jump to a page user has already been to
|
//only allow a jump to a page user has already been to
|
||||||
if (newStepAndPage >= 0 && newStepAndPage <= maxStepAndPage)
|
if (newStepAndPage >= 0 && newStepAndPage <= maxStepAndPage)
|
||||||
{
|
{
|
||||||
stepAndPage = newStepAndPage;
|
state.stepAndPage = newStepAndPage;
|
||||||
|
|
||||||
cocoon.log.debug("Jump To Step & Page=" + stepAndPage);
|
cocoon.log.debug("Jump To Step & Page=" + state.stepAndPage);
|
||||||
|
|
||||||
//reset progress iterator
|
//reset progress iterator
|
||||||
for(var i=0; i<stepsInSubmission.length; i++)
|
for(var i=0; i<stepsInSubmission.length; i++)
|
||||||
{
|
{
|
||||||
if(stepAndPage==stepsInSubmission[i])
|
if(state.stepAndPage==stepsInSubmission[i])
|
||||||
{
|
{
|
||||||
progressIterator = i;
|
state.progressIterator = i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user