Index: lams_central/web/comments/edit.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/comments/edit.jsp,v diff -u -r1.2.2.4 -r1.2.2.5 --- lams_central/web/comments/edit.jsp 23 Feb 2016 14:23:03 -0000 1.2.2.4 +++ lams_central/web/comments/edit.jsp 20 Apr 2016 02:58:10 -0000 1.2.2.5 @@ -26,9 +26,16 @@ $('#editForm').submit(function() { // catch the form's submit event editCommentSubmit() } ); - + function editCommentSubmit() { + var btnName = "editCommentSubmitButton"; + if ( isDisabled(btnName) ) { + return false; + } + + disableButton(btnName); + var theForm = $(editForm); if ( validateBodyText($('#editFormBody').val(), <%=CommentConstants.MAX_BODY_LENGTH%>, "") ) { @@ -48,6 +55,9 @@ reloadThread(response,'','',''); }); } // end validateBodyText + else { + enableButton(btnName); + } return false; }; @@ -64,7 +74,7 @@
- +   Index: lams_central/web/comments/new.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/comments/new.jsp,v diff -u -r1.4.2.4 -r1.4.2.5 --- lams_central/web/comments/new.jsp 23 Feb 2016 14:23:03 -0000 1.4.2.4 +++ lams_central/web/comments/new.jsp 20 Apr 2016 02:58:10 -0000 1.4.2.5 @@ -11,9 +11,16 @@ }); }); + var btnName = "newCommentSubmitButton"; + function newCommentSubmit() { + if ( isDisabled(btnName) ) { + return false; + } + var theForm = $(newForm); + disableButton(btnName); if (validateBodyText($('#newFormBody').val(), <%=CommentConstants.MAX_BODY_LENGTH%>,"")) { @@ -56,17 +63,22 @@ clearNewForm(); } else if (response.errMessage) { alert(response.errMessage); + enableButton(btnName); } else { alert(''); } }); } // end validateBodyText + else { + enableButton(btnName); + } return false; } function clearNewForm() { $('#newFormBody').val(''); + enableButton(btnName); return false; } @@ -93,9 +105,9 @@ href="javascript:refreshComments();" style="margin: 5px" class="btn btn-primary btn-xs"> - - + + Index: lams_central/web/comments/reply.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/comments/reply.jsp,v diff -u -r1.2.2.4 -r1.2.2.5 --- lams_central/web/comments/reply.jsp 23 Feb 2016 14:23:03 -0000 1.2.2.4 +++ lams_central/web/comments/reply.jsp 20 Apr 2016 02:58:10 -0000 1.2.2.5 @@ -26,6 +26,14 @@ }); function replyFormSubmit() { + + var btnName = "replyCommentSubmitButton"; + if ( isDisabled(btnName) ) { + return false; + } + + disableButton(btnName); + var theForm = $(replyForm); if (validateBodyText($('#replyFormBody').val(), <%=CommentConstants.MAX_BODY_LENGTH%> @@ -56,6 +64,9 @@ ''); }); } // end validateBodyText + else { + enableButton(btnName); + } return false; } @@ -76,7 +87,7 @@