Bläddra i källkod

revert of switchChange event triggered only on falsy skip

Emanuele Marchi 10 år sedan
förälder
incheckning
b7e9c8518f

+ 1 - 1
dist/js/bootstrap-switch.js

@@ -493,8 +493,8 @@
                 if (_this.$element.is(":radio")) {
                   $("[name='" + (_this.$element.attr('name')) + "']").not(_this.$element).prop("checked", false).trigger("change.bootstrapSwitch", true);
                 }
+                return _this.$element.trigger("switchChange.bootstrapSwitch", [state]);
               }
-              return _this.$element.trigger("switchChange.bootstrapSwitch", [state]);
             };
           })(this),
           "focus.bootstrapSwitch": (function(_this) {

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
dist/js/bootstrap-switch.min.js


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

@@ -369,7 +369,7 @@ do ($ = window.jQuery, window) ->
               .prop("checked", false)
               .trigger "change.bootstrapSwitch", true
 
-          @$element.trigger "switchChange.bootstrapSwitch", [state]
+            @$element.trigger "switchChange.bootstrapSwitch", [state]
 
         "focus.bootstrapSwitch": (e) =>
           e.preventDefault()

+ 1 - 1
test/bootstrap-switch.js

@@ -493,8 +493,8 @@
                 if (_this.$element.is(":radio")) {
                   $("[name='" + (_this.$element.attr('name')) + "']").not(_this.$element).prop("checked", false).trigger("change.bootstrapSwitch", true);
                 }
+                return _this.$element.trigger("switchChange.bootstrapSwitch", [state]);
               }
-              return _this.$element.trigger("switchChange.bootstrapSwitch", [state]);
             };
           })(this),
           "focus.bootstrapSwitch": (function(_this) {

Vissa filer visades inte eftersom för många filer har ändrats