소스 검색

fix(wrapper): incorporate setter and getter in one method to rule them all

One Method to find them,
One Method to bring them all and in the darkness bind them
In the Land of Mordor where the Shadows lie.
Francesco Pontillo 11 년 전
부모
커밋
d40525f0cf
4개의 변경된 파일7개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      .gitignore
  2. 3 0
      dist/js/bootstrap-switch.js
  3. 0 0
      dist/js/bootstrap-switch.min.js
  4. 2 0
      src/coffee/bootstrap-switch.coffee

+ 2 - 0
.gitignore

@@ -1,3 +1,5 @@
 .grunt
 node_modules
 components
+.idea/
+bower_components/

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

@@ -268,6 +268,9 @@
         if (typeof value === "undefined") {
           return this.options.wrapperClass;
         }
+        if (!value) {
+          value = $.fn.bootstrapSwitch.defaults.wrapperClass;
+        }
         getClasses = (function(_this) {
           return function(classes) {
             var c, cls, _i, _len;

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/js/bootstrap-switch.min.js


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

@@ -189,6 +189,8 @@ do ($ = window.jQuery, window) ->
     wrapperClass: (value) ->
       return @options.wrapperClass if typeof value is "undefined"
 
+      value = $.fn.bootstrapSwitch.defaults.wrapperClass if !value
+
       getClasses = (classes) =>
         unless $.isArray classes
           return "#{@options.baseClass}-#{classes}"

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