Skip to content

Commit

Permalink
Merge pull request #321 from joesondow/ASGARD-1165-submision-after-va…
Browse files Browse the repository at this point in the history
…lidation-failure

Rollback unsafe first try of ASGARD-1117 "Prevent double submission"
  • Loading branch information
joesondow committed Jun 17, 2013
2 parents fc5acca + e8d1b7d commit d8db3f8
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions web-app/js/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,24 +53,6 @@ jQuery.fn.extend({
});
},

// Prevent double submission of forms
// http://stackoverflow.com/questions/2830542/prevent-double-submission-of-forms-in-jquery
preventDoubleSubmission: function() {
jQuery(this).bind('submit', function(e) {
var jForm = jQuery(this);
if (jForm.data('submitted') === true) {
// Previously submitted - don't submit again
e.preventDefault();
} else {
// Mark it so that the next submit can be ignored
jForm.data('submitted', true);
}
});

// Keep chainability
return this;
},

// Changes the background to yellow then fades it away to nothing
yellowFade: function(millis) {
jQuery(this).effect("highlight", {}, millis || 1500);
Expand Down Expand Up @@ -610,9 +592,6 @@ jQuery(document).ready(function() {
return e.keyCode !== 13;
});

// Prevent accidental double form submission
jQuery('form:not(.js-allow-double-submission)').preventDoubleSubmission();

// Decorate the menu buttons that have drop down lists. Do the work that CSS3 isn't ready to do yet.
jQuery('.menuButton').has('ul').addClass('dropdown');

Expand Down

0 comments on commit d8db3f8

Please sign in to comment.