소스 검색

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
 

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.