瀏覽代碼

Merge branch 'develop' of github.com:nostalgiaz/bootstrap-switch into develop

Emanuele Marchi 11 年之前
父節點
當前提交
07d001f558
共有 3 個文件被更改,包括 10 次插入0 次删除
  1. 6 0
      dist/js/bootstrap-switch.js
  2. 0 0
      dist/js/bootstrap-switch.min.js
  3. 4 0
      src/coffee/bootstrap-switch.coffee

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

@@ -427,6 +427,12 @@
             return function(e) {
               return _this.$label.trigger("mouseup.bootstrapSwitch");
             };
+          })(this),
+          "click.bootstrapSwitch": (function(_this) {
+            return function(e) {
+              _this.toggleState();
+              return _this.$element.trigger('focus.bootstrapSwitch');
+            };
           })(this)
         });
       };

文件差異過大導致無法顯示
+ 0 - 0
dist/js/bootstrap-switch.min.js


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

@@ -324,6 +324,10 @@ do ($ = window.jQuery, window) ->
 
         "mouseleave.bootstrapSwitch": (e) =>
           @$label.trigger "mouseup.bootstrapSwitch"
+        
+        "click.bootstrapSwitch": (e) =>
+          @toggleState()
+          @$element.trigger 'focus.bootstrapSwitch'
 
     _formHandler: ->
       $form = @$element.closest "form"

部分文件因文件數量過多而無法顯示