Explorar el Código

Added `setTextLabel` and `setIconLabel` methods

Francesco Pontillo hace 11 años
padre
commit
712d610b90
Se han modificado 2 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      static/js/bootstrap-switch.js
  2. 0 0
      static/js/bootstrap-switch.min.js

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

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

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
static/js/bootstrap-switch.min.js


Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio