diff --git a/build/gallery-icello-button/assets/gallery-icello-button-core.css b/build/gallery-icello-button/assets/gallery-icello-button-core.css
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/build/gallery-icello-button/assets/skins/sam/gallery-icello-button-skin.css b/build/gallery-icello-button/assets/skins/sam/gallery-icello-button-skin.css
new file mode 100644
index 0000000000..f98dad0249
--- /dev/null
+++ b/build/gallery-icello-button/assets/skins/sam/gallery-icello-button-skin.css
@@ -0,0 +1,202 @@
+@charset 'utf-8';
+
+.yui3-icello-button-hidden { display:none !important;}
+
+.yui3-icello-button-content { cursor: pointer;display: inline-block;/*font-size: 1.1em;*/overflow:visible;position: relative;padding:0;text-align: center;}
+.yui3-skin-sam .yui3-icello-button-content {background-color: #E6E6E6;border: 1px solid;border-bottom-color: #666;border-left-color: #999;border-right-color: #666;border-top-color: #999;color: #000;}
+.yui3-skin-sam .yui3-icello-button-content:hover, .yui3-skin-sam .yui3-icello-button-content:active {background-color: #DADADA;border: 1px solid;border-bottom-color: #333;border-left-color: #666;border-right-color: #333;border-top-color: #666;color: #000;}
+.yui3-icello-button-disabled, .yui3-icello-button-disabled:hover {cursor:auto;filter: alpha(opacity = 50);opacity: .5;}
+.yui3-skin-sam .yui3-icello-button-disabled, .yui3-skin-sam .yui3-icello-button-disabled:hover, .yui3-skin-sam .yui3-icello-button-disabled:active {background-color: #E6E6E6;border-bottom-color: #666;border-left-color: #999;border-right-color: #666;border-top-color: #999;color: #999;}
+
+.yui3-icello-button-icononly {width: 2.4em;}
+
+
+.yui3-skin-sam .yui3-icello-button-icon {background-image: url(../../ui-icons_222222_256x240.png);height: 16px;width: 16px;}
+.yui3-skin-sam .yui3-icello-button-disabled .yui3-icello-button-icon {background-image: url(../../ui-icons_888888_256x240.png);height: 16px;width: 16px;}
+
+.yui3-icello-button-content .yui3-icello-button-label {display: block; line-height: 1.4;}
+.yui3-icello-button-labelonly .yui3-icello-button-label { padding: .4em 1em; }
+.yui3-icello-button-icononly .yui3-icello-button-label { padding: .4em; text-indent: -9999999px; }
+.yui3-icello-button-iconwithlabel .yui3-icello-button-label { padding: .4em 1em .4em 2.1em; }
+
+.yui3-icello-button-icononly .yui3-icello-button-icon { position: absolute; top: 50%; margin-top: -8px; }
+.yui3-icello-button-icononly .yui3-icello-button-icon { left: 50%; margin-left: -8px; }
+.yui3-icello-button-iconwithlabel .yui3-icello-button-icon { display:inline-block;float: left;left: 0.5em;margin-top: -8px;position: absolute;top: 50%;}
+
+button.yui3-icello-button-content::-moz-focus-inner { border: 0; padding: 0; }
+
+
+
+.yui3-icello-button-icon-carat-1-n { background-position: 0 0; }
+.yui3-icello-button-icon-carat-1-ne { background-position: -16px 0; }
+.yui3-icello-button-icon-carat-1-e { background-position: -32px 0; }
+.yui3-icello-button-icon-carat-1-se { background-position: -48px 0; }
+.yui3-icello-button-icon-carat-1-s { background-position: -64px 0; }
+.yui3-icello-button-icon-carat-1-sw { background-position: -80px 0; }
+.yui3-icello-button-icon-carat-1-w { background-position: -96px 0; }
+.yui3-icello-button-icon-carat-1-nw { background-position: -112px 0; }
+.yui3-icello-button-icon-carat-2-n-s { background-position: -128px 0; }
+.yui3-icello-button-icon-carat-2-e-w { background-position: -144px 0; }
+.yui3-icello-button-icon-triangle-1-n { background-position: 0 -16px; }
+.yui3-icello-button-icon-triangle-1-ne { background-position: -16px -16px; }
+.yui3-icello-button-icon-triangle-1-e { background-position: -32px -16px; }
+.yui3-icello-button-icon-triangle-1-se { background-position: -48px -16px; }
+.yui3-icello-button-icon-triangle-1-s { background-position: -64px -16px; }
+.yui3-icello-button-icon-triangle-1-sw { background-position: -80px -16px; }
+.yui3-icello-button-icon-triangle-1-w { background-position: -96px -16px; }
+.yui3-icello-button-icon-triangle-1-nw { background-position: -112px -16px; }
+.yui3-icello-button-icon-triangle-2-n-s { background-position: -128px -16px; }
+.yui3-icello-button-icon-triangle-2-e-w { background-position: -144px -16px; }
+.yui3-icello-button-icon-arrow-1-n { background-position: 0 -32px; }
+.yui3-icello-button-icon-arrow-1-ne { background-position: -16px -32px; }
+.yui3-icello-button-icon-arrow-1-e { background-position: -32px -32px; }
+.yui3-icello-button-icon-arrow-1-se { background-position: -48px -32px; }
+.yui3-icello-button-icon-arrow-1-s { background-position: -64px -32px; }
+.yui3-icello-button-icon-arrow-1-sw { background-position: -80px -32px; }
+.yui3-icello-button-icon-arrow-1-w { background-position: -96px -32px; }
+.yui3-icello-button-icon-arrow-1-nw { background-position: -112px -32px; }
+.yui3-icello-button-icon-arrow-2-n-s { background-position: -128px -32px; }
+.yui3-icello-button-icon-arrow-2-ne-sw { background-position: -144px -32px; }
+.yui3-icello-button-icon-arrow-2-e-w { background-position: -160px -32px; }
+.yui3-icello-button-icon-arrow-2-se-nw { background-position: -176px -32px; }
+.yui3-icello-button-icon-arrowstop-1-n { background-position: -192px -32px; }
+.yui3-icello-button-icon-arrowstop-1-e { background-position: -208px -32px; }
+.yui3-icello-button-icon-arrowstop-1-s { background-position: -224px -32px; }
+.yui3-icello-button-icon-arrowstop-1-w { background-position: -240px -32px; }
+.yui3-icello-button-icon-arrowthick-1-n { background-position: 0 -48px; }
+.yui3-icello-button-icon-arrowthick-1-ne { background-position: -16px -48px; }
+.yui3-icello-button-icon-arrowthick-1-e { background-position: -32px -48px; }
+.yui3-icello-button-icon-arrowthick-1-se { background-position: -48px -48px; }
+.yui3-icello-button-icon-arrowthick-1-s { background-position: -64px -48px; }
+.yui3-icello-button-icon-arrowthick-1-sw { background-position: -80px -48px; }
+.yui3-icello-button-icon-arrowthick-1-w { background-position: -96px -48px; }
+.yui3-icello-button-icon-arrowthick-1-nw { background-position: -112px -48px; }
+.yui3-icello-button-icon-arrowthick-2-n-s { background-position: -128px -48px; }
+.yui3-icello-button-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
+.yui3-icello-button-icon-arrowthick-2-e-w { background-position: -160px -48px; }
+.yui3-icello-button-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
+.yui3-icello-button-icon-arrowthickstop-1-n { background-position: -192px -48px; }
+.yui3-icello-button-icon-arrowthickstop-1-e { background-position: -208px -48px; }
+.yui3-icello-button-icon-arrowthickstop-1-s { background-position: -224px -48px; }
+.yui3-icello-button-icon-arrowthickstop-1-w { background-position: -240px -48px; }
+.yui3-icello-button-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
+.yui3-icello-button-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
+.yui3-icello-button-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
+.yui3-icello-button-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
+.yui3-icello-button-icon-arrowreturn-1-w { background-position: -64px -64px; }
+.yui3-icello-button-icon-arrowreturn-1-n { background-position: -80px -64px; }
+.yui3-icello-button-icon-arrowreturn-1-e { background-position: -96px -64px; }
+.yui3-icello-button-icon-arrowreturn-1-s { background-position: -112px -64px; }
+.yui3-icello-button-icon-arrowrefresh-1-w { background-position: -128px -64px; }
+.yui3-icello-button-icon-arrowrefresh-1-n { background-position: -144px -64px; }
+.yui3-icello-button-icon-arrowrefresh-1-e { background-position: -160px -64px; }
+.yui3-icello-button-icon-arrowrefresh-1-s { background-position: -176px -64px; }
+.yui3-icello-button-icon-arrow-4 { background-position: 0 -80px; }
+.yui3-icello-button-icon-arrow-4-diag { background-position: -16px -80px; }
+.yui3-icello-button-icon-extlink { background-position: -32px -80px; }
+.yui3-icello-button-icon-newwin { background-position: -48px -80px; }
+.yui3-icello-button-icon-refresh { background-position: -64px -80px; }
+.yui3-icello-button-icon-shuffle { background-position: -80px -80px; }
+.yui3-icello-button-icon-transfer-e-w { background-position: -96px -80px; }
+.yui3-icello-button-icon-transferthick-e-w { background-position: -112px -80px; }
+.yui3-icello-button-icon-folder-collapsed { background-position: 0 -96px; }
+.yui3-icello-button-icon-folder-open { background-position: -16px -96px; }
+.yui3-icello-button-icon-document { background-position: -32px -96px; }
+.yui3-icello-button-icon-document-b { background-position: -48px -96px; }
+.yui3-icello-button-icon-note { background-position: -64px -96px; }
+.yui3-icello-button-icon-mail-closed { background-position: -80px -96px; }
+.yui3-icello-button-icon-mail-open { background-position: -96px -96px; }
+.yui3-icello-button-icon-suitcase { background-position: -112px -96px; }
+.yui3-icello-button-icon-comment { background-position: -128px -96px; }
+.yui3-icello-button-icon-person { background-position: -144px -96px; }
+.yui3-icello-button-icon-print { background-position: -160px -96px; }
+.yui3-icello-button-icon-trash { background-position: -176px -96px; }
+.yui3-icello-button-icon-locked { background-position: -192px -96px; }
+.yui3-icello-button-icon-unlocked { background-position: -208px -96px; }
+.yui3-icello-button-icon-bookmark { background-position: -224px -96px; }
+.yui3-icello-button-icon-tag { background-position: -240px -96px; }
+.yui3-icello-button-icon-home { background-position: 0 -112px; }
+.yui3-icello-button-icon-flag { background-position: -16px -112px; }
+.yui3-icello-button-icon-calendar { background-position: -32px -112px; }
+.yui3-icello-button-icon-cart { background-position: -48px -112px; }
+.yui3-icello-button-icon-pencil { background-position: -64px -112px; }
+.yui3-icello-button-icon-clock { background-position: -80px -112px; }
+.yui3-icello-button-icon-disk { background-position: -96px -112px; }
+.yui3-icello-button-icon-calculator { background-position: -112px -112px; }
+.yui3-icello-button-icon-zoomin { background-position: -128px -112px; }
+.yui3-icello-button-icon-zoomout { background-position: -144px -112px; }
+.yui3-icello-button-icon-search { background-position: -160px -112px; }
+.yui3-icello-button-icon-wrench { background-position: -176px -112px; }
+.yui3-icello-button-icon-gear { background-position: -192px -112px; }
+.yui3-icello-button-icon-heart { background-position: -208px -112px; }
+.yui3-icello-button-icon-star { background-position: -224px -112px; }
+.yui3-icello-button-icon-link { background-position: -240px -112px; }
+.yui3-icello-button-icon-cancel { background-position: 0 -128px; }
+.yui3-icello-button-icon-plus { background-position: -16px -128px; }
+.yui3-icello-button-icon-plusthick { background-position: -32px -128px; }
+.yui3-icello-button-icon-minus { background-position: -48px -128px; }
+.yui3-icello-button-icon-minusthick { background-position: -64px -128px; }
+.yui3-icello-button-icon-close { background-position: -80px -128px; }
+.yui3-icello-button-icon-closethick { background-position: -96px -128px; }
+.yui3-icello-button-icon-key { background-position: -112px -128px; }
+.yui3-icello-button-icon-lightbulb { background-position: -128px -128px; }
+.yui3-icello-button-icon-scissors { background-position: -144px -128px; }
+.yui3-icello-button-icon-clipboard { background-position: -160px -128px; }
+.yui3-icello-button-icon-copy { background-position: -176px -128px; }
+.yui3-icello-button-icon-contact { background-position: -192px -128px; }
+.yui3-icello-button-icon-image { background-position: -208px -128px; }
+.yui3-icello-button-icon-video { background-position: -224px -128px; }
+.yui3-icello-button-icon-script { background-position: -240px -128px; }
+.yui3-icello-button-icon-alert { background-position: 0 -144px; }
+.yui3-icello-button-icon-info { background-position: -16px -144px; }
+.yui3-icello-button-icon-notice { background-position: -32px -144px; }
+.yui3-icello-button-icon-help { background-position: -48px -144px; }
+.yui3-icello-button-icon-check { background-position: -64px -144px; }
+.yui3-icello-button-icon-bullet { background-position: -80px -144px; }
+.yui3-icello-button-icon-radio-off { background-position: -96px -144px; }
+.yui3-icello-button-icon-radio-on { background-position: -112px -144px; }
+.yui3-icello-button-icon-pin-w { background-position: -128px -144px; }
+.yui3-icello-button-icon-pin-s { background-position: -144px -144px; }
+.yui3-icello-button-icon-play { background-position: 0 -160px; }
+.yui3-icello-button-icon-pause { background-position: -16px -160px; }
+.yui3-icello-button-icon-seek-next { background-position: -32px -160px; }
+.yui3-icello-button-icon-seek-prev { background-position: -48px -160px; }
+.yui3-icello-button-icon-seek-end { background-position: -64px -160px; }
+.yui3-icello-button-icon-seek-start { background-position: -80px -160px; }
+.yui3-icello-button-icon-stop { background-position: -96px -160px; }
+.yui3-icello-button-icon-eject { background-position: -112px -160px; }
+.yui3-icello-button-icon-volume-off { background-position: -128px -160px; }
+.yui3-icello-button-icon-volume-on { background-position: -144px -160px; }
+.yui3-icello-button-icon-power { background-position: 0 -176px; }
+.yui3-icello-button-icon-signal-diag { background-position: -16px -176px; }
+.yui3-icello-button-icon-signal { background-position: -32px -176px; }
+.yui3-icello-button-icon-battery-0 { background-position: -48px -176px; }
+.yui3-icello-button-icon-battery-1 { background-position: -64px -176px; }
+.yui3-icello-button-icon-battery-2 { background-position: -80px -176px; }
+.yui3-icello-button-icon-battery-3 { background-position: -96px -176px; }
+.yui3-icello-button-icon-circle-plus { background-position: 0 -192px; }
+.yui3-icello-button-icon-circle-minus { background-position: -16px -192px; }
+.yui3-icello-button-icon-circle-close { background-position: -32px -192px; }
+.yui3-icello-button-icon-circle-triangle-e { background-position: -48px -192px; }
+.yui3-icello-button-icon-circle-triangle-s { background-position: -64px -192px; }
+.yui3-icello-button-icon-circle-triangle-w { background-position: -80px -192px; }
+.yui3-icello-button-icon-circle-triangle-n { background-position: -96px -192px; }
+.yui3-icello-button-icon-circle-arrow-e { background-position: -112px -192px; }
+.yui3-icello-button-icon-circle-arrow-s { background-position: -128px -192px; }
+.yui3-icello-button-icon-circle-arrow-w { background-position: -144px -192px; }
+.yui3-icello-button-icon-circle-arrow-n { background-position: -160px -192px; }
+.yui3-icello-button-icon-circle-zoomin { background-position: -176px -192px; }
+.yui3-icello-button-icon-circle-zoomout { background-position: -192px -192px; }
+.yui3-icello-button-icon-circle-check { background-position: -208px -192px; }
+.yui3-icello-button-icon-circlesmall-plus { background-position: 0 -208px; }
+.yui3-icello-button-icon-circlesmall-minus { background-position: -16px -208px; }
+.yui3-icello-button-icon-circlesmall-close { background-position: -32px -208px; }
+.yui3-icello-button-icon-squaresmall-plus { background-position: -48px -208px; }
+.yui3-icello-button-icon-squaresmall-minus { background-position: -64px -208px; }
+.yui3-icello-button-icon-squaresmall-close { background-position: -80px -208px; }
+.yui3-icello-button-icon-grip-dotted-vertical { background-position: 0 -224px; }
+.yui3-icello-button-icon-grip-dotted-horizontal { background-position: -16px -224px; }
+.yui3-icello-button-icon-grip-solid-vertical { background-position: -32px -224px; }
+.yui3-icello-button-icon-grip-solid-horizontal { background-position: -48px -224px; }
+.yui3-icello-button-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
+.yui3-icello-button-icon-grip-diagonal-se { background-position: -80px -224px; }
diff --git a/build/gallery-icello-button/assets/skins/sam/gallery-icello-button.css b/build/gallery-icello-button/assets/skins/sam/gallery-icello-button.css
new file mode 100644
index 0000000000..c8a0e46697
--- /dev/null
+++ b/build/gallery-icello-button/assets/skins/sam/gallery-icello-button.css
@@ -0,0 +1,3 @@
+@charset 'utf-8';.yui3-icello-button-hidden{display:none!important}.yui3-icello-button-content{cursor:pointer;display:inline-block;overflow:visible;position:relative;padding:0;text-align:center}.yui3-skin-sam .yui3-icello-button-content{background-color:#e6e6e6;border:1px solid;border-bottom-color:#666;border-left-color:#999;border-right-color:#666;border-top-color:#999;color:#000}.yui3-skin-sam .yui3-icello-button-content:hover,.yui3-skin-sam .yui3-icello-button-content:active{background-color:#dadada;border:1px solid;border-bottom-color:#333;border-left-color:#666;border-right-color:#333;border-top-color:#666;color:#000}.yui3-icello-button-disabled,.yui3-icello-button-disabled:hover{cursor:auto;filter:alpha(opacity = 50);opacity:.5}.yui3-skin-sam .yui3-icello-button-disabled,.yui3-skin-sam .yui3-icello-button-disabled:hover,.yui3-skin-sam .yui3-icello-button-disabled:active{background-color:#e6e6e6;border-bottom-color:#666;border-left-color:#999;border-right-color:#666;border-top-color:#999;color:#999}.yui3-icello-button-icononly{width:2.4em}.yui3-skin-sam .yui3-icello-button-icon{background-image:url(../../ui-icons_222222_256x240.png);height:16px;width:16px}.yui3-skin-sam .yui3-icello-button-disabled .yui3-icello-button-icon{background-image:url(../../ui-icons_888888_256x240.png);height:16px;width:16px}.yui3-icello-button-content .yui3-icello-button-label{display:block;line-height:1.4}.yui3-icello-button-labelonly .yui3-icello-button-label{padding:.4em 1em}.yui3-icello-button-icononly .yui3-icello-button-label{padding:.4em;text-indent:-9999999px}.yui3-icello-button-iconwithlabel .yui3-icello-button-label{padding:.4em 1em .4em 2.1em}.yui3-icello-button-icononly .yui3-icello-button-icon{position:absolute;top:50%;margin-top:-8px}.yui3-icello-button-icononly .yui3-icello-button-icon{left:50%;margin-left:-8px}.yui3-icello-button-iconwithlabel .yui3-icello-button-icon{display:inline-block;float:left;left:.5em;margin-top:-8px;position:absolute;top:50%}button.yui3-icello-button-content::-moz-focus-inner{border:0;padding:0}.yui3-icello-button-icon-carat-1-n{background-position:0 0}.yui3-icello-button-icon-carat-1-ne{background-position:-16px 0}.yui3-icello-button-icon-carat-1-e{background-position:-32px 0}.yui3-icello-button-icon-carat-1-se{background-position:-48px 0}.yui3-icello-button-icon-carat-1-s{background-position:-64px 0}.yui3-icello-button-icon-carat-1-sw{background-position:-80px 0}.yui3-icello-button-icon-carat-1-w{background-position:-96px 0}.yui3-icello-button-icon-carat-1-nw{background-position:-112px 0}.yui3-icello-button-icon-carat-2-n-s{background-position:-128px 0}.yui3-icello-button-icon-carat-2-e-w{background-position:-144px 0}.yui3-icello-button-icon-triangle-1-n{background-position:0 -16px}.yui3-icello-button-icon-triangle-1-ne{background-position:-16px -16px}.yui3-icello-button-icon-triangle-1-e{background-position:-32px -16px}.yui3-icello-button-icon-triangle-1-se{background-position:-48px -16px}.yui3-icello-button-icon-triangle-1-s{background-position:-64px -16px}.yui3-icello-button-icon-triangle-1-sw{background-position:-80px -16px}.yui3-icello-button-icon-triangle-1-w{background-position:-96px -16px}.yui3-icello-button-icon-triangle-1-nw{background-position:-112px -16px}.yui3-icello-button-icon-triangle-2-n-s{background-position:-128px -16px}.yui3-icello-button-icon-triangle-2-e-w{background-position:-144px -16px}.yui3-icello-button-icon-arrow-1-n{background-position:0 -32px}.yui3-icello-button-icon-arrow-1-ne{background-position:-16px -32px}.yui3-icello-button-icon-arrow-1-e{background-position:-32px -32px}.yui3-icello-button-icon-arrow-1-se{background-position:-48px -32px}.yui3-icello-button-icon-arrow-1-s{background-position:-64px -32px}.yui3-icello-button-icon-arrow-1-sw{background-position:-80px -32px}.yui3-icello-button-icon-arrow-1-w{background-position:-96px -32px}.yui3-icello-button-icon-arrow-1-nw{background-position:-112px -32px}.yui3-icello-button-icon-arrow-2-n-s{background-position:-128px -32px}.yui3-icello-button-icon-arrow-2-ne-sw{background-position:-144px -32px}.yui3-icello-button-icon-arrow-2-e-w{background-position:-160px -32px}.yui3-icello-button-icon-arrow-2-se-nw{background-position:-176px -32px}.yui3-icello-button-icon-arrowstop-1-n{background-position:-192px -32px}.yui3-icello-button-icon-arrowstop-1-e{background-position:-208px -32px}.yui3-icello-button-icon-arrowstop-1-s{background-position:-224px -32px}.yui3-icello-button-icon-arrowstop-1-w{background-position:-240px -32px}.yui3-icello-button-icon-arrowthick-1-n{background-position:0 -48px}.yui3-icello-button-icon-arrowthick-1-ne{background-position:-16px -48px}.yui3-icello-button-icon-arrowthick-1-e{background-position:-32px -48px}.yui3-icello-button-icon-arrowthick-1-se{background-position:-48px -48px}.yui3-icello-button-icon-arrowthick-1-s{background-position:-64px -48px}.yui3-icello-button-icon-arrowthick-1-sw{background-position:-80px -48px}.yui3-icello-button-icon-arrowthick-1-w{background-position:-96px -48px}.yui3-icello-button-icon-arrowthick-1-nw{background-position:-112px -48px}.yui3-icello-button-icon-arrowthick-2-n-s{background-position:-128px -48px}.yui3-icello-button-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.yui3-icello-button-icon-arrowthick-2-e-w{background-position:-160px -48px}.yui3-icello-button-icon-arrowthick-2-se-nw{background-position:-176px -48px}.yui3-icello-button-icon-arrowthickstop-1-n{background-position:-192px -48px}.yui3-icello-button-icon-arrowthickstop-1-e{background-position:-208px -48px}.yui3-icello-button-icon-arrowthickstop-1-s{background-position:-224px -48px}.yui3-icello-button-icon-arrowthickstop-1-w{background-position:-240px -48px}.yui3-icello-button-icon-arrowreturnthick-1-w{background-position:0 -64px}.yui3-icello-button-icon-arrowreturnthick-1-n{background-position:-16px -64px}.yui3-icello-button-icon-arrowreturnthick-1-e{background-position:-32px -64px}.yui3-icello-button-icon-arrowreturnthick-1-s{background-position:-48px -64px}
+.yui3-icello-button-icon-arrowreturn-1-w{background-position:-64px -64px}.yui3-icello-button-icon-arrowreturn-1-n{background-position:-80px -64px}.yui3-icello-button-icon-arrowreturn-1-e{background-position:-96px -64px}.yui3-icello-button-icon-arrowreturn-1-s{background-position:-112px -64px}.yui3-icello-button-icon-arrowrefresh-1-w{background-position:-128px -64px}.yui3-icello-button-icon-arrowrefresh-1-n{background-position:-144px -64px}.yui3-icello-button-icon-arrowrefresh-1-e{background-position:-160px -64px}.yui3-icello-button-icon-arrowrefresh-1-s{background-position:-176px -64px}.yui3-icello-button-icon-arrow-4{background-position:0 -80px}.yui3-icello-button-icon-arrow-4-diag{background-position:-16px -80px}.yui3-icello-button-icon-extlink{background-position:-32px -80px}.yui3-icello-button-icon-newwin{background-position:-48px -80px}.yui3-icello-button-icon-refresh{background-position:-64px -80px}.yui3-icello-button-icon-shuffle{background-position:-80px -80px}.yui3-icello-button-icon-transfer-e-w{background-position:-96px -80px}.yui3-icello-button-icon-transferthick-e-w{background-position:-112px -80px}.yui3-icello-button-icon-folder-collapsed{background-position:0 -96px}.yui3-icello-button-icon-folder-open{background-position:-16px -96px}.yui3-icello-button-icon-document{background-position:-32px -96px}.yui3-icello-button-icon-document-b{background-position:-48px -96px}.yui3-icello-button-icon-note{background-position:-64px -96px}.yui3-icello-button-icon-mail-closed{background-position:-80px -96px}.yui3-icello-button-icon-mail-open{background-position:-96px -96px}.yui3-icello-button-icon-suitcase{background-position:-112px -96px}.yui3-icello-button-icon-comment{background-position:-128px -96px}.yui3-icello-button-icon-person{background-position:-144px -96px}.yui3-icello-button-icon-print{background-position:-160px -96px}.yui3-icello-button-icon-trash{background-position:-176px -96px}.yui3-icello-button-icon-locked{background-position:-192px -96px}.yui3-icello-button-icon-unlocked{background-position:-208px -96px}.yui3-icello-button-icon-bookmark{background-position:-224px -96px}.yui3-icello-button-icon-tag{background-position:-240px -96px}.yui3-icello-button-icon-home{background-position:0 -112px}.yui3-icello-button-icon-flag{background-position:-16px -112px}.yui3-icello-button-icon-calendar{background-position:-32px -112px}.yui3-icello-button-icon-cart{background-position:-48px -112px}.yui3-icello-button-icon-pencil{background-position:-64px -112px}.yui3-icello-button-icon-clock{background-position:-80px -112px}.yui3-icello-button-icon-disk{background-position:-96px -112px}.yui3-icello-button-icon-calculator{background-position:-112px -112px}.yui3-icello-button-icon-zoomin{background-position:-128px -112px}.yui3-icello-button-icon-zoomout{background-position:-144px -112px}.yui3-icello-button-icon-search{background-position:-160px -112px}.yui3-icello-button-icon-wrench{background-position:-176px -112px}.yui3-icello-button-icon-gear{background-position:-192px -112px}.yui3-icello-button-icon-heart{background-position:-208px -112px}.yui3-icello-button-icon-star{background-position:-224px -112px}.yui3-icello-button-icon-link{background-position:-240px -112px}.yui3-icello-button-icon-cancel{background-position:0 -128px}.yui3-icello-button-icon-plus{background-position:-16px -128px}.yui3-icello-button-icon-plusthick{background-position:-32px -128px}.yui3-icello-button-icon-minus{background-position:-48px -128px}.yui3-icello-button-icon-minusthick{background-position:-64px -128px}.yui3-icello-button-icon-close{background-position:-80px -128px}.yui3-icello-button-icon-closethick{background-position:-96px -128px}.yui3-icello-button-icon-key{background-position:-112px -128px}.yui3-icello-button-icon-lightbulb{background-position:-128px -128px}.yui3-icello-button-icon-scissors{background-position:-144px -128px}.yui3-icello-button-icon-clipboard{background-position:-160px -128px}.yui3-icello-button-icon-copy{background-position:-176px -128px}.yui3-icello-button-icon-contact{background-position:-192px -128px}.yui3-icello-button-icon-image{background-position:-208px -128px}.yui3-icello-button-icon-video{background-position:-224px -128px}.yui3-icello-button-icon-script{background-position:-240px -128px}.yui3-icello-button-icon-alert{background-position:0 -144px}.yui3-icello-button-icon-info{background-position:-16px -144px}.yui3-icello-button-icon-notice{background-position:-32px -144px}.yui3-icello-button-icon-help{background-position:-48px -144px}.yui3-icello-button-icon-check{background-position:-64px -144px}.yui3-icello-button-icon-bullet{background-position:-80px -144px}.yui3-icello-button-icon-radio-off{background-position:-96px -144px}.yui3-icello-button-icon-radio-on{background-position:-112px -144px}.yui3-icello-button-icon-pin-w{background-position:-128px -144px}.yui3-icello-button-icon-pin-s{background-position:-144px -144px}.yui3-icello-button-icon-play{background-position:0 -160px}.yui3-icello-button-icon-pause{background-position:-16px -160px}.yui3-icello-button-icon-seek-next{background-position:-32px -160px}.yui3-icello-button-icon-seek-prev{background-position:-48px -160px}.yui3-icello-button-icon-seek-end{background-position:-64px -160px}.yui3-icello-button-icon-seek-start{background-position:-80px -160px}.yui3-icello-button-icon-stop{background-position:-96px -160px}.yui3-icello-button-icon-eject{background-position:-112px -160px}.yui3-icello-button-icon-volume-off{background-position:-128px -160px}.yui3-icello-button-icon-volume-on{background-position:-144px -160px}.yui3-icello-button-icon-power{background-position:0 -176px}.yui3-icello-button-icon-signal-diag{background-position:-16px -176px}.yui3-icello-button-icon-signal{background-position:-32px -176px}.yui3-icello-button-icon-battery-0{background-position:-48px -176px}.yui3-icello-button-icon-battery-1{background-position:-64px -176px}.yui3-icello-button-icon-battery-2{background-position:-80px -176px}.yui3-icello-button-icon-battery-3{background-position:-96px -176px}
+.yui3-icello-button-icon-circle-plus{background-position:0 -192px}.yui3-icello-button-icon-circle-minus{background-position:-16px -192px}.yui3-icello-button-icon-circle-close{background-position:-32px -192px}.yui3-icello-button-icon-circle-triangle-e{background-position:-48px -192px}.yui3-icello-button-icon-circle-triangle-s{background-position:-64px -192px}.yui3-icello-button-icon-circle-triangle-w{background-position:-80px -192px}.yui3-icello-button-icon-circle-triangle-n{background-position:-96px -192px}.yui3-icello-button-icon-circle-arrow-e{background-position:-112px -192px}.yui3-icello-button-icon-circle-arrow-s{background-position:-128px -192px}.yui3-icello-button-icon-circle-arrow-w{background-position:-144px -192px}.yui3-icello-button-icon-circle-arrow-n{background-position:-160px -192px}.yui3-icello-button-icon-circle-zoomin{background-position:-176px -192px}.yui3-icello-button-icon-circle-zoomout{background-position:-192px -192px}.yui3-icello-button-icon-circle-check{background-position:-208px -192px}.yui3-icello-button-icon-circlesmall-plus{background-position:0 -208px}.yui3-icello-button-icon-circlesmall-minus{background-position:-16px -208px}.yui3-icello-button-icon-circlesmall-close{background-position:-32px -208px}.yui3-icello-button-icon-squaresmall-plus{background-position:-48px -208px}.yui3-icello-button-icon-squaresmall-minus{background-position:-64px -208px}.yui3-icello-button-icon-squaresmall-close{background-position:-80px -208px}.yui3-icello-button-icon-grip-dotted-vertical{background-position:0 -224px}.yui3-icello-button-icon-grip-dotted-horizontal{background-position:-16px -224px}.yui3-icello-button-icon-grip-solid-vertical{background-position:-32px -224px}.yui3-icello-button-icon-grip-solid-horizontal{background-position:-48px -224px}.yui3-icello-button-icon-gripsmall-diagonal-se{background-position:-64px -224px}.yui3-icello-button-icon-grip-diagonal-se{background-position:-80px -224px}#yui3-css-stamp.skin-sam-gallery-icello-button{display:none}
diff --git a/build/gallery-icello-button/assets/ui-icons_222222_256x240.png b/build/gallery-icello-button/assets/ui-icons_222222_256x240.png
new file mode 100644
index 0000000000..b273ff111d
Binary files /dev/null and b/build/gallery-icello-button/assets/ui-icons_222222_256x240.png differ
diff --git a/build/gallery-icello-button/assets/ui-icons_888888_256x240.png b/build/gallery-icello-button/assets/ui-icons_888888_256x240.png
new file mode 100644
index 0000000000..6d02426c11
Binary files /dev/null and b/build/gallery-icello-button/assets/ui-icons_888888_256x240.png differ
diff --git a/build/gallery-icello-button/gallery-icello-button-debug.js b/build/gallery-icello-button/gallery-icello-button-debug.js
new file mode 100644
index 0000000000..8ced471baa
--- /dev/null
+++ b/build/gallery-icello-button/gallery-icello-button-debug.js
@@ -0,0 +1,386 @@
+YUI.add('gallery-icello-button', function(Y) {
+
+var BASENAME = 'icello-button',
+ CB = 'contentBox',
+ CSS_NAMES = {
+ ICON_ONLY: 'yui3-icello-button-icononly',
+ LABEL_ONLY: 'yui3-icello-button-labelonly',
+ ICON_WITH_LABEL: 'yui3-icello-button-iconwithlabel'
+ },
+ ICONS = null,
+ VIEW_TYPES = {
+ ICON_ONLY: 1,
+ LABEL_ONLY: 2,
+ ICON_WITH_LABEL: 3
+ },
+ Node = Y.Node,
+ sub = Y.Lang.sub,
+ getCN = Y.ClassNameManager.getClassName,
+ getIconCss = function (name) {
+ return getCN(BASENAME, 'icon', name);
+ };
+
+ICONS = {
+ ALERT: getIconCss('alert'),
+ ARROWREFRESH_1_E: getIconCss('arrowrefresh-1-e'),
+ ARROWREFRESH_1_N: getIconCss('arrowrefresh-1-n'),
+ ARROWREFRESH_1_S: getIconCss('arrowrefresh-1-s'),
+ ARROWREFRESH_1_W: getIconCss('arrowrefresh-1-w'),
+ ARROWRETURNTHICK_1_E: getIconCss('arrowreturnthick-1-e'),
+ ARROWRETURNTHICK_1_N: getIconCss('arrowreturnthick-1-n'),
+ ARROWRETURNTHICK_1_S: getIconCss('arrowreturnthick-1-s'),
+ ARROWRETURNTHICK_1_W: getIconCss('arrowreturnthick-1-w'),
+ ARROWRETURN_1_E: getIconCss('arrowreturn-1-e'),
+ ARROWRETURN_1_N: getIconCss('arrowreturn-1-n'),
+ ARROWRETURN_1_S: getIconCss('arrowreturn-1-s'),
+ ARROWRETURN_1_W: getIconCss('arrowreturn-1-w'),
+ ARROWSTOP_1_E: getIconCss('arrowstop-1-e'),
+ ARROWSTOP_1_N: getIconCss('arrowstop-1-n'),
+ ARROWSTOP_1_S: getIconCss('arrowstop-1-s'),
+ ARROWSTOP_1_W: getIconCss('arrowstop-1-w'),
+ ARROWTHICKSTOP_1_E: getIconCss('arrowthickstop-1-e'),
+ ARROWTHICKSTOP_1_N: getIconCss('arrowthickstop-1-n'),
+ ARROWTHICKSTOP_1_S: getIconCss('arrowthickstop-1-s'),
+ ARROWTHICKSTOP_1_W: getIconCss('arrowthickstop-1-w'),
+ ARROWTHICK_1_E: getIconCss('arrowthick-1-e'),
+ ARROWTHICK_1_N: getIconCss('arrowthick-1-n'),
+ ARROWTHICK_1_NE: getIconCss('arrowthick-1-ne'),
+ ARROWTHICK_1_NW: getIconCss('arrowthick-1-nw'),
+ ARROWTHICK_1_S: getIconCss('arrowthick-1-s'),
+ ARROWTHICK_1_SE: getIconCss('arrowthick-1-se'),
+ ARROWTHICK_1_SW: getIconCss('arrowthick-1-sw'),
+ ARROWTHICK_1_W: getIconCss('arrowthick-1-w'),
+ ARROWTHICK_2_E_W: getIconCss('arrowthick-2-e-w'),
+ ARROWTHICK_2_NE_SW: getIconCss('arrowthick-2-ne-sw'),
+ ARROWTHICK_2_N_S: getIconCss('arrowthick-2-n-s'),
+ ARROWTHICK_2_SE_NW: getIconCss('arrowthick-2-se-nw'),
+ ARROW_1_E: getIconCss('arrow-1-e'),
+ ARROW_1_N: getIconCss('arrow-1-n'),
+ ARROW_1_NE: getIconCss('arrow-1-ne'),
+ ARROW_1_NW: getIconCss('arrow-1-nw'),
+ ARROW_1_S: getIconCss('arrow-1-s'),
+ ARROW_1_SE: getIconCss('arrow-1-se'),
+ ARROW_1_SW: getIconCss('arrow-1-sw'),
+ ARROW_1_W: getIconCss('arrow-1-w'),
+ ARROW_2_E_W: getIconCss('arrow-2-e-w'),
+ ARROW_2_NE_SW: getIconCss('arrow-2-ne-sw'),
+ ARROW_2_N_S: getIconCss('arrow-2-n-s'),
+ ARROW_2_SE_NW: getIconCss('arrow-2-se-nw'),
+ ARROW_4: getIconCss('arrow-4'),
+ ARROW_4_DIAG: getIconCss('arrow-4-diag'),
+ BATTERY_0: getIconCss('battery-0'),
+ BATTERY_1: getIconCss('battery-1'),
+ BATTERY_2: getIconCss('battery-2'),
+ BATTERY_3: getIconCss('battery-3'),
+ BOOKMARK: getIconCss('bookmark'),
+ BULLET: getIconCss('bullet'),
+ CALCULATOR: getIconCss('calculator'),
+ CALENDAR: getIconCss('calendar'),
+ CANCEL: getIconCss('cancel'),
+ CARAT_1_E: getIconCss('carat-1-e'),
+ CARAT_1_N: getIconCss('carat-1-n'),
+ CARAT_1_NE: getIconCss('carat-1-ne'),
+ CARAT_1_NW: getIconCss('carat-1-nw'),
+ CARAT_1_S: getIconCss('carat-1-s'),
+ CARAT_1_SE: getIconCss('carat-1-se'),
+ CARAT_1_SW: getIconCss('carat-1-sw'),
+ CARAT_1_W: getIconCss('carat-1-w'),
+ CARAT_2_E_W: getIconCss('carat-2-e-w'),
+ CARAT_2_N_S: getIconCss('carat-2-n-s'),
+ CART: getIconCss('cart'),
+ CHECK: getIconCss('check'),
+ CIRCLESMALL_CLOSE: getIconCss('circlesmall-close'),
+ CIRCLESMALL_MINUS: getIconCss('circlesmall-minus'),
+ CIRCLESMALL_PLUS: getIconCss('circlesmall-plus'),
+ CIRCLE_ARROW_E: getIconCss('circle-arrow-e'),
+ CIRCLE_ARROW_N: getIconCss('circle-arrow-n'),
+ CIRCLE_ARROW_S: getIconCss('circle-arrow-s'),
+ CIRCLE_ARROW_W: getIconCss('circle-arrow-w'),
+ CIRCLE_CHECK: getIconCss('circle-check'),
+ CIRCLE_CLOSE: getIconCss('circle-close'),
+ CIRCLE_MINUS: getIconCss('circle-minus'),
+ CIRCLE_PLUS: getIconCss('circle-plus'),
+ CIRCLE_TRIANGLE_E: getIconCss('circle-triangle-e'),
+ CIRCLE_TRIANGLE_N: getIconCss('circle-triangle-n'),
+ CIRCLE_TRIANGLE_S: getIconCss('circle-triangle-s'),
+ CIRCLE_TRIANGLE_W: getIconCss('circle-triangle-w'),
+ CIRCLE_ZOOMIN: getIconCss('circle-zoomin'),
+ CIRCLE_ZOOMOUT: getIconCss('circle-zoomout'),
+ CLIPBOARD: getIconCss('clipboard'),
+ CLOCK: getIconCss('clock'),
+ CLOSE: getIconCss('close'),
+ CLOSETHICK: getIconCss('closethick'),
+ COMMENT: getIconCss('comment'),
+ CONTACT: getIconCss('contact'),
+ COPY: getIconCss('copy'),
+ DISK: getIconCss('disk'),
+ DOCUMENT: getIconCss('document'),
+ DOCUMENT_B: getIconCss('document-b'),
+ EJECT: getIconCss('eject'),
+ EXTLINK: getIconCss('extlink'),
+ FLAG: getIconCss('flag'),
+ FOLDER_COLLAPSED: getIconCss('folder-collapsed'),
+ FOLDER_OPEN: getIconCss('folder-open'),
+ GEAR: getIconCss('gear'),
+ GRIPSMALL_DIAGONAL_SE: getIconCss('gripsmall-diagonal-se'),
+ GRIP_DIAGONAL_SE: getIconCss('grip-diagonal-se'),
+ GRIP_DOTTED_HORIZONTAL: getIconCss('grip-dotted-horizontal'),
+ GRIP_DOTTED_VERTICAL: getIconCss('grip-dotted-vertical'),
+ GRIP_SOLID_HORIZONTAL: getIconCss('grip-solid-horizontal'),
+ GRIP_SOLID_VERTICAL: getIconCss('grip-solid-vertical'),
+ HEART: getIconCss('heart'),
+ HELP: getIconCss('help'),
+ HOME: getIconCss('home'),
+ IMAGE: getIconCss('image'),
+ INFO: getIconCss('info'),
+ KEY: getIconCss('key'),
+ LIGHTBULB: getIconCss('lightbulb'),
+ LINK: getIconCss('link'),
+ LOCKED: getIconCss('locked'),
+ MAIL_CLOSED: getIconCss('mail-closed'),
+ MAIL_OPEN: getIconCss('mail-open'),
+ MINUS: getIconCss('minus'),
+ MINUSTHICK: getIconCss('minusthick'),
+ NEWWIN: getIconCss('newwin'),
+ NOTE: getIconCss('note'),
+ NOTICE: getIconCss('notice'),
+ PAUSE: getIconCss('pause'),
+ PENCIL: getIconCss('pencil'),
+ PERSON: getIconCss('person'),
+ PIN_S: getIconCss('pin-s'),
+ PIN_W: getIconCss('pin-w'),
+ PLAY: getIconCss('play'),
+ PLUS: getIconCss('plus'),
+ PLUSTHICK: getIconCss('plusthick'),
+ POWER: getIconCss('power'),
+ PRINT: getIconCss('print'),
+ RADIO_OFF: getIconCss('radio-off'),
+ RADIO_ON: getIconCss('radio-on'),
+ REFRESH: getIconCss('refresh'),
+ SCISSORS: getIconCss('scissors'),
+ SCRIPT: getIconCss('script'),
+ SEARCH: getIconCss('search'),
+ SEEK_END: getIconCss('seek-end'),
+ SEEK_FIRST: getIconCss('seek-first'),
+ SEEK_NEXT: getIconCss('seek-next'),
+ SEEK_PREV: getIconCss('seek-prev'),
+ SEEK_START: getIconCss('seek-start'),
+ SHUFFLE: getIconCss('shuffle'),
+ SIGNAL: getIconCss('signal'),
+ SIGNAL_DIAG: getIconCss('signal-diag'),
+ SQUARESMALL_CLOSE: getIconCss('squaresmall-close'),
+ SQUARESMALL_MINUS: getIconCss('squaresmall-minus'),
+ SQUARESMALL_PLUS: getIconCss('squaresmall-plus'),
+ STAR: getIconCss('star'),
+ STOP: getIconCss('stop'),
+ SUITCASE: getIconCss('suitcase'),
+ TAG: getIconCss('tag'),
+ TRANSFERTHICK_E_W: getIconCss('transferthick-e-w'),
+ TRANSFER_E_W: getIconCss('transfer-e-w'),
+ TRASH: getIconCss('trash'),
+ TRIANGLE_1_E: getIconCss('triangle-1-e'),
+ TRIANGLE_1_N: getIconCss('triangle-1-n'),
+ TRIANGLE_1_NE: getIconCss('triangle-1-ne'),
+ TRIANGLE_1_NW: getIconCss('triangle-1-nw'),
+ TRIANGLE_1_S: getIconCss('triangle-1-s'),
+ TRIANGLE_1_SE: getIconCss('triangle-1-se'),
+ TRIANGLE_1_SW: getIconCss('triangle-1-sw'),
+ TRIANGLE_1_W: getIconCss('triangle-1-w'),
+ TRIANGLE_2_E_W: getIconCss('triangle-2-e-w'),
+ TRIANGLE_2_N_S: getIconCss('triangle-2-n-s'),
+ UNLOCKED: getIconCss('unlocked'),
+ VIDEO: getIconCss('video'),
+ VOLUME_OFF: getIconCss('volume-off'),
+ VOLUME_ON: getIconCss('volume-on'),
+ WRENCH: getIconCss('wrench'),
+ ZOOMIN: getIconCss('zoomin'),
+ ZOOMOUT: getIconCss('zoomout')
+};
+
+
+Y.namespace('Icello');
+
+Y.Icello.Button = Y.Base.create(
+ 'icello-button',
+ Y.Widget,
+ [],
+ {
+ BOUNDING_TEMPLATE: ' ',
+ CONTENT_TEMPLATE: null,
+ initializer: function () {
+ Y.log('', 'info', 'Button initializer');
+
+ this._viewType = null;
+ this._domButtonPreventDefault();
+
+ if (this.get('disabled')) {
+ this._disableButton();
+ }
+ },
+ destructor: function () {
+ Y.log('', 'info', 'Button destructor');
+ },
+ disable: function () {
+ Y.log('', 'info', 'Button disable');
+ this._disableButton();
+ Y.Icello.Button.superclass.disable.call(this);
+ },
+ enable: function () {
+ Y.log('', 'info', 'Button enable');
+ this._enableButton();
+ Y.Icello.Button.superclass.enable.call(this);
+ },
+ renderUI: function () {
+ Y.log('', 'info', 'Button renderUI');
+ },
+ bindUI: function () {
+ Y.log('', 'info', 'Button bindUI');
+ this.after('disabledChange', Y.bind(this._afterDisabledChange, this));
+ },
+ syncUI: function () {
+ Y.log('', 'info', 'Button syncUI');
+ var cb = this.get(CB);
+
+ this._setViewType();
+
+ cb.removeClass(CSS_NAMES.ICON_ONLY);
+ cb.removeClass(CSS_NAMES.LABEL_ONLY);
+ cb.removeClass(CSS_NAMES.ICON_WITH_LABEL);
+
+ if (this._viewType === VIEW_TYPES.ICON_ONLY) {
+ cb.addClass(CSS_NAMES.ICON_ONLY);
+ } else if (this._viewType === VIEW_TYPES.LABEL_ONLY) {
+ cb.addClass(CSS_NAMES.LABEL_ONLY);
+ } else if (this._viewType === VIEW_TYPES.ICON_WITH_LABEL) {
+ cb.addClass(CSS_NAMES.ICON_WITH_LABEL);
+ }
+
+ cb.empty();
+ this._renderIcon();
+ this._renderText();
+ this._setTitle();
+ },
+ _afterDisabledChange: function (e) {
+ Y.log(e.newVal, 'info', 'Buttton _afterDisabledChange');
+ var do_disable = e.newVal;
+ if (do_disable) {
+ this.disable();
+ } else {
+ this.enable();
+ }
+ },
+ _domButtonPreventDefault: function () {
+ Y.log('', 'info', 'Button _domButtonPreventDefault');
+ var cb = this.get(CB);
+ cb.on('click', function (e) {
+ e.preventDefault(); // - this was needed so that when button is within form, the form doesn't submit automatically
+ // - the client will not need to worry about this strange behavior; they can submit form as needed explicitly
+ });
+ },
+ _disableButton: function () {
+ Y.log('', 'info', 'Button _disableButton');
+ var cb = this.get(CB);
+ cb.set('disabled', true);
+ },
+ _enableButton: function () {
+ Y.log('', 'info', 'Button _enableButton');
+ var cb = this.get(CB);
+ cb.set('disabled', false);
+ },
+ _renderIcon: function () {
+ Y.log('', 'info', 'Button _renderIcon');
+ var cssIcon = this.get('icon'),
+ data = null,
+ span = null,
+ template = null;
+
+ if (cssIcon) {
+ data = { cssIcon: cssIcon };
+ template = ' ';
+
+ span = Node.create(sub(template, data));
+ this.get(CB).appendChild(span);
+ }
+ },
+ _renderText: function () {
+ Y.log('', 'info', 'Button _renderText');
+ var data = null,
+ label = null,
+ span = null,
+ template = '{label} ';
+
+ label = (this._viewType === VIEW_TYPES.ICON_ONLY) ? ' ' : this.get('label');
+ data = { css: getCN(BASENAME, 'label'), label: label };
+ span = Node.create(sub(template, data));
+ this.get(CB).appendChild(span);
+ },
+ _setTitle: function () {
+ Y.log('', 'info', 'Button _setTitle');
+ var cb = this.get(CB),
+ label = this.get('label'),
+ title = this.get('title');
+
+ if (title !== '') {
+ cb.set('title', title);
+ } else if (label !== '') {
+ cb.set('title', label);
+ this.set('title', label);
+ }
+ },
+ _setViewType: function () {
+ Y.log('', 'info', 'Button _setViewType');
+
+ var cssIcon = this.get('icon'),
+ label = this.get('label'),
+ labelHasValue = label && label.replace(/ /g, '') !== '';
+
+ if (cssIcon && labelHasValue) {
+ this._viewType = VIEW_TYPES.ICON_WITH_LABEL;
+ } else if (cssIcon && !labelHasValue) {
+ this._viewType = VIEW_TYPES.ICON_ONLY;
+ } else if (!cssIcon && labelHasValue) {
+ this._viewType = VIEW_TYPES.LABEL_ONLY;
+ } else {
+ throw {
+ name: 'IconAndLabelNotDefinedButtonException',
+ message: "Icello.Button _setViewType: either 'icon' or 'label' must be defined"
+ };
+ }
+
+ }
+ },
+ {
+ ATTRS: {
+ icon: {
+ validator: Y.Lang.isString
+ },
+ label: {
+ validator: Y.Lang.isString,
+ value: ''
+ },
+ disabled: {
+ validator: Y.Lang.isBoolean,
+ value: false
+ },
+ title: {
+ validator: Y.Lang.isString,
+ value: ''
+ }
+ },
+ CSS_NAMES: CSS_NAMES,
+ ICONS: ICONS,
+ HTML_PARSER: {
+ label: function (srcNode) {
+ Y.log('', 'info', 'Button HTML_PARSER label');
+
+ if (srcNode) {
+ return srcNode.getContent();
+ }
+ }
+ },
+ VIEW_TYPES: VIEW_TYPES
+ }
+);
+
+
+}, 'gallery-2012.04.04-17-55' ,{skinnable:true, requires:['base-build', 'widget']});
diff --git a/build/gallery-icello-button/gallery-icello-button-min.js b/build/gallery-icello-button/gallery-icello-button-min.js
new file mode 100644
index 0000000000..5d19229666
--- /dev/null
+++ b/build/gallery-icello-button/gallery-icello-button-min.js
@@ -0,0 +1,2 @@
+YUI.add("gallery-icello-button",function(b){var h="icello-button",i="contentBox",e={ICON_ONLY:"yui3-icello-button-icononly",LABEL_ONLY:"yui3-icello-button-labelonly",ICON_WITH_LABEL:"yui3-icello-button-iconwithlabel"},f=null,j={ICON_ONLY:1,LABEL_ONLY:2,ICON_WITH_LABEL:3},g=b.Node,a=b.Lang.sub,c=b.ClassNameManager.getClassName,d=function(k){return c(h,"icon",k);};f={ALERT:d("alert"),ARROWREFRESH_1_E:d("arrowrefresh-1-e"),ARROWREFRESH_1_N:d("arrowrefresh-1-n"),ARROWREFRESH_1_S:d("arrowrefresh-1-s"),ARROWREFRESH_1_W:d("arrowrefresh-1-w"),ARROWRETURNTHICK_1_E:d("arrowreturnthick-1-e"),ARROWRETURNTHICK_1_N:d("arrowreturnthick-1-n"),ARROWRETURNTHICK_1_S:d("arrowreturnthick-1-s"),ARROWRETURNTHICK_1_W:d("arrowreturnthick-1-w"),ARROWRETURN_1_E:d("arrowreturn-1-e"),ARROWRETURN_1_N:d("arrowreturn-1-n"),ARROWRETURN_1_S:d("arrowreturn-1-s"),ARROWRETURN_1_W:d("arrowreturn-1-w"),ARROWSTOP_1_E:d("arrowstop-1-e"),ARROWSTOP_1_N:d("arrowstop-1-n"),ARROWSTOP_1_S:d("arrowstop-1-s"),ARROWSTOP_1_W:d("arrowstop-1-w"),ARROWTHICKSTOP_1_E:d("arrowthickstop-1-e"),ARROWTHICKSTOP_1_N:d("arrowthickstop-1-n"),ARROWTHICKSTOP_1_S:d("arrowthickstop-1-s"),ARROWTHICKSTOP_1_W:d("arrowthickstop-1-w"),ARROWTHICK_1_E:d("arrowthick-1-e"),ARROWTHICK_1_N:d("arrowthick-1-n"),ARROWTHICK_1_NE:d("arrowthick-1-ne"),ARROWTHICK_1_NW:d("arrowthick-1-nw"),ARROWTHICK_1_S:d("arrowthick-1-s"),ARROWTHICK_1_SE:d("arrowthick-1-se"),ARROWTHICK_1_SW:d("arrowthick-1-sw"),ARROWTHICK_1_W:d("arrowthick-1-w"),ARROWTHICK_2_E_W:d("arrowthick-2-e-w"),ARROWTHICK_2_NE_SW:d("arrowthick-2-ne-sw"),ARROWTHICK_2_N_S:d("arrowthick-2-n-s"),ARROWTHICK_2_SE_NW:d("arrowthick-2-se-nw"),ARROW_1_E:d("arrow-1-e"),ARROW_1_N:d("arrow-1-n"),ARROW_1_NE:d("arrow-1-ne"),ARROW_1_NW:d("arrow-1-nw"),ARROW_1_S:d("arrow-1-s"),ARROW_1_SE:d("arrow-1-se"),ARROW_1_SW:d("arrow-1-sw"),ARROW_1_W:d("arrow-1-w"),ARROW_2_E_W:d("arrow-2-e-w"),ARROW_2_NE_SW:d("arrow-2-ne-sw"),ARROW_2_N_S:d("arrow-2-n-s"),ARROW_2_SE_NW:d("arrow-2-se-nw"),ARROW_4:d("arrow-4"),ARROW_4_DIAG:d("arrow-4-diag"),BATTERY_0:d("battery-0"),BATTERY_1:d("battery-1"),BATTERY_2:d("battery-2"),BATTERY_3:d("battery-3"),BOOKMARK:d("bookmark"),BULLET:d("bullet"),CALCULATOR:d("calculator"),CALENDAR:d("calendar"),CANCEL:d("cancel"),CARAT_1_E:d("carat-1-e"),CARAT_1_N:d("carat-1-n"),CARAT_1_NE:d("carat-1-ne"),CARAT_1_NW:d("carat-1-nw"),CARAT_1_S:d("carat-1-s"),CARAT_1_SE:d("carat-1-se"),CARAT_1_SW:d("carat-1-sw"),CARAT_1_W:d("carat-1-w"),CARAT_2_E_W:d("carat-2-e-w"),CARAT_2_N_S:d("carat-2-n-s"),CART:d("cart"),CHECK:d("check"),CIRCLESMALL_CLOSE:d("circlesmall-close"),CIRCLESMALL_MINUS:d("circlesmall-minus"),CIRCLESMALL_PLUS:d("circlesmall-plus"),CIRCLE_ARROW_E:d("circle-arrow-e"),CIRCLE_ARROW_N:d("circle-arrow-n"),CIRCLE_ARROW_S:d("circle-arrow-s"),CIRCLE_ARROW_W:d("circle-arrow-w"),CIRCLE_CHECK:d("circle-check"),CIRCLE_CLOSE:d("circle-close"),CIRCLE_MINUS:d("circle-minus"),CIRCLE_PLUS:d("circle-plus"),CIRCLE_TRIANGLE_E:d("circle-triangle-e"),CIRCLE_TRIANGLE_N:d("circle-triangle-n"),CIRCLE_TRIANGLE_S:d("circle-triangle-s"),CIRCLE_TRIANGLE_W:d("circle-triangle-w"),CIRCLE_ZOOMIN:d("circle-zoomin"),CIRCLE_ZOOMOUT:d("circle-zoomout"),CLIPBOARD:d("clipboard"),CLOCK:d("clock"),CLOSE:d("close"),CLOSETHICK:d("closethick"),COMMENT:d("comment"),CONTACT:d("contact"),COPY:d("copy"),DISK:d("disk"),DOCUMENT:d("document"),DOCUMENT_B:d("document-b"),EJECT:d("eject"),EXTLINK:d("extlink"),FLAG:d("flag"),FOLDER_COLLAPSED:d("folder-collapsed"),FOLDER_OPEN:d("folder-open"),GEAR:d("gear"),GRIPSMALL_DIAGONAL_SE:d("gripsmall-diagonal-se"),GRIP_DIAGONAL_SE:d("grip-diagonal-se"),GRIP_DOTTED_HORIZONTAL:d("grip-dotted-horizontal"),GRIP_DOTTED_VERTICAL:d("grip-dotted-vertical"),GRIP_SOLID_HORIZONTAL:d("grip-solid-horizontal"),GRIP_SOLID_VERTICAL:d("grip-solid-vertical"),HEART:d("heart"),HELP:d("help"),HOME:d("home"),IMAGE:d("image"),INFO:d("info"),KEY:d("key"),LIGHTBULB:d("lightbulb"),LINK:d("link"),LOCKED:d("locked"),MAIL_CLOSED:d("mail-closed"),MAIL_OPEN:d("mail-open"),MINUS:d("minus"),MINUSTHICK:d("minusthick"),NEWWIN:d("newwin"),NOTE:d("note"),NOTICE:d("notice"),PAUSE:d("pause"),PENCIL:d("pencil"),PERSON:d("person"),PIN_S:d("pin-s"),PIN_W:d("pin-w"),PLAY:d("play"),PLUS:d("plus"),PLUSTHICK:d("plusthick"),POWER:d("power"),PRINT:d("print"),RADIO_OFF:d("radio-off"),RADIO_ON:d("radio-on"),REFRESH:d("refresh"),SCISSORS:d("scissors"),SCRIPT:d("script"),SEARCH:d("search"),SEEK_END:d("seek-end"),SEEK_FIRST:d("seek-first"),SEEK_NEXT:d("seek-next"),SEEK_PREV:d("seek-prev"),SEEK_START:d("seek-start"),SHUFFLE:d("shuffle"),SIGNAL:d("signal"),SIGNAL_DIAG:d("signal-diag"),SQUARESMALL_CLOSE:d("squaresmall-close"),SQUARESMALL_MINUS:d("squaresmall-minus"),SQUARESMALL_PLUS:d("squaresmall-plus"),STAR:d("star"),STOP:d("stop"),SUITCASE:d("suitcase"),TAG:d("tag"),TRANSFERTHICK_E_W:d("transferthick-e-w"),TRANSFER_E_W:d("transfer-e-w"),TRASH:d("trash"),TRIANGLE_1_E:d("triangle-1-e"),TRIANGLE_1_N:d("triangle-1-n"),TRIANGLE_1_NE:d("triangle-1-ne"),TRIANGLE_1_NW:d("triangle-1-nw"),TRIANGLE_1_S:d("triangle-1-s"),TRIANGLE_1_SE:d("triangle-1-se"),TRIANGLE_1_SW:d("triangle-1-sw"),TRIANGLE_1_W:d("triangle-1-w"),TRIANGLE_2_E_W:d("triangle-2-e-w"),TRIANGLE_2_N_S:d("triangle-2-n-s"),UNLOCKED:d("unlocked"),VIDEO:d("video"),VOLUME_OFF:d("volume-off"),VOLUME_ON:d("volume-on"),WRENCH:d("wrench"),ZOOMIN:d("zoomin"),ZOOMOUT:d("zoomout")};b.namespace("Icello");b.Icello.Button=b.Base.create("icello-button",b.Widget,[],{BOUNDING_TEMPLATE:" ",CONTENT_TEMPLATE:null,initializer:function(){this._viewType=null;this._domButtonPreventDefault();if(this.get("disabled")){this._disableButton();}},destructor:function(){},disable:function(){this._disableButton();b.Icello.Button.superclass.disable.call(this);},enable:function(){this._enableButton();b.Icello.Button.superclass.enable.call(this);},renderUI:function(){},bindUI:function(){this.after("disabledChange",b.bind(this._afterDisabledChange,this));},syncUI:function(){var k=this.get(i);this._setViewType();k.removeClass(e.ICON_ONLY);k.removeClass(e.LABEL_ONLY);
+k.removeClass(e.ICON_WITH_LABEL);if(this._viewType===j.ICON_ONLY){k.addClass(e.ICON_ONLY);}else{if(this._viewType===j.LABEL_ONLY){k.addClass(e.LABEL_ONLY);}else{if(this._viewType===j.ICON_WITH_LABEL){k.addClass(e.ICON_WITH_LABEL);}}}k.empty();this._renderIcon();this._renderText();this._setTitle();},_afterDisabledChange:function(l){var k=l.newVal;if(k){this.disable();}else{this.enable();}},_domButtonPreventDefault:function(){var k=this.get(i);k.on("click",function(l){l.preventDefault();});},_disableButton:function(){var k=this.get(i);k.set("disabled",true);},_enableButton:function(){var k=this.get(i);k.set("disabled",false);},_renderIcon:function(){var k=this.get("icon"),n=null,m=null,l=null;if(k){n={cssIcon:k};l=' ';m=g.create(a(l,n));this.get(i).appendChild(m);}},_renderText:function(){var n=null,k=null,m=null,l='{label} ';k=(this._viewType===j.ICON_ONLY)?" ":this.get("label");n={css:c(h,"label"),label:k};m=g.create(a(l,n));this.get(i).appendChild(m);},_setTitle:function(){var k=this.get(i),l=this.get("label"),m=this.get("title");if(m!==""){k.set("title",m);}else{if(l!==""){k.set("title",l);this.set("title",l);}}},_setViewType:function(){var k=this.get("icon"),m=this.get("label"),l=m&&m.replace(/ /g,"")!=="";if(k&&l){this._viewType=j.ICON_WITH_LABEL;}else{if(k&&!l){this._viewType=j.ICON_ONLY;}else{if(!k&&l){this._viewType=j.LABEL_ONLY;}else{throw {name:"IconAndLabelNotDefinedButtonException",message:"Icello.Button _setViewType: either 'icon' or 'label' must be defined"};}}}}},{ATTRS:{icon:{validator:b.Lang.isString},label:{validator:b.Lang.isString,value:""},disabled:{validator:b.Lang.isBoolean,value:false},title:{validator:b.Lang.isString,value:""}},CSS_NAMES:e,ICONS:f,HTML_PARSER:{label:function(k){if(k){return k.getContent();}}},VIEW_TYPES:j});},"gallery-2012.04.04-17-55",{skinnable:true,requires:["base-build","widget"]});
\ No newline at end of file
diff --git a/build/gallery-icello-button/gallery-icello-button.js b/build/gallery-icello-button/gallery-icello-button.js
new file mode 100644
index 0000000000..b753ac6d1c
--- /dev/null
+++ b/build/gallery-icello-button/gallery-icello-button.js
@@ -0,0 +1,370 @@
+YUI.add('gallery-icello-button', function(Y) {
+
+var BASENAME = 'icello-button',
+ CB = 'contentBox',
+ CSS_NAMES = {
+ ICON_ONLY: 'yui3-icello-button-icononly',
+ LABEL_ONLY: 'yui3-icello-button-labelonly',
+ ICON_WITH_LABEL: 'yui3-icello-button-iconwithlabel'
+ },
+ ICONS = null,
+ VIEW_TYPES = {
+ ICON_ONLY: 1,
+ LABEL_ONLY: 2,
+ ICON_WITH_LABEL: 3
+ },
+ Node = Y.Node,
+ sub = Y.Lang.sub,
+ getCN = Y.ClassNameManager.getClassName,
+ getIconCss = function (name) {
+ return getCN(BASENAME, 'icon', name);
+ };
+
+ICONS = {
+ ALERT: getIconCss('alert'),
+ ARROWREFRESH_1_E: getIconCss('arrowrefresh-1-e'),
+ ARROWREFRESH_1_N: getIconCss('arrowrefresh-1-n'),
+ ARROWREFRESH_1_S: getIconCss('arrowrefresh-1-s'),
+ ARROWREFRESH_1_W: getIconCss('arrowrefresh-1-w'),
+ ARROWRETURNTHICK_1_E: getIconCss('arrowreturnthick-1-e'),
+ ARROWRETURNTHICK_1_N: getIconCss('arrowreturnthick-1-n'),
+ ARROWRETURNTHICK_1_S: getIconCss('arrowreturnthick-1-s'),
+ ARROWRETURNTHICK_1_W: getIconCss('arrowreturnthick-1-w'),
+ ARROWRETURN_1_E: getIconCss('arrowreturn-1-e'),
+ ARROWRETURN_1_N: getIconCss('arrowreturn-1-n'),
+ ARROWRETURN_1_S: getIconCss('arrowreturn-1-s'),
+ ARROWRETURN_1_W: getIconCss('arrowreturn-1-w'),
+ ARROWSTOP_1_E: getIconCss('arrowstop-1-e'),
+ ARROWSTOP_1_N: getIconCss('arrowstop-1-n'),
+ ARROWSTOP_1_S: getIconCss('arrowstop-1-s'),
+ ARROWSTOP_1_W: getIconCss('arrowstop-1-w'),
+ ARROWTHICKSTOP_1_E: getIconCss('arrowthickstop-1-e'),
+ ARROWTHICKSTOP_1_N: getIconCss('arrowthickstop-1-n'),
+ ARROWTHICKSTOP_1_S: getIconCss('arrowthickstop-1-s'),
+ ARROWTHICKSTOP_1_W: getIconCss('arrowthickstop-1-w'),
+ ARROWTHICK_1_E: getIconCss('arrowthick-1-e'),
+ ARROWTHICK_1_N: getIconCss('arrowthick-1-n'),
+ ARROWTHICK_1_NE: getIconCss('arrowthick-1-ne'),
+ ARROWTHICK_1_NW: getIconCss('arrowthick-1-nw'),
+ ARROWTHICK_1_S: getIconCss('arrowthick-1-s'),
+ ARROWTHICK_1_SE: getIconCss('arrowthick-1-se'),
+ ARROWTHICK_1_SW: getIconCss('arrowthick-1-sw'),
+ ARROWTHICK_1_W: getIconCss('arrowthick-1-w'),
+ ARROWTHICK_2_E_W: getIconCss('arrowthick-2-e-w'),
+ ARROWTHICK_2_NE_SW: getIconCss('arrowthick-2-ne-sw'),
+ ARROWTHICK_2_N_S: getIconCss('arrowthick-2-n-s'),
+ ARROWTHICK_2_SE_NW: getIconCss('arrowthick-2-se-nw'),
+ ARROW_1_E: getIconCss('arrow-1-e'),
+ ARROW_1_N: getIconCss('arrow-1-n'),
+ ARROW_1_NE: getIconCss('arrow-1-ne'),
+ ARROW_1_NW: getIconCss('arrow-1-nw'),
+ ARROW_1_S: getIconCss('arrow-1-s'),
+ ARROW_1_SE: getIconCss('arrow-1-se'),
+ ARROW_1_SW: getIconCss('arrow-1-sw'),
+ ARROW_1_W: getIconCss('arrow-1-w'),
+ ARROW_2_E_W: getIconCss('arrow-2-e-w'),
+ ARROW_2_NE_SW: getIconCss('arrow-2-ne-sw'),
+ ARROW_2_N_S: getIconCss('arrow-2-n-s'),
+ ARROW_2_SE_NW: getIconCss('arrow-2-se-nw'),
+ ARROW_4: getIconCss('arrow-4'),
+ ARROW_4_DIAG: getIconCss('arrow-4-diag'),
+ BATTERY_0: getIconCss('battery-0'),
+ BATTERY_1: getIconCss('battery-1'),
+ BATTERY_2: getIconCss('battery-2'),
+ BATTERY_3: getIconCss('battery-3'),
+ BOOKMARK: getIconCss('bookmark'),
+ BULLET: getIconCss('bullet'),
+ CALCULATOR: getIconCss('calculator'),
+ CALENDAR: getIconCss('calendar'),
+ CANCEL: getIconCss('cancel'),
+ CARAT_1_E: getIconCss('carat-1-e'),
+ CARAT_1_N: getIconCss('carat-1-n'),
+ CARAT_1_NE: getIconCss('carat-1-ne'),
+ CARAT_1_NW: getIconCss('carat-1-nw'),
+ CARAT_1_S: getIconCss('carat-1-s'),
+ CARAT_1_SE: getIconCss('carat-1-se'),
+ CARAT_1_SW: getIconCss('carat-1-sw'),
+ CARAT_1_W: getIconCss('carat-1-w'),
+ CARAT_2_E_W: getIconCss('carat-2-e-w'),
+ CARAT_2_N_S: getIconCss('carat-2-n-s'),
+ CART: getIconCss('cart'),
+ CHECK: getIconCss('check'),
+ CIRCLESMALL_CLOSE: getIconCss('circlesmall-close'),
+ CIRCLESMALL_MINUS: getIconCss('circlesmall-minus'),
+ CIRCLESMALL_PLUS: getIconCss('circlesmall-plus'),
+ CIRCLE_ARROW_E: getIconCss('circle-arrow-e'),
+ CIRCLE_ARROW_N: getIconCss('circle-arrow-n'),
+ CIRCLE_ARROW_S: getIconCss('circle-arrow-s'),
+ CIRCLE_ARROW_W: getIconCss('circle-arrow-w'),
+ CIRCLE_CHECK: getIconCss('circle-check'),
+ CIRCLE_CLOSE: getIconCss('circle-close'),
+ CIRCLE_MINUS: getIconCss('circle-minus'),
+ CIRCLE_PLUS: getIconCss('circle-plus'),
+ CIRCLE_TRIANGLE_E: getIconCss('circle-triangle-e'),
+ CIRCLE_TRIANGLE_N: getIconCss('circle-triangle-n'),
+ CIRCLE_TRIANGLE_S: getIconCss('circle-triangle-s'),
+ CIRCLE_TRIANGLE_W: getIconCss('circle-triangle-w'),
+ CIRCLE_ZOOMIN: getIconCss('circle-zoomin'),
+ CIRCLE_ZOOMOUT: getIconCss('circle-zoomout'),
+ CLIPBOARD: getIconCss('clipboard'),
+ CLOCK: getIconCss('clock'),
+ CLOSE: getIconCss('close'),
+ CLOSETHICK: getIconCss('closethick'),
+ COMMENT: getIconCss('comment'),
+ CONTACT: getIconCss('contact'),
+ COPY: getIconCss('copy'),
+ DISK: getIconCss('disk'),
+ DOCUMENT: getIconCss('document'),
+ DOCUMENT_B: getIconCss('document-b'),
+ EJECT: getIconCss('eject'),
+ EXTLINK: getIconCss('extlink'),
+ FLAG: getIconCss('flag'),
+ FOLDER_COLLAPSED: getIconCss('folder-collapsed'),
+ FOLDER_OPEN: getIconCss('folder-open'),
+ GEAR: getIconCss('gear'),
+ GRIPSMALL_DIAGONAL_SE: getIconCss('gripsmall-diagonal-se'),
+ GRIP_DIAGONAL_SE: getIconCss('grip-diagonal-se'),
+ GRIP_DOTTED_HORIZONTAL: getIconCss('grip-dotted-horizontal'),
+ GRIP_DOTTED_VERTICAL: getIconCss('grip-dotted-vertical'),
+ GRIP_SOLID_HORIZONTAL: getIconCss('grip-solid-horizontal'),
+ GRIP_SOLID_VERTICAL: getIconCss('grip-solid-vertical'),
+ HEART: getIconCss('heart'),
+ HELP: getIconCss('help'),
+ HOME: getIconCss('home'),
+ IMAGE: getIconCss('image'),
+ INFO: getIconCss('info'),
+ KEY: getIconCss('key'),
+ LIGHTBULB: getIconCss('lightbulb'),
+ LINK: getIconCss('link'),
+ LOCKED: getIconCss('locked'),
+ MAIL_CLOSED: getIconCss('mail-closed'),
+ MAIL_OPEN: getIconCss('mail-open'),
+ MINUS: getIconCss('minus'),
+ MINUSTHICK: getIconCss('minusthick'),
+ NEWWIN: getIconCss('newwin'),
+ NOTE: getIconCss('note'),
+ NOTICE: getIconCss('notice'),
+ PAUSE: getIconCss('pause'),
+ PENCIL: getIconCss('pencil'),
+ PERSON: getIconCss('person'),
+ PIN_S: getIconCss('pin-s'),
+ PIN_W: getIconCss('pin-w'),
+ PLAY: getIconCss('play'),
+ PLUS: getIconCss('plus'),
+ PLUSTHICK: getIconCss('plusthick'),
+ POWER: getIconCss('power'),
+ PRINT: getIconCss('print'),
+ RADIO_OFF: getIconCss('radio-off'),
+ RADIO_ON: getIconCss('radio-on'),
+ REFRESH: getIconCss('refresh'),
+ SCISSORS: getIconCss('scissors'),
+ SCRIPT: getIconCss('script'),
+ SEARCH: getIconCss('search'),
+ SEEK_END: getIconCss('seek-end'),
+ SEEK_FIRST: getIconCss('seek-first'),
+ SEEK_NEXT: getIconCss('seek-next'),
+ SEEK_PREV: getIconCss('seek-prev'),
+ SEEK_START: getIconCss('seek-start'),
+ SHUFFLE: getIconCss('shuffle'),
+ SIGNAL: getIconCss('signal'),
+ SIGNAL_DIAG: getIconCss('signal-diag'),
+ SQUARESMALL_CLOSE: getIconCss('squaresmall-close'),
+ SQUARESMALL_MINUS: getIconCss('squaresmall-minus'),
+ SQUARESMALL_PLUS: getIconCss('squaresmall-plus'),
+ STAR: getIconCss('star'),
+ STOP: getIconCss('stop'),
+ SUITCASE: getIconCss('suitcase'),
+ TAG: getIconCss('tag'),
+ TRANSFERTHICK_E_W: getIconCss('transferthick-e-w'),
+ TRANSFER_E_W: getIconCss('transfer-e-w'),
+ TRASH: getIconCss('trash'),
+ TRIANGLE_1_E: getIconCss('triangle-1-e'),
+ TRIANGLE_1_N: getIconCss('triangle-1-n'),
+ TRIANGLE_1_NE: getIconCss('triangle-1-ne'),
+ TRIANGLE_1_NW: getIconCss('triangle-1-nw'),
+ TRIANGLE_1_S: getIconCss('triangle-1-s'),
+ TRIANGLE_1_SE: getIconCss('triangle-1-se'),
+ TRIANGLE_1_SW: getIconCss('triangle-1-sw'),
+ TRIANGLE_1_W: getIconCss('triangle-1-w'),
+ TRIANGLE_2_E_W: getIconCss('triangle-2-e-w'),
+ TRIANGLE_2_N_S: getIconCss('triangle-2-n-s'),
+ UNLOCKED: getIconCss('unlocked'),
+ VIDEO: getIconCss('video'),
+ VOLUME_OFF: getIconCss('volume-off'),
+ VOLUME_ON: getIconCss('volume-on'),
+ WRENCH: getIconCss('wrench'),
+ ZOOMIN: getIconCss('zoomin'),
+ ZOOMOUT: getIconCss('zoomout')
+};
+
+
+Y.namespace('Icello');
+
+Y.Icello.Button = Y.Base.create(
+ 'icello-button',
+ Y.Widget,
+ [],
+ {
+ BOUNDING_TEMPLATE: ' ',
+ CONTENT_TEMPLATE: null,
+ initializer: function () {
+
+ this._viewType = null;
+ this._domButtonPreventDefault();
+
+ if (this.get('disabled')) {
+ this._disableButton();
+ }
+ },
+ destructor: function () {
+ },
+ disable: function () {
+ this._disableButton();
+ Y.Icello.Button.superclass.disable.call(this);
+ },
+ enable: function () {
+ this._enableButton();
+ Y.Icello.Button.superclass.enable.call(this);
+ },
+ renderUI: function () {
+ },
+ bindUI: function () {
+ this.after('disabledChange', Y.bind(this._afterDisabledChange, this));
+ },
+ syncUI: function () {
+ var cb = this.get(CB);
+
+ this._setViewType();
+
+ cb.removeClass(CSS_NAMES.ICON_ONLY);
+ cb.removeClass(CSS_NAMES.LABEL_ONLY);
+ cb.removeClass(CSS_NAMES.ICON_WITH_LABEL);
+
+ if (this._viewType === VIEW_TYPES.ICON_ONLY) {
+ cb.addClass(CSS_NAMES.ICON_ONLY);
+ } else if (this._viewType === VIEW_TYPES.LABEL_ONLY) {
+ cb.addClass(CSS_NAMES.LABEL_ONLY);
+ } else if (this._viewType === VIEW_TYPES.ICON_WITH_LABEL) {
+ cb.addClass(CSS_NAMES.ICON_WITH_LABEL);
+ }
+
+ cb.empty();
+ this._renderIcon();
+ this._renderText();
+ this._setTitle();
+ },
+ _afterDisabledChange: function (e) {
+ var do_disable = e.newVal;
+ if (do_disable) {
+ this.disable();
+ } else {
+ this.enable();
+ }
+ },
+ _domButtonPreventDefault: function () {
+ var cb = this.get(CB);
+ cb.on('click', function (e) {
+ e.preventDefault(); // - this was needed so that when button is within form, the form doesn't submit automatically
+ // - the client will not need to worry about this strange behavior; they can submit form as needed explicitly
+ });
+ },
+ _disableButton: function () {
+ var cb = this.get(CB);
+ cb.set('disabled', true);
+ },
+ _enableButton: function () {
+ var cb = this.get(CB);
+ cb.set('disabled', false);
+ },
+ _renderIcon: function () {
+ var cssIcon = this.get('icon'),
+ data = null,
+ span = null,
+ template = null;
+
+ if (cssIcon) {
+ data = { cssIcon: cssIcon };
+ template = ' ';
+
+ span = Node.create(sub(template, data));
+ this.get(CB).appendChild(span);
+ }
+ },
+ _renderText: function () {
+ var data = null,
+ label = null,
+ span = null,
+ template = '{label} ';
+
+ label = (this._viewType === VIEW_TYPES.ICON_ONLY) ? ' ' : this.get('label');
+ data = { css: getCN(BASENAME, 'label'), label: label };
+ span = Node.create(sub(template, data));
+ this.get(CB).appendChild(span);
+ },
+ _setTitle: function () {
+ var cb = this.get(CB),
+ label = this.get('label'),
+ title = this.get('title');
+
+ if (title !== '') {
+ cb.set('title', title);
+ } else if (label !== '') {
+ cb.set('title', label);
+ this.set('title', label);
+ }
+ },
+ _setViewType: function () {
+
+ var cssIcon = this.get('icon'),
+ label = this.get('label'),
+ labelHasValue = label && label.replace(/ /g, '') !== '';
+
+ if (cssIcon && labelHasValue) {
+ this._viewType = VIEW_TYPES.ICON_WITH_LABEL;
+ } else if (cssIcon && !labelHasValue) {
+ this._viewType = VIEW_TYPES.ICON_ONLY;
+ } else if (!cssIcon && labelHasValue) {
+ this._viewType = VIEW_TYPES.LABEL_ONLY;
+ } else {
+ throw {
+ name: 'IconAndLabelNotDefinedButtonException',
+ message: "Icello.Button _setViewType: either 'icon' or 'label' must be defined"
+ };
+ }
+
+ }
+ },
+ {
+ ATTRS: {
+ icon: {
+ validator: Y.Lang.isString
+ },
+ label: {
+ validator: Y.Lang.isString,
+ value: ''
+ },
+ disabled: {
+ validator: Y.Lang.isBoolean,
+ value: false
+ },
+ title: {
+ validator: Y.Lang.isString,
+ value: ''
+ }
+ },
+ CSS_NAMES: CSS_NAMES,
+ ICONS: ICONS,
+ HTML_PARSER: {
+ label: function (srcNode) {
+
+ if (srcNode) {
+ return srcNode.getContent();
+ }
+ }
+ },
+ VIEW_TYPES: VIEW_TYPES
+ }
+);
+
+
+}, 'gallery-2012.04.04-17-55' ,{skinnable:true, requires:['base-build', 'widget']});
diff --git a/build/gallery-icello-date/gallery-icello-date-debug.js b/build/gallery-icello-date/gallery-icello-date-debug.js
new file mode 100644
index 0000000000..fea2fba9fe
--- /dev/null
+++ b/build/gallery-icello-date/gallery-icello-date-debug.js
@@ -0,0 +1,48 @@
+YUI.add('gallery-icello-date', function(Y) {
+
+Y.namespace('Icello.Date');
+
+Y.Icello.Date.addMonths = function (date, months) {
+ Y.log('', 'info', 'Icello Date addMonths');
+
+ var dPlusMonths = null,
+ dPlusMonthsDayOne = null,
+ dPlusMonthsDayLast = null,
+ inputMonth = date.getMonth() + months,
+ expectedMonth = inputMonth % 12,
+ d = null;
+
+ dPlusMonths = new Date(date.getFullYear(), inputMonth, date.getDate());
+
+ if (expectedMonth === dPlusMonths.getMonth()) {
+ d = dPlusMonths;
+ } else {
+ dPlusMonthsDayOne = new Date(date.getFullYear(), inputMonth, 1);
+ dPlusMonthsDayLast = new Date(dPlusMonthsDayOne.getFullYear(), dPlusMonthsDayOne.getMonth(), Y.DataType.Date.daysInMonth(dPlusMonthsDayOne));
+ d = dPlusMonthsDayLast;
+ }
+
+ return d;
+};
+
+Y.Icello.Date.areDaysEqual = function (date1, date2) {
+ Y.log('', 'info', 'Icello Date areDaysEqual');
+
+ var y1 = date1.getFullYear(),
+ y2 = date2.getFullYear(),
+ m1 = date1.getMonth(),
+ m2 = date2.getMonth(),
+ d1 = date1.getDay(),
+ d2 = date2.getDay();
+
+ return y1 === y2 && m1 === m2 && d1 === d2;
+};
+
+Y.Icello.Date.formatShortDate = function (date) {
+ Y.log('', 'info', 'Icello Date formatShortDate');
+ var sb = [date.getMonth() + 1, '/', date.getDate(), '/', date.getFullYear()];
+ return sb.join('');
+};
+
+
+}, 'gallery-2012.04.04-17-55' ,{requires:['datatype-date-math'], skinnable:false});
diff --git a/build/gallery-icello-date/gallery-icello-date-min.js b/build/gallery-icello-date/gallery-icello-date-min.js
new file mode 100644
index 0000000000..7555643472
--- /dev/null
+++ b/build/gallery-icello-date/gallery-icello-date-min.js
@@ -0,0 +1 @@
+YUI.add("gallery-icello-date",function(a){a.namespace("Icello.Date");a.Icello.Date.addMonths=function(f,b){var j=null,g=null,h=null,c=f.getMonth()+b,e=c%12,i=null;j=new Date(f.getFullYear(),c,f.getDate());if(e===j.getMonth()){i=j;}else{g=new Date(f.getFullYear(),c,1);h=new Date(g.getFullYear(),g.getMonth(),a.DataType.Date.daysInMonth(g));i=h;}return i;};a.Icello.Date.areDaysEqual=function(i,h){var e=i.getFullYear(),d=h.getFullYear(),c=i.getMonth(),b=h.getMonth(),g=i.getDay(),f=h.getDay();return e===d&&c===b&&g===f;};a.Icello.Date.formatShortDate=function(b){var c=[b.getMonth()+1,"/",b.getDate(),"/",b.getFullYear()];return c.join("");};},"gallery-2012.04.04-17-55",{requires:["datatype-date-math"],skinnable:false});
\ No newline at end of file
diff --git a/build/gallery-icello-date/gallery-icello-date.js b/build/gallery-icello-date/gallery-icello-date.js
new file mode 100644
index 0000000000..2af0fa57be
--- /dev/null
+++ b/build/gallery-icello-date/gallery-icello-date.js
@@ -0,0 +1,45 @@
+YUI.add('gallery-icello-date', function(Y) {
+
+Y.namespace('Icello.Date');
+
+Y.Icello.Date.addMonths = function (date, months) {
+
+ var dPlusMonths = null,
+ dPlusMonthsDayOne = null,
+ dPlusMonthsDayLast = null,
+ inputMonth = date.getMonth() + months,
+ expectedMonth = inputMonth % 12,
+ d = null;
+
+ dPlusMonths = new Date(date.getFullYear(), inputMonth, date.getDate());
+
+ if (expectedMonth === dPlusMonths.getMonth()) {
+ d = dPlusMonths;
+ } else {
+ dPlusMonthsDayOne = new Date(date.getFullYear(), inputMonth, 1);
+ dPlusMonthsDayLast = new Date(dPlusMonthsDayOne.getFullYear(), dPlusMonthsDayOne.getMonth(), Y.DataType.Date.daysInMonth(dPlusMonthsDayOne));
+ d = dPlusMonthsDayLast;
+ }
+
+ return d;
+};
+
+Y.Icello.Date.areDaysEqual = function (date1, date2) {
+
+ var y1 = date1.getFullYear(),
+ y2 = date2.getFullYear(),
+ m1 = date1.getMonth(),
+ m2 = date2.getMonth(),
+ d1 = date1.getDay(),
+ d2 = date2.getDay();
+
+ return y1 === y2 && m1 === m2 && d1 === d2;
+};
+
+Y.Icello.Date.formatShortDate = function (date) {
+ var sb = [date.getMonth() + 1, '/', date.getDate(), '/', date.getFullYear()];
+ return sb.join('');
+};
+
+
+}, 'gallery-2012.04.04-17-55' ,{requires:['datatype-date-math'], skinnable:false});
diff --git a/build/gallery-icello-datechooser/assets/gallery-icello-datechooser-core.css b/build/gallery-icello-datechooser/assets/gallery-icello-datechooser-core.css
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/build/gallery-icello-datechooser/assets/skins/sam/gallery-icello-datechooser-skin.css b/build/gallery-icello-datechooser/assets/skins/sam/gallery-icello-datechooser-skin.css
new file mode 100644
index 0000000000..b9674b0145
--- /dev/null
+++ b/build/gallery-icello-datechooser/assets/skins/sam/gallery-icello-datechooser-skin.css
@@ -0,0 +1,57 @@
+.yui3-skin-sam .yui3-icello-datechooser {position:absolute;}
+.yui3-skin-sam .yui3-icello-datechooser-hidden {visibility:hidden;}
+.yui3-skin-sam .yui3-icello-datechooser-hidden table {display:none;}
+.yui3-skin-sam .yui3-icello-datechooser-content {background: #F2F2F2;border: 1px solid gray;color: #000;overflow:hidden !important;padding: 10px;}
+
+
+
+/* viewdecade styles*/
+.yui3-icello-datechooser-viewdecade-header div {float:left;}
+.yui3-skin-sam .yui3-icello-datechooser-viewdecade-header-label {text-align:center;width: 170px;}
+.yui3-skin-sam .yui3-icello-datechooser-viewdecade-decade {font-size: 12px;font-weight: bold;}
+.yui3-skin-sam .yui3-icello-datechooser-viewdecade-nextdecade, .yui3-skin-sam .yui3-icello-datechooser-viewdecade-prevdecade {cursor: pointer;width:15px;font-family:"Times New Roman",Serif;font-size:14px;}
+.yui3-skin-sam .yui3-icello-datechooser-viewdecade-nextdecade:hover, .yui3-skin-sam .yui3-icello-datechooser-viewdecade-prevdecade:hover {color:Blue;}
+.yui3-skin-sam .yui3-icello-datechooser-viewdecade-nextdecade:active, .yui3-skin-sam .yui3-icello-datechooser-viewdecade-prevdecade:active {color:Brown;}
+.yui3-skin-sam .yui3-icello-datechooser-viewdecade-body {padding-top: 5px;}
+.yui3-skin-sam .yui3-icello-datechooser-viewdecade-grid {border-collapse: collapse;padding:5px;width: 100%;}
+.yui3-skin-sam .yui3-icello-datechooser-viewdecade-year {background-color:#fff;border: 1px solid #CCC;cursor: pointer;font-size: 11px;font-weight:bold;height:32px;padding:1px;text-align:center;}
+.yui3-skin-sam .yui3-icello-datechooser-viewdecade-year-outsidedecade {color:#ccc;}
+.yui3-skin-sam .yui3-icello-datechooser-viewdecade-year:hover {background-color:blue;color:white;}
+.yui3-skin-sam .yui3-icello-datechooser-viewdecade-year-selected {background-color: #B3D4FF;}
+
+/* viewyear styles */
+.yui3-icello-datechooser-viewyear-header div {float:left;}
+.yui3-skin-sam .yui3-icello-datechooser-viewyear-header-label {text-align:center;width: 170px;}
+.yui3-skin-sam .yui3-icello-datechooser-viewyear-year {cursor:pointer;font-size: 12px;font-weight: bold;}
+.yui3-skin-sam .yui3-icello-datechooser-viewyear-year:hover {color:Blue;}
+.yui3-skin-sam .yui3-icello-datechooser-viewyear-grid {border-collapse: collapse;padding:5px;width: 100%;}
+.yui3-skin-sam .yui3-icello-datechooser-viewyear-month {background-color:#fff;border: 1px solid #CCC;cursor: pointer;font-size: 11px;font-weight:bold;height:32px;padding:1px;text-align:center;}
+.yui3-skin-sam .yui3-icello-datechooser-viewyear-month:hover {background-color:blue;color:white;}
+
+.yui3-skin-sam .yui3-icello-datechooser-viewyear-nextyear, .yui3-skin-sam .yui3-icello-datechooser-viewyear-prevyear {cursor:pointer;font-family:"Times New Roman",Serif;font-size:14px;}
+.yui3-skin-sam .yui3-icello-datechooser-viewyear-nextyear:hover, .yui3-skin-sam .yui3-icello-datechooser-viewyear-prevyear:hover {color:Blue;}
+.yui3-skin-sam .yui3-icello-datechooser-viewyear-nextyear:active, .yui3-skin-sam .yui3-icello-datechooser-viewyear-prevyear:active {color:Brown;}
+.yui3-skin-sam .yui3-icello-datechooser-viewyear-body {padding-top: 5px;}
+.yui3-skin-sam .yui3-icello-datechooser-viewyear-month-selected {background-color: #B3D4FF;}
+
+/* viewmonth styles */
+.yui3-icello-datechooser-viewmonth-header div {float:left;}
+.yui3-skin-sam .yui3-icello-datechooser-viewmonth-header-label {text-align:center;width: 170px;}
+.yui3-skin-sam .yui3-icello-datechooser-viewmonth-monthyear {cursor:pointer;font-size: 12px;font-weight: bold;}
+.yui3-skin-sam .yui3-icello-datechooser-viewmonth-monthyear:hover {color:Blue;}
+
+.yui3-skin-sam .yui3-icello-datechooser-viewmonth-nextmonth, .yui3-skin-sam .yui3-icello-datechooser-viewmonth-prevmonth {cursor: pointer;width:15px;font-family:"Times New Roman",Serif;font-size:14px;}
+.yui3-skin-sam .yui3-icello-datechooser-viewmonth-nextmonth:hover, .yui3-skin-sam .yui3-icello-datechooser-viewmonth-prevmonth:hover {color:Blue;}
+.yui3-skin-sam .yui3-icello-datechooser-viewmonth-nextmonth:active, .yui3-skin-sam .yui3-icello-datechooser-viewmonth-prevmonth:active {color:Brown;}
+
+.yui3-skin-sam .yui3-icello-datechooser-viewmonth-grid {border-collapse: collapse;padding:5px;width: 100%;}
+.yui3-skin-sam .yui3-icello-datechooser-viewmonth-weekday {border: 0px;font-size: 11px;padding:0px;}
+
+.yui3-skin-sam .yui3-icello-datechooser-viewmonth-day, .yui3-skin-sam .yui3-icello-datechooser-viewmonth-prevmonth-day, .yui3-skin-sam .yui3-icello-datechooser-viewmonth-nextmonth-day {background-color:#fff;border: 1px solid #CCC;font-size: 11px;padding:1px;text-align:center;}
+.yui3-skin-sam .yui3-icello-datechooser-viewmonth-day {cursor: pointer;font-weight:bold;}
+.yui3-skin-sam .yui3-icello-datechooser-viewmonth-day:hover {background-color:blue;color:white;}
+.yui3-skin-sam .yui3-icello-datechooser-viewmonth-prevmonth-day, .yui3-skin-sam .yui3-icello-datechooser-viewmonth-nextmonth-day {color:#ccc;}
+
+.yui3-skin-sam .yui3-icello-datechooser-viewmonth-day-selected {background-color: #B3D4FF;}
+.yui3-icello-datechooser-viewmonth-body { padding-top: 5px; }
+
diff --git a/build/gallery-icello-datechooser/assets/skins/sam/gallery-icello-datechooser.css b/build/gallery-icello-datechooser/assets/skins/sam/gallery-icello-datechooser.css
new file mode 100644
index 0000000000..7ff8b873f0
--- /dev/null
+++ b/build/gallery-icello-datechooser/assets/skins/sam/gallery-icello-datechooser.css
@@ -0,0 +1 @@
+.yui3-skin-sam .yui3-icello-datechooser{position:absolute}.yui3-skin-sam .yui3-icello-datechooser-hidden{visibility:hidden}.yui3-skin-sam .yui3-icello-datechooser-hidden table{display:none}.yui3-skin-sam .yui3-icello-datechooser-content{background:#f2f2f2;border:1px solid gray;color:#000;overflow:hidden!important;padding:10px}.yui3-icello-datechooser-viewdecade-header div{float:left}.yui3-skin-sam .yui3-icello-datechooser-viewdecade-header-label{text-align:center;width:170px}.yui3-skin-sam .yui3-icello-datechooser-viewdecade-decade{font-size:12px;font-weight:bold}.yui3-skin-sam .yui3-icello-datechooser-viewdecade-nextdecade,.yui3-skin-sam .yui3-icello-datechooser-viewdecade-prevdecade{cursor:pointer;width:15px;font-family:"Times New Roman",Serif;font-size:14px}.yui3-skin-sam .yui3-icello-datechooser-viewdecade-nextdecade:hover,.yui3-skin-sam .yui3-icello-datechooser-viewdecade-prevdecade:hover{color:Blue}.yui3-skin-sam .yui3-icello-datechooser-viewdecade-nextdecade:active,.yui3-skin-sam .yui3-icello-datechooser-viewdecade-prevdecade:active{color:Brown}.yui3-skin-sam .yui3-icello-datechooser-viewdecade-body{padding-top:5px}.yui3-skin-sam .yui3-icello-datechooser-viewdecade-grid{border-collapse:collapse;padding:5px;width:100%}.yui3-skin-sam .yui3-icello-datechooser-viewdecade-year{background-color:#fff;border:1px solid #CCC;cursor:pointer;font-size:11px;font-weight:bold;height:32px;padding:1px;text-align:center}.yui3-skin-sam .yui3-icello-datechooser-viewdecade-year-outsidedecade{color:#ccc}.yui3-skin-sam .yui3-icello-datechooser-viewdecade-year:hover{background-color:blue;color:white}.yui3-skin-sam .yui3-icello-datechooser-viewdecade-year-selected{background-color:#b3d4ff}.yui3-icello-datechooser-viewyear-header div{float:left}.yui3-skin-sam .yui3-icello-datechooser-viewyear-header-label{text-align:center;width:170px}.yui3-skin-sam .yui3-icello-datechooser-viewyear-year{cursor:pointer;font-size:12px;font-weight:bold}.yui3-skin-sam .yui3-icello-datechooser-viewyear-year:hover{color:Blue}.yui3-skin-sam .yui3-icello-datechooser-viewyear-grid{border-collapse:collapse;padding:5px;width:100%}.yui3-skin-sam .yui3-icello-datechooser-viewyear-month{background-color:#fff;border:1px solid #CCC;cursor:pointer;font-size:11px;font-weight:bold;height:32px;padding:1px;text-align:center}.yui3-skin-sam .yui3-icello-datechooser-viewyear-month:hover{background-color:blue;color:white}.yui3-skin-sam .yui3-icello-datechooser-viewyear-nextyear,.yui3-skin-sam .yui3-icello-datechooser-viewyear-prevyear{cursor:pointer;font-family:"Times New Roman",Serif;font-size:14px}.yui3-skin-sam .yui3-icello-datechooser-viewyear-nextyear:hover,.yui3-skin-sam .yui3-icello-datechooser-viewyear-prevyear:hover{color:Blue}.yui3-skin-sam .yui3-icello-datechooser-viewyear-nextyear:active,.yui3-skin-sam .yui3-icello-datechooser-viewyear-prevyear:active{color:Brown}.yui3-skin-sam .yui3-icello-datechooser-viewyear-body{padding-top:5px}.yui3-skin-sam .yui3-icello-datechooser-viewyear-month-selected{background-color:#b3d4ff}.yui3-icello-datechooser-viewmonth-header div{float:left}.yui3-skin-sam .yui3-icello-datechooser-viewmonth-header-label{text-align:center;width:170px}.yui3-skin-sam .yui3-icello-datechooser-viewmonth-monthyear{cursor:pointer;font-size:12px;font-weight:bold}.yui3-skin-sam .yui3-icello-datechooser-viewmonth-monthyear:hover{color:Blue}.yui3-skin-sam .yui3-icello-datechooser-viewmonth-nextmonth,.yui3-skin-sam .yui3-icello-datechooser-viewmonth-prevmonth{cursor:pointer;width:15px;font-family:"Times New Roman",Serif;font-size:14px}.yui3-skin-sam .yui3-icello-datechooser-viewmonth-nextmonth:hover,.yui3-skin-sam .yui3-icello-datechooser-viewmonth-prevmonth:hover{color:Blue}.yui3-skin-sam .yui3-icello-datechooser-viewmonth-nextmonth:active,.yui3-skin-sam .yui3-icello-datechooser-viewmonth-prevmonth:active{color:Brown}.yui3-skin-sam .yui3-icello-datechooser-viewmonth-grid{border-collapse:collapse;padding:5px;width:100%}.yui3-skin-sam .yui3-icello-datechooser-viewmonth-weekday{border:0;font-size:11px;padding:0}.yui3-skin-sam .yui3-icello-datechooser-viewmonth-day,.yui3-skin-sam .yui3-icello-datechooser-viewmonth-prevmonth-day,.yui3-skin-sam .yui3-icello-datechooser-viewmonth-nextmonth-day{background-color:#fff;border:1px solid #CCC;font-size:11px;padding:1px;text-align:center}.yui3-skin-sam .yui3-icello-datechooser-viewmonth-day{cursor:pointer;font-weight:bold}.yui3-skin-sam .yui3-icello-datechooser-viewmonth-day:hover{background-color:blue;color:white}.yui3-skin-sam .yui3-icello-datechooser-viewmonth-prevmonth-day,.yui3-skin-sam .yui3-icello-datechooser-viewmonth-nextmonth-day{color:#ccc}.yui3-skin-sam .yui3-icello-datechooser-viewmonth-day-selected{background-color:#b3d4ff}.yui3-icello-datechooser-viewmonth-body{padding-top:5px}#yui3-css-stamp.skin-sam-gallery-icello-datechooser{display:none}
diff --git a/build/gallery-icello-datechooser/gallery-icello-datechooser-debug.js b/build/gallery-icello-datechooser/gallery-icello-datechooser-debug.js
new file mode 100644
index 0000000000..6697cc880c
--- /dev/null
+++ b/build/gallery-icello-datechooser/gallery-icello-datechooser-debug.js
@@ -0,0 +1,582 @@
+YUI.add('gallery-icello-datechooser', function(Y) {
+
+var getCN = Y.ClassNameManager.getClassName,
+ CBX = 'contentBox',
+ BASENAME = 'icello-datechooser',
+ DC = BASENAME + '-viewmonth',
+ MC = BASENAME + '-viewyear',
+ YC = BASENAME + '-viewdecade',
+ UI_SRC = Y.Widget.UI_SRC,
+ IDate = Y.Icello.Date,
+ YDate = Y.DataType.Date,
+ sub = Y.substitute,
+ styles = {
+ viewmonth: {
+ css_pane: getCN(DC, 'pane'),
+ css_body: getCN(DC, 'body'),
+ css_header: getCN(DC, 'header'),
+ css_prevmonth: getCN(DC, 'prevmonth'),
+ css_nextmonth: getCN(DC, 'nextmonth'),
+ css_header_label: getCN(DC, 'header', 'label'),
+ css_monthyear: getCN(DC, 'monthyear'),
+ css_grid: getCN(DC, 'grid'),
+ css_weekdayrow: getCN(DC, 'weekdayrow'),
+ css_weekday: getCN(DC, 'weekday'),
+ css_day: getCN(DC, 'day'),
+ css_day_selected: getCN(DC, 'day', 'selected'),
+ css_nextmonth_day: getCN(DC, 'nextmonth', 'day'),
+ css_prevmonth_day: getCN(DC, 'prevmonth', 'day')
+ },
+ viewyear: {
+ css_pane: getCN(MC, 'pane'),
+ css_body: getCN(MC, 'body'),
+ css_header: getCN(MC, 'header'),
+ css_prevyear: getCN(MC, 'prevyear'),
+ css_nextyear: getCN(MC, 'nextyear'),
+ css_header_label: getCN(MC, 'header', 'label'),
+ css_year: getCN(MC, 'year'),
+ css_grid: getCN(MC, 'grid'),
+ css_month: getCN(MC, 'month'),
+ css_month_selected: getCN(MC, 'month', 'selected')
+ },
+ viewdecade: {
+ css_pane: getCN(YC, 'pane'),
+ css_body: getCN(YC, 'body'),
+ css_header: getCN(YC, 'header'),
+ css_prevdecade: getCN(YC, 'prevdecade'),
+ css_nextdecade: getCN(YC, 'nextdecade'),
+ css_header_label: getCN(YC, 'header', 'label'),
+ css_decade: getCN(YC, 'decade'),
+ css_grid: getCN(YC, 'grid'),
+ css_year: getCN(YC, 'year'),
+ css_year_selected: getCN(YC, 'year', 'selected'),
+ css_year_outsidedecade: getCN(YC, 'year', 'outsidedecade')
+ }
+ },
+ templates = {
+ viewmonth: {
+ content: '
',
+ header: '',
+ prevmonth: '◄
',
+ nextmonth: '►
',
+ headerlabel: '',
+ grid: '',
+ weekdayrow: '{weekdays} ',
+ weekday: '{weekday} ', //used to create {weekdays}
+ row: '{columns} ', //used to create {rows}
+ column: '{dspDay} '
+ },
+ viewyear: {
+ content: '',
+ header: '',
+ prevyear: '◄
',
+ nextyear: '►
',
+ headerlabel: '',
+ grid: '',
+ row: '{columns} ', //used to create {rows}
+ column: '{dspMonth} '
+ },
+ viewdecade: {
+ content: '',
+ header: '',
+ prevdecade: '◄
',
+ nextdecade: '►
',
+ headerlabel: '',
+ grid: '',
+ row: '{columns} ', //used to create {rows}
+ column: '{dspYear} '
+ }
+ },
+ fnAddDays = function (d, days) {
+ var year = d.getFullYear(),
+ month = d.getMonth(),
+ day = d.getDate() + days;
+
+ return new Date(year, month, day);
+ },
+ fnGetDecadeFirstYear = function (year) {
+ var y1to3 = parseInt(year / 10, 10);
+ return parseInt(y1to3 + '0', 10);
+ };
+
+Y.namespace('Icello');
+
+Y.Icello.DateChooser = Y.Base.create(
+ BASENAME,
+ Y.Widget,
+ [Y.WidgetPosition, Y.WidgetStack, Y.WidgetPositionAlign, Y.WidgetPositionConstrain, Y.WidgetAutohide],
+ { //instance members
+ initializer: function () {
+ Y.log('', 'info', 'Datechooser initializer');
+ this._navdate = null;
+ this._monthsL = null;
+ this._weekdaysL = null;
+ this._inputNodeHandle = null;
+ this._monthsL = this._getMonthsL(this.get('date'));
+ this._weekdaysL = this._getWeekdaysL(this.get('date'));
+
+ this.set('align', {
+ node: this.get('inputNode'),
+ points: [Y.WidgetPositionAlign.TL, Y.WidgetPositionAlign.BL]
+ });
+ },
+ destructor: function () {
+ Y.log('', 'info', 'Datechooser destructor');
+
+ if (this._inputNodeHandle) {
+ this._inputNodeHandle.detach();
+ }
+ },
+ renderUI: function () {
+ Y.log('', 'info', 'Datechooser renderUI');
+ this._syncDates();
+ this._renderViewMonth();
+ },
+ bindUI: function () {
+ Y.log('', 'info', 'Datechooser bindUI');
+ this._inputNodeHandle = this.get('inputNode').on('click', Y.bind(this._inputNodeClick, this));
+ this.on('click', Y.bind(this._clickHandler, this));
+ this.set('hideOn', [{ eventName: 'clickoutside'}]);
+ this.after('dateChange', this._handlerAfterDateChange);
+ },
+ syncUI: function () {
+ Y.log('', 'info', 'Datechooser syncUI');
+
+ },
+ _clickHandler: function (e) {
+ Y.log('', 'info', 'Datechooser _clickHandler');
+ var n = e.domEvent.target;
+
+ if (n.hasClass(styles.viewmonth.css_day)) {
+ this._dayChosenHandler(n.getContent());
+ } else if (n.hasClass(styles.viewmonth.css_nextmonth)) {
+ this._monthChosenHandler(IDate.addMonths(this._navdate, 1));
+ } else if (n.hasClass(styles.viewmonth.css_prevmonth)) {
+ this._monthChosenHandler(IDate.addMonths(this._navdate, -1));
+ } else if (n.hasClass(styles.viewmonth.css_monthyear)) {
+ this._yearChosenHandler(this._navdate);
+ } else if (n.hasClass(styles.viewyear.css_nextyear)) {
+ this._yearChosenHandler(YDate.addYears(this._navdate, 1));
+ } else if (n.hasClass(styles.viewyear.css_prevyear)) {
+ this._yearChosenHandler(YDate.addYears(this._navdate, -1));
+ } else if (n.hasClass(styles.viewyear.css_month)) {
+ this._monthChosenHandler(this._getMonthChosenFromContent(n.getContent()));
+ } else if (n.hasClass(styles.viewyear.css_year)) {
+ this._decadeChosenHandler(new Date(parseInt(n.getContent(), 10), this._navdate.getMonth(), this._navdate.getDate()));
+ } else if (n.hasClass(styles.viewdecade.css_year)) {
+ this._yearChosenHandler(new Date(parseInt(n.getContent(), 10), this._navdate.getMonth(), this._navdate.getDate()));
+ } else if (n.hasClass(styles.viewdecade.css_nextdecade)) {
+ this._decadeChosenHandler(YDate.addYears(this._navdate, 10));
+ } else if (n.hasClass(styles.viewdecade.css_prevdecade)) {
+ this._decadeChosenHandler(YDate.addYears(this._navdate, -10));
+ }
+
+ e.domEvent.halt(true);
+ },
+ _getMonthChosenFromContent: function (content) {
+ Y.log('', 'info', 'Datechooser _getMonthChosenFromContent');
+
+ var monthIndex = -1;
+ Y.Array.each(this._monthsL, function (v, i) {
+ if (v === content) {
+ monthIndex = i;
+ }
+ });
+
+ return new Date(this._navdate.getFullYear(), monthIndex, this._navdate.getDate());
+ },
+ _dayChosenHandler: function (dayChosen) {
+ Y.log('', 'info', 'Datechooser _dayChosenHandler');
+ var date = this._navdate,
+ year = date.getFullYear(),
+ month = date.getMonth(),
+ newDate = new Date(year, month, dayChosen),
+ newDateDsp = (month + 1) + '/' + dayChosen + '/' + year;
+
+ this.set('date', newDate, {source: UI_SRC});
+ this._navdate = this.get('date');
+
+ this.get('inputNode').set('value', newDateDsp);
+
+ this._renderViewMonth();
+
+ this.hide();
+ this.fire('daySelect', { navdate: this._navdate });
+ },
+ _monthChosenHandler: function (newDate) {
+ Y.log(newDate, 'info', 'DateChooser _monthChosenHandler');
+
+ this._navdate = newDate;
+ this._renderViewMonth();
+ this.fire('monthSelect', { navdate: this._navdate });
+ },
+ _yearChosenHandler: function (newDate) {
+ Y.log(newDate, 'info', 'DateChooser _yearChosenHandler');
+
+ this._navdate = newDate;
+ this._renderViewYear();
+ this.fire('yearSelect', { navdate: this._navdate });
+ },
+ _decadeChosenHandler: function (newDate) {
+ Y.log(newDate, 'info', 'DateChooser _decadeChosenHandler');
+
+ this._navdate = newDate;
+ this._renderViewDecade();
+ this.fire('decadeSelect', { navdate: this._navdate });
+ },
+ _handlerAfterDateChange: function (e) {
+ Y.log('', 'info', 'DateChooser _handlerAfterDateChange');
+ if (e.source === UI_SRC) {
+ return;
+ }
+
+ this._navdate = e.newVal;
+ this._dayChosenHandler(this._navdate.getDate());
+ },
+ _inputNodeClick: function () {
+ Y.log('', 'info', 'DateChooser _inputNodeClick');
+
+ var hasDateChanged = false,
+ oldDate = null,
+ newDate = null;
+
+ if (this.get('visible')) {
+ this.hide();
+ this.fire('inputClickHide');
+ } else {
+ oldDate = this.get('date');
+ this._syncDates();
+ newDate = this.get('date');
+
+ hasDateChanged = !YDate.areEqual(oldDate, newDate);
+ if (hasDateChanged) {
+ this._renderViewMonth();
+ }
+
+ this.show();
+ this.fire('inputClickShow');
+ }
+ },
+ _syncDates: function () {
+ Y.log('', 'info', 'Datechooser _syncDates');
+ this.set('date', this.get('inputNode').get('value'), {source: UI_SRC});
+ this._navdate = this.get('date');
+ },
+ _renderViewMonth: function () {
+ Y.log('', 'info', 'Datechooser _renderViewMonth');
+ var contentBox = this.get(CBX);
+ contentBox.empty();
+ contentBox.appendChild(this._getViewMonthHTML());
+ },
+ _renderViewYear: function () {
+ Y.log('', 'info', 'Datechooser _renderViewYear');
+ var contentBox = this.get(CBX);
+ contentBox.empty();
+ contentBox.appendChild(this._getViewYearHTML());
+ },
+ _renderViewDecade: function () {
+ Y.log('', 'info', 'Datechooser _renderViewDecade');
+ var contentBox = this.get(CBX);
+ contentBox.empty();
+ contentBox.appendChild(this._getViewDecadeHTML());
+ },
+ _getViewMonthHTML: function () {
+ Y.log('this._navdate: ' + this._navdate, 'info', 'Datechooser _getViewMonthHTML');
+
+ var data = {},
+ navdate = this._navdate,
+ t = templates.viewmonth;
+
+ Y.mix(data, styles.viewmonth);
+
+ data.t_prevmonth = sub(t.prevmonth, data);
+ data.t_nextmonth = sub(t.nextmonth, data);
+ data.month = YDate.format(navdate, { format: '%B' });
+ data.year = YDate.format(navdate, { format: '%Y' });
+ data.t_headerlabel = sub(t.headerlabel, data);
+ data.t_header = sub(t.header, data);
+
+ data.weekdays = this._getViewMonthWeekdays();
+ data.t_weekdayrow = sub(t.weekdayrow, data);
+ data.rows = this._getViewMonthRows();
+ data.t_grid = sub(t.grid, data);
+
+ return sub(t.content, data);
+ },
+ _getViewYearHTML: function () {
+ Y.log('this._navdate: ' + this._navdate, 'info', 'Datechooser _getViewYearHTML');
+
+ var data = {},
+ navdate = this._navdate,
+ t = templates.viewyear;
+
+ Y.mix(data, styles.viewyear);
+
+ data.t_prevyear = sub(t.prevyear, data);
+ data.t_nextyear = sub(t.nextyear, data);
+ data.year = YDate.format(navdate, { format: '%Y' });
+ data.t_headerlabel = sub(t.headerlabel, data);
+ data.t_header = sub(t.header, data);
+
+ data.rows = this._getViewYearRows();
+ data.t_grid = sub(t.grid, data);
+
+ return sub(t.content, data);
+ },
+ _getViewDecadeHTML: function () {
+ Y.log('this._navdate: ' + this._navdate, 'info', 'Datechooser _getViewYearHTML');
+
+ var data = {},
+ navdate = this._navdate,
+ t = templates.viewdecade,
+ decadeFirstYear = fnGetDecadeFirstYear(navdate.getFullYear()),
+ decadeLastYear = decadeFirstYear + 9;
+
+ Y.mix(data, styles.viewdecade);
+
+ data.t_prevdecade = sub(t.prevdecade, data);
+ data.t_nextdecade = sub(t.nextdecade, data);
+ data.decade = decadeFirstYear + '-' + decadeLastYear;
+ data.t_headerlabel = sub(t.headerlabel, data);
+ data.t_header = sub(t.header, data);
+
+ data.rows = this._getViewDecadeRows();
+ data.t_grid = sub(t.grid, data);
+
+ return sub(t.content, data);
+ },
+ _getViewMonthWeekdays: function () {
+ Y.log('', 'info', 'Datechooser _getViewMonthWeekdays');
+
+ var weekdays = this._weekdaysL,
+ t_weekday = templates.viewmonth.weekday,
+ css_weekday = styles.viewmonth.css_weekday,
+ sb = [];
+
+ Y.Array.each(weekdays, function (weekday) {
+ sb.push(sub(t_weekday, { weekday: weekday, css_weekday: css_weekday }));
+ }, this);
+
+ return sb.join('');
+ },
+ _getWeekdaysL: function (todayDate) {
+ Y.log('', 'info', 'Datechooser _getWeekdaysL');
+
+ var weekdays = [],
+ today_num = YDate.format(todayDate, { format: '%w' }),
+ daysToAdd = -(today_num),
+ currDate = null,
+ i = -1;
+
+ for (i = 0; i < 7; i += 1) {
+ currDate = fnAddDays(todayDate, daysToAdd);
+ weekdays.push(YDate.format(currDate, { format: '%a' }));
+ daysToAdd += 1;
+ }
+ return weekdays;
+ },
+ _getViewMonthRows: function () {
+ Y.log('', 'info', 'Datechooser _getViewMonthRows');
+
+ var sb = [],
+ sbColumns = [],
+ date = this.get('date'),
+ navdate = this._navdate,
+ dLastMonth = IDate.addMonths(navdate, -1),
+ dFirstDayOfMonth = new Date(navdate.getFullYear(), navdate.getMonth(), 1),
+ indexFirstDayOfMonth = dFirstDayOfMonth.getDay(),
+ daysInMonth = YDate.daysInMonth(navdate),
+ daysInLastMonth = YDate.daysInMonth(dLastMonth),
+ i = 1,
+ row = -1,
+ column = -1,
+ daydata = null,
+ day = -1,
+ dCurr = null;
+
+ Y.log('navdate: ' + navdate, 'info', 'Datechooser _getViewMonthRows');
+ Y.log('daysInMonth: ' + daysInMonth, 'info', 'Datechooser _getViewMonthRows');
+
+ for (row = 0; row < 6; row += 1) {
+ sbColumns = [];
+ for (column = 0; column < 7; column += 1) {
+ daydata = { css: styles.viewmonth.css_day, dspDay: 0 };
+ day = i - indexFirstDayOfMonth;
+
+ if (day > daysInMonth) {
+ daydata.dspDay = day % daysInMonth;
+ daydata.css = styles.viewmonth.css_nextmonth_day;
+ } else if (day < 1) {
+ daydata.dspDay = daysInLastMonth + day;
+ daydata.css = styles.viewmonth.css_prevmonth_day;
+ } else {
+ daydata.dspDay = day;
+ dCurr = new Date(navdate.getFullYear(), navdate.getMonth(), day);
+ if (dCurr.getFullYear() === date.getFullYear() && dCurr.getMonth() === date.getMonth() && dCurr.getDate() === date.getDate()) {
+ daydata.css += ' ' + styles.viewmonth.css_day_selected;
+ }
+ }
+
+ sbColumns.push(sub(templates.viewmonth.column, daydata));
+
+ i += 1;
+ } //end for column
+
+ sb.push(sub(templates.viewmonth.row, { columns: sbColumns.join('') }));
+ } //end for row
+
+ return sb.join('');
+ },
+ _getMonthsL: function (todayDate) {
+ Y.log('', 'info', 'Datechooser _getMonthsL');
+
+ var months = [],
+ today_num = YDate.format(todayDate, { format: '%m' }),
+ monthsToAdd = -(today_num) + 1,
+ currDate = null,
+ i = -1;
+
+ Y.log('todayDate: ' + todayDate, 'info', 'Datechooser _getMonthsL');
+ Y.log('today_num: ' + today_num, 'info', 'Datechooser _getMonthsL');
+
+ for (i = 0; i < 12; i += 1) {
+ currDate = IDate.addMonths(todayDate, monthsToAdd);
+ Y.log('currDate: ' + currDate, 'info', 'Datechooser _getMonthsL');
+ Y.log('monthsToAdd: ' + monthsToAdd, 'info', 'Datechooser _getMonthsL');
+ Y.log('monthDsp: ' + YDate.format(currDate, { format: '%b' }), 'info', 'Datechooser _getMonthsL');
+ months.push(YDate.format(currDate, { format: '%b' }));
+ monthsToAdd += 1;
+ }
+
+ return months;
+ },
+ _getViewYearRows: function () {
+ Y.log('', 'info', 'Datechooser _getViewYearRows');
+
+ var sb = [],
+ sbColumns = [],
+ date = this.get('date'),
+ navdate = this._navdate,
+ monthsDspArray = this._monthsL,
+ i = 0,
+ row = -1,
+ column = -1,
+ monthdata = null,
+ dCurr = null;
+
+ for (row = 0; row < 3; row += 1) {
+ sbColumns = [];
+ for (column = 0; column < 4; column += 1) {
+ monthdata = { css: styles.viewyear.css_month, dspMonth: monthsDspArray[i] };
+
+ dCurr = new Date(navdate.getFullYear(), i, 1);
+ if (dCurr.getFullYear() === date.getFullYear() && dCurr.getMonth() === date.getMonth()) {
+ monthdata.css += ' ' + styles.viewyear.css_month_selected;
+ }
+
+ sbColumns.push(sub(templates.viewyear.column, monthdata));
+
+ i += 1;
+ } //end for column
+
+ sb.push(sub(templates.viewyear.row, { columns: sbColumns.join('') }));
+ } //end for row
+
+ return sb.join('');
+ },
+ _getViewDecadeRows: function () {
+ Y.log('', 'info', 'Datechooser _getViewDecadeRows');
+
+ var sb = [],
+ sbColumns = [],
+ date = this.get('date'),
+ navdate = this._navdate,
+ decadeFirstYear = fnGetDecadeFirstYear(navdate.getFullYear()),
+ decadeLastYear = decadeFirstYear + 9,
+ currYear = decadeFirstYear - 1,
+ i = 0,
+ row = -1,
+ column = -1,
+ yeardata = null;
+
+ for (row = 0; row < 3; row += 1) {
+ sbColumns = [];
+ for (column = 0; column < 4; column += 1) {
+ yeardata = { css: styles.viewdecade.css_year, dspYear: currYear };
+
+ if (currYear === date.getFullYear()) {
+ yeardata.css += ' ' + styles.viewdecade.css_year_selected;
+ } else if (currYear < decadeFirstYear || currYear > decadeLastYear) {
+ yeardata.css += ' ' + styles.viewdecade.css_year_outsidedecade;
+ }
+ sbColumns.push(sub(templates.viewdecade.column, yeardata));
+
+ currYear += 1;
+ i += 1;
+ } //end for column
+
+ sb.push(sub(templates.viewdecade.row, { columns: sbColumns.join('') }));
+ } //end for row
+
+ return sb.join('');
+ }
+
+ },
+ { //static members
+ ATTRS: {
+ date: {
+ value: new Date(),
+ validator: function (val) {
+ var isValid = YDate.isValidDate(val),
+ dateParsed = Y.DataType.Date.parse(val);
+
+ Y.log(val + ' isValid: ' + isValid + '; dateParsed: ' + dateParsed, 'info', 'Datechooser date validator');
+
+ return isValid || dateParsed !== null;
+ },
+ setter: function (v) {
+ Y.log('', 'info', 'Datechooser date setter');
+
+ var vToReturn = null;
+
+ if (typeof v === 'string') {
+ vToReturn = Y.DataType.Date.parse(v);
+ } else {
+ vToReturn = v;
+ }
+
+ return vToReturn;
+ }
+ },
+ height: {
+ value: '150px',
+ readOnly: true
+ },
+ width: {
+ value: '225px',
+ readOnly: true
+ },
+ inputNode: {
+ writeOnce: 'initOnly',
+ setter: function (nodeOrId) {
+ Y.log('', 'info', 'Datechooser inputNode setter');
+ var node = nodeOrId;
+
+ if (typeof nodeOrId === 'string') {
+ node = Y.one(nodeOrId);
+ }
+
+ return node;
+ }
+ },
+ visible: {
+ value: false
+ }
+ }
+ }
+);
+
+
+
+
+}, 'gallery-2012.04.04-17-55' ,{skinnable:true, requires:['widget', 'widget-position', 'widget-stack', 'widget-position-align', 'widget-position-constrain', 'widget-autohide', 'datatype-date', 'datatype-date-math', 'substitute', 'datatype-date-format', 'gallery-icello-date']});
diff --git a/build/gallery-icello-datechooser/gallery-icello-datechooser-min.js b/build/gallery-icello-datechooser/gallery-icello-datechooser-min.js
new file mode 100644
index 0000000000..48f719fed7
--- /dev/null
+++ b/build/gallery-icello-datechooser/gallery-icello-datechooser-min.js
@@ -0,0 +1,2 @@
+YUI.add("gallery-icello-datechooser",function(c){var e=c.ClassNameManager.getClassName,j="contentBox",m="icello-datechooser",h=m+"-viewmonth",g=m+"-viewyear",d=m+"-viewdecade",i=c.Widget.UI_SRC,f=c.Icello.Date,n=c.DataType.Date,b=c.substitute,o={viewmonth:{css_pane:e(h,"pane"),css_body:e(h,"body"),css_header:e(h,"header"),css_prevmonth:e(h,"prevmonth"),css_nextmonth:e(h,"nextmonth"),css_header_label:e(h,"header","label"),css_monthyear:e(h,"monthyear"),css_grid:e(h,"grid"),css_weekdayrow:e(h,"weekdayrow"),css_weekday:e(h,"weekday"),css_day:e(h,"day"),css_day_selected:e(h,"day","selected"),css_nextmonth_day:e(h,"nextmonth","day"),css_prevmonth_day:e(h,"prevmonth","day")},viewyear:{css_pane:e(g,"pane"),css_body:e(g,"body"),css_header:e(g,"header"),css_prevyear:e(g,"prevyear"),css_nextyear:e(g,"nextyear"),css_header_label:e(g,"header","label"),css_year:e(g,"year"),css_grid:e(g,"grid"),css_month:e(g,"month"),css_month_selected:e(g,"month","selected")},viewdecade:{css_pane:e(d,"pane"),css_body:e(d,"body"),css_header:e(d,"header"),css_prevdecade:e(d,"prevdecade"),css_nextdecade:e(d,"nextdecade"),css_header_label:e(d,"header","label"),css_decade:e(d,"decade"),css_grid:e(d,"grid"),css_year:e(d,"year"),css_year_selected:e(d,"year","selected"),css_year_outsidedecade:e(d,"year","outsidedecade")}},l={viewmonth:{content:'',header:'',prevmonth:'◄
',nextmonth:'►
',headerlabel:'',grid:'',weekdayrow:'{weekdays} ',weekday:'{weekday} ',row:"{columns} ",column:'{dspDay} '},viewyear:{content:'',header:'',prevyear:'◄
',nextyear:'►
',headerlabel:'',grid:'',row:"{columns} ",column:'{dspMonth} '},viewdecade:{content:'',header:'',prevdecade:'◄
',nextdecade:'►
',headerlabel:'',grid:'',row:"{columns} ",column:'{dspYear} '}},k=function(s,t){var q=s.getFullYear(),r=s.getMonth(),p=s.getDate()+t;return new Date(q,r,p);},a=function(p){var q=parseInt(p/10,10);return parseInt(q+"0",10);};c.namespace("Icello");c.Icello.DateChooser=c.Base.create(m,c.Widget,[c.WidgetPosition,c.WidgetStack,c.WidgetPositionAlign,c.WidgetPositionConstrain,c.WidgetAutohide],{initializer:function(){this._navdate=null;this._monthsL=null;this._weekdaysL=null;this._inputNodeHandle=null;this._monthsL=this._getMonthsL(this.get("date"));this._weekdaysL=this._getWeekdaysL(this.get("date"));this.set("align",{node:this.get("inputNode"),points:[c.WidgetPositionAlign.TL,c.WidgetPositionAlign.BL]});},destructor:function(){if(this._inputNodeHandle){this._inputNodeHandle.detach();}},renderUI:function(){this._syncDates();this._renderViewMonth();},bindUI:function(){this._inputNodeHandle=this.get("inputNode").on("click",c.bind(this._inputNodeClick,this));this.on("click",c.bind(this._clickHandler,this));this.set("hideOn",[{eventName:"clickoutside"}]);this.after("dateChange",this._handlerAfterDateChange);},syncUI:function(){},_clickHandler:function(p){var q=p.domEvent.target;if(q.hasClass(o.viewmonth.css_day)){this._dayChosenHandler(q.getContent());}else{if(q.hasClass(o.viewmonth.css_nextmonth)){this._monthChosenHandler(f.addMonths(this._navdate,1));}else{if(q.hasClass(o.viewmonth.css_prevmonth)){this._monthChosenHandler(f.addMonths(this._navdate,-1));}else{if(q.hasClass(o.viewmonth.css_monthyear)){this._yearChosenHandler(this._navdate);}else{if(q.hasClass(o.viewyear.css_nextyear)){this._yearChosenHandler(n.addYears(this._navdate,1));}else{if(q.hasClass(o.viewyear.css_prevyear)){this._yearChosenHandler(n.addYears(this._navdate,-1));}else{if(q.hasClass(o.viewyear.css_month)){this._monthChosenHandler(this._getMonthChosenFromContent(q.getContent()));}else{if(q.hasClass(o.viewyear.css_year)){this._decadeChosenHandler(new Date(parseInt(q.getContent(),10),this._navdate.getMonth(),this._navdate.getDate()));}else{if(q.hasClass(o.viewdecade.css_year)){this._yearChosenHandler(new Date(parseInt(q.getContent(),10),this._navdate.getMonth(),this._navdate.getDate()));}else{if(q.hasClass(o.viewdecade.css_nextdecade)){this._decadeChosenHandler(n.addYears(this._navdate,10));}else{if(q.hasClass(o.viewdecade.css_prevdecade)){this._decadeChosenHandler(n.addYears(this._navdate,-10));}}}}}}}}}}}p.domEvent.halt(true);},_getMonthChosenFromContent:function(p){var q=-1;c.Array.each(this._monthsL,function(r,s){if(r===p){q=s;}});return new Date(this._navdate.getFullYear(),q,this._navdate.getDate());},_dayChosenHandler:function(t){var r=this._navdate,s=r.getFullYear(),u=r.getMonth(),p=new Date(s,u,t),q=(u+1)+"/"+t+"/"+s;this.set("date",p,{source:i});this._navdate=this.get("date");this.get("inputNode").set("value",q);this._renderViewMonth();this.hide();this.fire("daySelect",{navdate:this._navdate});},_monthChosenHandler:function(p){this._navdate=p;this._renderViewMonth();this.fire("monthSelect",{navdate:this._navdate});},_yearChosenHandler:function(p){this._navdate=p;this._renderViewYear();
+this.fire("yearSelect",{navdate:this._navdate});},_decadeChosenHandler:function(p){this._navdate=p;this._renderViewDecade();this.fire("decadeSelect",{navdate:this._navdate});},_handlerAfterDateChange:function(p){if(p.source===i){return;}this._navdate=p.newVal;this._dayChosenHandler(this._navdate.getDate());},_inputNodeClick:function(){var r=false,q=null,p=null;if(this.get("visible")){this.hide();this.fire("inputClickHide");}else{q=this.get("date");this._syncDates();p=this.get("date");r=!n.areEqual(q,p);if(r){this._renderViewMonth();}this.show();this.fire("inputClickShow");}},_syncDates:function(){this.set("date",this.get("inputNode").get("value"),{source:i});this._navdate=this.get("date");},_renderViewMonth:function(){var p=this.get(j);p.empty();p.appendChild(this._getViewMonthHTML());},_renderViewYear:function(){var p=this.get(j);p.empty();p.appendChild(this._getViewYearHTML());},_renderViewDecade:function(){var p=this.get(j);p.empty();p.appendChild(this._getViewDecadeHTML());},_getViewMonthHTML:function(){var r={},p=this._navdate,q=l.viewmonth;c.mix(r,o.viewmonth);r.t_prevmonth=b(q.prevmonth,r);r.t_nextmonth=b(q.nextmonth,r);r.month=n.format(p,{format:"%B"});r.year=n.format(p,{format:"%Y"});r.t_headerlabel=b(q.headerlabel,r);r.t_header=b(q.header,r);r.weekdays=this._getViewMonthWeekdays();r.t_weekdayrow=b(q.weekdayrow,r);r.rows=this._getViewMonthRows();r.t_grid=b(q.grid,r);return b(q.content,r);},_getViewYearHTML:function(){var r={},p=this._navdate,q=l.viewyear;c.mix(r,o.viewyear);r.t_prevyear=b(q.prevyear,r);r.t_nextyear=b(q.nextyear,r);r.year=n.format(p,{format:"%Y"});r.t_headerlabel=b(q.headerlabel,r);r.t_header=b(q.header,r);r.rows=this._getViewYearRows();r.t_grid=b(q.grid,r);return b(q.content,r);},_getViewDecadeHTML:function(){var u={},q=this._navdate,r=l.viewdecade,p=a(q.getFullYear()),s=p+9;c.mix(u,o.viewdecade);u.t_prevdecade=b(r.prevdecade,u);u.t_nextdecade=b(r.nextdecade,u);u.decade=p+"-"+s;u.t_headerlabel=b(r.headerlabel,u);u.t_header=b(r.header,u);u.rows=this._getViewDecadeRows();u.t_grid=b(r.grid,u);return b(r.content,u);},_getViewMonthWeekdays:function(){var p=this._weekdaysL,q=l.viewmonth.weekday,r=o.viewmonth.css_weekday,s=[];c.Array.each(p,function(t){s.push(b(q,{weekday:t,css_weekday:r}));},this);return s.join("");},_getWeekdaysL:function(q){var p=[],t=n.format(q,{format:"%w"}),r=-(t),u=null,s=-1;for(s=0;s<7;s+=1){u=k(q,r);p.push(n.format(u,{format:"%a"}));r+=1;}return p;},_getViewMonthRows:function(){var y=[],C=[],r=this.get("date"),t=this._navdate,A=f.addMonths(t,-1),q=new Date(t.getFullYear(),t.getMonth(),1),v=q.getDay(),p=n.daysInMonth(t),B=n.daysInMonth(A),u=1,D=-1,s=-1,z=null,x=-1,w=null;for(D=0;D<6;D+=1){C=[];for(s=0;s<7;s+=1){z={css:o.viewmonth.css_day,dspDay:0};x=u-v;if(x>p){z.dspDay=x%p;z.css=o.viewmonth.css_nextmonth_day;}else{if(x<1){z.dspDay=B+x;z.css=o.viewmonth.css_prevmonth_day;}else{z.dspDay=x;w=new Date(t.getFullYear(),t.getMonth(),x);if(w.getFullYear()===r.getFullYear()&&w.getMonth()===r.getMonth()&&w.getDate()===r.getDate()){z.css+=" "+o.viewmonth.css_day_selected;}}}C.push(b(l.viewmonth.column,z));u+=1;}y.push(b(l.viewmonth.row,{columns:C.join("")}));}return y.join("");},_getMonthsL:function(q){var p=[],s=n.format(q,{format:"%m"}),u=-(s)+1,t=null,r=-1;for(r=0;r<12;r+=1){t=f.addMonths(q,u);p.push(n.format(t,{format:"%b"}));u+=1;}return p;},_getViewYearRows:function(){var v=[],x=[],q=this.get("date"),s=this._navdate,p=this._monthsL,t=0,y=-1,r=-1,w=null,u=null;for(y=0;y<3;y+=1){x=[];for(r=0;r<4;r+=1){w={css:o.viewyear.css_month,dspMonth:p[t]};u=new Date(s.getFullYear(),t,1);if(u.getFullYear()===q.getFullYear()&&u.getMonth()===q.getMonth()){w.css+=" "+o.viewyear.css_month_selected;}x.push(b(l.viewyear.column,w));t+=1;}v.push(b(l.viewyear.row,{columns:x.join("")}));}return v.join("");},_getViewDecadeRows:function(){var v=[],x=[],q=this.get("date"),s=this._navdate,z=a(s.getFullYear()),p=z+9,w=z-1,u=0,y=-1,r=-1,t=null;for(y=0;y<3;y+=1){x=[];for(r=0;r<4;r+=1){t={css:o.viewdecade.css_year,dspYear:w};if(w===q.getFullYear()){t.css+=" "+o.viewdecade.css_year_selected;}else{if(wp){t.css+=" "+o.viewdecade.css_year_outsidedecade;}}x.push(b(l.viewdecade.column,t));w+=1;u+=1;}v.push(b(l.viewdecade.row,{columns:x.join("")}));}return v.join("");}},{ATTRS:{date:{value:new Date(),validator:function(r){var q=n.isValidDate(r),p=c.DataType.Date.parse(r);return q||p!==null;},setter:function(p){var q=null;if(typeof p==="string"){q=c.DataType.Date.parse(p);}else{q=p;}return q;}},height:{value:"150px",readOnly:true},width:{value:"225px",readOnly:true},inputNode:{writeOnce:"initOnly",setter:function(p){var q=p;if(typeof p==="string"){q=c.one(p);}return q;}},visible:{value:false}}});},"gallery-2012.04.04-17-55",{skinnable:true,requires:["widget","widget-position","widget-stack","widget-position-align","widget-position-constrain","widget-autohide","datatype-date","datatype-date-math","substitute","datatype-date-format","gallery-icello-date"]});
\ No newline at end of file
diff --git a/build/gallery-icello-datechooser/gallery-icello-datechooser.js b/build/gallery-icello-datechooser/gallery-icello-datechooser.js
new file mode 100644
index 0000000000..9b7f0a6411
--- /dev/null
+++ b/build/gallery-icello-datechooser/gallery-icello-datechooser.js
@@ -0,0 +1,546 @@
+YUI.add('gallery-icello-datechooser', function(Y) {
+
+var getCN = Y.ClassNameManager.getClassName,
+ CBX = 'contentBox',
+ BASENAME = 'icello-datechooser',
+ DC = BASENAME + '-viewmonth',
+ MC = BASENAME + '-viewyear',
+ YC = BASENAME + '-viewdecade',
+ UI_SRC = Y.Widget.UI_SRC,
+ IDate = Y.Icello.Date,
+ YDate = Y.DataType.Date,
+ sub = Y.substitute,
+ styles = {
+ viewmonth: {
+ css_pane: getCN(DC, 'pane'),
+ css_body: getCN(DC, 'body'),
+ css_header: getCN(DC, 'header'),
+ css_prevmonth: getCN(DC, 'prevmonth'),
+ css_nextmonth: getCN(DC, 'nextmonth'),
+ css_header_label: getCN(DC, 'header', 'label'),
+ css_monthyear: getCN(DC, 'monthyear'),
+ css_grid: getCN(DC, 'grid'),
+ css_weekdayrow: getCN(DC, 'weekdayrow'),
+ css_weekday: getCN(DC, 'weekday'),
+ css_day: getCN(DC, 'day'),
+ css_day_selected: getCN(DC, 'day', 'selected'),
+ css_nextmonth_day: getCN(DC, 'nextmonth', 'day'),
+ css_prevmonth_day: getCN(DC, 'prevmonth', 'day')
+ },
+ viewyear: {
+ css_pane: getCN(MC, 'pane'),
+ css_body: getCN(MC, 'body'),
+ css_header: getCN(MC, 'header'),
+ css_prevyear: getCN(MC, 'prevyear'),
+ css_nextyear: getCN(MC, 'nextyear'),
+ css_header_label: getCN(MC, 'header', 'label'),
+ css_year: getCN(MC, 'year'),
+ css_grid: getCN(MC, 'grid'),
+ css_month: getCN(MC, 'month'),
+ css_month_selected: getCN(MC, 'month', 'selected')
+ },
+ viewdecade: {
+ css_pane: getCN(YC, 'pane'),
+ css_body: getCN(YC, 'body'),
+ css_header: getCN(YC, 'header'),
+ css_prevdecade: getCN(YC, 'prevdecade'),
+ css_nextdecade: getCN(YC, 'nextdecade'),
+ css_header_label: getCN(YC, 'header', 'label'),
+ css_decade: getCN(YC, 'decade'),
+ css_grid: getCN(YC, 'grid'),
+ css_year: getCN(YC, 'year'),
+ css_year_selected: getCN(YC, 'year', 'selected'),
+ css_year_outsidedecade: getCN(YC, 'year', 'outsidedecade')
+ }
+ },
+ templates = {
+ viewmonth: {
+ content: '',
+ header: '',
+ prevmonth: '◄
',
+ nextmonth: '►
',
+ headerlabel: '',
+ grid: '',
+ weekdayrow: '{weekdays} ',
+ weekday: '{weekday} ', //used to create {weekdays}
+ row: '{columns} ', //used to create {rows}
+ column: '{dspDay} '
+ },
+ viewyear: {
+ content: '',
+ header: '',
+ prevyear: '◄
',
+ nextyear: '►
',
+ headerlabel: '',
+ grid: '',
+ row: '{columns} ', //used to create {rows}
+ column: '{dspMonth} '
+ },
+ viewdecade: {
+ content: '',
+ header: '',
+ prevdecade: '◄
',
+ nextdecade: '►
',
+ headerlabel: '',
+ grid: '',
+ row: '{columns} ', //used to create {rows}
+ column: '{dspYear} '
+ }
+ },
+ fnAddDays = function (d, days) {
+ var year = d.getFullYear(),
+ month = d.getMonth(),
+ day = d.getDate() + days;
+
+ return new Date(year, month, day);
+ },
+ fnGetDecadeFirstYear = function (year) {
+ var y1to3 = parseInt(year / 10, 10);
+ return parseInt(y1to3 + '0', 10);
+ };
+
+Y.namespace('Icello');
+
+Y.Icello.DateChooser = Y.Base.create(
+ BASENAME,
+ Y.Widget,
+ [Y.WidgetPosition, Y.WidgetStack, Y.WidgetPositionAlign, Y.WidgetPositionConstrain, Y.WidgetAutohide],
+ { //instance members
+ initializer: function () {
+ this._navdate = null;
+ this._monthsL = null;
+ this._weekdaysL = null;
+ this._inputNodeHandle = null;
+ this._monthsL = this._getMonthsL(this.get('date'));
+ this._weekdaysL = this._getWeekdaysL(this.get('date'));
+
+ this.set('align', {
+ node: this.get('inputNode'),
+ points: [Y.WidgetPositionAlign.TL, Y.WidgetPositionAlign.BL]
+ });
+ },
+ destructor: function () {
+
+ if (this._inputNodeHandle) {
+ this._inputNodeHandle.detach();
+ }
+ },
+ renderUI: function () {
+ this._syncDates();
+ this._renderViewMonth();
+ },
+ bindUI: function () {
+ this._inputNodeHandle = this.get('inputNode').on('click', Y.bind(this._inputNodeClick, this));
+ this.on('click', Y.bind(this._clickHandler, this));
+ this.set('hideOn', [{ eventName: 'clickoutside'}]);
+ this.after('dateChange', this._handlerAfterDateChange);
+ },
+ syncUI: function () {
+
+ },
+ _clickHandler: function (e) {
+ var n = e.domEvent.target;
+
+ if (n.hasClass(styles.viewmonth.css_day)) {
+ this._dayChosenHandler(n.getContent());
+ } else if (n.hasClass(styles.viewmonth.css_nextmonth)) {
+ this._monthChosenHandler(IDate.addMonths(this._navdate, 1));
+ } else if (n.hasClass(styles.viewmonth.css_prevmonth)) {
+ this._monthChosenHandler(IDate.addMonths(this._navdate, -1));
+ } else if (n.hasClass(styles.viewmonth.css_monthyear)) {
+ this._yearChosenHandler(this._navdate);
+ } else if (n.hasClass(styles.viewyear.css_nextyear)) {
+ this._yearChosenHandler(YDate.addYears(this._navdate, 1));
+ } else if (n.hasClass(styles.viewyear.css_prevyear)) {
+ this._yearChosenHandler(YDate.addYears(this._navdate, -1));
+ } else if (n.hasClass(styles.viewyear.css_month)) {
+ this._monthChosenHandler(this._getMonthChosenFromContent(n.getContent()));
+ } else if (n.hasClass(styles.viewyear.css_year)) {
+ this._decadeChosenHandler(new Date(parseInt(n.getContent(), 10), this._navdate.getMonth(), this._navdate.getDate()));
+ } else if (n.hasClass(styles.viewdecade.css_year)) {
+ this._yearChosenHandler(new Date(parseInt(n.getContent(), 10), this._navdate.getMonth(), this._navdate.getDate()));
+ } else if (n.hasClass(styles.viewdecade.css_nextdecade)) {
+ this._decadeChosenHandler(YDate.addYears(this._navdate, 10));
+ } else if (n.hasClass(styles.viewdecade.css_prevdecade)) {
+ this._decadeChosenHandler(YDate.addYears(this._navdate, -10));
+ }
+
+ e.domEvent.halt(true);
+ },
+ _getMonthChosenFromContent: function (content) {
+
+ var monthIndex = -1;
+ Y.Array.each(this._monthsL, function (v, i) {
+ if (v === content) {
+ monthIndex = i;
+ }
+ });
+
+ return new Date(this._navdate.getFullYear(), monthIndex, this._navdate.getDate());
+ },
+ _dayChosenHandler: function (dayChosen) {
+ var date = this._navdate,
+ year = date.getFullYear(),
+ month = date.getMonth(),
+ newDate = new Date(year, month, dayChosen),
+ newDateDsp = (month + 1) + '/' + dayChosen + '/' + year;
+
+ this.set('date', newDate, {source: UI_SRC});
+ this._navdate = this.get('date');
+
+ this.get('inputNode').set('value', newDateDsp);
+
+ this._renderViewMonth();
+
+ this.hide();
+ this.fire('daySelect', { navdate: this._navdate });
+ },
+ _monthChosenHandler: function (newDate) {
+
+ this._navdate = newDate;
+ this._renderViewMonth();
+ this.fire('monthSelect', { navdate: this._navdate });
+ },
+ _yearChosenHandler: function (newDate) {
+
+ this._navdate = newDate;
+ this._renderViewYear();
+ this.fire('yearSelect', { navdate: this._navdate });
+ },
+ _decadeChosenHandler: function (newDate) {
+
+ this._navdate = newDate;
+ this._renderViewDecade();
+ this.fire('decadeSelect', { navdate: this._navdate });
+ },
+ _handlerAfterDateChange: function (e) {
+ if (e.source === UI_SRC) {
+ return;
+ }
+
+ this._navdate = e.newVal;
+ this._dayChosenHandler(this._navdate.getDate());
+ },
+ _inputNodeClick: function () {
+
+ var hasDateChanged = false,
+ oldDate = null,
+ newDate = null;
+
+ if (this.get('visible')) {
+ this.hide();
+ this.fire('inputClickHide');
+ } else {
+ oldDate = this.get('date');
+ this._syncDates();
+ newDate = this.get('date');
+
+ hasDateChanged = !YDate.areEqual(oldDate, newDate);
+ if (hasDateChanged) {
+ this._renderViewMonth();
+ }
+
+ this.show();
+ this.fire('inputClickShow');
+ }
+ },
+ _syncDates: function () {
+ this.set('date', this.get('inputNode').get('value'), {source: UI_SRC});
+ this._navdate = this.get('date');
+ },
+ _renderViewMonth: function () {
+ var contentBox = this.get(CBX);
+ contentBox.empty();
+ contentBox.appendChild(this._getViewMonthHTML());
+ },
+ _renderViewYear: function () {
+ var contentBox = this.get(CBX);
+ contentBox.empty();
+ contentBox.appendChild(this._getViewYearHTML());
+ },
+ _renderViewDecade: function () {
+ var contentBox = this.get(CBX);
+ contentBox.empty();
+ contentBox.appendChild(this._getViewDecadeHTML());
+ },
+ _getViewMonthHTML: function () {
+
+ var data = {},
+ navdate = this._navdate,
+ t = templates.viewmonth;
+
+ Y.mix(data, styles.viewmonth);
+
+ data.t_prevmonth = sub(t.prevmonth, data);
+ data.t_nextmonth = sub(t.nextmonth, data);
+ data.month = YDate.format(navdate, { format: '%B' });
+ data.year = YDate.format(navdate, { format: '%Y' });
+ data.t_headerlabel = sub(t.headerlabel, data);
+ data.t_header = sub(t.header, data);
+
+ data.weekdays = this._getViewMonthWeekdays();
+ data.t_weekdayrow = sub(t.weekdayrow, data);
+ data.rows = this._getViewMonthRows();
+ data.t_grid = sub(t.grid, data);
+
+ return sub(t.content, data);
+ },
+ _getViewYearHTML: function () {
+
+ var data = {},
+ navdate = this._navdate,
+ t = templates.viewyear;
+
+ Y.mix(data, styles.viewyear);
+
+ data.t_prevyear = sub(t.prevyear, data);
+ data.t_nextyear = sub(t.nextyear, data);
+ data.year = YDate.format(navdate, { format: '%Y' });
+ data.t_headerlabel = sub(t.headerlabel, data);
+ data.t_header = sub(t.header, data);
+
+ data.rows = this._getViewYearRows();
+ data.t_grid = sub(t.grid, data);
+
+ return sub(t.content, data);
+ },
+ _getViewDecadeHTML: function () {
+
+ var data = {},
+ navdate = this._navdate,
+ t = templates.viewdecade,
+ decadeFirstYear = fnGetDecadeFirstYear(navdate.getFullYear()),
+ decadeLastYear = decadeFirstYear + 9;
+
+ Y.mix(data, styles.viewdecade);
+
+ data.t_prevdecade = sub(t.prevdecade, data);
+ data.t_nextdecade = sub(t.nextdecade, data);
+ data.decade = decadeFirstYear + '-' + decadeLastYear;
+ data.t_headerlabel = sub(t.headerlabel, data);
+ data.t_header = sub(t.header, data);
+
+ data.rows = this._getViewDecadeRows();
+ data.t_grid = sub(t.grid, data);
+
+ return sub(t.content, data);
+ },
+ _getViewMonthWeekdays: function () {
+
+ var weekdays = this._weekdaysL,
+ t_weekday = templates.viewmonth.weekday,
+ css_weekday = styles.viewmonth.css_weekday,
+ sb = [];
+
+ Y.Array.each(weekdays, function (weekday) {
+ sb.push(sub(t_weekday, { weekday: weekday, css_weekday: css_weekday }));
+ }, this);
+
+ return sb.join('');
+ },
+ _getWeekdaysL: function (todayDate) {
+
+ var weekdays = [],
+ today_num = YDate.format(todayDate, { format: '%w' }),
+ daysToAdd = -(today_num),
+ currDate = null,
+ i = -1;
+
+ for (i = 0; i < 7; i += 1) {
+ currDate = fnAddDays(todayDate, daysToAdd);
+ weekdays.push(YDate.format(currDate, { format: '%a' }));
+ daysToAdd += 1;
+ }
+ return weekdays;
+ },
+ _getViewMonthRows: function () {
+
+ var sb = [],
+ sbColumns = [],
+ date = this.get('date'),
+ navdate = this._navdate,
+ dLastMonth = IDate.addMonths(navdate, -1),
+ dFirstDayOfMonth = new Date(navdate.getFullYear(), navdate.getMonth(), 1),
+ indexFirstDayOfMonth = dFirstDayOfMonth.getDay(),
+ daysInMonth = YDate.daysInMonth(navdate),
+ daysInLastMonth = YDate.daysInMonth(dLastMonth),
+ i = 1,
+ row = -1,
+ column = -1,
+ daydata = null,
+ day = -1,
+ dCurr = null;
+
+
+ for (row = 0; row < 6; row += 1) {
+ sbColumns = [];
+ for (column = 0; column < 7; column += 1) {
+ daydata = { css: styles.viewmonth.css_day, dspDay: 0 };
+ day = i - indexFirstDayOfMonth;
+
+ if (day > daysInMonth) {
+ daydata.dspDay = day % daysInMonth;
+ daydata.css = styles.viewmonth.css_nextmonth_day;
+ } else if (day < 1) {
+ daydata.dspDay = daysInLastMonth + day;
+ daydata.css = styles.viewmonth.css_prevmonth_day;
+ } else {
+ daydata.dspDay = day;
+ dCurr = new Date(navdate.getFullYear(), navdate.getMonth(), day);
+ if (dCurr.getFullYear() === date.getFullYear() && dCurr.getMonth() === date.getMonth() && dCurr.getDate() === date.getDate()) {
+ daydata.css += ' ' + styles.viewmonth.css_day_selected;
+ }
+ }
+
+ sbColumns.push(sub(templates.viewmonth.column, daydata));
+
+ i += 1;
+ } //end for column
+
+ sb.push(sub(templates.viewmonth.row, { columns: sbColumns.join('') }));
+ } //end for row
+
+ return sb.join('');
+ },
+ _getMonthsL: function (todayDate) {
+
+ var months = [],
+ today_num = YDate.format(todayDate, { format: '%m' }),
+ monthsToAdd = -(today_num) + 1,
+ currDate = null,
+ i = -1;
+
+
+ for (i = 0; i < 12; i += 1) {
+ currDate = IDate.addMonths(todayDate, monthsToAdd);
+ months.push(YDate.format(currDate, { format: '%b' }));
+ monthsToAdd += 1;
+ }
+
+ return months;
+ },
+ _getViewYearRows: function () {
+
+ var sb = [],
+ sbColumns = [],
+ date = this.get('date'),
+ navdate = this._navdate,
+ monthsDspArray = this._monthsL,
+ i = 0,
+ row = -1,
+ column = -1,
+ monthdata = null,
+ dCurr = null;
+
+ for (row = 0; row < 3; row += 1) {
+ sbColumns = [];
+ for (column = 0; column < 4; column += 1) {
+ monthdata = { css: styles.viewyear.css_month, dspMonth: monthsDspArray[i] };
+
+ dCurr = new Date(navdate.getFullYear(), i, 1);
+ if (dCurr.getFullYear() === date.getFullYear() && dCurr.getMonth() === date.getMonth()) {
+ monthdata.css += ' ' + styles.viewyear.css_month_selected;
+ }
+
+ sbColumns.push(sub(templates.viewyear.column, monthdata));
+
+ i += 1;
+ } //end for column
+
+ sb.push(sub(templates.viewyear.row, { columns: sbColumns.join('') }));
+ } //end for row
+
+ return sb.join('');
+ },
+ _getViewDecadeRows: function () {
+
+ var sb = [],
+ sbColumns = [],
+ date = this.get('date'),
+ navdate = this._navdate,
+ decadeFirstYear = fnGetDecadeFirstYear(navdate.getFullYear()),
+ decadeLastYear = decadeFirstYear + 9,
+ currYear = decadeFirstYear - 1,
+ i = 0,
+ row = -1,
+ column = -1,
+ yeardata = null;
+
+ for (row = 0; row < 3; row += 1) {
+ sbColumns = [];
+ for (column = 0; column < 4; column += 1) {
+ yeardata = { css: styles.viewdecade.css_year, dspYear: currYear };
+
+ if (currYear === date.getFullYear()) {
+ yeardata.css += ' ' + styles.viewdecade.css_year_selected;
+ } else if (currYear < decadeFirstYear || currYear > decadeLastYear) {
+ yeardata.css += ' ' + styles.viewdecade.css_year_outsidedecade;
+ }
+ sbColumns.push(sub(templates.viewdecade.column, yeardata));
+
+ currYear += 1;
+ i += 1;
+ } //end for column
+
+ sb.push(sub(templates.viewdecade.row, { columns: sbColumns.join('') }));
+ } //end for row
+
+ return sb.join('');
+ }
+
+ },
+ { //static members
+ ATTRS: {
+ date: {
+ value: new Date(),
+ validator: function (val) {
+ var isValid = YDate.isValidDate(val),
+ dateParsed = Y.DataType.Date.parse(val);
+
+
+ return isValid || dateParsed !== null;
+ },
+ setter: function (v) {
+
+ var vToReturn = null;
+
+ if (typeof v === 'string') {
+ vToReturn = Y.DataType.Date.parse(v);
+ } else {
+ vToReturn = v;
+ }
+
+ return vToReturn;
+ }
+ },
+ height: {
+ value: '150px',
+ readOnly: true
+ },
+ width: {
+ value: '225px',
+ readOnly: true
+ },
+ inputNode: {
+ writeOnce: 'initOnly',
+ setter: function (nodeOrId) {
+ var node = nodeOrId;
+
+ if (typeof nodeOrId === 'string') {
+ node = Y.one(nodeOrId);
+ }
+
+ return node;
+ }
+ },
+ visible: {
+ value: false
+ }
+ }
+ }
+);
+
+
+
+
+}, 'gallery-2012.04.04-17-55' ,{skinnable:true, requires:['widget', 'widget-position', 'widget-stack', 'widget-position-align', 'widget-position-constrain', 'widget-autohide', 'datatype-date', 'datatype-date-math', 'substitute', 'datatype-date-format', 'gallery-icello-date']});
diff --git a/build/gallery-model-consumer/gallery-model-consumer-debug.js b/build/gallery-model-consumer/gallery-model-consumer-debug.js
new file mode 100644
index 0000000000..d1933d502e
--- /dev/null
+++ b/build/gallery-model-consumer/gallery-model-consumer-debug.js
@@ -0,0 +1,86 @@
+YUI.add('gallery-model-consumer', function(Y) {
+
+//
+// this is a *very* poor man's trait type thing, basically add our own
+// properties to the config object for an attribute
+//
+Y.Base._ATTR_CFG.concat("mlClass");
+Y.Base._ATTR_CFG_HASH.mlClass = true;
+Y.Base._ATTR_CFG.concat("mClass");
+Y.Base._ATTR_CFG_HASH.mClass = true;
+
+function ModelConsumer (config) {}
+
+ModelConsumer.prototype = {
+ _setML: function (list, name) {
+ var existing_list = this.get(name),
+ ml_class,
+ new_list
+ ;
+
+ if (existing_list) {
+ return existing_list.reset(list);
+ }
+
+ ml_class = this._getAttrCfg(name).mlClass;
+ if (list instanceof ml_class) {
+ list.addTarget(this);
+
+ return list;
+ }
+
+ new_list = new ml_class (
+ {
+ bubbleTargets: this
+ }
+ );
+ new_list.reset(list);
+
+ return new_list;
+ },
+
+ _setM: function (cfg, name) {
+ var existing_model = this.get(name),
+ m_class,
+ load,
+ m
+ ;
+
+ if (existing_model) {
+ existing_model.removeTarget(this);
+ }
+
+ m_class = this._getAttrCfg(name).mClass;
+
+ if (cfg instanceof m_class) {
+ cfg.addTarget(this);
+
+ return cfg;
+ }
+ if (! Y.Lang.isValue(cfg)) {
+ return;
+ }
+
+ load = false;
+ if (cfg && ! Y.Lang.isObject(cfg)) {
+ // TODO: this should be the idAttribute?
+ cfg = {
+ id: cfg
+ };
+ load = true;
+ }
+
+ m = new m_class (cfg);
+ if (load) {
+ m.load();
+ }
+ m.addTarget(this);
+
+ return m;
+ }
+};
+
+Y.ModelConsumer = ModelConsumer;
+
+
+}, 'gallery-2012.04.04-17-55' ,{requires:['gallery-model-consumer'], skinnable:false});
diff --git a/build/gallery-model-consumer/gallery-model-consumer-min.js b/build/gallery-model-consumer/gallery-model-consumer-min.js
new file mode 100644
index 0000000000..6b4ae54dfe
--- /dev/null
+++ b/build/gallery-model-consumer/gallery-model-consumer-min.js
@@ -0,0 +1 @@
+YUI.add("gallery-model-consumer",function(b){b.Base._ATTR_CFG.concat("mlClass");b.Base._ATTR_CFG_HASH.mlClass=true;b.Base._ATTR_CFG.concat("mClass");b.Base._ATTR_CFG_HASH.mClass=true;function a(c){}a.prototype={_setML:function(f,e){var g=this.get(e),d,c;if(g){return g.reset(f);}d=this._getAttrCfg(e).mlClass;if(f instanceof d){f.addTarget(this);return f;}c=new d({bubbleTargets:this});c.reset(f);return c;},_setM:function(d,f){var h=this.get(f),e,g,c;if(h){h.removeTarget(this);}e=this._getAttrCfg(f).mClass;if(d instanceof e){d.addTarget(this);return d;}if(!b.Lang.isValue(d)){return;}g=false;if(d&&!b.Lang.isObject(d)){d={id:d};g=true;}c=new e(d);if(g){c.load();}c.addTarget(this);return c;}};b.ModelConsumer=a;},"gallery-2012.04.04-17-55",{requires:["gallery-model-consumer"],skinnable:false});
\ No newline at end of file
diff --git a/build/gallery-model-consumer/gallery-model-consumer.js b/build/gallery-model-consumer/gallery-model-consumer.js
new file mode 100644
index 0000000000..d1933d502e
--- /dev/null
+++ b/build/gallery-model-consumer/gallery-model-consumer.js
@@ -0,0 +1,86 @@
+YUI.add('gallery-model-consumer', function(Y) {
+
+//
+// this is a *very* poor man's trait type thing, basically add our own
+// properties to the config object for an attribute
+//
+Y.Base._ATTR_CFG.concat("mlClass");
+Y.Base._ATTR_CFG_HASH.mlClass = true;
+Y.Base._ATTR_CFG.concat("mClass");
+Y.Base._ATTR_CFG_HASH.mClass = true;
+
+function ModelConsumer (config) {}
+
+ModelConsumer.prototype = {
+ _setML: function (list, name) {
+ var existing_list = this.get(name),
+ ml_class,
+ new_list
+ ;
+
+ if (existing_list) {
+ return existing_list.reset(list);
+ }
+
+ ml_class = this._getAttrCfg(name).mlClass;
+ if (list instanceof ml_class) {
+ list.addTarget(this);
+
+ return list;
+ }
+
+ new_list = new ml_class (
+ {
+ bubbleTargets: this
+ }
+ );
+ new_list.reset(list);
+
+ return new_list;
+ },
+
+ _setM: function (cfg, name) {
+ var existing_model = this.get(name),
+ m_class,
+ load,
+ m
+ ;
+
+ if (existing_model) {
+ existing_model.removeTarget(this);
+ }
+
+ m_class = this._getAttrCfg(name).mClass;
+
+ if (cfg instanceof m_class) {
+ cfg.addTarget(this);
+
+ return cfg;
+ }
+ if (! Y.Lang.isValue(cfg)) {
+ return;
+ }
+
+ load = false;
+ if (cfg && ! Y.Lang.isObject(cfg)) {
+ // TODO: this should be the idAttribute?
+ cfg = {
+ id: cfg
+ };
+ load = true;
+ }
+
+ m = new m_class (cfg);
+ if (load) {
+ m.load();
+ }
+ m.addTarget(this);
+
+ return m;
+ }
+};
+
+Y.ModelConsumer = ModelConsumer;
+
+
+}, 'gallery-2012.04.04-17-55' ,{requires:['gallery-model-consumer'], skinnable:false});
diff --git a/build/gallery-model-relate-autogen/gallery-model-relate-autogen-debug.js b/build/gallery-model-relate-autogen/gallery-model-relate-autogen-debug.js
new file mode 100644
index 0000000000..235a8748f1
--- /dev/null
+++ b/build/gallery-model-relate-autogen/gallery-model-relate-autogen-debug.js
@@ -0,0 +1,91 @@
+YUI.add('gallery-model-relate-autogen', function(Y) {
+
+function ModelRelateAutoGen (config) {
+ Y.Do.after(this._modelRelateAutoGenAfterParse, this, "parse");
+ Y.Do.after(this._modelRelateAutoGenAfterSetAttrs, this, "setAttrs");
+
+ this._loadModelRelateAutoGenRelated(config);
+}
+
+ModelRelateAutoGen.prototype = {
+ _modelRelateAutoGenAfterParse: function () {
+ this._loadModelRelateAutoGenRelated(Y.Do.currentRetVal);
+ },
+
+ _modelRelateAutoGenAfterSetAttrs: function (config, options) {
+ var relationships,
+ rel,
+ key,
+ existingModel,
+ i
+ ;
+
+ if (config) {
+ relationships = this.constructor.RELATIONSHIPS;
+
+ for (key in config) {
+ if (relationships[key] && Y.Lang.isValue(config[key])) {
+ rel = relationships[key];
+
+ if (rel.type === "toOne") {
+ existingModel = Y.ModelStore.find(rel.relatedModel, config[key][rel.relatedKey]);
+ existingModel.setAttrs(config[key]);
+ }
+ else if (rel.type === "toMany") {
+ for (i = 0; i < config[key].length; ++i) {
+ existingModel = Y.ModelStore.find(rel.relatedModel, config[key][i][rel.key]);
+ existingModel.setAttrs(config[key][i]);
+ }
+ }
+ }
+ }
+ }
+ },
+
+ _loadModelRelateAutoGenRelated: function (config) {
+ var relationships,
+ rel,
+ existingModel,
+ newModel,
+ newModelClass,
+ key,
+ i
+ ;
+
+ if (config) {
+ relationships = this.constructor.RELATIONSHIPS;
+
+ for (key in config) {
+ if (relationships[key] && Y.Lang.isValue(config[key])) {
+ rel = relationships[key];
+
+ newModelClass = Y.ModelStore._getModelCtor(rel.relatedModel);
+
+ if (rel.type === "toOne") {
+ existingModel = Y.ModelStore.find(rel.relatedModel, config[key][rel.relatedKey]);
+ if (! existingModel) {
+ newModel = new newModelClass (config[key]);
+
+ Y.ModelStore.registerModel(newModel);
+ }
+ }
+ else if (rel.type === "toMany") {
+ for (i = 0; i < config[key].length; ++i) {
+ existingModel = Y.ModelStore.find(rel.relatedModel, config[key][i][rel.relatedModel.idAttribute]);
+ if (! existingModel) {
+ existingModel = new newModelClass (config[key][i]);
+
+ Y.ModelStore.registerModel(existingModel);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+Y.ModelRelateAutoGen = ModelRelateAutoGen;
+
+
+}, 'gallery-2012.04.04-17-55' ,{requires:['gallery-model-relate'], skinnable:false});
diff --git a/build/gallery-model-relate-autogen/gallery-model-relate-autogen-min.js b/build/gallery-model-relate-autogen/gallery-model-relate-autogen-min.js
new file mode 100644
index 0000000000..3c43273683
--- /dev/null
+++ b/build/gallery-model-relate-autogen/gallery-model-relate-autogen-min.js
@@ -0,0 +1 @@
+YUI.add("gallery-model-relate-autogen",function(b){function a(c){b.Do.after(this._modelRelateAutoGenAfterParse,this,"parse");b.Do.after(this._modelRelateAutoGenAfterSetAttrs,this,"setAttrs");this._loadModelRelateAutoGenRelated(c);}a.prototype={_modelRelateAutoGenAfterParse:function(){this._loadModelRelateAutoGenRelated(b.Do.currentRetVal);},_modelRelateAutoGenAfterSetAttrs:function(f,e){var j,c,h,d,g;if(f){j=this.constructor.RELATIONSHIPS;for(h in f){if(j[h]&&b.Lang.isValue(f[h])){c=j[h];if(c.type==="toOne"){d=b.ModelStore.find(c.relatedModel,f[h][c.relatedKey]);d.setAttrs(f[h]);}else{if(c.type==="toMany"){for(g=0;g';d.copy_down_button_class="quickedit-copy-down";d.textFormatter=function(r){var p=' '+"{cd}"+d.error_display_markup;var q=r.column.quickEdit;return b.Lang.sub(p,{key:r.column.key,value:r.value.toString().replace(/"/g,"""),yiv:q.validation?(q.validation.css||""):"",cd:d.copyDownFormatter.call(this,r)});};d.textareaFormatter=function(r){var p=''+"{cd}"+d.error_display_markup;var q=r.column.quickEdit;return b.Lang.sub(p,{key:r.column.key,value:r.value,yiv:q.validation?(q.validation.css||""):"",cd:d.copyDownFormatter.call(this,r)});};d.readonlyEmailFormatter=function(p){return(p.value||"");};d.readonlyLinkFormatter=function(p){return(p.value||"");};function n(r,q){var t=null;this._tbodyNode.get("children").some(function(u){if(u.contains(r)){t=u;return true;}});if(!t){return null;}var p=r.getAncestorByTagName("td",true);var s=-1;t.get("children").some(function(v,u){if(v===p){s=u;return true;}});t=(q<0?t.previous():t.next());return t?t.get("children").item(s):null;}function f(s){var p=s.currentTarget.ancestor(".yui3-datatable-cell");var r=p.one(".quickedit-field");if(!r){return;}var q=b.Lang.trim(r.get("value"));if(!q&&q!==0){return;}while(1){p=n.call(this,p,+1);if(!p){break;}r=p.one(".quickedit-field");if(r){r.set("value",q);}}}d.copyDownFormatter=function(p,q){if(p.column.quickEdit.copyDown&&p.rowIndex===0){return b.Lang.sub('↓ ',{c:d.copy_down_button_class});}else{return"";}};function c(q,p){return function(r){if(!r.record&&b.Lang.isString(p)){return p;}else{return(r.record?q:p).apply(this,arguments);}};}function o(r){var p=n.call(this,r.target,r.charCode==38?-1:+1);if(p){var q=p.one(".quickedit-field");if(q){q.focus();q.select();r.halt(true);}}}function a(){var r=this.get("host").get("columns");var q={};function p(u,t){if(b.Lang.isString(t)){var s={key:t};u.push(s);q[t]=s;}else{if(t.children){u=b.reduce(t.children,u,p);}else{u.push(t);q[t.key]=t;}}return u;}this.column_list=b.reduce(r,[],p);this.column_map=q;}function g(v){var x=this.get("host");var r=true;var t=v.size();for(var s=0;s';d.copy_down_button_class="quickedit-copy-down";d.textFormatter=function(r){var p=' '+"{cd}"+d.error_display_markup;var q=r.column.quickEdit;return b.Lang.sub(p,{key:r.column.key,value:r.value.toString().replace(/"/g,"""),yiv:q.validation?(q.validation.css||""):"",cd:d.copyDownFormatter.call(this,r)});};d.textareaFormatter=function(r){var p=''+"{cd}"+d.error_display_markup;var q=r.column.quickEdit;return b.Lang.sub(p,{key:r.column.key,value:r.value,yiv:q.validation?(q.validation.css||""):"",cd:d.copyDownFormatter.call(this,r)});};d.readonlyEmailFormatter=function(p){return(p.value||"");};d.readonlyLinkFormatter=function(p){return(p.value||"");};function f(r){var o=r.currentTarget.ancestor(".yui3-datatable-cell");var q=o.one(".quickedit-field");if(!q){return;}var p=b.Lang.trim(q.get("value"));if(!p&&p!==0){return;}while(1){o=this.getCell(o,"below");if(!o){break;}q=o.one(".quickedit-field");if(q){q.set("value",p);}}}d.copyDownFormatter=function(p,q){if(p.column.quickEdit.copyDown&&p.rowIndex===0){return b.Lang.sub('↓ ',{c:d.copy_down_button_class});}else{return"";}};function c(p,o){return function(q){if(!q.record&&b.Lang.isString(o)){return o;}else{return(q.record?p:o).apply(this,arguments);}};}function n(q){var o=this.getCell(q.target,q.charCode==38?"above":"below");if(o){var p=o.one(".quickedit-field");if(p){p.focus();p.select();q.halt(true);}}}function a(){var q=this.get("host").get("columns");var p={};function o(t,s){if(b.Lang.isString(s)){var r={key:s};t.push(r);p[s]=r;}else{if(s.children){t=b.reduce(s.children,t,o);}else{t.push(s);p[s.key]=s;}}return t;}this.column_list=b.reduce(q,[],o);this.column_map=p;}function g(u){var w=this.get("host");var q=true;var s=u.size();for(var r=0;r div{height:28px;}
.yui3-slidecheckbox .edge,.yui3-slidecheckbox-handle,.yui3-slidecheckbox-handle > span,.yui3-slidecheckbox-labelOn,.yui3-slidecheckbox-labelOff{background-image:url(slider.png);background-color:transparent;height:28px;display:block;-moz-user-select:none;-khtml-user-select:none;}
+.yui3-slidecheckbox-handle,.yui3-slidecheckbox-handle > span,.yui3-slidecheckbox-labelOn,.yui3-slidecheckbox-labelOff{background-color:transparent;}
.yui3-slidecheckbox-handle{width:28px;background:none;}
.yui3-slidecheckbox-handle span{height:28px;width:14px;}
.yui3-slidecheckbox-handle .lt{background-position:0 0;left:-14px;}
diff --git a/build/gallery-slidecheckbox/assets/skins/ios5-green/gallery-slidecheckbox.css b/build/gallery-slidecheckbox/assets/skins/ios5-green/gallery-slidecheckbox.css
index 6d76eaf1f9..2dbdd97a6e 100644
--- a/build/gallery-slidecheckbox/assets/skins/ios5-green/gallery-slidecheckbox.css
+++ b/build/gallery-slidecheckbox/assets/skins/ios5-green/gallery-slidecheckbox.css
@@ -1 +1 @@
-.yui3-slidecheckbox-content,.yui3-slidecheckbox-content>div{height:27px}.yui3-slidecheckbox-content{position:relative}.yui3-slidecheckbox-content>div{position:relative;border-radius:4px;-moz-border-radius:4px;overflow:hidden}.yui3-slidecheckbox-handle,.yui3-slidecheckbox-labelOn,.yui3-slidecheckbox-labelOff{float:left}.yui3-slidecheckbox-handle{z-index:3;width:35px;position:relative;-moz-user-select:none;-khtml-user-select:none}.yui3-slidecheckbox-handle>span{position:absolute}.yui3-slidecheckbox-handle .lt{left:-3px}.yui3-slidecheckbox-handle .rt{right:-3px}.yui3-slidecheckbox-labelOn,.yui3-slidecheckbox-labelOff{background-repeat:repeat-x}.yui3-slidecheckbox-labelOn{background-position:-5 0}.yui3-slidecheckbox-labelOff{margin-left:-3px}.yui3-slidecheckbox-labelOn div,.yui3-slidecheckbox-labelOff div{float:left;font-weight:bold;text-align:center;white-space:nowrap}.yui3-slidecheckbox-labelOn div{float:right;padding:4px 0 5px 0}.yui3-slidecheckbox-labelOff div{margin-left:5px;padding:4px 2px 5px 0}.yui3-slidecheckbox-hidden{position:absolute;left:-10000px;top:-10000px}.yui3-slidecheckbox-focused .yui3-slidecheckbox-wrapper{outline:silver dotted thin}.yui3-slidecheckbox-wrapper>.edge{width:4px;height:27px;z-index:2;position:absolute;background-color:white}.yui3-slidecheckbox-wrapper>.edge.lt{left:0}.yui3-slidecheckbox-wrapper>.edge.rt{right:0}.yui3-slidecheckbox-slider{display:block;margin-left:0;position:relative}.yui3-slidecheckbox-sliderwrap{position:absolute}.yui3-slidecheckbox-slider:after{clear:both;content:".";display:block;font-size:0;height:0;visibility:hidden}.yui3-slidecheckbox-content,.yui3-slidecheckbox-content>div{height:28px}.yui3-slidecheckbox .edge,.yui3-slidecheckbox-handle,.yui3-slidecheckbox-handle>span,.yui3-slidecheckbox-labelOn,.yui3-slidecheckbox-labelOff{background-image:url(slider.png);background-color:transparent;height:28px;display:block;-moz-user-select:none;-khtml-user-select:none}.yui3-slidecheckbox-handle{width:28px;background:0}.yui3-slidecheckbox-handle span{height:28px;width:14px}.yui3-slidecheckbox-handle .lt{background-position:0 0;left:-14px}.yui3-slidecheckbox-handle .rt{background-position:-14px 0;right:14px}.yui3-slidecheckbox-labelOff{background-position:right -84px;color:#8b8b8b;margin-left:-29px}.yui3-slidecheckbox-labelOn{background-position:right -56px;color:white}.yui3-slidecheckbox-labelOff,.yui3-slidecheckbox-labelOn{background-repeat:repeat-x;text-shadow:0 0 2px white rgba(0,0,0,0.6);height:28px}.yui3-slidecheckbox-labelOff{padding:1px 20px 0 17px}.yui3-slidecheckbox-labelOn{padding:1px 20px 0 15px}.yui3-slidecheckbox-labelOn label,.yui3-slidecheckbox-labelOff label{font-family:"Helvetica Neue",Arial,Helvetica,sans-serif}.yui3-slidecheckbox-wrapper>.edge{width:14px;height:28px}.yui3-slidecheckbox-wrapper>.edge.lt{background-position:0 -28px}.yui3-slidecheckbox-wrapper>.edge.rt{background-position:-14px -28px}#yui3-css-stamp.skin-ios5-green-gallery-slidecheckbox{display:none}
+.yui3-slidecheckbox-content,.yui3-slidecheckbox-content>div{height:27px}.yui3-slidecheckbox-content{position:relative}.yui3-slidecheckbox-content>div{position:relative;border-radius:4px;-moz-border-radius:4px;overflow:hidden}.yui3-slidecheckbox-handle,.yui3-slidecheckbox-labelOn,.yui3-slidecheckbox-labelOff{float:left}.yui3-slidecheckbox-handle{z-index:3;width:35px;position:relative;-moz-user-select:none;-khtml-user-select:none}.yui3-slidecheckbox-handle>span{position:absolute}.yui3-slidecheckbox-handle .lt{left:-3px}.yui3-slidecheckbox-handle .rt{right:-3px}.yui3-slidecheckbox-labelOn,.yui3-slidecheckbox-labelOff{background-repeat:repeat-x}.yui3-slidecheckbox-labelOn{background-position:-5 0}.yui3-slidecheckbox-labelOff{margin-left:-3px}.yui3-slidecheckbox-labelOn div,.yui3-slidecheckbox-labelOff div{float:left;font-weight:bold;text-align:center;white-space:nowrap}.yui3-slidecheckbox-labelOn div{float:right;padding:4px 0 5px 0}.yui3-slidecheckbox-labelOff div{margin-left:5px;padding:4px 2px 5px 0}.yui3-slidecheckbox-hidden{position:absolute;left:-10000px;top:-10000px}.yui3-slidecheckbox-focused .yui3-slidecheckbox-wrapper{outline:silver dotted thin}.yui3-slidecheckbox-wrapper>.edge{width:4px;height:27px;z-index:2;position:absolute;background-color:white}.yui3-slidecheckbox-wrapper>.edge.lt{left:0}.yui3-slidecheckbox-wrapper>.edge.rt{right:0}.yui3-slidecheckbox-slider{display:block;margin-left:0;position:relative}.yui3-slidecheckbox-sliderwrap{position:absolute}.yui3-slidecheckbox-slider:after{clear:both;content:".";display:block;font-size:0;height:0;visibility:hidden}.yui3-slidecheckbox-content,.yui3-slidecheckbox-content>div{height:28px}.yui3-slidecheckbox .edge,.yui3-slidecheckbox-handle,.yui3-slidecheckbox-handle>span,.yui3-slidecheckbox-labelOn,.yui3-slidecheckbox-labelOff{background-image:url(slider.png);background-color:transparent;height:28px;display:block;-moz-user-select:none;-khtml-user-select:none}.yui3-slidecheckbox-handle,.yui3-slidecheckbox-handle>span,.yui3-slidecheckbox-labelOn,.yui3-slidecheckbox-labelOff{background-color:transparent}.yui3-slidecheckbox-handle{width:28px;background:0}.yui3-slidecheckbox-handle span{height:28px;width:14px}.yui3-slidecheckbox-handle .lt{background-position:0 0;left:-14px}.yui3-slidecheckbox-handle .rt{background-position:-14px 0;right:14px}.yui3-slidecheckbox-labelOff{background-position:right -84px;color:#8b8b8b;margin-left:-29px}.yui3-slidecheckbox-labelOn{background-position:right -56px;color:white}.yui3-slidecheckbox-labelOff,.yui3-slidecheckbox-labelOn{background-repeat:repeat-x;text-shadow:0 0 2px white rgba(0,0,0,0.6);height:28px}.yui3-slidecheckbox-labelOff{padding:1px 20px 0 17px}.yui3-slidecheckbox-labelOn{padding:1px 20px 0 15px}.yui3-slidecheckbox-labelOn label,.yui3-slidecheckbox-labelOff label{font-family:"Helvetica Neue",Arial,Helvetica,sans-serif}.yui3-slidecheckbox-wrapper>.edge{width:14px;height:28px}.yui3-slidecheckbox-wrapper>.edge.lt{background-position:0 -28px}.yui3-slidecheckbox-wrapper>.edge.rt{background-position:-14px -28px}#yui3-css-stamp.skin-ios5-green-gallery-slidecheckbox{display:none}
diff --git a/build/gallery-slidecheckbox/assets/skins/sam/gallery-slidecheckbox-skin.css b/build/gallery-slidecheckbox/assets/skins/sam/gallery-slidecheckbox-skin.css
index 5db5f8437a..732d453fa2 100644
--- a/build/gallery-slidecheckbox/assets/skins/sam/gallery-slidecheckbox-skin.css
+++ b/build/gallery-slidecheckbox/assets/skins/sam/gallery-slidecheckbox-skin.css
@@ -6,7 +6,7 @@
.yui3-slidecheckbox-handle{background-position:right -108px;height:27px;}
.yui3-slidecheckbox-labelOff{background-position:right -54px;color:#8B8B8B;}
.yui3-slidecheckbox-labelOn{background-position:right -27px;color:white;}
-.yui3-slidecheckbox-labelOff,.yui3-slidecheckbox-labelOn{padding:0 5px;background-repeat:repeat-x;text-shadow: 0px 0px 2px white rgba(0, 0, 0, 0.6);padding:0 20px;}
+.yui3-slidecheckbox-labelOff,.yui3-slidecheckbox-labelOn{background-repeat:repeat-x;text-shadow: 0px 0px 2px white rgba(0, 0, 0, 0.6);padding:0 20px;}
.yui3-slidecheckbox-labelOn label,.yui3-slidecheckbox-labelOff label{font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;}
.yui3-slidecheckbox-wrapper > .edge.lt{background-position:0 0;}
.yui3-slidecheckbox-wrapper > .edge.rt{background-position:-4px 0;}
\ No newline at end of file
diff --git a/build/gallery-slidecheckbox/assets/skins/sam/gallery-slidecheckbox.css b/build/gallery-slidecheckbox/assets/skins/sam/gallery-slidecheckbox.css
index 564846c3de..4c8b31692d 100644
--- a/build/gallery-slidecheckbox/assets/skins/sam/gallery-slidecheckbox.css
+++ b/build/gallery-slidecheckbox/assets/skins/sam/gallery-slidecheckbox.css
@@ -1 +1 @@
-.yui3-slidecheckbox-content,.yui3-slidecheckbox-content>div{height:27px}.yui3-slidecheckbox-content{position:relative}.yui3-slidecheckbox-content>div{position:relative;border-radius:4px;-moz-border-radius:4px;overflow:hidden}.yui3-slidecheckbox-handle,.yui3-slidecheckbox-labelOn,.yui3-slidecheckbox-labelOff{float:left}.yui3-slidecheckbox-handle{z-index:3;width:35px;position:relative;-moz-user-select:none;-khtml-user-select:none}.yui3-slidecheckbox-handle>span{position:absolute}.yui3-slidecheckbox-handle .lt{left:-3px}.yui3-slidecheckbox-handle .rt{right:-3px}.yui3-slidecheckbox-labelOn,.yui3-slidecheckbox-labelOff{background-repeat:repeat-x}.yui3-slidecheckbox-labelOn{background-position:-5 0}.yui3-slidecheckbox-labelOff{margin-left:-3px}.yui3-slidecheckbox-labelOn div,.yui3-slidecheckbox-labelOff div{float:left;font-weight:bold;text-align:center;white-space:nowrap}.yui3-slidecheckbox-labelOn div{float:right;padding:4px 0 5px 0}.yui3-slidecheckbox-labelOff div{margin-left:5px;padding:4px 2px 5px 0}.yui3-slidecheckbox-hidden{position:absolute;left:-10000px;top:-10000px}.yui3-slidecheckbox-focused .yui3-slidecheckbox-wrapper{outline:silver dotted thin}.yui3-slidecheckbox-wrapper>.edge{width:4px;height:27px;z-index:2;position:absolute;background-color:white}.yui3-slidecheckbox-wrapper>.edge.lt{left:0}.yui3-slidecheckbox-wrapper>.edge.rt{right:0}.yui3-slidecheckbox-slider{display:block;margin-left:0;position:relative}.yui3-slidecheckbox-sliderwrap{position:absolute}.yui3-slidecheckbox-slider:after{clear:both;content:".";display:block;font-size:0;height:0;visibility:hidden}.yui3-slidecheckbox .edge,.yui3-slidecheckbox-handle,.yui3-slidecheckbox-handle>span,.yui3-slidecheckbox-labelOn,.yui3-slidecheckbox-labelOff{background-image:url(slider.png);height:27px;display:block;-moz-user-select:none;-khtml-user-select:none}.yui3-slidecheckbox-handle,.yui3-slidecheckbox-handle>span,.yui3-slidecheckbox-labelOn,.yui3-slidecheckbox-labelOff{background-color:transparent}.yui3-slidecheckbox-handle span{height:27px;width:3px}.yui3-slidecheckbox-handle .lt{background-position:0 -81px}.yui3-slidecheckbox-handle .rt{background-position:-5px -81px}.yui3-slidecheckbox-handle{background-position:right -108px;height:27px}.yui3-slidecheckbox-labelOff{background-position:right -54px;color:#8b8b8b}.yui3-slidecheckbox-labelOn{background-position:right -27px;color:white}.yui3-slidecheckbox-labelOff,.yui3-slidecheckbox-labelOn{padding:0 5px;background-repeat:repeat-x;text-shadow:0 0 2px white rgba(0,0,0,0.6);padding:0 20px}.yui3-slidecheckbox-labelOn label,.yui3-slidecheckbox-labelOff label{font-family:"Helvetica Neue",Arial,Helvetica,sans-serif}.yui3-slidecheckbox-wrapper>.edge.lt{background-position:0 0}.yui3-slidecheckbox-wrapper>.edge.rt{background-position:-4px 0}#yui3-css-stamp.skin-sam-gallery-slidecheckbox{display:none}
+.yui3-slidecheckbox-content,.yui3-slidecheckbox-content>div{height:27px}.yui3-slidecheckbox-content{position:relative}.yui3-slidecheckbox-content>div{position:relative;border-radius:4px;-moz-border-radius:4px;overflow:hidden}.yui3-slidecheckbox-handle,.yui3-slidecheckbox-labelOn,.yui3-slidecheckbox-labelOff{float:left}.yui3-slidecheckbox-handle{z-index:3;width:35px;position:relative;-moz-user-select:none;-khtml-user-select:none}.yui3-slidecheckbox-handle>span{position:absolute}.yui3-slidecheckbox-handle .lt{left:-3px}.yui3-slidecheckbox-handle .rt{right:-3px}.yui3-slidecheckbox-labelOn,.yui3-slidecheckbox-labelOff{background-repeat:repeat-x}.yui3-slidecheckbox-labelOn{background-position:-5 0}.yui3-slidecheckbox-labelOff{margin-left:-3px}.yui3-slidecheckbox-labelOn div,.yui3-slidecheckbox-labelOff div{float:left;font-weight:bold;text-align:center;white-space:nowrap}.yui3-slidecheckbox-labelOn div{float:right;padding:4px 0 5px 0}.yui3-slidecheckbox-labelOff div{margin-left:5px;padding:4px 2px 5px 0}.yui3-slidecheckbox-hidden{position:absolute;left:-10000px;top:-10000px}.yui3-slidecheckbox-focused .yui3-slidecheckbox-wrapper{outline:silver dotted thin}.yui3-slidecheckbox-wrapper>.edge{width:4px;height:27px;z-index:2;position:absolute;background-color:white}.yui3-slidecheckbox-wrapper>.edge.lt{left:0}.yui3-slidecheckbox-wrapper>.edge.rt{right:0}.yui3-slidecheckbox-slider{display:block;margin-left:0;position:relative}.yui3-slidecheckbox-sliderwrap{position:absolute}.yui3-slidecheckbox-slider:after{clear:both;content:".";display:block;font-size:0;height:0;visibility:hidden}.yui3-slidecheckbox .edge,.yui3-slidecheckbox-handle,.yui3-slidecheckbox-handle>span,.yui3-slidecheckbox-labelOn,.yui3-slidecheckbox-labelOff{background-image:url(slider.png);height:27px;display:block;-moz-user-select:none;-khtml-user-select:none}.yui3-slidecheckbox-handle,.yui3-slidecheckbox-handle>span,.yui3-slidecheckbox-labelOn,.yui3-slidecheckbox-labelOff{background-color:transparent}.yui3-slidecheckbox-handle span{height:27px;width:3px}.yui3-slidecheckbox-handle .lt{background-position:0 -81px}.yui3-slidecheckbox-handle .rt{background-position:-5px -81px}.yui3-slidecheckbox-handle{background-position:right -108px;height:27px}.yui3-slidecheckbox-labelOff{background-position:right -54px;color:#8b8b8b}.yui3-slidecheckbox-labelOn{background-position:right -27px;color:white}.yui3-slidecheckbox-labelOff,.yui3-slidecheckbox-labelOn{background-repeat:repeat-x;text-shadow:0 0 2px white rgba(0,0,0,0.6);padding:0 20px}.yui3-slidecheckbox-labelOn label,.yui3-slidecheckbox-labelOff label{font-family:"Helvetica Neue",Arial,Helvetica,sans-serif}.yui3-slidecheckbox-wrapper>.edge.lt{background-position:0 0}.yui3-slidecheckbox-wrapper>.edge.rt{background-position:-4px 0}#yui3-css-stamp.skin-sam-gallery-slidecheckbox{display:none}
diff --git a/build/gallery-slidecheckbox/gallery-slidecheckbox-debug.js b/build/gallery-slidecheckbox/gallery-slidecheckbox-debug.js
index a170cf87bf..4382b0f7d8 100644
--- a/build/gallery-slidecheckbox/gallery-slidecheckbox-debug.js
+++ b/build/gallery-slidecheckbox/gallery-slidecheckbox-debug.js
@@ -210,4 +210,4 @@ YUI.add('gallery-slidecheckbox', function(Y) {
);
-}, 'gallery-2012.03.28-20-16' ,{skinnable:true, requires:['node-base', 'anim-base', 'anim-easing', 'base-build', 'event-key', 'event-move', 'widget', 'node-style', 'gallery-makenode', 'dd-drag', 'dd-constrain']});
+}, 'gallery-2012.04.04-17-55' ,{skinnable:true, requires:['node-base', 'anim-base', 'anim-easing', 'base-build', 'event-key', 'event-move', 'widget', 'node-style', 'gallery-makenode', 'dd-drag', 'dd-constrain']});
diff --git a/build/gallery-slidecheckbox/gallery-slidecheckbox-min.js b/build/gallery-slidecheckbox/gallery-slidecheckbox-min.js
index ec965ab09b..8da426e015 100644
--- a/build/gallery-slidecheckbox/gallery-slidecheckbox-min.js
+++ b/build/gallery-slidecheckbox/gallery-slidecheckbox-min.js
@@ -1 +1 @@
-YUI.add("gallery-slidecheckbox",function(c){var e="SlideCheckbox",i="contentBox",g="wrapper",a="slider",f="sliderwrap",b="labelOn",h="labelOff",d="handle";c[e]=c.Base.create(e,c.Widget,[c.MakeNode],{anim:null,currentX:null,lastX:null,renderUI:function(){this.src=this.get("srcNode").addClass(this.getClassName("hidden"));this.get(i).append(this._makeNode()).append(this.src);this._locateNodes();var m=this._labelOnNode.one("div").get("offsetWidth"),l=this._labelOffNode.one("div").get("offsetWidth"),n=this._labelOnNode.get("offsetWidth"),o=this.getSkinName(),j=o?o.indexOf("ios5")>-1:null;if(m>l){this._labelOffNode.one("div").setStyle("width",m);}else{this._labelOnNode.one("div").setStyle("width",l);n=this._labelOnNode.get("offsetWidth");}this.left=-this._labelOnNode.get("offsetWidth")+3;var k=2*n;if(j){this._slideWrapWidth=2*n+28;this.left=this.left+11;k=n+14;}else{this._slideWrapWidth=3*n+10;this._handleNode.setStyle("width",n-3);}this._sliderwrapNode.setStyle("width",this._slideWrapWidth);this._wrapperNode.setStyle("width",k);},bindUI:function(){this.disabled=this.src.get("disabled");var k=new c.DD.Drag({node:this._sliderwrapNode,activeHandle:this._handleNode,lock:this.disabled}),j=this.get(i);this._addDragConstraint(k);k.on("drag:drag",function(m){var l=this._wrapperNode.getXY();if(l[1]!==k.actXY[1]){k.unplug();this._addDragConstraint(k);m.halt(true);}if(k.actXY[0]%2===0){this.lastX=this.currentX;}this.currentX=k.actXY[0];},this);k.on("drag:end",this.move,this);j.on("focus",function(){j.on("key",this.goLeft,"down:37",this);j.on("key",this.goRight,"down:39",this);j.on("key",function(l){l.preventDefault();this.move();},"down:32",this);},this);j.on("blur",function(){j.detach("key");j.blur();},this);this.src.on("change",function(l){alert(this.src.get("checked"));});},syncUI:function(){this._sliderwrapNode.setStyle("left",this.src.get("checked")?0:this.left);},destructor:function(){this.anim.stop().destroy();this.src=null;},goLeft:function(){this.to=this.left;this._execute();},goRight:function(){this.to=0;this._execute();},move:function(){this.from=this._replacePx(this._sliderwrapNode.getComputedStyle("left"));if(this.lastX!==null){if(this.currentXthis.left){this.goLeft();}else{this.goRight();}},_addDragConstraint:function(j){var k=this._wrapperNode.getXY();j.plug(c.Plugin.DDConstrained,{constrain:{top:k[1],bottom:k[1]+this._wrapperNode.get("offsetHeight"),right:k[0]+this._slideWrapWidth,left:k[0]+this.left}});},_defaultCB:function(j){return null;},_onClick:function(j){j.preventDefault();this.move();},_execute:function(){this.focus();if(this.disabled){return;}if(this.anim===null){this.anim=new c.Anim({node:this._sliderwrapNode,from:{left:this.from},duration:this.get("duration"),to:{left:this.to},easing:"easeIn"});}this.lastX=null;this.anim.set("from",{left:(this.from?this.from:this.baseX)});this.anim.set("to",{left:this.to});this.anim.run();this.src.set("checked",!this.src.get("checked"));},_replacePx:function(j){return parseInt(j.replace("px",""));}},{ATTRS:{duration:{value:0.2},strings:{value:{labelOn:"ON",labelOff:"OFF"}}},_CLASS_NAMES:[g,a,f,b,h,d],_TEMPLATE:['"].join("\n"),_EVENTS:{slider:[{type:"click",fn:"_onClick"}]},HTML_PARSER:{value:function(j){return j.getAttribute("checked");}}});},"gallery-2012.03.28-20-16",{skinnable:true,requires:["node-base","anim-base","anim-easing","base-build","event-key","event-move","widget","node-style","gallery-makenode","dd-drag","dd-constrain"]});
\ No newline at end of file
+YUI.add("gallery-slidecheckbox",function(c){var e="SlideCheckbox",i="contentBox",g="wrapper",a="slider",f="sliderwrap",b="labelOn",h="labelOff",d="handle";c[e]=c.Base.create(e,c.Widget,[c.MakeNode],{anim:null,currentX:null,lastX:null,renderUI:function(){this.src=this.get("srcNode").addClass(this.getClassName("hidden"));this.get(i).append(this._makeNode()).append(this.src);this._locateNodes();var m=this._labelOnNode.one("div").get("offsetWidth"),l=this._labelOffNode.one("div").get("offsetWidth"),n=this._labelOnNode.get("offsetWidth"),o=this.getSkinName(),j=o?o.indexOf("ios5")>-1:null;if(m>l){this._labelOffNode.one("div").setStyle("width",m);}else{this._labelOnNode.one("div").setStyle("width",l);n=this._labelOnNode.get("offsetWidth");}this.left=-this._labelOnNode.get("offsetWidth")+3;var k=2*n;if(j){this._slideWrapWidth=2*n+28;this.left=this.left+11;k=n+14;}else{this._slideWrapWidth=3*n+10;this._handleNode.setStyle("width",n-3);}this._sliderwrapNode.setStyle("width",this._slideWrapWidth);this._wrapperNode.setStyle("width",k);},bindUI:function(){this.disabled=this.src.get("disabled");var k=new c.DD.Drag({node:this._sliderwrapNode,activeHandle:this._handleNode,lock:this.disabled}),j=this.get(i);this._addDragConstraint(k);k.on("drag:drag",function(m){var l=this._wrapperNode.getXY();if(l[1]!==k.actXY[1]){k.unplug();this._addDragConstraint(k);m.halt(true);}if(k.actXY[0]%2===0){this.lastX=this.currentX;}this.currentX=k.actXY[0];},this);k.on("drag:end",this.move,this);j.on("focus",function(){j.on("key",this.goLeft,"down:37",this);j.on("key",this.goRight,"down:39",this);j.on("key",function(l){l.preventDefault();this.move();},"down:32",this);},this);j.on("blur",function(){j.detach("key");j.blur();},this);this.src.on("change",function(l){alert(this.src.get("checked"));});},syncUI:function(){this._sliderwrapNode.setStyle("left",this.src.get("checked")?0:this.left);},destructor:function(){this.anim.stop().destroy();this.src=null;},goLeft:function(){this.to=this.left;this._execute();},goRight:function(){this.to=0;this._execute();},move:function(){this.from=this._replacePx(this._sliderwrapNode.getComputedStyle("left"));if(this.lastX!==null){if(this.currentXthis.left){this.goLeft();}else{this.goRight();}},_addDragConstraint:function(j){var k=this._wrapperNode.getXY();j.plug(c.Plugin.DDConstrained,{constrain:{top:k[1],bottom:k[1]+this._wrapperNode.get("offsetHeight"),right:k[0]+this._slideWrapWidth,left:k[0]+this.left}});},_defaultCB:function(j){return null;},_onClick:function(j){j.preventDefault();this.move();},_execute:function(){this.focus();if(this.disabled){return;}if(this.anim===null){this.anim=new c.Anim({node:this._sliderwrapNode,from:{left:this.from},duration:this.get("duration"),to:{left:this.to},easing:"easeIn"});}this.lastX=null;this.anim.set("from",{left:(this.from?this.from:this.baseX)});this.anim.set("to",{left:this.to});this.anim.run();this.src.set("checked",!this.src.get("checked"));},_replacePx:function(j){return parseInt(j.replace("px",""));}},{ATTRS:{duration:{value:0.2},strings:{value:{labelOn:"ON",labelOff:"OFF"}}},_CLASS_NAMES:[g,a,f,b,h,d],_TEMPLATE:['"].join("\n"),_EVENTS:{slider:[{type:"click",fn:"_onClick"}]},HTML_PARSER:{value:function(j){return j.getAttribute("checked");}}});},"gallery-2012.04.04-17-55",{skinnable:true,requires:["node-base","anim-base","anim-easing","base-build","event-key","event-move","widget","node-style","gallery-makenode","dd-drag","dd-constrain"]});
\ No newline at end of file
diff --git a/build/gallery-slidecheckbox/gallery-slidecheckbox.js b/build/gallery-slidecheckbox/gallery-slidecheckbox.js
index 442122c420..d998867811 100644
--- a/build/gallery-slidecheckbox/gallery-slidecheckbox.js
+++ b/build/gallery-slidecheckbox/gallery-slidecheckbox.js
@@ -208,4 +208,4 @@ YUI.add('gallery-slidecheckbox', function(Y) {
);
-}, 'gallery-2012.03.28-20-16' ,{skinnable:true, requires:['node-base', 'anim-base', 'anim-easing', 'base-build', 'event-key', 'event-move', 'widget', 'node-style', 'gallery-makenode', 'dd-drag', 'dd-constrain']});
+}, 'gallery-2012.04.04-17-55' ,{skinnable:true, requires:['node-base', 'anim-base', 'anim-easing', 'base-build', 'event-key', 'event-move', 'widget', 'node-style', 'gallery-makenode', 'dd-drag', 'dd-constrain']});
diff --git a/build/gallery-treeble/assets/skins/sam/gallery-treeble-skin.css b/build/gallery-treeble/assets/skins/sam/gallery-treeble-skin.css
index b638ad7c8a..f1873cfc64 100644
--- a/build/gallery-treeble/assets/skins/sam/gallery-treeble-skin.css
+++ b/build/gallery-treeble/assets/skins/sam/gallery-treeble-skin.css
@@ -3,18 +3,18 @@
border-right-color: transparent;
}
-.yui3-skin-sam .yui3-datatable .row-toggle a.treeble-collapse-nub
+.yui3-skin-sam .yui3-datatable .row-toggle a.treeble-expand-nub
{
padding:0 8px;
height:14px;
margin-left:2px;
*display:inline-block;
}
-.yui3-skin-sam .yui3-datatable .row-closed a.treeble-collapse-nub
+.yui3-skin-sam .yui3-datatable .row-closed a.treeble-expand-nub
{
background:url(closed.png) no-repeat;
}
-.yui3-skin-sam .yui3-datatable .row-open a.treeble-collapse-nub
+.yui3-skin-sam .yui3-datatable .row-open a.treeble-expand-nub
{
background:url(open.png) no-repeat;
}
diff --git a/build/gallery-treeble/assets/skins/sam/gallery-treeble.css b/build/gallery-treeble/assets/skins/sam/gallery-treeble.css
index 02332c837a..9f132562d0 100644
--- a/build/gallery-treeble/assets/skins/sam/gallery-treeble.css
+++ b/build/gallery-treeble/assets/skins/sam/gallery-treeble.css
@@ -1 +1 @@
-.yui3-skin-sam .yui3-datatable td.treeble-nub{border-right-color:transparent}.yui3-skin-sam .yui3-datatable .row-toggle a.treeble-collapse-nub{padding:0 8px;height:14px;margin-left:2px;*display:inline-block}.yui3-skin-sam .yui3-datatable .row-closed a.treeble-collapse-nub{background:url(closed.png) no-repeat}.yui3-skin-sam .yui3-datatable .row-open a.treeble-collapse-nub{background:url(open.png) no-repeat}.yui3-skin-sam .yui3-datatable td .treeble-depth-1{padding-left:15px}.yui3-skin-sam .yui3-datatable td .treeble-depth-2{padding-left:30px}.yui3-skin-sam .yui3-datatable td .treeble-depth-3{padding-left:45px}#yui3-css-stamp.skin-sam-gallery-treeble{display:none}
+.yui3-skin-sam .yui3-datatable td.treeble-nub{border-right-color:transparent}.yui3-skin-sam .yui3-datatable .row-toggle a.treeble-expand-nub{padding:0 8px;height:14px;margin-left:2px;*display:inline-block}.yui3-skin-sam .yui3-datatable .row-closed a.treeble-expand-nub{background:url(closed.png) no-repeat}.yui3-skin-sam .yui3-datatable .row-open a.treeble-expand-nub{background:url(open.png) no-repeat}.yui3-skin-sam .yui3-datatable td .treeble-depth-1{padding-left:15px}.yui3-skin-sam .yui3-datatable td .treeble-depth-2{padding-left:30px}.yui3-skin-sam .yui3-datatable td .treeble-depth-3{padding-left:45px}#yui3-css-stamp.skin-sam-gallery-treeble{display:none}
diff --git a/build/gallery-treeble/gallery-treeble-debug.js b/build/gallery-treeble/gallery-treeble-debug.js
index 8995eead22..4c1d453574 100644
--- a/build/gallery-treeble/gallery-treeble-debug.js
+++ b/build/gallery-treeble/gallery-treeble-debug.js
@@ -1064,7 +1064,7 @@ Treeble.buildTwistdownFormatter = function(sendRequest)
ds.toggle(path, {}, sendRequest);
});
- o.cell.set('innerHTML', ' ');
+ o.cell.set('innerHTML', ' ');
}
return true; // keep the Y.Node instances
@@ -1102,4 +1102,4 @@ Y.extend(Treeble, Y.DataTable,
Y.Treeble = Treeble;
-}, 'gallery-2012.03.23-18-00' ,{requires:['datasource'], skinnable:true});
+}, 'gallery-2012.04.04-17-55' ,{requires:['datasource'], skinnable:true});
diff --git a/build/gallery-treeble/gallery-treeble-min.js b/build/gallery-treeble/gallery-treeble-min.js
index 1f727c62d2..c03c397591 100644
--- a/build/gallery-treeble/gallery-treeble-min.js
+++ b/build/gallery-treeble/gallery-treeble-min.js
@@ -1,3 +1,3 @@
YUI.add("gallery-treeble",function(Y){function TreebleDataSource(){TreebleDataSource.superclass.constructor.apply(this,arguments);}TreebleDataSource.NAME="treebleDataSource";TreebleDataSource.ATTRS={root:{writeOnce:true},paginateChildren:{value:false,validator:Y.Lang.isBoolean,writeOnce:true},uniqueIdKey:{validator:Y.Lang.isString}};function populateOpen(parent,open,req){var data=req.data;var startIndex=req.start;var childNodesKey=req.ds.treeble_config.childNodesKey;var nodeOpenKey=req.ds.treeble_config.nodeOpenKey;for(var j=0;j=startIndex){break;}}var uniqueIdKey=this.get("uniqueIdKey");var result=true;for(var k=0;k=open.length||open[j].index>i){var item={index:i,open:null,ds:ds,children:[],childTotal:0,parent:parent};var cached_item=null;if(uniqueIdKey){cached_item=this._open_cache[data[k][uniqueIdKey]];if(cached_item){item.open=cached_item.open;item.childTotal=cached_item.childTotal;this._redo=this._redo||item.open;}}if(!cached_item&&nodeOpenKey&&data[k][nodeOpenKey]){this._toggle.push(req.path.concat(i));}open.splice(j,0,item);this._open_cache[data[k][uniqueIdKey]]=item;}j++;}return result;}function searchOpen(list,nodeIndex){for(var i=0;i=skip+show||node.index==-1){slices.push({ds:ds,path:path.slice(0),start:send?m:skip,end:skip+show-1});if(m+delta==skip+show){slices=slices.concat(getVisibleSlicesPgTop(0,node.childTotal,node.ds,node.children,path.concat(node.index)));}return slices;}else{if(!send&&m+delta==skip){presend=true;}else{if(m+delta>skip){slices.push({ds:ds,path:path.slice(0),start:send?prev+1:skip,end:m+delta-1});send=true;}}}m+=delta;if(send&&node.childTotal>0){slices=slices.concat(getVisibleSlicesPgTop(0,node.childTotal,node.ds,node.children,path.concat(node.index)));}prev=node.index;send=send||presend;}}function getVisibleSlicesPgAll(skip,show,rootDS,open,path,parent,pre,send,slices){if(!parent){path=[];parent=null;pre=0;send=false;slices=[];}var ds=parent?parent.ds:rootDS;open=open.concat({index:parent?parent.childTotal:-1,open:true,childTotal:0,children:null});var n=0,m=0,prev=-1;for(var i=0;i=skip+show||node.index==-1){slices.push({ds:ds,path:path.slice(0),start:m+(send?0:skip-pre-n),end:m+(skip+show-1-pre-n)});return slices;}else{if(!send&&pre+n+delta==skip){send=true;}else{if(pre+n+delta>skip){slices.push({ds:ds,path:path.slice(0),start:m+(send?0:skip-pre-n),end:m+delta-1});send=true;}}}n+=delta;m+=delta;if(node.childTotal>0){var info=getVisibleSlicesPgAll(skip,show,rootDS,node.children,path.concat(node.index),node,pre+n,send,slices);if(Y.Lang.isArray(info)){return info;}else{n+=info.count;send=info.send;}}prev=node.index;}var info={count:n,send:send};return info;}function requestSlices(request){for(var i=0;i0?getNode.call(this,req.path):null);var open=(parent!==null?parent.children:this._open);if(!populateOpen.call(this,parent,open,req)){treeFailure.apply(this,arguments);return;}if(!parent&&req.ds.treeble_config.totalRecordsExpr){eval("this._topNodeTotal=e.response"+req.ds.treeble_config.totalRecordsExpr);}else{if(!parent&&req.ds.treeble_config.totalRecordsReturnExpr){this._topNodeTotal=e.response.results.length;}}checkFinished.call(this);}function treeFailure(e,reqIndex){var req=searchTxId(this._req,e.tId,reqIndex);if(!req){return;}this._cancelAllRequests();this._callback.error=e.error;this._callback.response=e.response;this.fire("response",this._callback);}function setNodeInfo(list,offset,path,ds){var depth=path.length;for(var i=0;i0){this.toggle(this._toggle[0],Y.clone(this._callback.request,true),{fn:function(){Y.Lang.later(0,this,requestTree);},scope:this});return;}}var response={};Y.mix(response,this._topResponse);response.results=[];response=Y.clone(response,true);count=this._slices.length;for(i=0;i');}return true;};};Treeble.treeValueFormatter=function(o){var depth_class="treeble-depth-"+o.data._yui_node_depth;return''+o.value+" ";};Y.extend(Treeble,Y.DataTable,{plug:function(plugin,config){if(plugin===Y.Plugin.DataTableDataSource){var recordType=this.get("recordType");recordType.ATTRS[config.datasource.get("root").treeble_config.childNodesKey]={};recordType.ATTRS._yui_node_path={};recordType.ATTRS._yui_node_depth={};}Treeble.superclass.plug.apply(this,arguments);}});Y.Treeble=Treeble;},"gallery-2012.03.23-18-00",{requires:["datasource"],skinnable:true});
\ No newline at end of file
+}Treeble.NAME="datatable";Treeble.buildTwistdownFormatter=function(sendRequest){return function(o){o.td.addClass("treeble-nub");var ds=this.datasource.get("datasource");var key=ds.get("root").treeble_config.childNodesKey;if(o.data[key]){var path=o.data._yui_node_path;var open=ds.isOpen(path);var clazz=open?"row-open":"row-closed";o.td.addClass("row-toggle");o.td.replaceClass(/row-(open|closed)/,clazz);o.td.on("click",function(){ds.toggle(path,{},sendRequest);});o.cell.set("innerHTML",' ');}return true;};};Treeble.treeValueFormatter=function(o){var depth_class="treeble-depth-"+o.data._yui_node_depth;return''+o.value+" ";};Y.extend(Treeble,Y.DataTable,{plug:function(plugin,config){if(plugin===Y.Plugin.DataTableDataSource){var recordType=this.get("recordType");recordType.ATTRS[config.datasource.get("root").treeble_config.childNodesKey]={};recordType.ATTRS._yui_node_path={};recordType.ATTRS._yui_node_depth={};}Treeble.superclass.plug.apply(this,arguments);}});Y.Treeble=Treeble;},"gallery-2012.04.04-17-55",{requires:["datasource"],skinnable:true});
\ No newline at end of file
diff --git a/build/gallery-treeble/gallery-treeble.js b/build/gallery-treeble/gallery-treeble.js
index 8995eead22..4c1d453574 100644
--- a/build/gallery-treeble/gallery-treeble.js
+++ b/build/gallery-treeble/gallery-treeble.js
@@ -1064,7 +1064,7 @@ Treeble.buildTwistdownFormatter = function(sendRequest)
ds.toggle(path, {}, sendRequest);
});
- o.cell.set('innerHTML', ' ');
+ o.cell.set('innerHTML', ' ');
}
return true; // keep the Y.Node instances
@@ -1102,4 +1102,4 @@ Y.extend(Treeble, Y.DataTable,
Y.Treeble = Treeble;
-}, 'gallery-2012.03.23-18-00' ,{requires:['datasource'], skinnable:true});
+}, 'gallery-2012.04.04-17-55' ,{requires:['datasource'], skinnable:true});