Index: lams_tool_larsrc/web/includes/javascript/rsrccommon.js
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_larsrc/web/includes/javascript/rsrccommon.js,v
diff -u -r1.3.4.1 -r1.3.4.2
--- lams_tool_larsrc/web/includes/javascript/rsrccommon.js 19 May 2016 04:22:36 -0000 1.3.4.1
+++ lams_tool_larsrc/web/includes/javascript/rsrccommon.js 6 Mar 2017 11:21:54 -0000 1.3.4.2
@@ -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
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_larsrc/web/includes/javascript/rsrcresourceitem.js,v
diff -u -r1.13.2.3 -r1.13.2.4
--- lams_tool_larsrc/web/includes/javascript/rsrcresourceitem.js 1 Mar 2017 00:29:02 -0000 1.13.2.3
+++ lams_tool_larsrc/web/includes/javascript/rsrcresourceitem.js 6 Mar 2017 11:21:54 -0000 1.13.2.4
@@ -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
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_larsrc/web/pages/authoring/basic.jsp,v
diff -u -r1.28.2.3 -r1.28.2.4
--- lams_tool_larsrc/web/pages/authoring/basic.jsp 20 Aug 2016 06:50:06 -0000 1.28.2.3
+++ lams_tool_larsrc/web/pages/authoring/basic.jsp 6 Mar 2017 11:21:54 -0000 1.28.2.4
@@ -4,14 +4,15 @@