Index: lams_tool_larsrc/web/includes/javascript/rsrccommon.js =================================================================== diff -u -rb3fe40cd67fc779a6eee8320fadc3a489565a557 -rafefa4ff09424c4462d405b7b8a6f75c8461e0c0 --- lams_tool_larsrc/web/includes/javascript/rsrccommon.js (.../rsrccommon.js) (revision b3fe40cd67fc779a6eee8320fadc3a489565a557) +++ lams_tool_larsrc/web/includes/javascript/rsrccommon.js (.../rsrccommon.js) (revision afefa4ff09424c4462d405b7b8a6f75c8461e0c0) @@ -9,4 +9,13 @@ if(div != null){ document.getElementById(targetDiv+"_Busy").style.display = 'none'; } - } \ No newline at end of file + } + function disableButtons() { + $('.btn-disable-on-submit').prop('disabled', true); + $("#saveCancelButtons .btn").prop('disabled', true); + } + function enableButtons() { + $('.btn-disable-on-submit').prop('disabled', false); + $("#saveCancelButtons .btn").prop('disabled', false); + } + Index: lams_tool_larsrc/web/includes/javascript/rsrcresourceitem.js =================================================================== diff -u -ra4bc09633e07b301174911591702607f522c7037 -rafefa4ff09424c4462d405b7b8a6f75c8461e0c0 --- lams_tool_larsrc/web/includes/javascript/rsrcresourceitem.js (.../rsrcresourceitem.js) (revision a4bc09633e07b301174911591702607f522c7037) +++ lams_tool_larsrc/web/includes/javascript/rsrcresourceitem.js (.../rsrcresourceitem.js) (revision afefa4ff09424c4462d405b7b8a6f75c8461e0c0) @@ -37,13 +37,15 @@ $('textarea').trigger('change'); var param = $("#instructionForm").serialize(); + disableButtons(); addInstructionLoading(); $.post( addInstructionUrl, param, function(xml) { $('#instructionArea').html(xml); + enableButtons(); } ); @@ -109,8 +111,8 @@ document.getElementById("instructionList").value = $("#instructionForm").serialize(); var formData = new FormData(document.getElementById("resourceItemForm")); + disableButtons(); showBusy(instructionTargetDiv); - // after submit, it direct to itemlist.jsp, // then refresh "basic tab" resource list and close this window. $.ajax({ // create an AJAX call... @@ -121,6 +123,9 @@ url: $("#resourceItemForm").attr('action'), success: function(data) { $('#resourceInputArea').html(data); + }, + complete: function() { + enableButtons(); } }); Index: lams_tool_larsrc/web/pages/authoring/basic.jsp =================================================================== diff -u -ref8d9a9e7303e6f5d108db3ac7f5413add6b66d2 -rafefa4ff09424c4462d405b7b8a6f75c8461e0c0 --- lams_tool_larsrc/web/pages/authoring/basic.jsp (.../basic.jsp) (revision ef8d9a9e7303e6f5d108db3ac7f5413add6b66d2) +++ lams_tool_larsrc/web/pages/authoring/basic.jsp (.../basic.jsp) (revision afefa4ff09424c4462d405b7b8a6f75c8461e0c0) @@ -4,14 +4,15 @@