diff --git a/src/main/java/edu/iu/uits/lms/crosslist/controller/CrosslistController.java b/src/main/java/edu/iu/uits/lms/crosslist/controller/CrosslistController.java index a4e914a..a175bd9 100644 --- a/src/main/java/edu/iu/uits/lms/crosslist/controller/CrosslistController.java +++ b/src/main/java/edu/iu/uits/lms/crosslist/controller/CrosslistController.java @@ -542,25 +542,31 @@ public String doSubmitConfirmation(@PathVariable("courseId") String courseId, Mo if (hasErrors || hasSuccesses) { SubmissionStatus status = new SubmissionStatus(); + String titleKey = null; String messageKey = null; String pageTitle = ""; if (hasSuccesses && !hasErrors) { status.setStatusClass(CrosslistConstants.STATUS_SUCCESS); - messageKey = "status.success"; + titleKey = "status.success.title"; + messageKey = "status.success.msg"; pageTitle = "Success - Cross-listing Assistant"; } else if (hasSuccesses) { status.setStatusClass(CrosslistConstants.STATUS_PARTIAL); - messageKey = "status.partial"; + titleKey = "status.partial.title"; + messageKey = "status.partial.msg"; pageTitle = "Some sites cross-listed - Cross-listing Assistant"; } else { status.setStatusClass(CrosslistConstants.STATUS_FAILED); - messageKey = "status.error"; + titleKey = "status.error.title"; + messageKey = "status.error.msg"; pageTitle = "Error has occurred - Cross-listing Assistant"; } String statusMessage = messageSource.getMessage(messageKey, null, Locale.getDefault()); + String statusTitle = messageSource.getMessage(titleKey, null, Locale.getDefault()); status.setStatusMessage(statusMessage); + status.setStatusTitle(statusTitle); model.addAttribute("submissionStatus", status); // Page title diff --git a/src/main/java/edu/iu/uits/lms/crosslist/model/SubmissionStatus.java b/src/main/java/edu/iu/uits/lms/crosslist/model/SubmissionStatus.java index ad6cfbb..0ef6d8b 100644 --- a/src/main/java/edu/iu/uits/lms/crosslist/model/SubmissionStatus.java +++ b/src/main/java/edu/iu/uits/lms/crosslist/model/SubmissionStatus.java @@ -42,4 +42,5 @@ public class SubmissionStatus { private String statusClass; private String statusMessage; + private String statusTitle; } diff --git a/src/main/resources/crosslist.properties b/src/main/resources/crosslist.properties index f64e10e..e0712d2 100644 --- a/src/main/resources/crosslist.properties +++ b/src/main/resources/crosslist.properties @@ -30,7 +30,10 @@ # OF THE POSSIBILITY OF SUCH DAMAGE. # #L% ### -status.error=Error: Your cross-listing changes failed. See below for the current list of sections in this course, and try your changes again. -status.partial=Alert: Some of your cross-listing changes were not successful. See below for the current list of sections in this course. To make additional changes, try again. -status.success=Success: Your cross-listing changes were successful! +status.error.title=Error +status.error.msg=Your cross-listing changes failed. See below for the current list of sections in this course, and try your changes again. +status.partial.title=Alert +status.partial.msg=Some of your cross-listing changes were not successful. See below for the current list of sections in this course. To make additional changes, try again. +status.success.title=Success +status.success.msg=Your cross-listing changes were successful! etext.message=An IU eTexts order is associated with the original section in this course. Before taking any action, make sure the same materials were ordered for all the sections you wish to cross-list. diff --git a/src/main/resources/static/js/crosslisting.js b/src/main/resources/static/js/crosslisting.js index 9cc05b0..4a3b680 100644 --- a/src/main/resources/static/js/crosslisting.js +++ b/src/main/resources/static/js/crosslisting.js @@ -98,15 +98,6 @@ $(document).ready(function(){ // this will prevent forms from submitting twice $('form').preventDoubleSubmission(); - $(function(){ - if ($("#alert").length) { - $("#alert").focus(); - } - if ($("#focusText").length) { - $("#focusText").focus(); - } - }); - $('#addTerm').on('change', function() { var obj = $(this); var urlBase = obj.data('urlbase'); diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index ad5bd3d..bd5c3b4 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -44,11 +44,11 @@
Check the sections you wish to add (cross-list) and uncheck the sections you wish to remove (de-cross-list).