Parcourir la source

Added `setTextLabel` and `setIconLabel` methods

Francesco Pontillo il y a 11 ans
Parent
commit
220c9c30d7
2 fichiers modifiés avec 3 ajouts et 3 suppressions
  1. 2 2
      static/js/bootstrap-switch.js
  2. 1 1
      static/js/bootstrap-switch.min.js

+ 2 - 2
static/js/bootstrap-switch.js

@@ -42,7 +42,7 @@
 
             $element.addClass('has-switch');
 
-            if ($element.data('on') !== undefined)
+            if ($element.data('on'))
               color = "switch-" + $element.data('on');
 
             if ($element.data('on-label') !== undefined)
@@ -64,7 +64,7 @@
               .html(onLabel);
 
             color = '';
-            if ($element.data('off') !== undefined)
+            if ($element.data('off'))
               color = "switch-" + $element.data('off');
 
             $switchRight = $('<span>')

Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
static/js/bootstrap-switch.min.js


Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff