Index: lams_tool_larsrc/web/pages/learning/learning.jsp =================================================================== diff -u -r33c08844653d1db1980b7a57cd4d22f28e948167 -r7ed5fbd3fe8ae436e1a4376f59cd23392a6f389f --- lams_tool_larsrc/web/pages/learning/learning.jsp (.../learning.jsp) (revision 33c08844653d1db1980b7a57cd4d22f28e948167) +++ lams_tool_larsrc/web/pages/learning/learning.jsp (.../learning.jsp) (revision 7ed5fbd3fe8ae436e1a4376f59cd23392a6f389f) @@ -32,8 +32,8 @@ }); function submitResourceForm() { - debugger; if ( $(this).valid() ) { + $('.btn-disable-on-submit').prop('disabled', true); var formData = new FormData(this); $.ajax({ // create an AJAX call... data: formData, @@ -43,14 +43,13 @@ url: $(this).attr('action'), // the file to call success: function (response) { $('#addresource').html(response); - if ( itemType == 1) - setFormURL(); - else if ( itemType == 2) - setFormFile(); }, error: function (jqXHR, textStatus, errorThrown ) { alert(textStatus+": "+errorThrown); }, + complete: function(response) { + $('.btn-disable-on-submit').prop('disabled', false); + } }); } return false; @@ -84,6 +83,7 @@ $("#sessionMapID").val("${sessionMapID}"); } function cancel(){ + $('.btn-disable-on-submit').prop('disabled', false); $("#addresource").html(''); } @@ -97,11 +97,12 @@ launchPopup(myUrl,"LearnerView"); } function finishSession(){ - document.getElementById("finishButton").disabled = true; + $('.btn-disable-on-submit').prop('disabled', true); document.location.href =''; return false; } function continueReflect(){ + $('.btn-disable-on-submit').prop('disabled', true); document.location.href=''; } @@ -242,7 +243,7 @@ - + @@ -256,13 +257,13 @@ + onclick="return continueReflect()" styleClass="btn btn-default voffset5 pull-right btn-disable-on-submit"> - +