فهرست منبع

Form reset improvement, now restoring to the original checkbox state instead of setting it to false.

Carlos Guimarães 11 سال پیش
والد
کامیت
a209920dad
3فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 1 1
      dist/js/bootstrap-switch.js
  2. 0 0
      dist/js/bootstrap-switch.min.js
  3. 1 1
      src/coffee/bootstrap-switch.coffee

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

@@ -418,7 +418,7 @@
             return $form.find("input").filter(function() {
               return $(this).data("bootstrap-switch");
             }).each(function() {
-              return $(this).bootstrapSwitch("state", false);
+              return $(this).bootstrapSwitch("state", this.checked);
             });
           }, 1);
         }).data("bootstrap-switch", true);

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/js/bootstrap-switch.min.js


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

@@ -310,7 +310,7 @@ do ($ = window.jQuery, window) ->
           $form
           .find("input")
           .filter( -> $(@).data "bootstrap-switch")
-          .each -> $(@).bootstrapSwitch "state", false
+          .each -> $(@).bootstrapSwitch "state", @checked
         , 1
       .data "bootstrap-switch", true
 

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است