Browse Source

fix reset textarea & validateAll

elclanrs 10 years ago
parent
commit
b4bf793e86
5 changed files with 8 additions and 118 deletions
  1. 0 110
      css/jquery.idealforms.css
  2. 4 4
      js/out/jquery.idealforms.js
  3. 0 0
      js/out/jquery.idealforms.min.js
  4. 3 3
      js/private.js
  5. 1 1
      js/public.js

File diff suppressed because it is too large
+ 0 - 110
css/jquery.idealforms.css


File diff suppressed because it is too large
+ 4 - 4
js/out/jquery.idealforms.js


File diff suppressed because it is too large
+ 0 - 0
js/out/jquery.idealforms.min.js


+ 3 - 3
js/private.js

@@ -20,7 +20,7 @@ module.exports = {
     this.addRules(this.opts.rules || {});
 
     this.$form.submit(function(e) {
-      self._validateAll();
+      self._validateAll(true);
       self.focusFirstInvalid();
       self.opts.onSubmit.call(self, self.getInvalid().length, e);
     });
@@ -204,8 +204,8 @@ module.exports = {
     return valid;
   },
 
-  _validateAll: function() {
+  _validateAll: function(handleStyle, handleError) {
     var self = this;
-    this.$inputs.each(function(){ self._validate(this, true); });
+    this.$inputs.each(function(){ self._validate(this, handleStyle, handleError); });
   }
 };

+ 1 - 1
js/public.js

@@ -52,7 +52,7 @@ module.exports = {
 
     if (name) $inputs = $inputs.filter('[name="'+ name +'"]');
 
-    $inputs.filter('input:not(:checkbox, :radio)').val('');
+    $inputs.filter('input:not(:checkbox, :radio), textarea').val('');
     $inputs.filter(':checkbox, :radio').prop('checked', false);
     $inputs.filter('select').find('option').prop('selected', function() {
       return this.defaultSelected;

Some files were not shown because too many files changed in this diff