Index: lams_central/web/authoring/authoring.jsp =================================================================== diff -u -rc273aea6f908193080903efb968a837967282832 -r30a950cbc2f449d2f3ab2e7e16b2423703f4b7f8 --- lams_central/web/authoring/authoring.jsp (.../authoring.jsp) (revision c273aea6f908193080903efb968a837967282832) +++ lams_central/web/authoring/authoring.jsp (.../authoring.jsp) (revision 30a950cbc2f449d2f3ab2e7e16b2423703f4b7f8) @@ -580,12 +580,14 @@ - - Index: lams_central/web/includes/javascript/authoring/authoringGeneral.js =================================================================== diff -u -re93902daebd26642320182c15a0c9812b75c957d -r30a950cbc2f449d2f3ab2e7e16b2423703f4b7f8 --- lams_central/web/includes/javascript/authoring/authoringGeneral.js (.../authoringGeneral.js) (revision e93902daebd26642320182c15a0c9812b75c957d) +++ lams_central/web/includes/javascript/authoring/authoringGeneral.js (.../authoringGeneral.js) (revision 30a950cbc2f449d2f3ab2e7e16b2423703f4b7f8) @@ -542,6 +542,7 @@ $('#ldStoreDialogSaveButton', ldStoreDialogContents).click(function(){ var dialog = layout.ldStoreDialog, + saveButton = $('#ldStoreDialogSaveButton', dialog), title = $('#ldStoreDialogNameContainer input', dialog).val().trim(); if (!title) { alert(LABELS.SAVE_SEQUENCE_TITLE_PROMPT); @@ -552,7 +553,7 @@ alert(LABELS.TITLE_VALIDATION_ERROR); return; } - + saveButton.prop('disabled', true).button('loading'); var folderNode = null, folderID = null, tree = dialog.data('ldTree'), @@ -562,6 +563,7 @@ folderNode = node.data.learningDesignId ? node.parent : node; if (!folderNode.data.canSave) { alert(LABELS.FOLDER_CAN_NOT_SAVE_ERROR); + saveButton.button('reset'); return; } folderID = folderNode.data.folderID; @@ -578,6 +580,7 @@ if (!folderID) { // although an existing sequence can be highlighted alert(LABELS.FOLDER_NOT_SELECTED_ERROR); + saveButton.button('reset'); return; } @@ -596,9 +599,11 @@ } if (nodeData && (!nodeData.canModify || (!canSetReadOnly && nodeData.readOnly))){ alert(LABELS.READONLY_FORBIDDEN_ERROR); + saveButton.button('reset'); return; } if (nodeData && !confirm(LABELS.SEQUENCE_OVERWRITE_CONFIRM)) { + saveButton.button('reset'); return; } var readOnly = (nodeData && !nodeData.canModify) || @@ -609,14 +614,17 @@ GeneralLib.openLearningDesign(); dialog.modal('hide'); } + saveButton.button('reset'); }); $('#ldStoreDialogOpenButton', ldStoreDialogContents).click(function(){ var dialog = layout.ldStoreDialog, + openButton = $('#ldStoreDialogOpenButton', dialog), tree = dialog.data('ldTree'), ldNode = tree.getHighlightedNode(), learningDesignID = ldNode ? ldNode.data.learningDesignId : null; - + + openButton.button('loading'); if (!learningDesignID) { learningDesignID = +$('#ldStoreDialogAccessDiv > div.selected', dialog) .data('learningDesignId'); @@ -625,9 +633,11 @@ // no LD was chosen if (!learningDesignID) { alert(LABELS.SEQUENCE_NOT_SELECTED_ERROR); + openButton.button('reset'); return; } + openButton.button('reset'); dialog.modal('hide'); GeneralLib.openLearningDesign(learningDesignID); }); Index: lams_central/web/toolcontent/import.jsp =================================================================== diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -r30a950cbc2f449d2f3ab2e7e16b2423703f4b7f8 --- lams_central/web/toolcontent/import.jsp (.../import.jsp) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80) +++ lams_central/web/toolcontent/import.jsp (.../import.jsp) (revision 30a950cbc2f449d2f3ab2e7e16b2423703f4b7f8) @@ -16,6 +16,7 @@ +