浏览代码

Merge branch 'root-talis-develop' into develop

LostCrew 11 年之前
父节点
当前提交
08225f7398
共有 3 个文件被更改,包括 4 次插入0 次删除
  1. 3 0
      dist/js/bootstrap-switch.js
  2. 0 0
      dist/js/bootstrap-switch.min.js
  3. 1 0
      src/coffee/bootstrap-switch.coffee

+ 3 - 0
dist/js/bootstrap-switch.js

@@ -120,6 +120,9 @@
         if (this.options.disabled || this.options.readonly || this.options.indeterminate) {
           return this.$element;
         }
+        if (this.options.state && this.$element.is(':radio')) {
+          return this.$element;
+        }
         value = !!value;
         this.$element.prop("checked", value).trigger("change.bootstrapSwitch", skip);
         return this.$element;

文件差异内容过多而无法显示
+ 0 - 0
dist/js/bootstrap-switch.min.js


+ 1 - 0
src/coffee/bootstrap-switch.coffee

@@ -73,6 +73,7 @@ do ($ = window.jQuery, window) ->
     state: (value, skip) ->
       return @options.state if typeof value is "undefined"
       return @$element if @options.disabled or @options.readonly or @options.indeterminate
+      return @$element if @options.state and @$element.is ':radio'
 
       value = not not value
 

部分文件因为文件数量过多而无法显示