Permalink
Browse files

Fixes #33: Javascript catching cancel submit

  • Loading branch information...
1 parent 62924bd commit 27bf4b372dca85dac8f3ca898d3f9d436ea3430b @philcali philcali committed May 25, 2012
Showing with 7 additions and 12 deletions.
  1. +2 −4 js/selection.coffee
  2. +5 −8 js/selection.js
View
@@ -1,6 +1,5 @@
# Written at Louisiana State University
-
$(document).ready () ->
potentials = "#from_users"
mailed = "#mail_users"
@@ -53,6 +52,5 @@ $(document).ready () ->
ids = $(mailed).children("*").map(mapper).get().join ','
- if ids == '' then false else
- $("input[name=mailto]").val(ids);
- true
+ $("input[name=mailto]").val(ids);
+ true
View
@@ -1,4 +1,5 @@
-(function() {
+(function(){
+ // Written at Louisiana State University
$(document).ready(function() {
var clear_selections, mailed, move, potentials, quickmail_changer, selectors;
potentials = "#from_users";
@@ -55,12 +56,8 @@
return $(elem).val().split(' ')[0];
};
ids = $(mailed).children("*").map(mapper).get().join(',');
- if (ids === '') {
- return false;
- } else {
- $("input[name=mailto]").val(ids);
- return true;
- }
+ $("input[name=mailto]").val(ids);
+ return true;
});
});
-}).call(this);
+})();

0 comments on commit 27bf4b3

Please sign in to comment.