]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
style(abide): add some spaces
authorDaniel Ruf <d.ruf@bitexpert.de>
Mon, 13 Jan 2020 09:04:51 +0000 (10:04 +0100)
committerDaniel Ruf <d.ruf@bitexpert.de>
Mon, 13 Jan 2020 09:04:51 +0000 (10:04 +0100)
js/foundation.abide.js

index 7fbd9df8d94cb20df82de3ccc04a7addb6877b9d..a1657ac8e14470c7b50384c2d47f97b6a02b6687 100644 (file)
@@ -123,7 +123,7 @@ class Abide extends Plugin {
   /**
    * Enables the whole validation
    */
-  enableValidation(){
+  enableValidation() {
     this.isEnabled = true;
   }
 
@@ -157,7 +157,7 @@ class Abide extends Plugin {
         break;
 
       default:
-        if(!$el.val() || !$el.val().length) isGood = false;
+        if (!$el.val() || !$el.val().length) isGood = false;
     }
 
     return isGood;
@@ -387,11 +387,11 @@ class Abide extends Plugin {
    */
   removeErrorClasses($el) {
     // radios need to clear all of the els
-    if($el[0].type == 'radio') {
+    if ($el[0].type == 'radio') {
       return this.removeRadioErrorClasses($el.attr('name'));
     }
     // checkboxes need to clear all of the els
-    else if($el[0].type == 'checkbox') {
+    else if ($el[0].type == 'checkbox') {
       return this.removeCheckboxErrorClasses($el.attr('name'));
     }
 
@@ -599,7 +599,7 @@ class Abide extends Plugin {
         required = true;
       }
     });
-    if(!required) valid=true;
+    if (!required) valid=true;
 
     if (!valid) {
       // For the group to be valid, at least one radio needs to be checked
@@ -630,7 +630,7 @@ class Abide extends Plugin {
         required = true;
       }
     });
-    if(!required) valid=true;
+    if (!required) valid=true;
 
     if (!valid) {
       // Count checked checkboxes within the group
@@ -876,4 +876,4 @@ Abide.defaults = {
   }
 }
 
-export {Abide};
+export { Abide };