Browse Source

Added `setTextLabel` and `setIconLabel` methods

Francesco Pontillo 11 năm trước cách đây
mục cha
commit
220c9c30d7
2 tập tin đã thay đổi với 3 bổ sung3 xóa
  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>')

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
static/js/bootstrap-switch.min.js


Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác