Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

gallery-2014.03.12-23-08 mschipperheyn gallery-msa-checkbox

  • Loading branch information...
commit d99c2af41233acd3e1b16075a806c74db673b554 1 parent da4afcc
Ezequiel Rodriguez authored
Showing with 1,233 additions and 0 deletions.
  1. +49 −0 build/gallery-msa-checkbox/assets/gallery-msa-checkbox-core.css
  2. +42 −0 build/gallery-msa-checkbox/assets/skins/android/gallery-msa-checkbox-skin.css
  3. +1 −0  build/gallery-msa-checkbox/assets/skins/android/gallery-msa-checkbox.css
  4. +37 −0 build/gallery-msa-checkbox/assets/skins/ios/gallery-msa-checkbox-skin.css
  5. +1 −0  build/gallery-msa-checkbox/assets/skins/ios/gallery-msa-checkbox.css
  6. +49 −0 build/gallery-msa-checkbox/assets/skins/sam/gallery-msa-checkbox-skin.css
  7. +1 −0  build/gallery-msa-checkbox/assets/skins/sam/gallery-msa-checkbox.css
  8. +6 −0 build/gallery-msa-checkbox/gallery-msa-checkbox-coverage.js
  9. +172 −0 build/gallery-msa-checkbox/gallery-msa-checkbox-debug.js
  10. +1 −0  build/gallery-msa-checkbox/gallery-msa-checkbox-min.js
  11. +169 −0 build/gallery-msa-checkbox/gallery-msa-checkbox.js
  12. +20 −0 src/gallery-msa-checkbox/LICENSE
  13. +37 −0 src/gallery-msa-checkbox/README.md
  14. +49 −0 src/gallery-msa-checkbox/assets/gallery-msa-checkbox-core.css
  15. +42 −0 src/gallery-msa-checkbox/assets/skins/android/gallery-msa-checkbox-skin.css
  16. +37 −0 src/gallery-msa-checkbox/assets/skins/ios/gallery-msa-checkbox-skin.css
  17. +49 −0 src/gallery-msa-checkbox/assets/skins/sam/gallery-msa-checkbox-skin.css
  18. +28 −0 src/gallery-msa-checkbox/build.json
  19. +29 −0 src/gallery-msa-checkbox/build.properties
  20. +7 −0 src/gallery-msa-checkbox/build.xml
  21. +153 −0 src/gallery-msa-checkbox/js/gallery-msa-checkbox.js
  22. +4 −0 src/gallery-msa-checkbox/logs/yogi.stderr.log
  23. +195 −0 src/gallery-msa-checkbox/logs/yogi.stdout.log
  24. +55 −0 src/gallery-msa-checkbox/test.html
View
49 build/gallery-msa-checkbox/assets/gallery-msa-checkbox-core.css
@@ -0,0 +1,49 @@
+.toggle-hidden{
+ position:absolute;
+ opacity:0;
+}
+.toggle,
+.toggle-handle{
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+.toggle {
+ font:300 14px/1.5 "Open Sans",sans-serif;
+ display: block;
+ position: relative;
+ width: 58px;
+ height: 30px;
+ background-color: #fff;
+ border: 2px solid #ddd;
+ border-radius: 20px;
+ -webkit-transition-property: background-color, border;
+ -moz-transition-property: background-color, border;
+ transition-property: background-color, border;
+ -webkit-transition-duration: 0.2s;
+ -moz-transition-duration: 0.2s;
+ transition-duration: 0.2s;
+}
+.toggle .toggle-handle {
+ position: absolute;
+ top: -1px;
+ left: -1px;
+ z-index: 2;
+ width: 28px;
+ height: 28px;
+ background-color: #fff;
+ border: 1px solid #ddd;
+ border-radius: 100px;
+ -webkit-transition-property: -webkit-transform, border, width;
+ -moz-transition-property: -moz-transform, border, width;
+ transition-property: transform, border, width;
+ -webkit-transition-duration: 0.2s;
+ -moz-transition-duration: 0.2s;
+ transition-duration: 0.2s;
+}
+.toggle.active .toggle-handle {
+ -webkit-transform: translate3d(28px, 0, 0);
+ -ms-transform: translate3d(28px, 0, 0);
+ transform: translate3d(28px, 0, 0);
+}
+
View
42 build/gallery-msa-checkbox/assets/skins/android/gallery-msa-checkbox-skin.css
@@ -0,0 +1,42 @@
+.toggle {
+ width: 104px;
+ height: 28px;
+ border: 2px solid #d7d7d7;
+ border-radius: 0;
+ background-color: #d7d7d7;
+}
+.toggle .toggle-handle {
+ top: 0;
+ left: 0;
+ width: 50px;
+ height: 24px;
+ border: 1px solid #b5b5b5;
+ border-radius: 2px;
+ background-color: #bebebe;
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+}
+.toggle:before {
+ top: 1px;
+ right: auto;
+ left: 11px;
+ z-index: 3;
+ color: #fff;
+}
+.toggle.active {
+ border: 2px solid #d7d7d7;
+ background-color: #d7d7d7;
+}
+.toggle.active .toggle-handle {
+ margin-right: 2px;
+ background-color: #33b5e5;
+ border-color: #33b5e5;
+ -webkit-transform: translate3d(50px, 0, 0);
+ -ms-transform: translate3d(50px, 0, 0);
+ transform: translate3d(50px, 0, 0);
+}
+.toggle.active:before {
+ left: auto;
+ right: 14px;
+ color: #fff;
+}
View
1  build/gallery-msa-checkbox/assets/skins/android/gallery-msa-checkbox.css
@@ -0,0 +1 @@
+.toggle-hidden{position:absolute;opacity:0}.toggle,.toggle-handle{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.toggle{font:300 14px/1.5 "Open Sans",sans-serif;display:block;position:relative;width:58px;height:30px;background-color:#fff;border:2px solid #ddd;border-radius:20px;-webkit-transition-property:background-color,border;-moz-transition-property:background-color,border;transition-property:background-color,border;-webkit-transition-duration:.2s;-moz-transition-duration:.2s;transition-duration:.2s}.toggle .toggle-handle{position:absolute;top:-1px;left:-1px;z-index:2;width:28px;height:28px;background-color:#fff;border:1px solid #ddd;border-radius:100px;-webkit-transition-property:-webkit-transform,border,width;-moz-transition-property:-moz-transform,border,width;transition-property:transform,border,width;-webkit-transition-duration:.2s;-moz-transition-duration:.2s;transition-duration:.2s}.toggle.active .toggle-handle{-webkit-transform:translate3d(28px,0,0);-ms-transform:translate3d(28px,0,0);transform:translate3d(28px,0,0)}.toggle{width:104px;height:28px;border:2px solid #d7d7d7;border-radius:0;background-color:#d7d7d7}.toggle .toggle-handle{top:0;left:0;width:50px;height:24px;border:1px solid #b5b5b5;border-radius:2px;background-color:#bebebe;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.3),inset 0 -1px 0 rgba(0,0,0,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.3),inset 0 -1px 0 rgba(0,0,0,0.1)}.toggle:before{top:1px;right:auto;left:11px;z-index:3;color:#fff}.toggle.active{border:2px solid #d7d7d7;background-color:#d7d7d7}.toggle.active .toggle-handle{margin-right:2px;background-color:#33b5e5;border-color:#33b5e5;-webkit-transform:translate3d(50px,0,0);-ms-transform:translate3d(50px,0,0);transform:translate3d(50px,0,0)}.toggle.active:before{left:auto;right:14px;color:#fff}#yui3-css-stamp.skin-android-gallery-msa-checkbox{display:none}
View
37 build/gallery-msa-checkbox/assets/skins/ios/gallery-msa-checkbox-skin.css
@@ -0,0 +1,37 @@
+.toggle {
+ width: 47px;
+ border: 2px solid #e6e6e6;
+ -webkit-box-shadow: inset 0 0 0 0 #e1e1e1;
+ box-shadow: inset 0 0 0 0 #e1e1e1;
+ -webkit-transition-property: box-shadow, border;
+ -moz-transition-property: box-shadow, border;
+ transition-property: box-shadow, border;
+ -webkit-transition-duration: 0.2s;
+ -moz-transition-duration: 0.2s;
+ transition-duration: 0.2s;
+}
+.toggle .toggle-handle {
+ border: 1px solid rgba(0, 0, 0, 0.2);
+ -webkit-transition-property: -webkit-transform, border, width;
+ -moz-transition-property: -moz-transform, border, width;
+ transition-property: transform, border, width;
+ -webkit-box-shadow: 0 3px 3px rgba(0, 0, 0, 0.08);
+ box-shadow: 0 3px 3px rgba(0, 0, 0, 0.08);
+}
+.toggle:before {
+ display: none;
+}
+.toggle.active {
+ border: 2px solid #4cd964;
+ background-color: transparent;
+ -webkit-box-shadow: inset 0 0 0 13px #4cd964;
+ box-shadow: inset 0 0 0 13px #4cd964;
+}
+.toggle.active .toggle-handle {
+ -webkit-transform: translate3d(17px, 0, 0);
+ -ms-transform: translate3d(17px, 0, 0);
+ transform: translate3d(17px, 0, 0);
+}
+.toggle.active .toggle-handle {
+ border-color: #4cd964;
+}
View
1  build/gallery-msa-checkbox/assets/skins/ios/gallery-msa-checkbox.css
@@ -0,0 +1 @@
+.toggle-hidden{position:absolute;opacity:0}.toggle,.toggle-handle{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.toggle{font:300 14px/1.5 "Open Sans",sans-serif;display:block;position:relative;width:58px;height:30px;background-color:#fff;border:2px solid #ddd;border-radius:20px;-webkit-transition-property:background-color,border;-moz-transition-property:background-color,border;transition-property:background-color,border;-webkit-transition-duration:.2s;-moz-transition-duration:.2s;transition-duration:.2s}.toggle .toggle-handle{position:absolute;top:-1px;left:-1px;z-index:2;width:28px;height:28px;background-color:#fff;border:1px solid #ddd;border-radius:100px;-webkit-transition-property:-webkit-transform,border,width;-moz-transition-property:-moz-transform,border,width;transition-property:transform,border,width;-webkit-transition-duration:.2s;-moz-transition-duration:.2s;transition-duration:.2s}.toggle.active .toggle-handle{-webkit-transform:translate3d(28px,0,0);-ms-transform:translate3d(28px,0,0);transform:translate3d(28px,0,0)}.toggle{width:47px;border:2px solid #e6e6e6;-webkit-box-shadow:inset 0 0 0 0 #e1e1e1;box-shadow:inset 0 0 0 0 #e1e1e1;-webkit-transition-property:box-shadow,border;-moz-transition-property:box-shadow,border;transition-property:box-shadow,border;-webkit-transition-duration:.2s;-moz-transition-duration:.2s;transition-duration:.2s}.toggle .toggle-handle{border:1px solid rgba(0,0,0,0.2);-webkit-transition-property:-webkit-transform,border,width;-moz-transition-property:-moz-transform,border,width;transition-property:transform,border,width;-webkit-box-shadow:0 3px 3px rgba(0,0,0,0.08);box-shadow:0 3px 3px rgba(0,0,0,0.08)}.toggle:before{display:none}.toggle.active{border:2px solid #4cd964;background-color:transparent;-webkit-box-shadow:inset 0 0 0 13px #4cd964;box-shadow:inset 0 0 0 13px #4cd964}.toggle.active .toggle-handle{-webkit-transform:translate3d(17px,0,0);-ms-transform:translate3d(17px,0,0);transform:translate3d(17px,0,0)}.toggle.active .toggle-handle{border-color:#4cd964}#yui3-css-stamp.skin-ios-gallery-msa-checkbox{display:none}
View
49 build/gallery-msa-checkbox/assets/skins/sam/gallery-msa-checkbox-skin.css
@@ -0,0 +1,49 @@
+ .toggle {
+ width: 58px;
+ border: 2px solid #e6e6e6;
+ -webkit-box-shadow: inset 0 0 0 0 #e1e1e1;
+ box-shadow: inset 0 0 0 0 #e1e1e1;
+ -webkit-transition-property: box-shadow, border;
+ -moz-transition-property: box-shadow, border;
+ transition-property: box-shadow, border;
+ -webkit-transition-duration: 0.2s;
+ -moz-transition-duration: 0.2s;
+ transition-duration: 0.2s;
+}
+.toggle .toggle-handle {
+ border: 1px solid rgba(0, 0, 0, 0.2);
+ -webkit-transition-property: -webkit-transform, border, width;
+ -moz-transition-property: -moz-transform, border, width;
+ transition-property: transform, border, width;
+ -webkit-box-shadow: 0 3px 3px rgba(0, 0, 0, 0.08);
+ box-shadow: 0 3px 3px rgba(0, 0, 0, 0.08);
+}
+.toggle:before {
+ position: absolute;
+ top: 3px;
+ right: 11px;
+ color: #999;
+ font-size: 13px;
+ content: "O";
+}
+.toggle.active {
+ border: 2px solid #60a683;
+ background-color: #60a683;
+
+ -webkit-box-shadow: inset 0 0 0 13px #60a683;
+ box-shadow: inset 0 0 0 13px #60a683;
+}
+.toggle.active .toggle-handle {
+ -webkit-transform: translate3d(28px, 0, 0);
+ -ms-transform: translate3d(28px, 0, 0);
+ transform: translate3d(28px, 0, 0);
+}
+.toggle.active .toggle-handle {
+ border-color: #60a683;
+}
+.toggle.active:before {
+ right: auto;
+ left: 15px;
+ color: #fff;
+ content: "I";
+}
View
1  build/gallery-msa-checkbox/assets/skins/sam/gallery-msa-checkbox.css
@@ -0,0 +1 @@
+.toggle-hidden{position:absolute;opacity:0}.toggle,.toggle-handle{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.toggle{font:300 14px/1.5 "Open Sans",sans-serif;display:block;position:relative;width:58px;height:30px;background-color:#fff;border:2px solid #ddd;border-radius:20px;-webkit-transition-property:background-color,border;-moz-transition-property:background-color,border;transition-property:background-color,border;-webkit-transition-duration:.2s;-moz-transition-duration:.2s;transition-duration:.2s}.toggle .toggle-handle{position:absolute;top:-1px;left:-1px;z-index:2;width:28px;height:28px;background-color:#fff;border:1px solid #ddd;border-radius:100px;-webkit-transition-property:-webkit-transform,border,width;-moz-transition-property:-moz-transform,border,width;transition-property:transform,border,width;-webkit-transition-duration:.2s;-moz-transition-duration:.2s;transition-duration:.2s}.toggle.active .toggle-handle{-webkit-transform:translate3d(28px,0,0);-ms-transform:translate3d(28px,0,0);transform:translate3d(28px,0,0)}.toggle{width:58px;border:2px solid #e6e6e6;-webkit-box-shadow:inset 0 0 0 0 #e1e1e1;box-shadow:inset 0 0 0 0 #e1e1e1;-webkit-transition-property:box-shadow,border;-moz-transition-property:box-shadow,border;transition-property:box-shadow,border;-webkit-transition-duration:.2s;-moz-transition-duration:.2s;transition-duration:.2s}.toggle .toggle-handle{border:1px solid rgba(0,0,0,0.2);-webkit-transition-property:-webkit-transform,border,width;-moz-transition-property:-moz-transform,border,width;transition-property:transform,border,width;-webkit-box-shadow:0 3px 3px rgba(0,0,0,0.08);box-shadow:0 3px 3px rgba(0,0,0,0.08)}.toggle:before{position:absolute;top:3px;right:11px;color:#999;font-size:13px;content:"O"}.toggle.active{border:2px solid #60a683;background-color:#60a683;-webkit-box-shadow:inset 0 0 0 13px #60a683;box-shadow:inset 0 0 0 13px #60a683}.toggle.active .toggle-handle{-webkit-transform:translate3d(28px,0,0);-ms-transform:translate3d(28px,0,0);transform:translate3d(28px,0,0)}.toggle.active .toggle-handle{border-color:#60a683}.toggle.active:before{right:auto;left:15px;color:#fff;content:"I"}#yui3-css-stamp.skin-sam-gallery-msa-checkbox{display:none}
View
6 build/gallery-msa-checkbox/gallery-msa-checkbox-coverage.js
@@ -0,0 +1,6 @@
+if (typeof __coverage__ === 'undefined') { __coverage__ = {}; }
+if (!__coverage__['build/gallery-msa-checkbox/gallery-msa-checkbox.js']) {
+ __coverage__['build/gallery-msa-checkbox/gallery-msa-checkbox.js'] = {"path":"build/gallery-msa-checkbox/gallery-msa-checkbox.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0,0,0],"9":[0,0],"10":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":32},"end":{"line":1,"column":51}}},"2":{"name":"Checkbox","line":7,"loc":{"start":{"line":7,"column":0},"end":{"line":7,"column":26}}},"3":{"name":"(anonymous_3)","line":25,"loc":{"start":{"line":25,"column":13},"end":{"line":25,"column":26}}},"4":{"name":"(anonymous_4)","line":29,"loc":{"start":{"line":29,"column":10},"end":{"line":29,"column":23}}},"5":{"name":"(anonymous_5)","line":31,"loc":{"start":{"line":31,"column":20},"end":{"line":31,"column":34}}},"6":{"name":"(anonymous_6)","line":50,"loc":{"start":{"line":50,"column":8},"end":{"line":50,"column":18}}},"7":{"name":"(anonymous_7)","line":56,"loc":{"start":{"line":56,"column":34},"end":{"line":56,"column":47}}},"8":{"name":"(anonymous_8)","line":71,"loc":{"start":{"line":71,"column":29},"end":{"line":71,"column":42}}},"9":{"name":"(anonymous_9)","line":110,"loc":{"start":{"line":110,"column":32},"end":{"line":110,"column":45}}},"10":{"name":"(anonymous_10)","line":142,"loc":{"start":{"line":142,"column":12},"end":{"line":142,"column":22}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":169,"column":3}},"2":{"start":{"line":5,"column":0},"end":{"line":5,"column":19}},"3":{"start":{"line":7,"column":0},"end":{"line":9,"column":1}},"4":{"start":{"line":8,"column":4},"end":{"line":8,"column":59}},"5":{"start":{"line":11,"column":0},"end":{"line":11,"column":30}},"6":{"start":{"line":13,"column":0},"end":{"line":22,"column":83}},"7":{"start":{"line":24,"column":0},"end":{"line":150,"column":3}},"8":{"start":{"line":26,"column":2},"end":{"line":26,"column":21}},"9":{"start":{"line":27,"column":2},"end":{"line":27,"column":21}},"10":{"start":{"line":31,"column":2},"end":{"line":46,"column":5}},"11":{"start":{"line":33,"column":3},"end":{"line":33,"column":34}},"12":{"start":{"line":36,"column":3},"end":{"line":36,"column":36}},"13":{"start":{"line":38,"column":3},"end":{"line":40,"column":4}},"14":{"start":{"line":39,"column":4},"end":{"line":39,"column":42}},"15":{"start":{"line":42,"column":3},"end":{"line":44,"column":15}},"16":{"start":{"line":48,"column":2},"end":{"line":48,"column":16}},"17":{"start":{"line":51,"column":2},"end":{"line":53,"column":20}},"18":{"start":{"line":55,"column":2},"end":{"line":68,"column":4}},"19":{"start":{"line":57,"column":4},"end":{"line":61,"column":76}},"20":{"start":{"line":63,"column":4},"end":{"line":63,"column":62}},"21":{"start":{"line":64,"column":4},"end":{"line":64,"column":22}},"22":{"start":{"line":70,"column":2},"end":{"line":107,"column":4}},"23":{"start":{"line":77,"column":4},"end":{"line":83,"column":44}},"24":{"start":{"line":85,"column":4},"end":{"line":85,"column":21}},"25":{"start":{"line":86,"column":4},"end":{"line":86,"column":44}},"26":{"start":{"line":89,"column":4},"end":{"line":91,"column":5}},"27":{"start":{"line":90,"column":5},"end":{"line":90,"column":12}},"28":{"start":{"line":93,"column":4},"end":{"line":93,"column":23}},"29":{"start":{"line":95,"column":4},"end":{"line":97,"column":5}},"30":{"start":{"line":96,"column":5},"end":{"line":96,"column":71}},"31":{"start":{"line":98,"column":4},"end":{"line":100,"column":5}},"32":{"start":{"line":99,"column":5},"end":{"line":99,"column":87}},"33":{"start":{"line":102,"column":4},"end":{"line":102,"column":80}},"34":{"start":{"line":104,"column":4},"end":{"line":104,"column":77}},"35":{"start":{"line":109,"column":2},"end":{"line":140,"column":4}},"36":{"start":{"line":112,"column":4},"end":{"line":117,"column":123}},"37":{"start":{"line":119,"column":4},"end":{"line":120,"column":12}},"38":{"start":{"line":120,"column":5},"end":{"line":120,"column":12}},"39":{"start":{"line":122,"column":4},"end":{"line":126,"column":5}},"40":{"start":{"line":123,"column":5},"end":{"line":123,"column":78}},"41":{"start":{"line":125,"column":5},"end":{"line":125,"column":63}},"42":{"start":{"line":129,"column":4},"end":{"line":130,"column":47}},"43":{"start":{"line":132,"column":4},"end":{"line":134,"column":7}},"44":{"start":{"line":136,"column":4},"end":{"line":136,"column":22}},"45":{"start":{"line":137,"column":4},"end":{"line":137,"column":22}},"46":{"start":{"line":144,"column":2},"end":{"line":146,"column":3}},"47":{"start":{"line":145,"column":3},"end":{"line":145,"column":29}},"48":{"start":{"line":148,"column":2},"end":{"line":148,"column":23}},"49":{"start":{"line":152,"column":0},"end":{"line":152,"column":26}}},"branchMap":{"1":{"line":38,"type":"if","locations":[{"start":{"line":38,"column":3},"end":{"line":38,"column":3}},{"start":{"line":38,"column":3},"end":{"line":38,"column":3}}]},"2":{"line":43,"type":"cond-expr","locations":[{"start":{"line":43,"column":32},"end":{"line":43,"column":38}},{"start":{"line":43,"column":41},"end":{"line":43,"column":43}}]},"3":{"line":61,"type":"cond-expr","locations":[{"start":{"line":61,"column":45},"end":{"line":61,"column":70}},{"start":{"line":61,"column":74},"end":{"line":61,"column":75}}]},"4":{"line":89,"type":"if","locations":[{"start":{"line":89,"column":4},"end":{"line":89,"column":4}},{"start":{"line":89,"column":4},"end":{"line":89,"column":4}}]},"5":{"line":89,"type":"binary-expr","locations":[{"start":{"line":89,"column":8},"end":{"line":89,"column":67}},{"start":{"line":89,"column":71},"end":{"line":89,"column":110}}]},"6":{"line":95,"type":"if","locations":[{"start":{"line":95,"column":4},"end":{"line":95,"column":4}},{"start":{"line":95,"column":4},"end":{"line":95,"column":4}}]},"7":{"line":98,"type":"if","locations":[{"start":{"line":98,"column":4},"end":{"line":98,"column":4}},{"start":{"line":98,"column":4},"end":{"line":98,"column":4}}]},"8":{"line":117,"type":"binary-expr","locations":[{"start":{"line":117,"column":19},"end":{"line":117,"column":29}},{"start":{"line":117,"column":33},"end":{"line":117,"column":57}},{"start":{"line":117,"column":63},"end":{"line":117,"column":72}},{"start":{"line":117,"column":77},"end":{"line":117,"column":120}}]},"9":{"line":119,"type":"if","locations":[{"start":{"line":119,"column":4},"end":{"line":119,"column":4}},{"start":{"line":119,"column":4},"end":{"line":119,"column":4}}]},"10":{"line":122,"type":"if","locations":[{"start":{"line":122,"column":4},"end":{"line":122,"column":4}},{"start":{"line":122,"column":4},"end":{"line":122,"column":4}}]}},"code":["(function () { YUI.add('gallery-msa-checkbox', function (Y, NAME) {","","'use strict';","","Y.namespace('MSA');","","function Checkbox(config) {"," Checkbox.superclass.constructor.apply(this, arguments);","}","","Checkbox.NAME = \"MSACheckbox\";","","var HANDLE = '.toggle-handle',","\tTOGGLE = '.toggle',","\tCHECKBOX = 'input[type=checkbox]',","\tREADONLY = 'readonly',","\tDISABLED = 'disabled',","\tWEBKITTRANSFORM = 'webkitTransform',","\tWIDTH = 'clientWidth',","\tACTIVE = 'active',","\tTRANSLATE3D = 'translate3D',","\tTEMPLATE = '<div class=\"toggle {active}\"><div class=\"toggle-handle\"></div></div>';","","Y.extend(Checkbox, Y.Base, {","\tinitializer:function(cfg){","\t\tthis._handles = [];","\t\tthis.renderUI(cfg);","\t},","\trenderUI:function(cfg){","","\t\tcfg.srcNodes.each(function(node){","\t\t\t","\t\t\tnode.addClass('toggle-hidden');","\t\t","\t\t\t//we have to remove any label around a checkbox to prevent erronous selecting","\t\t\tvar lbl = node.ancestor(\"label\");","\t","\t\t\tif(lbl){","\t\t\t\tlbl.setAttribute(\"for\",Math.random());","\t\t\t}","\t","\t\t\tnode.insert(Y.Lang.sub(TEMPLATE,{","\t\t\t\tactive:node.get('checked')? ACTIVE : ''","\t\t\t}),'after');","","\t\t});","\t\t","\t\tthis.bindUI();","\t},","\tbindUI:function(){","\t\tvar start = {},","\t\ttouchMove = false,","\t\tdistanceX = false;","\t\t","\t\tthis._handles.push(","\t\t\tY.delegate('gesturemovestart', function (e) {","\t\t\t\tvar toggle = e.currentTarget,","\t\t\t\thandle = toggle.one(HANDLE),","\t\t\t\ttoggleWidth = toggle.get(WIDTH),","\t\t\t\thandleWidth = handle.get(WIDTH),","\t\t\t\toffset = toggle.hasClass(ACTIVE) ? (toggleWidth - handleWidth) : 0;","","\t\t\t\tstart = { pageX : e.pageX - offset, pageY : e.pageY };","\t\t\t\ttouchMove = false;","\t\t\t","\t\t\t","\t\t\t},'body','.toggle',this)","\t\t);","\t\t","\t\tthis._handles.push(","\t\t\tY.delegate('gesturemove', function (e) {","\t\t\t\t/*","\t\t\t\tif (e.touches.length > 1) {","\t\t\t\t\treturn; // Exit if a pinch","\t\t\t\t}*/","","\t\t\t\tvar toggle = e.currentTarget,","\t\t\t\thandle = toggle.one(HANDLE),","\t\t\t\t//current = e.touches[0],","\t\t\t\tcurrent \t= e,","\t\t\t\ttoggleWidth = toggle.get(WIDTH),","\t\t\t\thandleWidth = handle.get(WIDTH),","\t\t\t\toffset = toggleWidth - handleWidth;","","\t\t\t\ttouchMove = true;","\t\t\t\tdistanceX = current.pageX - start.pageX;","","","\t\t\t\tif (Math.abs(distanceX) < Math.abs(current.pageY - start.pageY) || toggle.previous(CHECKBOX).get(DISABLED)) {","\t\t\t\t\treturn;","\t\t\t\t}","","\t\t\t\te.preventDefault();","","\t\t\t\tif (distanceX < 0) {","\t\t\t\t\treturn (handle.setStyle(WEBKITTRANSFORM,TRANSLATE3D + '(0,0,0)'));","\t\t\t\t}","\t\t\t\tif (distanceX > offset) {","\t\t\t\t\treturn (handle.setStyle(WEBKITTRANSFORM, TRANSLATE3D + '(' + offset + 'px,0,0)'));","\t\t\t\t}","","\t\t\t\thandle.setStyle(WEBKITTRANSFORM, TRANSLATE3D + '(' + distanceX + 'px,0,0)');","","\t\t\t\ttoggle.toggleClass(ACTIVE,(distanceX > (toggleWidth/2 - handleWidth/2)));","\t\t\t","\t\t\t},'body','.toggle',this)","\t\t);","\t\t","\t\tthis._handles.push(","\t\t\tY.delegate('gesturemoveend', function (e) {","","\t\t\t\tvar toggle = e.currentTarget,","\t\t\t\thandle = toggle.one(HANDLE),","\t\t\t\ttoggleWidth = toggle.get(WIDTH),","\t\t\t\thandleWidth = handle.get(WIDTH),","\t\t\t\toffset = (toggleWidth - handleWidth),","\t\t\t\tslideOn = (!touchMove && !toggle.hasClass(ACTIVE)) || (touchMove && (distanceX > (toggleWidth/2 - handleWidth/2)));","","\t\t\t\tif(toggle.previous(CHECKBOX).get(DISABLED))","\t\t\t\t\treturn;","","\t\t\t\tif (slideOn) {","\t\t\t\t\thandle.setStyle(WEBKITTRANSFORM, TRANSLATE3D + '(' + offset + 'px,0,0)');","\t\t\t\t} else {","\t\t\t\t\thandle.setStyle(WEBKITTRANSFORM, TRANSLATE3D + '(0,0,0)');","\t\t\t\t}","","","\t\t\t\ttoggle.toggleClass(ACTIVE, slideOn)","\t\t\t\t.previous(CHECKBOX).set('checked',slideOn);","\t\t\t\t","\t\t\t\tthis.fire('toggle', {","\t\t\t\t\tisActive: slideOn","\t\t\t\t});","","\t\t\t\ttouchMove = false;","\t\t\t\ttoggle = false;","\t\t\t","\t\t\t},'body','.toggle',this)","\t\t);","\t},","\tdestructor:function(){","","\t\tfor(var x=0;x < this._handles.length;x++){","\t\t\tthis._handles[x].detach();","\t\t}","\t","\t\tthis._handles = null;","\t}","});","","Y.MSA.Checkbox = Checkbox;","","","}, 'gallery-2014.03.12-23-08', {"," \"skinnable\": \"true\","," \"requires\": ["," \"node-base\","," \"base\","," \"event-base\","," \"event-move\","," \"event-delegate\","," \"node-event-delegate\","," \"node-style\""," ],"," \"optional\": ["," \"\""," ]","});","","}());"]};
+}
+var __cov_a4DRxmeDYnf8DQTg_nnEGg = __coverage__['build/gallery-msa-checkbox/gallery-msa-checkbox.js'];
+__cov_a4DRxmeDYnf8DQTg_nnEGg.s['1']++;YUI.add('gallery-msa-checkbox',function(Y,NAME){'use strict';__cov_a4DRxmeDYnf8DQTg_nnEGg.f['1']++;__cov_a4DRxmeDYnf8DQTg_nnEGg.s['2']++;Y.namespace('MSA');__cov_a4DRxmeDYnf8DQTg_nnEGg.s['3']++;function Checkbox(config){__cov_a4DRxmeDYnf8DQTg_nnEGg.f['2']++;__cov_a4DRxmeDYnf8DQTg_nnEGg.s['4']++;Checkbox.superclass.constructor.apply(this,arguments);}__cov_a4DRxmeDYnf8DQTg_nnEGg.s['5']++;Checkbox.NAME='MSACheckbox';__cov_a4DRxmeDYnf8DQTg_nnEGg.s['6']++;var HANDLE='.toggle-handle',TOGGLE='.toggle',CHECKBOX='input[type=checkbox]',READONLY='readonly',DISABLED='disabled',WEBKITTRANSFORM='webkitTransform',WIDTH='clientWidth',ACTIVE='active',TRANSLATE3D='translate3D',TEMPLATE='<div class="toggle {active}"><div class="toggle-handle"></div></div>';__cov_a4DRxmeDYnf8DQTg_nnEGg.s['7']++;Y.extend(Checkbox,Y.Base,{initializer:function(cfg){__cov_a4DRxmeDYnf8DQTg_nnEGg.f['3']++;__cov_a4DRxmeDYnf8DQTg_nnEGg.s['8']++;this._handles=[];__cov_a4DRxmeDYnf8DQTg_nnEGg.s['9']++;this.renderUI(cfg);},renderUI:function(cfg){__cov_a4DRxmeDYnf8DQTg_nnEGg.f['4']++;__cov_a4DRxmeDYnf8DQTg_nnEGg.s['10']++;cfg.srcNodes.each(function(node){__cov_a4DRxmeDYnf8DQTg_nnEGg.f['5']++;__cov_a4DRxmeDYnf8DQTg_nnEGg.s['11']++;node.addClass('toggle-hidden');__cov_a4DRxmeDYnf8DQTg_nnEGg.s['12']++;var lbl=node.ancestor('label');__cov_a4DRxmeDYnf8DQTg_nnEGg.s['13']++;if(lbl){__cov_a4DRxmeDYnf8DQTg_nnEGg.b['1'][0]++;__cov_a4DRxmeDYnf8DQTg_nnEGg.s['14']++;lbl.setAttribute('for',Math.random());}else{__cov_a4DRxmeDYnf8DQTg_nnEGg.b['1'][1]++;}__cov_a4DRxmeDYnf8DQTg_nnEGg.s['15']++;node.insert(Y.Lang.sub(TEMPLATE,{active:node.get('checked')?(__cov_a4DRxmeDYnf8DQTg_nnEGg.b['2'][0]++,ACTIVE):(__cov_a4DRxmeDYnf8DQTg_nnEGg.b['2'][1]++,'')}),'after');});__cov_a4DRxmeDYnf8DQTg_nnEGg.s['16']++;this.bindUI();},bindUI:function(){__cov_a4DRxmeDYnf8DQTg_nnEGg.f['6']++;__cov_a4DRxmeDYnf8DQTg_nnEGg.s['17']++;var start={},touchMove=false,distanceX=false;__cov_a4DRxmeDYnf8DQTg_nnEGg.s['18']++;this._handles.push(Y.delegate('gesturemovestart',function(e){__cov_a4DRxmeDYnf8DQTg_nnEGg.f['7']++;__cov_a4DRxmeDYnf8DQTg_nnEGg.s['19']++;var toggle=e.currentTarget,handle=toggle.one(HANDLE),toggleWidth=toggle.get(WIDTH),handleWidth=handle.get(WIDTH),offset=toggle.hasClass(ACTIVE)?(__cov_a4DRxmeDYnf8DQTg_nnEGg.b['3'][0]++,toggleWidth-handleWidth):(__cov_a4DRxmeDYnf8DQTg_nnEGg.b['3'][1]++,0);__cov_a4DRxmeDYnf8DQTg_nnEGg.s['20']++;start={pageX:e.pageX-offset,pageY:e.pageY};__cov_a4DRxmeDYnf8DQTg_nnEGg.s['21']++;touchMove=false;},'body','.toggle',this));__cov_a4DRxmeDYnf8DQTg_nnEGg.s['22']++;this._handles.push(Y.delegate('gesturemove',function(e){__cov_a4DRxmeDYnf8DQTg_nnEGg.f['8']++;__cov_a4DRxmeDYnf8DQTg_nnEGg.s['23']++;var toggle=e.currentTarget,handle=toggle.one(HANDLE),current=e,toggleWidth=toggle.get(WIDTH),handleWidth=handle.get(WIDTH),offset=toggleWidth-handleWidth;__cov_a4DRxmeDYnf8DQTg_nnEGg.s['24']++;touchMove=true;__cov_a4DRxmeDYnf8DQTg_nnEGg.s['25']++;distanceX=current.pageX-start.pageX;__cov_a4DRxmeDYnf8DQTg_nnEGg.s['26']++;if((__cov_a4DRxmeDYnf8DQTg_nnEGg.b['5'][0]++,Math.abs(distanceX)<Math.abs(current.pageY-start.pageY))||(__cov_a4DRxmeDYnf8DQTg_nnEGg.b['5'][1]++,toggle.previous(CHECKBOX).get(DISABLED))){__cov_a4DRxmeDYnf8DQTg_nnEGg.b['4'][0]++;__cov_a4DRxmeDYnf8DQTg_nnEGg.s['27']++;return;}else{__cov_a4DRxmeDYnf8DQTg_nnEGg.b['4'][1]++;}__cov_a4DRxmeDYnf8DQTg_nnEGg.s['28']++;e.preventDefault();__cov_a4DRxmeDYnf8DQTg_nnEGg.s['29']++;if(distanceX<0){__cov_a4DRxmeDYnf8DQTg_nnEGg.b['6'][0]++;__cov_a4DRxmeDYnf8DQTg_nnEGg.s['30']++;return handle.setStyle(WEBKITTRANSFORM,TRANSLATE3D+'(0,0,0)');}else{__cov_a4DRxmeDYnf8DQTg_nnEGg.b['6'][1]++;}__cov_a4DRxmeDYnf8DQTg_nnEGg.s['31']++;if(distanceX>offset){__cov_a4DRxmeDYnf8DQTg_nnEGg.b['7'][0]++;__cov_a4DRxmeDYnf8DQTg_nnEGg.s['32']++;return handle.setStyle(WEBKITTRANSFORM,TRANSLATE3D+'('+offset+'px,0,0)');}else{__cov_a4DRxmeDYnf8DQTg_nnEGg.b['7'][1]++;}__cov_a4DRxmeDYnf8DQTg_nnEGg.s['33']++;handle.setStyle(WEBKITTRANSFORM,TRANSLATE3D+'('+distanceX+'px,0,0)');__cov_a4DRxmeDYnf8DQTg_nnEGg.s['34']++;toggle.toggleClass(ACTIVE,distanceX>toggleWidth/2-handleWidth/2);},'body','.toggle',this));__cov_a4DRxmeDYnf8DQTg_nnEGg.s['35']++;this._handles.push(Y.delegate('gesturemoveend',function(e){__cov_a4DRxmeDYnf8DQTg_nnEGg.f['9']++;__cov_a4DRxmeDYnf8DQTg_nnEGg.s['36']++;var toggle=e.currentTarget,handle=toggle.one(HANDLE),toggleWidth=toggle.get(WIDTH),handleWidth=handle.get(WIDTH),offset=toggleWidth-handleWidth,slideOn=(__cov_a4DRxmeDYnf8DQTg_nnEGg.b['8'][0]++,!touchMove)&&(__cov_a4DRxmeDYnf8DQTg_nnEGg.b['8'][1]++,!toggle.hasClass(ACTIVE))||(__cov_a4DRxmeDYnf8DQTg_nnEGg.b['8'][2]++,touchMove)&&(__cov_a4DRxmeDYnf8DQTg_nnEGg.b['8'][3]++,distanceX>toggleWidth/2-handleWidth/2);__cov_a4DRxmeDYnf8DQTg_nnEGg.s['37']++;if(toggle.previous(CHECKBOX).get(DISABLED)){__cov_a4DRxmeDYnf8DQTg_nnEGg.b['9'][0]++;__cov_a4DRxmeDYnf8DQTg_nnEGg.s['38']++;return;}else{__cov_a4DRxmeDYnf8DQTg_nnEGg.b['9'][1]++;}__cov_a4DRxmeDYnf8DQTg_nnEGg.s['39']++;if(slideOn){__cov_a4DRxmeDYnf8DQTg_nnEGg.b['10'][0]++;__cov_a4DRxmeDYnf8DQTg_nnEGg.s['40']++;handle.setStyle(WEBKITTRANSFORM,TRANSLATE3D+'('+offset+'px,0,0)');}else{__cov_a4DRxmeDYnf8DQTg_nnEGg.b['10'][1]++;__cov_a4DRxmeDYnf8DQTg_nnEGg.s['41']++;handle.setStyle(WEBKITTRANSFORM,TRANSLATE3D+'(0,0,0)');}__cov_a4DRxmeDYnf8DQTg_nnEGg.s['42']++;toggle.toggleClass(ACTIVE,slideOn).previous(CHECKBOX).set('checked',slideOn);__cov_a4DRxmeDYnf8DQTg_nnEGg.s['43']++;this.fire('toggle',{isActive:slideOn});__cov_a4DRxmeDYnf8DQTg_nnEGg.s['44']++;touchMove=false;__cov_a4DRxmeDYnf8DQTg_nnEGg.s['45']++;toggle=false;},'body','.toggle',this));},destructor:function(){__cov_a4DRxmeDYnf8DQTg_nnEGg.f['10']++;__cov_a4DRxmeDYnf8DQTg_nnEGg.s['46']++;for(var x=0;x<this._handles.length;x++){__cov_a4DRxmeDYnf8DQTg_nnEGg.s['47']++;this._handles[x].detach();}__cov_a4DRxmeDYnf8DQTg_nnEGg.s['48']++;this._handles=null;}});__cov_a4DRxmeDYnf8DQTg_nnEGg.s['49']++;Y.MSA.Checkbox=Checkbox;},'gallery-2014.03.12-23-08',{'skinnable':'true','requires':['node-base','base','event-base','event-move','event-delegate','node-event-delegate','node-style'],'optional':['']});
View
172 build/gallery-msa-checkbox/gallery-msa-checkbox-debug.js
@@ -0,0 +1,172 @@
+YUI.add('gallery-msa-checkbox', function (Y, NAME) {
+
+'use strict';
+
+Y.namespace('MSA');
+
+function Checkbox(config) {
+ Checkbox.superclass.constructor.apply(this, arguments);
+}
+
+Checkbox.NAME = "MSACheckbox";
+
+var HANDLE = '.toggle-handle',
+ TOGGLE = '.toggle',
+ CHECKBOX = 'input[type=checkbox]',
+ READONLY = 'readonly',
+ DISABLED = 'disabled',
+ WEBKITTRANSFORM = 'webkitTransform',
+ WIDTH = 'clientWidth',
+ ACTIVE = 'active',
+ TRANSLATE3D = 'translate3D',
+ TEMPLATE = '<div class="toggle {active}"><div class="toggle-handle"></div></div>';
+
+Y.extend(Checkbox, Y.Base, {
+ initializer:function(cfg){
+ this._handles = [];
+ this.renderUI(cfg);
+ },
+ renderUI:function(cfg){
+
+ cfg.srcNodes.each(function(node){
+
+ node.addClass('toggle-hidden');
+
+ //we have to remove any label around a checkbox to prevent erronous selecting
+ var lbl = node.ancestor("label");
+
+ if(lbl){
+ lbl.setAttribute("for",Math.random());
+ }
+
+ node.insert(Y.Lang.sub(TEMPLATE,{
+ active:node.get('checked')? ACTIVE : ''
+ }),'after');
+
+ });
+
+ this.bindUI();
+ },
+ bindUI:function(){
+ var start = {},
+ touchMove = false,
+ distanceX = false;
+
+ this._handles.push(
+ Y.delegate('gesturemovestart', function (e) {
+ var toggle = e.currentTarget,
+ handle = toggle.one(HANDLE),
+ toggleWidth = toggle.get(WIDTH),
+ handleWidth = handle.get(WIDTH),
+ offset = toggle.hasClass(ACTIVE) ? (toggleWidth - handleWidth) : 0;
+
+ start = { pageX : e.pageX - offset, pageY : e.pageY };
+ touchMove = false;
+
+ Y.log('Move: offset:' + offset + 'e.pageX: ' + e.pageX + 'pageY' + e.pageX);
+
+ },'body','.toggle',this)
+ );
+
+ this._handles.push(
+ Y.delegate('gesturemove', function (e) {
+ /*
+ if (e.touches.length > 1) {
+ return; // Exit if a pinch
+ }*/
+
+ var toggle = e.currentTarget,
+ handle = toggle.one(HANDLE),
+ //current = e.touches[0],
+ current = e,
+ toggleWidth = toggle.get(WIDTH),
+ handleWidth = handle.get(WIDTH),
+ offset = toggleWidth - handleWidth;
+
+ touchMove = true;
+ distanceX = current.pageX - start.pageX;
+
+ Y.log('Move: distanceX:' + distanceX + 'current.pageX: ' + current.pageX + 'start.pageX' + start.pageX);
+
+ if (Math.abs(distanceX) < Math.abs(current.pageY - start.pageY) || toggle.previous(CHECKBOX).get(DISABLED)) {
+ return;
+ }
+
+ e.preventDefault();
+
+ if (distanceX < 0) {
+ return (handle.setStyle(WEBKITTRANSFORM,TRANSLATE3D + '(0,0,0)'));
+ }
+ if (distanceX > offset) {
+ return (handle.setStyle(WEBKITTRANSFORM, TRANSLATE3D + '(' + offset + 'px,0,0)'));
+ }
+
+ handle.setStyle(WEBKITTRANSFORM, TRANSLATE3D + '(' + distanceX + 'px,0,0)');
+
+ toggle.toggleClass(ACTIVE,(distanceX > (toggleWidth/2 - handleWidth/2)));
+
+ },'body','.toggle',this)
+ );
+
+ this._handles.push(
+ Y.delegate('gesturemoveend', function (e) {
+
+ var toggle = e.currentTarget,
+ handle = toggle.one(HANDLE),
+ toggleWidth = toggle.get(WIDTH),
+ handleWidth = handle.get(WIDTH),
+ offset = (toggleWidth - handleWidth),
+ slideOn = (!touchMove && !toggle.hasClass(ACTIVE)) || (touchMove && (distanceX > (toggleWidth/2 - handleWidth/2)));
+
+ if(toggle.previous(CHECKBOX).get(DISABLED))
+ return;
+
+ if (slideOn) {
+ handle.setStyle(WEBKITTRANSFORM, TRANSLATE3D + '(' + offset + 'px,0,0)');
+ } else {
+ handle.setStyle(WEBKITTRANSFORM, TRANSLATE3D + '(0,0,0)');
+ }
+
+ Y.log('MoveEnd: slideOn: ' + slideOn);
+
+ toggle.toggleClass(ACTIVE, slideOn)
+ .previous(CHECKBOX).set('checked',slideOn);
+
+ this.fire('toggle', {
+ isActive: slideOn
+ });
+
+ touchMove = false;
+ toggle = false;
+
+ },'body','.toggle',this)
+ );
+ },
+ destructor:function(){
+
+ for(var x=0;x < this._handles.length;x++){
+ this._handles[x].detach();
+ }
+
+ this._handles = null;
+ }
+});
+
+Y.MSA.Checkbox = Checkbox;
+
+
+}, 'gallery-2014.03.12-23-08', {
+ "skinnable": "true",
+ "requires": [
+ "node-base",
+ "base",
+ "event-base",
+ "event-move",
+ "event-delegate",
+ "node-event-delegate",
+ "node-style"
+ ],
+ "optional": [
+ ""
+ ]
+});
View
1  build/gallery-msa-checkbox/gallery-msa-checkbox-min.js
@@ -0,0 +1 @@
+YUI.add("gallery-msa-checkbox",function(e,t){"use strict";function n(e){n.superclass.constructor.apply(this,arguments)}e.namespace("MSA"),n.NAME="MSACheckbox";var r=".toggle-handle",i=".toggle",s="input[type=checkbox]",o="readonly",u="disabled",a="webkitTransform",f="clientWidth",l="active",c="translate3D",h='<div class="toggle {active}"><div class="toggle-handle"></div></div>';e.extend(n,e.Base,{initializer:function(e){this._handles=[],this.renderUI(e)},renderUI:function(t){t.srcNodes.each(function(t){t.addClass("toggle-hidden");var n=t.ancestor("label");n&&n.setAttribute("for",Math.random()),t.insert(e.Lang.sub(h,{active:t.get("checked")?l:""}),"after")}),this.bindUI()},bindUI:function(){var t={},n=!1,i=!1;this._handles.push(e.delegate("gesturemovestart",function(e){var i=e.currentTarget,s=i.one(r),o=i.get(f),u=s.get(f),a=i.hasClass(l)?o-u:0;t={pageX:e.pageX-a,pageY:e.pageY},n=!1},"body",".toggle",this)),this._handles.push(e.delegate("gesturemove",function(e){var o=e.currentTarget,h=o.one(r),p=e,d=o.get(f),v=h.get(f),m=d-v;n=!0,i=p.pageX-t.pageX;if(Math.abs(i)<Math.abs(p.pageY-t.pageY)||o.previous(s).get(u))return;e.preventDefault();if(i<0)return h.setStyle(a,c+"(0,0,0)");if(i>m)return h.setStyle(a,c+"("+m+"px,0,0)");h.setStyle(a,c+"("+i+"px,0,0)"),o.toggleClass(l,i>d/2-v/2)},"body",".toggle",this)),this._handles.push(e.delegate("gesturemoveend",function(e){var t=e.currentTarget,o=t.one(r),h=t.get(f),p=o.get(f),d=h-p,v=!n&&!t.hasClass(l)||n&&i>h/2-p/2;if(t.previous(s).get(u))return;v?o.setStyle(a,c+"("+d+"px,0,0)"):o.setStyle(a,c+"(0,0,0)"),t.toggleClass(l,v).previous(s).set("checked",v),this.fire("toggle",{isActive:v}),n=!1,t=!1},"body",".toggle",this))},destructor:function(){for(var e=0;e<this._handles.length;e++)this._handles[e].detach();this._handles=null}}),e.MSA.Checkbox=n},"gallery-2014.03.12-23-08",{skinnable:"true",requires:["node-base","base","event-base","event-move","event-delegate","node-event-delegate","node-style"],optional:[""]});
View
169 build/gallery-msa-checkbox/gallery-msa-checkbox.js
@@ -0,0 +1,169 @@
+YUI.add('gallery-msa-checkbox', function (Y, NAME) {
+
+'use strict';
+
+Y.namespace('MSA');
+
+function Checkbox(config) {
+ Checkbox.superclass.constructor.apply(this, arguments);
+}
+
+Checkbox.NAME = "MSACheckbox";
+
+var HANDLE = '.toggle-handle',
+ TOGGLE = '.toggle',
+ CHECKBOX = 'input[type=checkbox]',
+ READONLY = 'readonly',
+ DISABLED = 'disabled',
+ WEBKITTRANSFORM = 'webkitTransform',
+ WIDTH = 'clientWidth',
+ ACTIVE = 'active',
+ TRANSLATE3D = 'translate3D',
+ TEMPLATE = '<div class="toggle {active}"><div class="toggle-handle"></div></div>';
+
+Y.extend(Checkbox, Y.Base, {
+ initializer:function(cfg){
+ this._handles = [];
+ this.renderUI(cfg);
+ },
+ renderUI:function(cfg){
+
+ cfg.srcNodes.each(function(node){
+
+ node.addClass('toggle-hidden');
+
+ //we have to remove any label around a checkbox to prevent erronous selecting
+ var lbl = node.ancestor("label");
+
+ if(lbl){
+ lbl.setAttribute("for",Math.random());
+ }
+
+ node.insert(Y.Lang.sub(TEMPLATE,{
+ active:node.get('checked')? ACTIVE : ''
+ }),'after');
+
+ });
+
+ this.bindUI();
+ },
+ bindUI:function(){
+ var start = {},
+ touchMove = false,
+ distanceX = false;
+
+ this._handles.push(
+ Y.delegate('gesturemovestart', function (e) {
+ var toggle = e.currentTarget,
+ handle = toggle.one(HANDLE),
+ toggleWidth = toggle.get(WIDTH),
+ handleWidth = handle.get(WIDTH),
+ offset = toggle.hasClass(ACTIVE) ? (toggleWidth - handleWidth) : 0;
+
+ start = { pageX : e.pageX - offset, pageY : e.pageY };
+ touchMove = false;
+
+
+ },'body','.toggle',this)
+ );
+
+ this._handles.push(
+ Y.delegate('gesturemove', function (e) {
+ /*
+ if (e.touches.length > 1) {
+ return; // Exit if a pinch
+ }*/
+
+ var toggle = e.currentTarget,
+ handle = toggle.one(HANDLE),
+ //current = e.touches[0],
+ current = e,
+ toggleWidth = toggle.get(WIDTH),
+ handleWidth = handle.get(WIDTH),
+ offset = toggleWidth - handleWidth;
+
+ touchMove = true;
+ distanceX = current.pageX - start.pageX;
+
+
+ if (Math.abs(distanceX) < Math.abs(current.pageY - start.pageY) || toggle.previous(CHECKBOX).get(DISABLED)) {
+ return;
+ }
+
+ e.preventDefault();
+
+ if (distanceX < 0) {
+ return (handle.setStyle(WEBKITTRANSFORM,TRANSLATE3D + '(0,0,0)'));
+ }
+ if (distanceX > offset) {
+ return (handle.setStyle(WEBKITTRANSFORM, TRANSLATE3D + '(' + offset + 'px,0,0)'));
+ }
+
+ handle.setStyle(WEBKITTRANSFORM, TRANSLATE3D + '(' + distanceX + 'px,0,0)');
+
+ toggle.toggleClass(ACTIVE,(distanceX > (toggleWidth/2 - handleWidth/2)));
+
+ },'body','.toggle',this)
+ );
+
+ this._handles.push(
+ Y.delegate('gesturemoveend', function (e) {
+
+ var toggle = e.currentTarget,
+ handle = toggle.one(HANDLE),
+ toggleWidth = toggle.get(WIDTH),
+ handleWidth = handle.get(WIDTH),
+ offset = (toggleWidth - handleWidth),
+ slideOn = (!touchMove && !toggle.hasClass(ACTIVE)) || (touchMove && (distanceX > (toggleWidth/2 - handleWidth/2)));
+
+ if(toggle.previous(CHECKBOX).get(DISABLED))
+ return;
+
+ if (slideOn) {
+ handle.setStyle(WEBKITTRANSFORM, TRANSLATE3D + '(' + offset + 'px,0,0)');
+ } else {
+ handle.setStyle(WEBKITTRANSFORM, TRANSLATE3D + '(0,0,0)');
+ }
+
+
+ toggle.toggleClass(ACTIVE, slideOn)
+ .previous(CHECKBOX).set('checked',slideOn);
+
+ this.fire('toggle', {
+ isActive: slideOn
+ });
+
+ touchMove = false;
+ toggle = false;
+
+ },'body','.toggle',this)
+ );
+ },
+ destructor:function(){
+
+ for(var x=0;x < this._handles.length;x++){
+ this._handles[x].detach();
+ }
+
+ this._handles = null;
+ }
+});
+
+Y.MSA.Checkbox = Checkbox;
+
+
+}, 'gallery-2014.03.12-23-08', {
+ "skinnable": "true",
+ "requires": [
+ "node-base",
+ "base",
+ "event-base",
+ "event-move",
+ "event-delegate",
+ "node-event-delegate",
+ "node-style"
+ ],
+ "optional": [
+ ""
+ ]
+});
View
20 src/gallery-msa-checkbox/LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2009 GitHub
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
37 src/gallery-msa-checkbox/README.md
@@ -0,0 +1,37 @@
+MSA-Checkbox
+=============
+
+MSA-Checkbox is a YUI 3 port of [Ratchet 2.0](https://github.com/twbs/ratchet)'s Toggle.
+
+Some minor modifications were done. In stead of On/Off, we use I/O to not be bothered with international aspects.
+
+There is a default skin, which is based on the project I created this for, and an ios and android skin.
+
+For optimization purposes, I chose to use a page based delegate that operates on the nodelist.
+
+Usage
+-------
+
+ Y.use('msa-checkbox', function(A){
+ new A.MSA.Checkbox({srcNodes:Y.all('.msa-checkbox')});
+ });
+
+ <input type="checkbox" name="test" class="msa-checkbox">
+
+Using a skin
+-------
+
+ Define a skin override in your YUI configuration. The skins are:
+
+ * ios
+ * android
+
+ Add yui3-skin-ios or yui3-skin-android to the body or surrounding div container
+
+
+Current limitations
+-------
+
+* This doesn't work in IE8
+* Since Ratchet is strongly based on CSS and Ratchet uses some fixed widths where it shouldn't we currently don't support multilingual versions. We hope we can in the near future.
+
View
49 src/gallery-msa-checkbox/assets/gallery-msa-checkbox-core.css
@@ -0,0 +1,49 @@
+.toggle-hidden{
+ position:absolute;
+ opacity:0;
+}
+.toggle,
+.toggle-handle{
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+.toggle {
+ font:300 14px/1.5 "Open Sans",sans-serif;
+ display: block;
+ position: relative;
+ width: 58px;
+ height: 30px;
+ background-color: #fff;
+ border: 2px solid #ddd;
+ border-radius: 20px;
+ -webkit-transition-property: background-color, border;
+ -moz-transition-property: background-color, border;
+ transition-property: background-color, border;
+ -webkit-transition-duration: 0.2s;
+ -moz-transition-duration: 0.2s;
+ transition-duration: 0.2s;
+}
+.toggle .toggle-handle {
+ position: absolute;
+ top: -1px;
+ left: -1px;
+ z-index: 2;
+ width: 28px;
+ height: 28px;
+ background-color: #fff;
+ border: 1px solid #ddd;
+ border-radius: 100px;
+ -webkit-transition-property: -webkit-transform, border, width;
+ -moz-transition-property: -moz-transform, border, width;
+ transition-property: transform, border, width;
+ -webkit-transition-duration: 0.2s;
+ -moz-transition-duration: 0.2s;
+ transition-duration: 0.2s;
+}
+.toggle.active .toggle-handle {
+ -webkit-transform: translate3d(28px, 0, 0);
+ -ms-transform: translate3d(28px, 0, 0);
+ transform: translate3d(28px, 0, 0);
+}
+
View
42 src/gallery-msa-checkbox/assets/skins/android/gallery-msa-checkbox-skin.css
@@ -0,0 +1,42 @@
+.toggle {
+ width: 104px;
+ height: 28px;
+ border: 2px solid #d7d7d7;
+ border-radius: 0;
+ background-color: #d7d7d7;
+}
+.toggle .toggle-handle {
+ top: 0;
+ left: 0;
+ width: 50px;
+ height: 24px;
+ border: 1px solid #b5b5b5;
+ border-radius: 2px;
+ background-color: #bebebe;
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+}
+.toggle:before {
+ top: 1px;
+ right: auto;
+ left: 11px;
+ z-index: 3;
+ color: #fff;
+}
+.toggle.active {
+ border: 2px solid #d7d7d7;
+ background-color: #d7d7d7;
+}
+.toggle.active .toggle-handle {
+ margin-right: 2px;
+ background-color: #33b5e5;
+ border-color: #33b5e5;
+ -webkit-transform: translate3d(50px, 0, 0);
+ -ms-transform: translate3d(50px, 0, 0);
+ transform: translate3d(50px, 0, 0);
+}
+.toggle.active:before {
+ left: auto;
+ right: 14px;
+ color: #fff;
+}
View
37 src/gallery-msa-checkbox/assets/skins/ios/gallery-msa-checkbox-skin.css
@@ -0,0 +1,37 @@
+.toggle {
+ width: 47px;
+ border: 2px solid #e6e6e6;
+ -webkit-box-shadow: inset 0 0 0 0 #e1e1e1;
+ box-shadow: inset 0 0 0 0 #e1e1e1;
+ -webkit-transition-property: box-shadow, border;
+ -moz-transition-property: box-shadow, border;
+ transition-property: box-shadow, border;
+ -webkit-transition-duration: 0.2s;
+ -moz-transition-duration: 0.2s;
+ transition-duration: 0.2s;
+}
+.toggle .toggle-handle {
+ border: 1px solid rgba(0, 0, 0, 0.2);
+ -webkit-transition-property: -webkit-transform, border, width;
+ -moz-transition-property: -moz-transform, border, width;
+ transition-property: transform, border, width;
+ -webkit-box-shadow: 0 3px 3px rgba(0, 0, 0, 0.08);
+ box-shadow: 0 3px 3px rgba(0, 0, 0, 0.08);
+}
+.toggle:before {
+ display: none;
+}
+.toggle.active {
+ border: 2px solid #4cd964;
+ background-color: transparent;
+ -webkit-box-shadow: inset 0 0 0 13px #4cd964;
+ box-shadow: inset 0 0 0 13px #4cd964;
+}
+.toggle.active .toggle-handle {
+ -webkit-transform: translate3d(17px, 0, 0);
+ -ms-transform: translate3d(17px, 0, 0);
+ transform: translate3d(17px, 0, 0);
+}
+.toggle.active .toggle-handle {
+ border-color: #4cd964;
+}
View
49 src/gallery-msa-checkbox/assets/skins/sam/gallery-msa-checkbox-skin.css
@@ -0,0 +1,49 @@
+ .toggle {
+ width: 58px;
+ border: 2px solid #e6e6e6;
+ -webkit-box-shadow: inset 0 0 0 0 #e1e1e1;
+ box-shadow: inset 0 0 0 0 #e1e1e1;
+ -webkit-transition-property: box-shadow, border;
+ -moz-transition-property: box-shadow, border;
+ transition-property: box-shadow, border;
+ -webkit-transition-duration: 0.2s;
+ -moz-transition-duration: 0.2s;
+ transition-duration: 0.2s;
+}
+.toggle .toggle-handle {
+ border: 1px solid rgba(0, 0, 0, 0.2);
+ -webkit-transition-property: -webkit-transform, border, width;
+ -moz-transition-property: -moz-transform, border, width;
+ transition-property: transform, border, width;
+ -webkit-box-shadow: 0 3px 3px rgba(0, 0, 0, 0.08);
+ box-shadow: 0 3px 3px rgba(0, 0, 0, 0.08);
+}
+.toggle:before {
+ position: absolute;
+ top: 3px;
+ right: 11px;
+ color: #999;
+ font-size: 13px;
+ content: "O";
+}
+.toggle.active {
+ border: 2px solid #60a683;
+ background-color: #60a683;
+
+ -webkit-box-shadow: inset 0 0 0 13px #60a683;
+ box-shadow: inset 0 0 0 13px #60a683;
+}
+.toggle.active .toggle-handle {
+ -webkit-transform: translate3d(28px, 0, 0);
+ -ms-transform: translate3d(28px, 0, 0);
+ transform: translate3d(28px, 0, 0);
+}
+.toggle.active .toggle-handle {
+ border-color: #60a683;
+}
+.toggle.active:before {
+ right: auto;
+ left: 15px;
+ color: #fff;
+ content: "I";
+}
View
28 src/gallery-msa-checkbox/build.json
@@ -0,0 +1,28 @@
+{
+ "name": "gallery-msa-checkbox",
+ "builds": {
+ "gallery-msa-checkbox": {
+ "config": {
+ "skinnable": "true",
+ "requires": [
+ "node-base",
+ "base",
+ "event-base",
+ "event-move",
+ "event-delegate",
+ "node-event-delegate",
+ "node-style"
+
+ ],
+ "optional": [
+ ""
+ ]
+ },
+ "skinnable": "true",
+ "jsfiles": [
+ "gallery-msa-checkbox.js"
+ ],
+ "meta": {}
+ }
+ }
+}
View
29 src/gallery-msa-checkbox/build.properties
@@ -0,0 +1,29 @@
+# My Custom Module Build Properties
+
+# As long as the builder project is cloned to the default folder
+# next to the yui3-gallery project folder, the builddir property does not
+# need to be changed
+#
+# If the builder project is checked out to an alternate location, this
+# property should be updated to point to the checkout location.
+builddir=../../../builder/componentbuild
+
+# The name of the component. E.g. event, attribute, widget
+component=msa-checkbox
+
+# The list of files which should be concatenated to create the component
+# NOTE: For a css component. (e.g. cssfonts, cssgrids etc.) use component.cssfiles instead.
+# component.jsfiles=my.custom.module.js, my.custom.moduleHelperClass.js, my.custom.moduleSubComponentClass.js
+component.jsfiles=msa-checkbox.js
+
+# The list of modules this component. requires. Used to set up the Y.add module call for YUI 3.
+component.requires=node-base,base,event-base,event-move,event-delegate,node-event-delegate,node-style
+
+# The list of modules this component. supersedes. Used to set up the Y.add module call for YUI 3.
+#component.supersedes=another.custom.module
+
+# The list of modules that are optional for this module. Used to set up the Y.add module call for YUI 3.
+component.optional=
+# If your module has a skin file, set this flag to "true"
+component.skinnable=true
+#component.skinnable=true
View
7 src/gallery-msa-checkbox/build.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- YUI 3 Gallery Component Build File -->
+<project name="Slide Checkbox" default="local">
+ <description>Slide Checkbox</description>
+ <property file="build.properties" />
+ <import file="${builddir}/3.x/bootstrap.xml" description="Default Build Properties and Targets" />
+</project>
View
153 src/gallery-msa-checkbox/js/gallery-msa-checkbox.js
@@ -0,0 +1,153 @@
+'use strict';
+
+Y.namespace('MSA');
+
+function Checkbox(config) {
+ Checkbox.superclass.constructor.apply(this, arguments);
+}
+
+Checkbox.NAME = "MSACheckbox";
+
+var HANDLE = '.toggle-handle',
+ TOGGLE = '.toggle',
+ CHECKBOX = 'input[type=checkbox]',
+ READONLY = 'readonly',
+ DISABLED = 'disabled',
+ WEBKITTRANSFORM = 'webkitTransform',
+ WIDTH = 'clientWidth',
+ ACTIVE = 'active',
+ TRANSLATE3D = 'translate3D',
+ TEMPLATE = '<div class="toggle {active}"><div class="toggle-handle"></div></div>';
+
+Y.extend(Checkbox, Y.Base, {
+ initializer:function(cfg){
+ this._handles = [];
+ this.renderUI(cfg);
+ },
+ renderUI:function(cfg){
+
+ cfg.srcNodes.each(function(node){
+
+ node.addClass('toggle-hidden');
+
+ //we have to remove any label around a checkbox to prevent erronous selecting
+ var lbl = node.ancestor("label");
+
+ if(lbl){
+ lbl.setAttribute("for",Math.random());
+ }
+
+ node.insert(Y.Lang.sub(TEMPLATE,{
+ active:node.get('checked')? ACTIVE : ''
+ }),'after');
+
+ });
+
+ this.bindUI();
+ },
+ bindUI:function(){
+ var start = {},
+ touchMove = false,
+ distanceX = false;
+
+ this._handles.push(
+ Y.delegate('gesturemovestart', function (e) {
+ var toggle = e.currentTarget,
+ handle = toggle.one(HANDLE),
+ toggleWidth = toggle.get(WIDTH),
+ handleWidth = handle.get(WIDTH),
+ offset = toggle.hasClass(ACTIVE) ? (toggleWidth - handleWidth) : 0;
+
+ start = { pageX : e.pageX - offset, pageY : e.pageY };
+ touchMove = false;
+
+ Y.log('Move: offset:' + offset + 'e.pageX: ' + e.pageX + 'pageY' + e.pageX);
+
+ },'body','.toggle',this)
+ );
+
+ this._handles.push(
+ Y.delegate('gesturemove', function (e) {
+ /*
+ if (e.touches.length > 1) {
+ return; // Exit if a pinch
+ }*/
+
+ var toggle = e.currentTarget,
+ handle = toggle.one(HANDLE),
+ //current = e.touches[0],
+ current = e,
+ toggleWidth = toggle.get(WIDTH),
+ handleWidth = handle.get(WIDTH),
+ offset = toggleWidth - handleWidth;
+
+ touchMove = true;
+ distanceX = current.pageX - start.pageX;
+
+ Y.log('Move: distanceX:' + distanceX + 'current.pageX: ' + current.pageX + 'start.pageX' + start.pageX);
+
+ if (Math.abs(distanceX) < Math.abs(current.pageY - start.pageY) || toggle.previous(CHECKBOX).get(DISABLED)) {
+ return;
+ }
+
+ e.preventDefault();
+
+ if (distanceX < 0) {
+ return (handle.setStyle(WEBKITTRANSFORM,TRANSLATE3D + '(0,0,0)'));
+ }
+ if (distanceX > offset) {
+ return (handle.setStyle(WEBKITTRANSFORM, TRANSLATE3D + '(' + offset + 'px,0,0)'));
+ }
+
+ handle.setStyle(WEBKITTRANSFORM, TRANSLATE3D + '(' + distanceX + 'px,0,0)');
+
+ toggle.toggleClass(ACTIVE,(distanceX > (toggleWidth/2 - handleWidth/2)));
+
+ },'body','.toggle',this)
+ );
+
+ this._handles.push(
+ Y.delegate('gesturemoveend', function (e) {
+
+ var toggle = e.currentTarget,
+ handle = toggle.one(HANDLE),
+ toggleWidth = toggle.get(WIDTH),
+ handleWidth = handle.get(WIDTH),
+ offset = (toggleWidth - handleWidth),
+ slideOn = (!touchMove && !toggle.hasClass(ACTIVE)) || (touchMove && (distanceX > (toggleWidth/2 - handleWidth/2)));
+
+ if(toggle.previous(CHECKBOX).get(DISABLED))
+ return;
+
+ if (slideOn) {
+ handle.setStyle(WEBKITTRANSFORM, TRANSLATE3D + '(' + offset + 'px,0,0)');
+ } else {
+ handle.setStyle(WEBKITTRANSFORM, TRANSLATE3D + '(0,0,0)');
+ }
+
+ Y.log('MoveEnd: slideOn: ' + slideOn);
+
+ toggle.toggleClass(ACTIVE, slideOn)
+ .previous(CHECKBOX).set('checked',slideOn);
+
+ this.fire('toggle', {
+ isActive: slideOn
+ });
+
+ touchMove = false;
+ toggle = false;
+
+ },'body','.toggle',this)
+ );
+ },
+ destructor:function(){
+
+ for(var x=0;x < this._handles.length;x++){
+ this._handles[x].detach();
+ }
+
+ this._handles = null;
+ }
+});
+
+Y.MSA.Checkbox = Checkbox;
View
4 src/gallery-msa-checkbox/logs/yogi.stderr.log
@@ -0,0 +1,4 @@
+shifter [err] /src/gallery-msa-checkbox/js/gallery-msa-checkbox.js contains 5 lint errors
+shifter [err] /assets/skins/android/gallery-msa-checkbox-skin.css contains 23 lint errors
+shifter [err] /assets/skins/ios/gallery-msa-checkbox-skin.css contains 25 lint errors
+shifter [err] /assets/skins/sam/gallery-msa-checkbox-skin.css contains 27 lint errors
View
195 src/gallery-msa-checkbox/logs/yogi.stdout.log
@@ -0,0 +1,195 @@
+yogi [info] using yogi@0.1.11 on node@0.10.26
+yogi [info] using module: gallery-msa-checkbox
+yogi [info] running with shifter
+shifter [info] racing to find the closest .shifter.json file
+shifter [info] revving up
+shifter [info] looking for build.json file
+shifter [info] found build.json file, shifting
+shifter [info] putting the hammer down, let's build this thing!
+shifter [warn] down shifting, can't find a meta directory
+shifter [info] putting the hammer down
+shifter [info] shifting into gear for gallery-msa-checkbox
+ #1: Mixed spaces and tabs.
+ current = e, // line 81, pos 12
+ #2: Expected '{' and instead saw 'return'.
+ return; // line 122, pos 21
+ #3: 'TOGGLE' is defined but never used.
+ TOGGLE = '.toggle', // line 14, pos 11
+ #4: 'READONLY' is defined but never used.
+ READONLY = 'readonly', // line 16, pos 13
+ #5: 'config' is defined but never used.
+ function Checkbox(config) { // line 7, pos 25
+shifter [queu] writing RAW file
+shifter [queu] compressing gallery-msa-checkbox/gallery-msa-checkbox.js with UglifyJS
+shifter [queu] writing -min file
+shifter [info] shifting for coverage
+shifter [info] shifting skin for gallery-msa-checkbox
+shifter [queu] coverage file read, starting coverage for: gallery-msa-checkbox/gallery-msa-checkbox.js
+shifter [info] istanbul providing coverage
+shifter [queu] instrumenting with istanbul
+shifter [queu] writing coverage file to gallery-msa-checkbox/gallery-msa-checkbox-coverage.js
+shifter [queu] copying assets to skin for android
+shifter [queu] copying assets to skin for ios
+ #1: [warning] The box-sizing property isn't supported in IE6 and IE7.
+ box-sizing: border-box; // line 9, pos 2
+ #2: [warning] Using width with border can sometimes make elements larger than you expect.
+ border: 2px solid #ddd; // line 18, pos 3
+ #3: [warning] Using height with border can sometimes make elements larger than you expect.
+ border: 2px solid #ddd; // line 18, pos 3
+ #4: [warning] The property -o-transition-property is compatible with -webkit-transition-property and -moz-transition-property and should be included as well.
+ -webkit-transition-property: background-color, border; // line 20, pos 3
+ #5: [warning] The property -o-transition-duration is compatible with -webkit-transition-duration and -moz-transition-duration and should be included as well.
+ -webkit-transition-duration: 0.2s; // line 23, pos 3
+ #6: [warning] Using height with border can sometimes make elements larger than you expect.
+ border: 1px solid #ddd; // line 35, pos 3
+ #7: [warning] Using width with border can sometimes make elements larger than you expect.
+ border: 1px solid #ddd; // line 35, pos 3
+ #8: [warning] The property -o-transition-property is compatible with -webkit-transition-property and -moz-transition-property and should be included as well.
+ -webkit-transition-property: -webkit-transform, border, width; // line 37, pos 3
+ #9: [warning] The property -o-transition-duration is compatible with -webkit-transition-duration and -moz-transition-duration and should be included as well.
+ -webkit-transition-duration: 0.2s; // line 40, pos 3
+ #10: [warning] Don't use adjoining classes.
+ .toggle.active .toggle-handle { // line 44, pos 1
+ #11: [warning] The property -moz-transform is compatible with -webkit-transform and -ms-transform and should be included as well.
+ -webkit-transform: translate3d(28px, 0, 0); // line 45, pos 3
+ #12: [warning] The property -o-transform is compatible with -webkit-transform and -ms-transform and should be included as well.
+ -webkit-transform: translate3d(28px, 0, 0); // line 45, pos 3
+ #13: [warning] Using height with border can sometimes make elements larger than you expect.
+ border: 2px solid #d7d7d7; // line 53, pos 3
+ #14: [warning] Using width with border can sometimes make elements larger than you expect.
+ border: 2px solid #d7d7d7; // line 53, pos 3
+ #15: [warning] Using height with border can sometimes make elements larger than you expect.
+ border: 1px solid #b5b5b5; // line 62, pos 3
+ #16: [warning] Using width with border can sometimes make elements larger than you expect.
+ border: 1px solid #b5b5b5; // line 62, pos 3
+ #17: [warning] The property -moz-box-shadow is compatible with -webkit-box-shadow and should be included as well.
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(0, 0, 0, 0.1); // line 65, pos 3
+ #18: [warning] Don't use adjoining classes.
+ .toggle.active { // line 75, pos 1
+ #19: [warning] Don't use adjoining classes.
+ .toggle.active .toggle-handle { // line 79, pos 1
+ #20: [warning] The property -moz-transform is compatible with -webkit-transform and -ms-transform and should be included as well.
+ -webkit-transform: translate3d(50px, 0, 0); // line 83, pos 3
+ #21: [warning] The property -o-transform is compatible with -webkit-transform and -ms-transform and should be included as well.
+ -webkit-transform: translate3d(50px, 0, 0); // line 83, pos 3
+ #22: [warning] Don't use adjoining classes.
+ .toggle.active:before { // line 87, pos 1
+ #23: [warning] Don't use adjoining classes.
+ .toggle.active:before { // line 87, pos 1
+shifter [queu] copying assets to skin for sam
+ #1: [warning] The box-sizing property isn't supported in IE6 and IE7.
+ box-sizing: border-box; // line 9, pos 2
+ #2: [warning] Using height with border can sometimes make elements larger than you expect.
+ border: 2px solid #ddd; // line 18, pos 3
+ #3: [warning] Using width with border can sometimes make elements larger than you expect.
+ border: 2px solid #ddd; // line 18, pos 3
+ #4: [warning] The property -o-transition-property is compatible with -webkit-transition-property and -moz-transition-property and should be included as well.
+ -webkit-transition-property: background-color, border; // line 20, pos 3
+ #5: [warning] The property -o-transition-duration is compatible with -webkit-transition-duration and -moz-transition-duration and should be included as well.
+ -webkit-transition-duration: 0.2s; // line 23, pos 3
+ #6: [warning] Using height with border can sometimes make elements larger than you expect.
+ border: 1px solid #ddd; // line 35, pos 3
+ #7: [warning] Using width with border can sometimes make elements larger than you expect.
+ border: 1px solid #ddd; // line 35, pos 3
+ #8: [warning] The property -o-transition-property is compatible with -webkit-transition-property and -moz-transition-property and should be included as well.
+ -webkit-transition-property: -webkit-transform, border, width; // line 37, pos 3
+ #9: [warning] The property -o-transition-duration is compatible with -webkit-transition-duration and -moz-transition-duration and should be included as well.
+ -webkit-transition-duration: 0.2s; // line 40, pos 3
+ #10: [warning] Don't use adjoining classes.
+ .toggle.active .toggle-handle { // line 44, pos 1
+ #11: [warning] The property -moz-transform is compatible with -webkit-transform and -ms-transform and should be included as well.
+ -webkit-transform: translate3d(28px, 0, 0); // line 45, pos 3
+ #12: [warning] The property -o-transform is compatible with -webkit-transform and -ms-transform and should be included as well.
+ -webkit-transform: translate3d(28px, 0, 0); // line 45, pos 3
+ #13: [warning] Using width with border can sometimes make elements larger than you expect.
+ border: 2px solid #e6e6e6; // line 52, pos 3
+ #14: [warning] The property -moz-box-shadow is compatible with -webkit-box-shadow and should be included as well.
+ -webkit-box-shadow: inset 0 0 0 0 #e1e1e1; // line 53, pos 3
+ #15: [warning] The property -o-transition-property is compatible with -webkit-transition-property and -moz-transition-property and should be included as well.
+ -webkit-transition-property: box-shadow, border; // line 55, pos 3
+ #16: [warning] The property -o-transition-duration is compatible with -webkit-transition-duration and -moz-transition-duration and should be included as well.
+ -webkit-transition-duration: 0.2s; // line 58, pos 3
+ #17: [warning] Fallback border (hex or RGB) should precede RGBA border.
+ border: 1px solid rgba(0, 0, 0, 0.2); // line 63, pos 3
+ #18: [warning] The property -o-transition-property is compatible with -webkit-transition-property and -moz-transition-property and should be included as well.
+ -webkit-transition-property: -webkit-transform, border, width; // line 64, pos 3
+ #19: [warning] The property -moz-box-shadow is compatible with -webkit-box-shadow and should be included as well.
+ -webkit-box-shadow: 0 3px 3px rgba(0, 0, 0, 0.08); // line 67, pos 3
+ #20: [warning] Don't use adjoining classes.
+ .toggle.active { // line 73, pos 1
+ #21: [warning] The property -moz-box-shadow is compatible with -webkit-box-shadow and should be included as well.
+ -webkit-box-shadow: inset 0 0 0 13px #4cd964; // line 76, pos 3
+ #22: [warning] Don't use adjoining classes.
+ .toggle.active .toggle-handle { // line 79, pos 1
+ #23: [warning] The property -moz-transform is compatible with -webkit-transform and -ms-transform and should be included as well.
+ -webkit-transform: translate3d(17px, 0, 0); // line 80, pos 3
+ #24: [warning] The property -o-transform is compatible with -webkit-transform and -ms-transform and should be included as well.
+ -webkit-transform: translate3d(17px, 0, 0); // line 80, pos 3
+ #25: [warning] Don't use adjoining classes.
+ .toggle.active .toggle-handle { // line 84, pos 1
+ #1: [warning] The box-sizing property isn't supported in IE6 and IE7.
+ box-sizing: border-box; // line 9, pos 2
+ #2: [warning] Using height with border can sometimes make elements larger than you expect.
+ border: 2px solid #ddd; // line 18, pos 3
+ #3: [warning] Using width with border can sometimes make elements larger than you expect.
+ border: 2px solid #ddd; // line 18, pos 3
+ #4: [warning] The property -o-transition-property is compatible with -webkit-transition-property and -moz-transition-property and should be included as well.
+ -webkit-transition-property: background-color, border; // line 20, pos 3
+ #5: [warning] The property -o-transition-duration is compatible with -webkit-transition-duration and -moz-transition-duration and should be included as well.
+ -webkit-transition-duration: 0.2s; // line 23, pos 3
+ #6: [warning] Using height with border can sometimes make elements larger than you expect.
+ border: 1px solid #ddd; // line 35, pos 3
+ #7: [warning] Using width with border can sometimes make elements larger than you expect.
+ border: 1px solid #ddd; // line 35, pos 3
+ #8: [warning] The property -o-transition-property is compatible with -webkit-transition-property and -moz-transition-property and should be included as well.
+ -webkit-transition-property: -webkit-transform, border, width; // line 37, pos 3
+ #9: [warning] The property -o-transition-duration is compatible with -webkit-transition-duration and -moz-transition-duration and should be included as well.
+ -webkit-transition-duration: 0.2s; // line 40, pos 3
+ #10: [warning] Don't use adjoining classes.
+ .toggle.active .toggle-handle { // line 44, pos 1
+ #11: [warning] The property -moz-transform is compatible with -webkit-transform and -ms-transform and should be included as well.
+ -webkit-transform: translate3d(28px, 0, 0); // line 45, pos 3
+ #12: [warning] The property -o-transform is compatible with -webkit-transform and -ms-transform and should be included as well.
+ -webkit-transform: translate3d(28px, 0, 0); // line 45, pos 3
+ #13: [warning] Using width with border can sometimes make elements larger than you expect.
+ border: 2px solid #e6e6e6; // line 52, pos 3
+ #14: [warning] The property -moz-box-shadow is compatible with -webkit-box-shadow and should be included as well.
+ -webkit-box-shadow: inset 0 0 0 0 #e1e1e1; // line 53, pos 3
+ #15: [warning] The property -o-transition-property is compatible with -webkit-transition-property and -moz-transition-property and should be included as well.
+ -webkit-transition-property: box-shadow, border; // line 55, pos 3
+ #16: [warning] The property -o-transition-duration is compatible with -webkit-transition-duration and -moz-transition-duration and should be included as well.
+ -webkit-transition-duration: 0.2s; // line 58, pos 3
+ #17: [warning] Fallback border (hex or RGB) should precede RGBA border.
+ border: 1px solid rgba(0, 0, 0, 0.2); // line 63, pos 3
+ #18: [warning] The property -o-transition-property is compatible with -webkit-transition-property and -moz-transition-property and should be included as well.
+ -webkit-transition-property: -webkit-transform, border, width; // line 64, pos 3
+ #19: [warning] The property -moz-box-shadow is compatible with -webkit-box-shadow and should be included as well.
+ -webkit-box-shadow: 0 3px 3px rgba(0, 0, 0, 0.08); // line 67, pos 3
+ #20: [warning] Don't use adjoining classes.
+ .toggle.active { // line 78, pos 1
+ #21: [warning] The property -moz-box-shadow is compatible with -webkit-box-shadow and should be included as well.
+ -webkit-box-shadow: inset 0 0 0 13px #60a683; // line 82, pos 3
+ #22: [warning] Don't use adjoining classes.
+ .toggle.active .toggle-handle { // line 85, pos 1
+ #23: [warning] The property -moz-transform is compatible with -webkit-transform and -ms-transform and should be included as well.
+ -webkit-transform: translate3d(28px, 0, 0); // line 86, pos 3
+ #24: [warning] The property -o-transform is compatible with -webkit-transform and -ms-transform and should be included as well.
+ -webkit-transform: translate3d(28px, 0, 0); // line 86, pos 3
+ #25: [warning] Don't use adjoining classes.
+ .toggle.active .toggle-handle { // line 90, pos 1
+ #26: [warning] Don't use adjoining classes.
+ .toggle.active:before { // line 93, pos 1
+ #27: [warning] Don't use adjoining classes.
+ .toggle.active:before { // line 93, pos 1
+shifter [queu] writing skin file with core wrapper
+shifter [queu] writing skin file with core wrapper
+shifter [queu] writing skin file with core wrapper
+shifter [queu] writing skin file without core wrapper
+shifter [queu] writing skin file without core wrapper
+shifter [queu] writing skin file without core wrapper
+shifter [info] done racing, the gears are toast
+shifter [info] finished in 0.385 seconds, pretty fast huh?
+yogi [info] build complete
+yogi [info] testing module now
+yogi [info] prepping grover tests
+yogi [bail] seems this module does not have tests, you should add some :)
View
55 src/gallery-msa-checkbox/test.html
@@ -0,0 +1,55 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<style>
+.yui3-slidecheckbox-wrapper > .edge{background-color:#F5F5F5 !important;}
+</style>
+<script src="http://yui.yahooapis.com/3.15.0/build/yui/yui-debug.js"></script>
+<script>
+YUI({
+ base: './',
+ gallery:'gallery-2012.06.20-20-07',
+ modules:{
+ 'gallery-msa-checkbox-patch':{
+ fullpath:'../../build/gallery-msa-checkbox/assets/skins/sam/gallery-msa-checkbox.css',
+ type: 'css'
+ },
+ 'gallery-msa-checkbox':{
+ fullpath:'../../build/gallery-msa-checkbox/gallery-msa-checkbox-debug.js',
+ requires:['node-base','gallery-msa-checkbox-patch'],
+ skinnable:['sam','ios','android']
+ }
+
+ },
+ skin:{
+ overrides:{
+ //'msa-checkbox':['ios']
+ }
+ },
+ filter:'debug'
+
+}).use('gallery-msa-checkbox',function(Y){
+ new Y.MSA.Checkbox({srcNodes:Y.all('.msa-checkbox')});
+});
+function reset(){
+ var src = document.getElementById('c4');
+ src.checked = !src.checked;
+}
+</script>
+</head>
+<body style="background-color:#F5F5F5;">
+<form>
+
+<input type="checkbox" name="myCheck1" id="c1" class="msa-checkbox"><br/>
+<input type="checkbox" name="myCheck2" checked="CHECKED" id="c2" class="msa-checkbox"><br/>
+<input type="checkbox" name="myCheck3" CHECKED id="c5" class="msa-checkbox"><br/>
+Readonly
+<input type="checkbox" name="myCheck4" READONLY id="c6" class="msa-checkbox"><br/>
+
+Disabled:<br/>
+<input type="checkbox" name="myCheck5" class="msa-checkbox" DISABLED id="c3" ><br/>
+
+</form>
+
+</body>
+</html>
Please sign in to comment.
Something went wrong with that request. Please try again.