Skip to content
Browse files

Gallery Build Tag: gallery-2011.06.01-20-18

  • Loading branch information...
1 parent fd179db commit f861e475b13c5655cd3dcb1402ef59e4e5b56769 YUI Builder committed Jun 1, 2011
Showing with 886 additions and 324 deletions.
  1. +1 −6 build/gallery-accordion-horiz-vert/gallery-accordion-horiz-vert-debug.js
  2. +2 −2 build/gallery-accordion-horiz-vert/gallery-accordion-horiz-vert-min.js
  3. +1 −6 build/gallery-accordion-horiz-vert/gallery-accordion-horiz-vert.js
  4. 0 build/gallery-carousel-rtl/assets/gallery-carousel-rtl-core.css
  5. +122 −0 build/gallery-carousel-rtl/assets/skins/sam/gallery-carousel-rtl-skin.css
  6. +1 −0 build/gallery-carousel-rtl/assets/skins/sam/gallery-carousel-rtl.css
  7. BIN build/gallery-carousel-rtl/assets/skins/sam/sprite.png
  8. +120 −0 build/gallery-carousel-rtl/gallery-carousel-rtl-debug.js
  9. +1 −0 build/gallery-carousel-rtl/gallery-carousel-rtl-min.js
  10. +120 −0 build/gallery-carousel-rtl/gallery-carousel-rtl.js
  11. +1 −6 build/gallery-checkboxgroups/gallery-checkboxgroups-debug.js
  12. +1 −1 build/gallery-checkboxgroups/gallery-checkboxgroups-min.js
  13. +1 −6 build/gallery-checkboxgroups/gallery-checkboxgroups.js
  14. +131 −0 build/gallery-dropdown/gallery-dropdown-debug.js
  15. +1 −0 build/gallery-dropdown/gallery-dropdown-min.js
  16. +131 −0 build/gallery-dropdown/gallery-dropdown.js
  17. +1 −6 build/gallery-exprbuilder/gallery-exprbuilder-debug.js
  18. +1 −1 build/gallery-exprbuilder/gallery-exprbuilder-min.js
  19. +1 −6 build/gallery-exprbuilder/gallery-exprbuilder.js
  20. +4 −4 build/gallery-formmgr-css-validation/gallery-formmgr-css-validation-debug.js
  21. +1 −1 build/gallery-formmgr-css-validation/gallery-formmgr-css-validation-min.js
  22. +4 −1 build/gallery-formmgr-css-validation/gallery-formmgr-css-validation.js
  23. +12 −25 build/gallery-formmgr/gallery-formmgr-debug.js
  24. +2 −2 build/gallery-formmgr/gallery-formmgr-min.js
  25. +12 −24 build/gallery-formmgr/gallery-formmgr.js
  26. +26 −29 build/gallery-instancemanager/gallery-instancemanager-debug.js
  27. +1 −1 build/gallery-instancemanager/gallery-instancemanager-min.js
  28. +26 −29 build/gallery-instancemanager/gallery-instancemanager.js
  29. +13 −14 build/gallery-io-multiresponse/gallery-io-multiresponse-debug.js
  30. +1 −1 build/gallery-io-multiresponse/gallery-io-multiresponse-min.js
  31. +13 −13 build/gallery-io-multiresponse/gallery-io-multiresponse.js
  32. +1 −6 build/gallery-querybuilder/gallery-querybuilder-debug.js
  33. +2 −2 build/gallery-querybuilder/gallery-querybuilder-min.js
  34. +1 −6 build/gallery-querybuilder/gallery-querybuilder.js
  35. 0 build/gallery-quickedit/assets/gallery-quickedit-core.css~upstream_master
  36. +10 −14 build/gallery-quickedit/gallery-quickedit-debug.js
  37. +3 −3 build/gallery-quickedit/gallery-quickedit-min.js
  38. +10 −14 build/gallery-quickedit/gallery-quickedit.js
  39. +2 −6 build/gallery-split-desktop/assets/gallery-split-desktop-core.css
  40. +5 −6 build/gallery-split-desktop/gallery-split-desktop-debug.js
  41. +2 −2 build/gallery-split-desktop/gallery-split-desktop-min.js
  42. +4 −5 build/gallery-split-desktop/gallery-split-desktop.js
  43. +7 −9 build/gallery-treeble/gallery-treeble-debug.js
  44. +2 −2 build/gallery-treeble/gallery-treeble-min.js
  45. +7 −9 build/gallery-treeble/gallery-treeble.js
  46. +39 −28 build/gallery-yql-finance/gallery-yql-finance-debug.js
  47. +1 −1 build/gallery-yql-finance/gallery-yql-finance-min.js
  48. +38 −27 build/gallery-yql-finance/gallery-yql-finance.js
View
7 build/gallery-accordion-horiz-vert/gallery-accordion-horiz-vert-debug.js
@@ -43,11 +43,6 @@ var use_nonzero_empty_div = (0 < Y.UA.ie && Y.UA.ie < 8),
function Accordion(config)
{
- if (arguments.length === 0) // derived class prototype
- {
- return;
- }
-
config = config || {};
if (Y.Lang.isUndefined(config.tabIndex))
{
@@ -1082,4 +1077,4 @@ Y.extend(Accordion, Y.Widget,
Y.Accordion = Accordion;
-}, 'gallery-2011.02.18-23-10' ,{optional:['anim-base'], requires:['widget','selector-css3'], skinnable:true});
+}, 'gallery-2011.06.01-20-18' ,{skinnable:true, optional:['anim-base'], requires:['widget','selector-css3']});
View
4 build/gallery-accordion-horiz-vert/gallery-accordion-horiz-vert-min.js
@@ -1,2 +1,2 @@
-YUI.add("gallery-accordion-horiz-vert",function(b){var f=(0<b.UA.ie&&b.UA.ie<8),h=!(0<b.UA.ie&&b.UA.ie<8),j=(f?1:0);function g(k){if(arguments.length===0){return;}k=k||{};if(b.Lang.isUndefined(k.tabIndex)){k.tabIndex=null;}if(b.Lang.isUndefined(k.horizontal)){k.horizontal=false;}g.superclass.constructor.call(this,k);}function d(){return !b.Lang.isUndefined(b.Anim);}function e(k){return(k&&h&&!b.Lang.isUndefined(b.Anim));}g.NAME="accordion";g.ATTRS={horizontal:{value:false,writeOnce:true},titles:{writeOnce:true},replaceTitleContainer:{value:true,validator:b.Lang.isBoolean},sections:{writeOnce:true},replaceSectionContainer:{value:true,validator:b.Lang.isBoolean},allowAllClosed:{value:false,validator:b.Lang.isBoolean,setter:function(k){this.allow_all_closed=k;return k;}},allowMultipleOpen:{value:false,validator:b.Lang.isBoolean},animateRender:{value:false,writeOnce:true,validator:b.Lang.isBoolean,setter:e},animateInsertRemove:{valueFn:d,validator:b.Lang.isBoolean,setter:e},animateOpenClose:{valueFn:d,validator:b.Lang.isBoolean,setter:e},animateDuration:{value:null,validator:function(k){return(k===null||b.Lang.isNumber(k));}},animateEasing:{value:null,validator:function(k){return(k===null||b.Lang.isFunction(k));}}};g.HTML_PARSER={titles:function(k){return k.all("li div:nth-child(1)");},sections:function(k){return k.all("li div:nth-child(2)");}};var a=b.ClassNameManager.getClassName(g.NAME,"open");var c=b.ClassNameManager.getClassName(g.NAME,"closed");function i(k){b.Event.purgeElement(k,true);while(k.hasChildNodes()){k.removeChild(k.lastChild);}}b.extend(g,b.Widget,{initializer:function(k){this.section_list=[];this.get("allowAllClosed");if(this.get("horizontal")){this.slide_style_name="width";this.slide_size_name="offsetWidth";this.fixed_style_name="height";this.fixed_size_name="offsetHeight";}else{this.slide_style_name="height";this.slide_size_name="offsetHeight";this.fixed_style_name="width";this.fixed_size_name="offsetWidth";}this.after("allowMultipleOpenChange",function(l){if(this.section_list&&this.section_list.length>0&&!l.newVal){this.closeAllSections();}});this.after("allowAllClosedChange",function(l){if(this.section_list&&this.section_list.length>0&&!l.newVal&&this.allSectionsClosed()){this.toggleSection(0);}});},renderUI:function(){this.get("boundingBox").addClass(this.getClassName(this.get("horizontal")?"horiz":"vert"));var n=this.get("titles");if(b.Lang.isString(n)){n=b.all(n);}var o=this.get("sections");if(b.Lang.isString(o)){o=b.all(o);}if(n instanceof b.NodeList&&o instanceof b.NodeList&&n.size()==o.size()){var l=this.get("animateInsertRemove");this.set("animateInsertRemove",this.get("animateRender"));var m=n.size();for(var k=0;k<m;k++){this.appendSection(n.item(k),o.item(k));}this.set("animateInsertRemove",l);}else{if(n instanceof Array&&o instanceof Array&&n.length==o.length){var l=this.get("animateInsertRemove");this.set("animateInsertRemove",this.get("animateRender"));var m=n.length;for(var k=0;k<m;k++){this.appendSection(n[k],o[k]);}this.set("animateInsertRemove",l);}else{}}},getSectionCount:function(){return this.section_list.length;},getTitle:function(k){return this.section_list[k].title;},setTitle:function(k,o){var l=this.section_list[k].title;i(l);var m;if(b.Lang.isString(o)){var m=b.one(o);if(!m){l.set("innerHTML",o);}}else{m=o;}if(m&&this.get("replaceTitleContainer")){var n=l.get("parentNode");n.removeChild(l);n.appendChild(m);this.section_list[k].title=m;m.addClass(this.getClassName("title"));m.addClass(this.section_list[k].open?a:c);}else{if(m){l.appendChild(m);}}if(f){l.setStyle("display",l.get("innerHTML")?"":"none");}},getSection:function(k){return this.section_list[k].content;},setSection:function(k,m){var q=this.section_list[k].content;i(q);var l;if(b.Lang.isString(m)){var l=b.one(m);if(!l){q.set("innerHTML",m);}}else{l=m;}if(l&&this.get("replaceSectionContainer")){var o=q.getStyle("display");var n=q.get("parentNode");n.removeChild(q);n.appendChild(l);this.section_list[k].content=l;l.addClass(this.getClassName("section"));l.addClass(this.section_list[k].open?a:c);l.setStyle("display",o);}else{if(l){q.appendChild(l);}}},_getClip:function(k){return this.section_list[k].clip;},prependSection:function(l,k){return this.insertSection(0,l,k);},appendSection:function(l,k){return this.insertSection(this.section_list.length,l,k);},insertSection:function(m,q,n){this.fire("beforeInsert",m);var r=b.Node.create("<div/>");r.addClass(this.getClassName("title"));r.addClass(c);var p=b.Node.create("<div/>");p.addClass(this.getClassName("section-clip"));p.setStyle(this.slide_style_name,j+"px");if(this.get("animateOpenClose")){p.setStyle("opacity",0);}var o=b.Node.create("<div/>");o.addClass(this.getClassName("section"));o.addClass(c);o.setStyle("display","none");p.appendChild(o);this.section_list.splice(m,0,{title:r,clip:p,content:o,open:false,anim:null});if(m<this.section_list.length-1){this.get("contentBox").insertBefore(r,this.section_list[m+1].title);}else{this.get("contentBox").appendChild(r);}this.setTitle(m,q);r=this.section_list[m].title;var s=r.get(this.slide_size_name);if(this.get("animateInsertRemove")){r.setStyle(this.slide_style_name,j+"px");var l={node:r,from:{opacity:0},to:{opacity:1}};l.to[this.slide_style_name]=s;var k=this._createAnimator(l);k.on("end",function(u,t){this.section_list[t].title.setStyle(this.slide_style_name,"auto");},this,m);k.run();}if(n){this.setSection(m,n);o=this.section_list[m].content;}if(m<this.section_list.length-1){this.get("contentBox").insertBefore(p,this.section_list[m+1].title);}else{this.get("contentBox").appendChild(p);}this.fire("insert",m,s);if(!this.allow_all_closed&&this.allSectionsClosed()){this.toggleSection(0);}return{title:r,content:o};},removeSection:function(m){this.fire("beforeRemove",m);function k(q,p){p[0].removeChild(p[1]);p[0].removeChild(p[2]);}var l=[this.get("contentBox"),this.section_list[m].title,this.section_list[m].clip];if(this.get("animateInsertRemove")){var o={node:this.section_list[m].clip,from:{opacity:1},to:{opacity:0}};
-o.to[this.slide_style_name]=j;if(this.section_list[m].open){this._startAnimator(m,o);}o.node=this.section_list[m].title;var n=this._createAnimator(o);n.on("end",k,null,l);n.run();}else{k(null,l);}this.section_list.splice(m,1);if(!this.allow_all_closed&&this.allSectionsClosed()){this.toggleSection(0);}this.fire("remove",m);},findSection:function(l){l=b.Node.getDOMNode(b.one(l));var n=this.section_list.length;for(var k=0;k<n;k++){var o=b.Node.getDOMNode(this.section_list[k].title);var m=b.Node.getDOMNode(this.section_list[k].content);if(l==o||b.DOM.contains(o,l)||l==m||b.DOM.contains(m,l)){return k;}}return false;},isSectionOpen:function(k){return this.section_list[k].open;},openSection:function(k){if(!this.section_list[k].open){this.toggleSection(k);}},closeSection:function(k){if(this.section_list[k].open){this.toggleSection(k);}},allSectionsOpen:function(){var l=this.section_list.length;for(var k=0;k<l;k++){if(!this.section_list[k].open){return false;}}return true;},allSectionsClosed:function(){var l=this.section_list.length;for(var k=0;k<l;k++){if(this.section_list[k].open){return false;}}return true;},toggleSection:function(k){if(!this.section_list[k].open&&!this.get("allowMultipleOpen")){var n=this.allow_all_closed;this.allow_all_closed=true;this.closeAllSections();this.allow_all_closed=n;}else{if(this.section_list[k].open&&!this.allow_all_closed){this.section_list[k].open=false;if(this.allSectionsClosed()){this.section_list[k].open=true;return;}this.section_list[k].open=true;}}function p(t,s){this.section_list[s].clip.setStyle(this.slide_style_name,"auto");this.fire("open",s);}function r(t,s){this.section_list[s].content.setStyle("display","none");this.fire("close",s);}if(!this.section_list[k].open){this.section_list[k].content.setStyle("display","block");this.fire("beforeOpen",k);this.section_list[k].open=true;this.section_list[k].title.replaceClass(c,a);this.section_list[k].content.replaceClass(c,a);var l=this.section_list[k].content.get(this.slide_size_name);if(this.get("animateOpenClose")){var q={node:this.section_list[k].clip,from:{opacity:0},to:{opacity:1}};q.to[this.slide_style_name]=l;var o=this._startAnimator(k,q);o.on("end",p,this,k);}else{var m=this.section_list[k].clip;if(m.getStyle("opacity")=="0"){m.setStyle("opacity",1);}p.call(this,null,k);}}else{this.fire("beforeClose",k);this.section_list[k].open=false;this.section_list[k].title.replaceClass(a,c);this.section_list[k].content.replaceClass(a,c);if(this.get("animateOpenClose")){var q={node:this.section_list[k].clip,from:{opacity:1},to:{opacity:0}};q.to[this.slide_style_name]=j;var o=this._startAnimator(k,q);o.on("end",r,this,k);}else{this.section_list[k].clip.setStyle(this.slide_style_name,j+"px");r.call(this,null,k);}}},openAllSections:function(){if(this.get("allowMultipleOpen")){var l=this.section_list.length;for(var k=0;k<l;k++){if(!this.section_list[k].open){this.toggleSection(k);}}}},closeAllSections:function(){var l=this.section_list.length;var m=true;for(var k=0;k<l;k++){if(this.section_list[k].open){if(!this.allow_all_closed&&m){m=false;}else{this.toggleSection(k);}}}if(!this.allow_all_closed&&m){this.toggleSection(0);}},_createAnimator:function(l){var k=this.get("animateDuration");if(k!==null){l.duration=k;}var m=this.get("animateEasing");if(m!==null){l.easing=m;}return new b.Anim(l);},_startAnimator:function(k,m){var l=this.section_list[k].anim;if(l){l.stop(true);}this.section_list[k].anim=l=this._createAnimator(m);l.on("end",function(o,n,p){if(n<this.section_list.length&&this.section_list[n].anim==p){this.section_list[n].anim=null;}},this,k,l);l.run();return l;}});b.Accordion=g;},"gallery-2011.02.18-23-10",{optional:["anim-base"],requires:["widget","selector-css3"],skinnable:true});
+YUI.add("gallery-accordion-horiz-vert",function(b){var f=(0<b.UA.ie&&b.UA.ie<8),h=!(0<b.UA.ie&&b.UA.ie<8),j=(f?1:0);function g(k){k=k||{};if(b.Lang.isUndefined(k.tabIndex)){k.tabIndex=null;}if(b.Lang.isUndefined(k.horizontal)){k.horizontal=false;}g.superclass.constructor.call(this,k);}function d(){return !b.Lang.isUndefined(b.Anim);}function e(k){return(k&&h&&!b.Lang.isUndefined(b.Anim));}g.NAME="accordion";g.ATTRS={horizontal:{value:false,writeOnce:true},titles:{writeOnce:true},replaceTitleContainer:{value:true,validator:b.Lang.isBoolean},sections:{writeOnce:true},replaceSectionContainer:{value:true,validator:b.Lang.isBoolean},allowAllClosed:{value:false,validator:b.Lang.isBoolean,setter:function(k){this.allow_all_closed=k;return k;}},allowMultipleOpen:{value:false,validator:b.Lang.isBoolean},animateRender:{value:false,writeOnce:true,validator:b.Lang.isBoolean,setter:e},animateInsertRemove:{valueFn:d,validator:b.Lang.isBoolean,setter:e},animateOpenClose:{valueFn:d,validator:b.Lang.isBoolean,setter:e},animateDuration:{value:null,validator:function(k){return(k===null||b.Lang.isNumber(k));}},animateEasing:{value:null,validator:function(k){return(k===null||b.Lang.isFunction(k));}}};g.HTML_PARSER={titles:function(k){return k.all("li div:nth-child(1)");},sections:function(k){return k.all("li div:nth-child(2)");}};var a=b.ClassNameManager.getClassName(g.NAME,"open");var c=b.ClassNameManager.getClassName(g.NAME,"closed");function i(k){b.Event.purgeElement(k,true);while(k.hasChildNodes()){k.removeChild(k.lastChild);}}b.extend(g,b.Widget,{initializer:function(k){this.section_list=[];this.get("allowAllClosed");if(this.get("horizontal")){this.slide_style_name="width";this.slide_size_name="offsetWidth";this.fixed_style_name="height";this.fixed_size_name="offsetHeight";}else{this.slide_style_name="height";this.slide_size_name="offsetHeight";this.fixed_style_name="width";this.fixed_size_name="offsetWidth";}this.after("allowMultipleOpenChange",function(l){if(this.section_list&&this.section_list.length>0&&!l.newVal){this.closeAllSections();}});this.after("allowAllClosedChange",function(l){if(this.section_list&&this.section_list.length>0&&!l.newVal&&this.allSectionsClosed()){this.toggleSection(0);}});},renderUI:function(){this.get("boundingBox").addClass(this.getClassName(this.get("horizontal")?"horiz":"vert"));var n=this.get("titles");if(b.Lang.isString(n)){n=b.all(n);}var o=this.get("sections");if(b.Lang.isString(o)){o=b.all(o);}if(n instanceof b.NodeList&&o instanceof b.NodeList&&n.size()==o.size()){var l=this.get("animateInsertRemove");this.set("animateInsertRemove",this.get("animateRender"));var m=n.size();for(var k=0;k<m;k++){this.appendSection(n.item(k),o.item(k));}this.set("animateInsertRemove",l);}else{if(n instanceof Array&&o instanceof Array&&n.length==o.length){var l=this.get("animateInsertRemove");this.set("animateInsertRemove",this.get("animateRender"));var m=n.length;for(var k=0;k<m;k++){this.appendSection(n[k],o[k]);}this.set("animateInsertRemove",l);}else{}}},getSectionCount:function(){return this.section_list.length;},getTitle:function(k){return this.section_list[k].title;},setTitle:function(k,o){var l=this.section_list[k].title;i(l);var m;if(b.Lang.isString(o)){var m=b.one(o);if(!m){l.set("innerHTML",o);}}else{m=o;}if(m&&this.get("replaceTitleContainer")){var n=l.get("parentNode");n.removeChild(l);n.appendChild(m);this.section_list[k].title=m;m.addClass(this.getClassName("title"));m.addClass(this.section_list[k].open?a:c);}else{if(m){l.appendChild(m);}}if(f){l.setStyle("display",l.get("innerHTML")?"":"none");}},getSection:function(k){return this.section_list[k].content;},setSection:function(k,m){var q=this.section_list[k].content;i(q);var l;if(b.Lang.isString(m)){var l=b.one(m);if(!l){q.set("innerHTML",m);}}else{l=m;}if(l&&this.get("replaceSectionContainer")){var o=q.getStyle("display");var n=q.get("parentNode");n.removeChild(q);n.appendChild(l);this.section_list[k].content=l;l.addClass(this.getClassName("section"));l.addClass(this.section_list[k].open?a:c);l.setStyle("display",o);}else{if(l){q.appendChild(l);}}},_getClip:function(k){return this.section_list[k].clip;},prependSection:function(l,k){return this.insertSection(0,l,k);},appendSection:function(l,k){return this.insertSection(this.section_list.length,l,k);},insertSection:function(m,q,n){this.fire("beforeInsert",m);var r=b.Node.create("<div/>");r.addClass(this.getClassName("title"));r.addClass(c);var p=b.Node.create("<div/>");p.addClass(this.getClassName("section-clip"));p.setStyle(this.slide_style_name,j+"px");if(this.get("animateOpenClose")){p.setStyle("opacity",0);}var o=b.Node.create("<div/>");o.addClass(this.getClassName("section"));o.addClass(c);o.setStyle("display","none");p.appendChild(o);this.section_list.splice(m,0,{title:r,clip:p,content:o,open:false,anim:null});if(m<this.section_list.length-1){this.get("contentBox").insertBefore(r,this.section_list[m+1].title);}else{this.get("contentBox").appendChild(r);}this.setTitle(m,q);r=this.section_list[m].title;var s=r.get(this.slide_size_name);if(this.get("animateInsertRemove")){r.setStyle(this.slide_style_name,j+"px");var l={node:r,from:{opacity:0},to:{opacity:1}};l.to[this.slide_style_name]=s;var k=this._createAnimator(l);k.on("end",function(u,t){this.section_list[t].title.setStyle(this.slide_style_name,"auto");},this,m);k.run();}if(n){this.setSection(m,n);o=this.section_list[m].content;}if(m<this.section_list.length-1){this.get("contentBox").insertBefore(p,this.section_list[m+1].title);}else{this.get("contentBox").appendChild(p);}this.fire("insert",m,s);if(!this.allow_all_closed&&this.allSectionsClosed()){this.toggleSection(0);}return{title:r,content:o};},removeSection:function(m){this.fire("beforeRemove",m);function k(q,p){p[0].removeChild(p[1]);p[0].removeChild(p[2]);}var l=[this.get("contentBox"),this.section_list[m].title,this.section_list[m].clip];if(this.get("animateInsertRemove")){var o={node:this.section_list[m].clip,from:{opacity:1},to:{opacity:0}};o.to[this.slide_style_name]=j;
+if(this.section_list[m].open){this._startAnimator(m,o);}o.node=this.section_list[m].title;var n=this._createAnimator(o);n.on("end",k,null,l);n.run();}else{k(null,l);}this.section_list.splice(m,1);if(!this.allow_all_closed&&this.allSectionsClosed()){this.toggleSection(0);}this.fire("remove",m);},findSection:function(l){l=b.Node.getDOMNode(b.one(l));var n=this.section_list.length;for(var k=0;k<n;k++){var o=b.Node.getDOMNode(this.section_list[k].title);var m=b.Node.getDOMNode(this.section_list[k].content);if(l==o||b.DOM.contains(o,l)||l==m||b.DOM.contains(m,l)){return k;}}return false;},isSectionOpen:function(k){return this.section_list[k].open;},openSection:function(k){if(!this.section_list[k].open){this.toggleSection(k);}},closeSection:function(k){if(this.section_list[k].open){this.toggleSection(k);}},allSectionsOpen:function(){var l=this.section_list.length;for(var k=0;k<l;k++){if(!this.section_list[k].open){return false;}}return true;},allSectionsClosed:function(){var l=this.section_list.length;for(var k=0;k<l;k++){if(this.section_list[k].open){return false;}}return true;},toggleSection:function(k){if(!this.section_list[k].open&&!this.get("allowMultipleOpen")){var n=this.allow_all_closed;this.allow_all_closed=true;this.closeAllSections();this.allow_all_closed=n;}else{if(this.section_list[k].open&&!this.allow_all_closed){this.section_list[k].open=false;if(this.allSectionsClosed()){this.section_list[k].open=true;return;}this.section_list[k].open=true;}}function p(t,s){this.section_list[s].clip.setStyle(this.slide_style_name,"auto");this.fire("open",s);}function r(t,s){this.section_list[s].content.setStyle("display","none");this.fire("close",s);}if(!this.section_list[k].open){this.section_list[k].content.setStyle("display","block");this.fire("beforeOpen",k);this.section_list[k].open=true;this.section_list[k].title.replaceClass(c,a);this.section_list[k].content.replaceClass(c,a);var l=this.section_list[k].content.get(this.slide_size_name);if(this.get("animateOpenClose")){var q={node:this.section_list[k].clip,from:{opacity:0},to:{opacity:1}};q.to[this.slide_style_name]=l;var o=this._startAnimator(k,q);o.on("end",p,this,k);}else{var m=this.section_list[k].clip;if(m.getStyle("opacity")=="0"){m.setStyle("opacity",1);}p.call(this,null,k);}}else{this.fire("beforeClose",k);this.section_list[k].open=false;this.section_list[k].title.replaceClass(a,c);this.section_list[k].content.replaceClass(a,c);if(this.get("animateOpenClose")){var q={node:this.section_list[k].clip,from:{opacity:1},to:{opacity:0}};q.to[this.slide_style_name]=j;var o=this._startAnimator(k,q);o.on("end",r,this,k);}else{this.section_list[k].clip.setStyle(this.slide_style_name,j+"px");r.call(this,null,k);}}},openAllSections:function(){if(this.get("allowMultipleOpen")){var l=this.section_list.length;for(var k=0;k<l;k++){if(!this.section_list[k].open){this.toggleSection(k);}}}},closeAllSections:function(){var l=this.section_list.length;var m=true;for(var k=0;k<l;k++){if(this.section_list[k].open){if(!this.allow_all_closed&&m){m=false;}else{this.toggleSection(k);}}}if(!this.allow_all_closed&&m){this.toggleSection(0);}},_createAnimator:function(l){var k=this.get("animateDuration");if(k!==null){l.duration=k;}var m=this.get("animateEasing");if(m!==null){l.easing=m;}return new b.Anim(l);},_startAnimator:function(k,m){var l=this.section_list[k].anim;if(l){l.stop(true);}this.section_list[k].anim=l=this._createAnimator(m);l.on("end",function(o,n,p){if(n<this.section_list.length&&this.section_list[n].anim==p){this.section_list[n].anim=null;}},this,k,l);l.run();return l;}});b.Accordion=g;},"gallery-2011.06.01-20-18",{skinnable:true,optional:["anim-base"],requires:["widget","selector-css3"]});
View
7 build/gallery-accordion-horiz-vert/gallery-accordion-horiz-vert.js
@@ -43,11 +43,6 @@ var use_nonzero_empty_div = (0 < Y.UA.ie && Y.UA.ie < 8),
function Accordion(config)
{
- if (arguments.length === 0) // derived class prototype
- {
- return;
- }
-
config = config || {};
if (Y.Lang.isUndefined(config.tabIndex))
{
@@ -1081,4 +1076,4 @@ Y.extend(Accordion, Y.Widget,
Y.Accordion = Accordion;
-}, 'gallery-2011.02.18-23-10' ,{optional:['anim-base'], requires:['widget','selector-css3'], skinnable:true});
+}, 'gallery-2011.06.01-20-18' ,{skinnable:true, optional:['anim-base'], requires:['widget','selector-css3']});
View
0 build/gallery-carousel-rtl/assets/gallery-carousel-rtl-core.css
No changes.
View
122 build/gallery-carousel-rtl/assets/skins/sam/gallery-carousel-rtl-skin.css
@@ -0,0 +1,122 @@
+.yui3-js-enabled .yui3-carousel-loading {
+ right: -1000em;
+ position: absolute;
+ top: -1000em;
+}
+.yui3-js-enabled .yui3-carousel-hidden {
+ right: -10000em;
+ position: absolute;
+ top: -10000em;
+}
+.yui3-js-enabled .yui3-carousel-content {
+ margin: 0 auto;
+ overflow: hidden;
+ padding: 0;
+ position: relative;
+ text-align: right;
+ *margin: 0;
+}
+.yui3-js-enabled .yui3-carousel-content li {
+ list-style: none;
+ margin: 1px;
+ overflow: hidden;
+ padding: 0;
+ position: absolute;
+ text-align: center;
+}
+.yui3-js-enabled .yui3-carousel-vertical .yui3-carousel-content li { display: block }
+.yui3-js-enabled .yui3-carousel-horizontal .yui3-carousel-content { width: 100000px }
+.yui3-js-enabled .yui3-carousel-vertical .yui3-carousel-content { height: 100000px }
+.yui3-js-enabled .yui3-carousel-vertical { min-width: 114px }
+.yui3-js-enabled .yui3-carousel-nav {
+ position: relative;
+ z-index: 1;
+}
+.yui3-skin-sam .yui3-carousel {
+ border: 1px solid #808080;
+ overflow: hidden;
+ position: relative;
+ text-align: right;
+}
+.yui3-skin-sam .yui3-carousel-content li { border: 1px solid #ccc }
+.yui3-skin-sam .yui3-carousel-content li.yui3-carousel-selected { border: 1px dotted #000 }
+.yui3-skin-sam .yui3-carousel-nav {
+ background: url("sprite.png") repeat-x scroll 0 0 transparent;
+ margin: 0;
+ padding: 3px;
+ text-align: left;
+}
+.yui3-skin-sam .yui3-carousel-nav:after {
+ clear: both;
+ content: ".";
+ display: block;
+ height: 0;
+ visibility: hidden;
+}
+.yui3-skin-sam .yui3-carousel-button {
+ background: url("sprite.png") repeat-x scroll 0 -600px transparent;
+ float: left;
+ height: 19px;
+ margin: 5px;
+ overflow: hidden;
+ width: 40px;
+}
+.yui3-skin-sam .yui3-carousel-vertical .yui3-carousel-button { background-position: 0 -800px }
+.yui3-skin-sam .yui3-carousel-button-disabled { background-position: 0 -2000px }
+.yui3-skin-sam .yui3-carousel-vertical .yui3-carousel-button-disabled { background-position: 0 -2100px }
+.yui3-skin-sam .yui3-carousel-button button {
+ background-color: transparent;
+ border: 0 none;
+ cursor: pointer;
+ display: block;
+ height: 44px;
+ margin: -2px -2px 0 0;
+ padding: 0 50px 0 0;
+}
+.yui3-skin-sam .yui3-carousel-first-button {
+ margin-right: -100px;
+ margin-left: 50px;
+}
+.yui3-skin-sam .yui3-carousel-next-button {
+ background-position: 0 -550px;
+}
+.yui3-skin-sam .yui3-carousel-vertical .yui3-carousel-first-button { background-position: 0 -750px }
+/*.yui3-skin-sam .yui3-carousel-first-button-disabled { background-position: 0 -1950px }
+ * .yui3-skin-sam .yui3-carousel-vertical .yui3-carousel-first-button-disabled { background-position: 0 -2050px }*/
+ .yui3-skin-sam .yui3-carousel-nav ul {
+ float: left;
+ height: 19px;
+ margin: 0 -220px 0 100px;
+ padding: 0;
+}
+.yui3-skin-sam .yui3-carousel-vertical .yui3-carousel-nav ul {
+ float: none;
+ margin: 0;
+}
+.yui3-skin-sam .yui3-carousel-nav ul li {
+ background: url("sprite.png") no-repeat scroll 0 -650px transparent;
+ cursor: pointer;
+ float: right;
+ height: 9px;
+ list-style: none outside none;
+ margin: 10px 5px 0 0;
+ overflow: hidden;
+ padding: 0;
+ width: 9px;
+}
+.yui3-skin-sam .yui3-carousel-nav ul:after {
+ clear: both;
+ content: ".";
+ display: block;
+ height: 0;
+ visibility: hidden;
+}
+.yui3-skin-sam .yui3-carousel-nav ul li a {
+ display: block;
+ height: 100%;
+ overflow: hidden;
+ text-align: right;
+ text-indent: -10000px;
+ width: 100%;
+}
+.yui3-skin-sam .yui3-carousel-nav ul li.yui3-carousel-nav-item-selected { background-position: 0 -700px }
View
1 build/gallery-carousel-rtl/assets/skins/sam/gallery-carousel-rtl.css
@@ -0,0 +1 @@
+.yui3-js-enabled .yui3-carousel-loading{right:-1000em;position:absolute;top:-1000em}.yui3-js-enabled .yui3-carousel-hidden{right:-10000em;position:absolute;top:-10000em}.yui3-js-enabled .yui3-carousel-content{margin:0 auto;overflow:hidden;padding:0;position:relative;text-align:right;*margin:0}.yui3-js-enabled .yui3-carousel-content li{list-style:none;margin:1px;overflow:hidden;padding:0;position:absolute;text-align:center}.yui3-js-enabled .yui3-carousel-vertical .yui3-carousel-content li{display:block}.yui3-js-enabled .yui3-carousel-horizontal .yui3-carousel-content{width:100000px}.yui3-js-enabled .yui3-carousel-vertical .yui3-carousel-content{height:100000px}.yui3-js-enabled .yui3-carousel-vertical{min-width:114px}.yui3-js-enabled .yui3-carousel-nav{position:relative;z-index:1}.yui3-skin-sam .yui3-carousel{border:1px solid #808080;overflow:hidden;position:relative;text-align:right}.yui3-skin-sam .yui3-carousel-content li{border:1px solid #ccc}.yui3-skin-sam .yui3-carousel-content li.yui3-carousel-selected{border:1px dotted #000}.yui3-skin-sam .yui3-carousel-nav{background:url("sprite.png") repeat-x scroll 0 0 transparent;margin:0;padding:3px;text-align:left}.yui3-skin-sam .yui3-carousel-nav:after{clear:both;content:".";display:block;height:0;visibility:hidden}.yui3-skin-sam .yui3-carousel-button{background:url("sprite.png") repeat-x scroll 0 -600px transparent;float:left;height:19px;margin:5px;overflow:hidden;width:40px}.yui3-skin-sam .yui3-carousel-vertical .yui3-carousel-button{background-position:0 -800px}.yui3-skin-sam .yui3-carousel-button-disabled{background-position:0 -2000px}.yui3-skin-sam .yui3-carousel-vertical .yui3-carousel-button-disabled{background-position:0 -2100px}.yui3-skin-sam .yui3-carousel-button button{background-color:transparent;border:0 none;cursor:pointer;display:block;height:44px;margin:-2px -2px 0 0;padding:0 50px 0 0}.yui3-skin-sam .yui3-carousel-first-button{margin-right:-100px;margin-left:50px}.yui3-skin-sam .yui3-carousel-next-button{background-position:0 -550px}.yui3-skin-sam .yui3-carousel-vertical .yui3-carousel-first-button{background-position:0 -750px}.yui3-skin-sam .yui3-carousel-nav ul{float:left;height:19px;margin:0 -220px 0 100px;padding:0}.yui3-skin-sam .yui3-carousel-vertical .yui3-carousel-nav ul{float:none;margin:0}.yui3-skin-sam .yui3-carousel-nav ul li{background:url("sprite.png") no-repeat scroll 0 -650px transparent;cursor:pointer;float:right;height:9px;list-style:none outside none;margin:10px 5px 0 0;overflow:hidden;padding:0;width:9px}.yui3-skin-sam .yui3-carousel-nav ul:after{clear:both;content:".";display:block;height:0;visibility:hidden}.yui3-skin-sam .yui3-carousel-nav ul li a{display:block;height:100%;overflow:hidden;text-align:right;text-indent:-10000px;width:100%}.yui3-skin-sam .yui3-carousel-nav ul li.yui3-carousel-nav-item-selected{background-position:0 -700px}
View
BIN build/gallery-carousel-rtl/assets/skins/sam/sprite.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
120 build/gallery-carousel-rtl/gallery-carousel-rtl-debug.js
@@ -0,0 +1,120 @@
+YUI.add('gallery-carousel-rtl', function(Y) {
+
+//constructor
+function CarouselRTLPlugin () {
+ CarouselRTLPlugin.superclass.constructor.apply(this, arguments);
+}
+var JS = Y.Lang;
+
+
+//Module stuff
+CarouselRTLPlugin.NAME = "carouselRTLPlugin";
+CarouselRTLPlugin.NS = "rtl";
+
+CarouselRTLPlugin.ATTRS = {
+ animation: {
+ validator: "_validateAnimation",
+ value: { speed: 0, effect: Y.Easing.easeOut }
+ }
+};
+
+
+//helper functions
+function fixDir (elem) {
+ var left = elem.getStyle("left");
+ elem
+ .setStyle("left", null)
+ .setStyle("right", left);
+}
+//Class
+Y.CarouselRTLPlugin = Y.extend(CarouselRTLPlugin, Y.Plugin.Base, {
+ initializer: function (config) {
+ //After the plugin is fully loaded and rendered fix its direction
+ this.afterHostMethod("render", this.renderFix);
+ this.beforeHostMethod("scrollTo", this.storePos);
+ this.afterHostMethod("scrollTo", this.fixScroll);
+ },
+
+ renderFix: function () {
+ var carousel = this.get("host"),
+ boundingBox = carousel.get("boundingBox"),
+ items = carousel.get("contentBox").get("children");
+
+ //Change the css direction of the container
+ boundingBox.setStyle("direction", "rtl");
+
+ //Replace list items css left property with "right"
+ items.each(fixDir);
+
+ },
+
+ fixScroll: function (index) {
+ var animation = this.get("animation");
+ if (animation.speed){
+ this.animateAndScrollTo(index);
+ } else {
+ fixDir(this.get("host").get("contentBox"));
+ }
+ },
+
+ storePos: function () {
+ var right = parseInt(this.get("host").get("contentBox").getStyle("right"), 10);
+ right = JS.isValue(right) ? right : 0;
+ this.set("right", right);
+ },
+
+ animateAndScrollTo: function (index) {
+ var self = this, carousel = self.get("host"),
+ anim, animation, cb, first, from, isVertical, to;
+
+ if (carousel.get("rendered")) {
+ animation = self.get("animation");
+ index = carousel._getCorrectedIndex(index);
+ cb = carousel.get("contentBox");
+ isVertical = carousel.get("isVertical");
+ if (isVertical) {
+ from = { top: carousel.get("top") };
+ to = { top: carousel._getOffsetForIndex(index) };
+ } else {
+ cb.setStyle("right", this.get("right"));
+ cb.setStyle("left", null);
+ from = { right: carousel.get("right") };
+ to = { right: carousel._getOffsetForIndex(index) };
+ }
+ first = carousel.getFirstVisible();
+ anim = new Y.Anim({
+ node: cb,
+ from: from,
+ to: to,
+ duration: animation.speed,
+ easing: animation.effect
+ });
+ anim.on("end", Y.bind(self._afterAnimEnd, self, index));
+ anim.run();
+ return new Y.Do.Prevent();
+ }
+ return false;
+ },
+
+ _afterAnimEnd: function (pos) {
+ var self = this, carousel = self.get("host");
+ carousel.set("selectedItem", pos);
+ },
+
+ _validateAnimation: function (config) {
+ var rv = false;
+ if (JS.isObject(config)) {
+ if (JS.isNumber(config.speed)) {
+ rv = true;
+ }
+ if (!JS.isUndefined(config.effect) &&
+ !JS.isFunction(config.effect)) {
+ rv = false;
+ }
+ }
+ return rv;
+ }
+});
+
+
+}, 'gallery-2011.06.01-20-18' ,{skinnable:true, requires:['substitute','gallery-carousel','anim','plugin','pluginhost']});
View
1 build/gallery-carousel-rtl/gallery-carousel-rtl-min.js
@@ -0,0 +1 @@
+YUI.add("gallery-carousel-rtl",function(d){function b(){b.superclass.constructor.apply(this,arguments);}var c=d.Lang;b.NAME="carouselRTLPlugin";b.NS="rtl";b.ATTRS={animation:{validator:"_validateAnimation",value:{speed:0,effect:d.Easing.easeOut}}};function a(e){var f=e.getStyle("left");e.setStyle("left",null).setStyle("right",f);}d.CarouselRTLPlugin=d.extend(b,d.Plugin.Base,{initializer:function(e){this.afterHostMethod("render",this.renderFix);this.beforeHostMethod("scrollTo",this.storePos);this.afterHostMethod("scrollTo",this.fixScroll);},renderFix:function(){var g=this.get("host"),f=g.get("boundingBox"),e=g.get("contentBox").get("children");f.setStyle("direction","rtl");e.each(a);},fixScroll:function(e){var f=this.get("animation");if(f.speed){this.animateAndScrollTo(e);}else{a(this.get("host").get("contentBox"));}},storePos:function(){var e=parseInt(this.get("host").get("contentBox").getStyle("right"),10);e=c.isValue(e)?e:0;this.set("right",e);},animateAndScrollTo:function(i){var n=this,m=n.get("host"),f,g,e,h,l,j,k;if(m.get("rendered")){g=n.get("animation");i=m._getCorrectedIndex(i);e=m.get("contentBox");j=m.get("isVertical");if(j){l={top:m.get("top")};k={top:m._getOffsetForIndex(i)};}else{e.setStyle("right",this.get("right"));e.setStyle("left",null);l={right:m.get("right")};k={right:m._getOffsetForIndex(i)};}h=m.getFirstVisible();f=new d.Anim({node:e,from:l,to:k,duration:g.speed,easing:g.effect});f.on("end",d.bind(n._afterAnimEnd,n,i));f.run();return new d.Do.Prevent();}return false;},_afterAnimEnd:function(g){var e=this,f=e.get("host");f.set("selectedItem",g);},_validateAnimation:function(e){var f=false;if(c.isObject(e)){if(c.isNumber(e.speed)){f=true;}if(!c.isUndefined(e.effect)&&!c.isFunction(e.effect)){f=false;}}return f;}});},"gallery-2011.06.01-20-18",{skinnable:true,requires:["substitute","gallery-carousel","anim","plugin","pluginhost"]});
View
120 build/gallery-carousel-rtl/gallery-carousel-rtl.js
@@ -0,0 +1,120 @@
+YUI.add('gallery-carousel-rtl', function(Y) {
+
+//constructor
+function CarouselRTLPlugin () {
+ CarouselRTLPlugin.superclass.constructor.apply(this, arguments);
+}
+var JS = Y.Lang;
+
+
+//Module stuff
+CarouselRTLPlugin.NAME = "carouselRTLPlugin";
+CarouselRTLPlugin.NS = "rtl";
+
+CarouselRTLPlugin.ATTRS = {
+ animation: {
+ validator: "_validateAnimation",
+ value: { speed: 0, effect: Y.Easing.easeOut }
+ }
+};
+
+
+//helper functions
+function fixDir (elem) {
+ var left = elem.getStyle("left");
+ elem
+ .setStyle("left", null)
+ .setStyle("right", left);
+}
+//Class
+Y.CarouselRTLPlugin = Y.extend(CarouselRTLPlugin, Y.Plugin.Base, {
+ initializer: function (config) {
+ //After the plugin is fully loaded and rendered fix its direction
+ this.afterHostMethod("render", this.renderFix);
+ this.beforeHostMethod("scrollTo", this.storePos);
+ this.afterHostMethod("scrollTo", this.fixScroll);
+ },
+
+ renderFix: function () {
+ var carousel = this.get("host"),
+ boundingBox = carousel.get("boundingBox"),
+ items = carousel.get("contentBox").get("children");
+
+ //Change the css direction of the container
+ boundingBox.setStyle("direction", "rtl");
+
+ //Replace list items css left property with "right"
+ items.each(fixDir);
+
+ },
+
+ fixScroll: function (index) {
+ var animation = this.get("animation");
+ if (animation.speed){
+ this.animateAndScrollTo(index);
+ } else {
+ fixDir(this.get("host").get("contentBox"));
+ }
+ },
+
+ storePos: function () {
+ var right = parseInt(this.get("host").get("contentBox").getStyle("right"), 10);
+ right = JS.isValue(right) ? right : 0;
+ this.set("right", right);
+ },
+
+ animateAndScrollTo: function (index) {
+ var self = this, carousel = self.get("host"),
+ anim, animation, cb, first, from, isVertical, to;
+
+ if (carousel.get("rendered")) {
+ animation = self.get("animation");
+ index = carousel._getCorrectedIndex(index);
+ cb = carousel.get("contentBox");
+ isVertical = carousel.get("isVertical");
+ if (isVertical) {
+ from = { top: carousel.get("top") };
+ to = { top: carousel._getOffsetForIndex(index) };
+ } else {
+ cb.setStyle("right", this.get("right"));
+ cb.setStyle("left", null);
+ from = { right: carousel.get("right") };
+ to = { right: carousel._getOffsetForIndex(index) };
+ }
+ first = carousel.getFirstVisible();
+ anim = new Y.Anim({
+ node: cb,
+ from: from,
+ to: to,
+ duration: animation.speed,
+ easing: animation.effect
+ });
+ anim.on("end", Y.bind(self._afterAnimEnd, self, index));
+ anim.run();
+ return new Y.Do.Prevent();
+ }
+ return false;
+ },
+
+ _afterAnimEnd: function (pos) {
+ var self = this, carousel = self.get("host");
+ carousel.set("selectedItem", pos);
+ },
+
+ _validateAnimation: function (config) {
+ var rv = false;
+ if (JS.isObject(config)) {
+ if (JS.isNumber(config.speed)) {
+ rv = true;
+ }
+ if (!JS.isUndefined(config.effect) &&
+ !JS.isFunction(config.effect)) {
+ rv = false;
+ }
+ }
+ return rv;
+ }
+});
+
+
+}, 'gallery-2011.06.01-20-18' ,{skinnable:true, requires:['substitute','gallery-carousel','anim','plugin','pluginhost']});
View
7 build/gallery-checkboxgroups/gallery-checkboxgroups-debug.js
@@ -89,11 +89,6 @@ Y.Array.each(ArrayMethods, function(name) {
function CheckboxGroup(
/* string/Node/NodeList */ cb_list)
{
- if (arguments.length === 0) // derived class prototype
- {
- return;
- }
-
this.cb_list = new Y.NodeList('');
this.ev_list = [];
this.splice(0, 0, cb_list);
@@ -465,4 +460,4 @@ Y.extend(EnableIfAnyCheckboxGroup, CheckboxGroup,
Y.EnableIfAnyCheckboxGroup = EnableIfAnyCheckboxGroup;
-}, 'gallery-2011.02.09-21-32' ,{requires:['node-base']});
+}, 'gallery-2011.06.01-20-18' ,{requires:['node-base']});
View
2 build/gallery-checkboxgroups/gallery-checkboxgroups-min.js
@@ -1 +1 @@
-YUI.add("gallery-checkboxgroups",function(b){var k=b.NodeList,i=Array.prototype,h=["concat","pop","push","shift","slice","splice","unshift"];b.Array.each(h,function(m){k.prototype[m]=function(){var o=[],p,n;for(p=0;p<arguments.length;p++){n=arguments[p];o.push(n._node||n._nodes||n);}return b.Node.scrubVal(i[m].apply(this._nodes,o));};});"use strict";function e(m){if(arguments.length===0){return;}this.cb_list=new b.NodeList("");this.ev_list=[];this.splice(0,0,m);this.ignore_change=false;}function f(n,m){this.checkboxChanged(n.target);}e.prototype={getCheckboxList:function(){return this.cb_list;},splice:function(p,o,m){for(var n=p;n<o;n++){this.ev_list[n].detach();}if(b.Lang.isString(m)){m=b.all(m);}if(m instanceof b.NodeList){m.each(function(q,t){var s=p+t,r=(t===0?o:0);this.cb_list.splice(s,r,q);this.ev_list.splice(s,r,q.on("click",f,this));},this);}else{if(m instanceof b.Node){this.cb_list.splice(p,o,m);this.ev_list.splice(p,o,m.on("click",f,this));}else{this.cb_list.splice(p,o);this.ev_list.splice(p,o);}}},checkboxChanged:function(m){if(this.ignore_change||this.cb_list.isEmpty()||this.allDisabled()){return;}m=b.one(m);this.cb_list.each(function(n,o){if(n==m){this.enforceConstraints(this.cb_list,o);}},this);},enforceConstraints:function(m,n){},allChecked:function(){var o=this.cb_list.size();for(var n=0;n<o;n++){var m=this.cb_list.item(n);if(!m.get("disabled")&&!m.get("checked")){return false;}}return true;},allUnchecked:function(){var n=this.cb_list.size();for(var m=0;m<n;m++){if(this.cb_list.item(m).get("checked")){return false;}}return true;},allDisabled:function(){var n=this.cb_list.size();for(var m=0;m<n;m++){if(!this.cb_list.item(m).get("disabled")){return false;}}return true;}};b.CheckboxGroup=e;function j(m){this.direction=g.SLIDE_UP;j.superclass.constructor.call(this,m);}var g={SLIDE_UP:0,SLIDE_DOWN:1};function c(n,o){if(n.size()<2){return o;}var m=o;do{if(m===0){this.direction=g.SLIDE_DOWN;}else{if(m==n.size()-1){this.direction=g.SLIDE_UP;}}if(this.direction==g.SLIDE_UP){m=Math.max(0,m-1);}else{m=Math.min(n.size()-1,m+1);}}while(n.item(m).get("disabled"));return m;}b.extend(j,e,{enforceConstraints:function(n,o){if(n.item(o).get("checked")||!this.allUnchecked()){this.direction=g.SLIDE_UP;return;}var m=c.call(this,n,o);if(m==o){m=c.call(this,n,o);}this.ignore_change=true;n.item(m).set("checked",true);this.ignore_change=false;}});b.AtLeastOneCheckboxGroup=j;function l(m){l.superclass.constructor.call(this,m);}b.extend(l,e,{enforceConstraints:function(m,n){if(!m.item(n).get("checked")){return;}var p=m.size();for(var o=0;o<p;o++){if(o!=n){m.item(o).set("checked",false);}}}});b.AtMostOneCheckboxGroup=l;function a(n,m){this.select_all_cb=b.one(n);this.select_all_cb.on("click",this.toggleSelectAll,this);a.superclass.constructor.call(this,m);}b.extend(a,e,{getSelectAllCheckbox:function(){return this.select_all_cb;},toggleSelectAll:function(){var p=this.select_all_cb.get("checked");var o=this.cb_list.size();for(var n=0;n<o;n++){var m=this.cb_list.item(n);if(!m.get("disabled")){m.set("checked",p);}}},enforceConstraints:function(m,n){this.select_all_cb.set("checked",this.allChecked());}});b.SelectAllCheckboxGroup=a;function d(n,m){this.nodes=b.Lang.isString(m)?b.all(m):m;d.superclass.constructor.call(this,n);this.enforceConstraints(this.cb_list,0);}b.extend(d,e,{enforceConstraints:function(m,o){var n=this.allUnchecked();this.nodes.each(function(p){p.set("disabled",n);});}});b.EnableIfAnyCheckboxGroup=d;},"gallery-2011.02.09-21-32",{requires:["node-base"]});
+YUI.add("gallery-checkboxgroups",function(b){var k=b.NodeList,i=Array.prototype,h=["concat","pop","push","shift","slice","splice","unshift"];b.Array.each(h,function(m){k.prototype[m]=function(){var o=[],p,n;for(p=0;p<arguments.length;p++){n=arguments[p];o.push(n._node||n._nodes||n);}return b.Node.scrubVal(i[m].apply(this._nodes,o));};});"use strict";function e(m){this.cb_list=new b.NodeList("");this.ev_list=[];this.splice(0,0,m);this.ignore_change=false;}function f(n,m){this.checkboxChanged(n.target);}e.prototype={getCheckboxList:function(){return this.cb_list;},splice:function(p,o,m){for(var n=p;n<o;n++){this.ev_list[n].detach();}if(b.Lang.isString(m)){m=b.all(m);}if(m instanceof b.NodeList){m.each(function(q,t){var s=p+t,r=(t===0?o:0);this.cb_list.splice(s,r,q);this.ev_list.splice(s,r,q.on("click",f,this));},this);}else{if(m instanceof b.Node){this.cb_list.splice(p,o,m);this.ev_list.splice(p,o,m.on("click",f,this));}else{this.cb_list.splice(p,o);this.ev_list.splice(p,o);}}},checkboxChanged:function(m){if(this.ignore_change||this.cb_list.isEmpty()||this.allDisabled()){return;}m=b.one(m);this.cb_list.each(function(n,o){if(n==m){this.enforceConstraints(this.cb_list,o);}},this);},enforceConstraints:function(m,n){},allChecked:function(){var o=this.cb_list.size();for(var n=0;n<o;n++){var m=this.cb_list.item(n);if(!m.get("disabled")&&!m.get("checked")){return false;}}return true;},allUnchecked:function(){var n=this.cb_list.size();for(var m=0;m<n;m++){if(this.cb_list.item(m).get("checked")){return false;}}return true;},allDisabled:function(){var n=this.cb_list.size();for(var m=0;m<n;m++){if(!this.cb_list.item(m).get("disabled")){return false;}}return true;}};b.CheckboxGroup=e;function j(m){this.direction=g.SLIDE_UP;j.superclass.constructor.call(this,m);}var g={SLIDE_UP:0,SLIDE_DOWN:1};function c(n,o){if(n.size()<2){return o;}var m=o;do{if(m===0){this.direction=g.SLIDE_DOWN;}else{if(m==n.size()-1){this.direction=g.SLIDE_UP;}}if(this.direction==g.SLIDE_UP){m=Math.max(0,m-1);}else{m=Math.min(n.size()-1,m+1);}}while(n.item(m).get("disabled"));return m;}b.extend(j,e,{enforceConstraints:function(n,o){if(n.item(o).get("checked")||!this.allUnchecked()){this.direction=g.SLIDE_UP;return;}var m=c.call(this,n,o);if(m==o){m=c.call(this,n,o);}this.ignore_change=true;n.item(m).set("checked",true);this.ignore_change=false;}});b.AtLeastOneCheckboxGroup=j;function l(m){l.superclass.constructor.call(this,m);}b.extend(l,e,{enforceConstraints:function(m,n){if(!m.item(n).get("checked")){return;}var p=m.size();for(var o=0;o<p;o++){if(o!=n){m.item(o).set("checked",false);}}}});b.AtMostOneCheckboxGroup=l;function a(n,m){this.select_all_cb=b.one(n);this.select_all_cb.on("click",this.toggleSelectAll,this);a.superclass.constructor.call(this,m);}b.extend(a,e,{getSelectAllCheckbox:function(){return this.select_all_cb;},toggleSelectAll:function(){var p=this.select_all_cb.get("checked");var o=this.cb_list.size();for(var n=0;n<o;n++){var m=this.cb_list.item(n);if(!m.get("disabled")){m.set("checked",p);}}},enforceConstraints:function(m,n){this.select_all_cb.set("checked",this.allChecked());}});b.SelectAllCheckboxGroup=a;function d(n,m){this.nodes=b.Lang.isString(m)?b.all(m):m;d.superclass.constructor.call(this,n);this.enforceConstraints(this.cb_list,0);}b.extend(d,e,{enforceConstraints:function(m,o){var n=this.allUnchecked();this.nodes.each(function(p){p.set("disabled",n);});}});b.EnableIfAnyCheckboxGroup=d;},"gallery-2011.06.01-20-18",{requires:["node-base"]});
View
7 build/gallery-checkboxgroups/gallery-checkboxgroups.js
@@ -89,11 +89,6 @@ Y.Array.each(ArrayMethods, function(name) {
function CheckboxGroup(
/* string/Node/NodeList */ cb_list)
{
- if (arguments.length === 0) // derived class prototype
- {
- return;
- }
-
this.cb_list = new Y.NodeList('');
this.ev_list = [];
this.splice(0, 0, cb_list);
@@ -465,4 +460,4 @@ Y.extend(EnableIfAnyCheckboxGroup, CheckboxGroup,
Y.EnableIfAnyCheckboxGroup = EnableIfAnyCheckboxGroup;
-}, 'gallery-2011.02.09-21-32' ,{requires:['node-base']});
+}, 'gallery-2011.06.01-20-18' ,{requires:['node-base']});
View
131 build/gallery-dropdown/gallery-dropdown-debug.js
@@ -0,0 +1,131 @@
+YUI.add('gallery-dropdown', function(Y) {
+
+/**
+ * DropDown plugin to convert html select into div based structure.
+ * @module gallery-dropdown
+ */
+
+Y.namespace("HTML");
+Y.HTML.DropDown = function(conf) {
+ this.init(conf);
+}
+Y.HTML.DropDown.prototype = {
+ init: function(conf) {
+ this.setDefaults(conf);
+ this.transform();
+ },
+
+ setDefaults: function(conf){
+ if(!conf)
+ conf = {};
+ conf.src = (conf.src) ? conf.src : 'select';
+ conf.resize = (conf.resize != undefined) ? conf.resize : true;
+ this.conf = conf;
+ this.srcNode = Y.all(this.conf.src);
+ },
+
+ transform: function() {
+ this.srcNode.each( function(select, i) {
+ if(select.get('tagName') == 'SELECT' || select.get('tagName') == 'select') {
+ var selectName = select.get("name"),
+ selectWidth = select.getStyle('width');
+ var markupStart = '<div class="yui-gallery-select">',
+ defaultSelect = {
+ markup: '',
+ value: ''
+ },
+ selectId = select.getAttribute('id'),
+ selectClass = select.getAttribute('class'),
+ markup = ['<div class="container"><ul>'];
+ if(select.all("optgroup").size() > 0) {
+ select.all("optgroup").each( function(optGrpNode, j) {
+ var label = optGrpNode.get("label");
+ markup.push('<li>' + label + '<ul>');
+ optGrpNode.get("options").each( function(node, i) {
+ this.buildMarkup(node, markup, defaultSelect, i + j);
+ },this);
+ markup.push('</ul></li>');
+ },this);
+ } else {
+ select.get("options").each( function(node, i) {
+ this.buildMarkup(node, markup, defaultSelect, i);
+ }, this);
+ }
+
+ markup.push('</ul></div><input type="hidden" name="' + selectName + '" value="' + defaultSelect.value + '"/></div>');
+ markup = markupStart + defaultSelect.markup + markup.join('');
+ var newSelect = Y.Node.create(markup);
+ select.insert(newSelect, select);
+ select.remove(true);
+ newSelect.set('id', selectId);
+ newSelect.set('className', selectClass+' '+newSelect.get('className'));
+ if(this.conf.resize){
+ this.resizeWidth(newSelect, selectWidth);
+ }
+ newSelect.one('.anchor').plug(Y.Plugin.SimpleMenu);
+ this.registerEvents(newSelect);
+ }
+ },this);
+ },
+
+ resizeWidth: function(select, width){
+ width = parseInt(width,10) + 20;
+ select.one('.anchor').setStyle('width',width + 'px');
+ select.one('.container').setStyle('width',(width + 20) + 'px');
+ },
+
+ buildMarkup: function(node, markup, defaultSelect, i) {
+ var selected = node.get('selected'),
+ title = node.get('title'),
+ value = node.get('value'),
+ text = node.get('text'),
+ title_text = '';
+ if(title) {
+ title_text = ' title="' + title + '"';
+ }
+ if(i==0 || selected) {
+ defaultSelect.markup = '<a class="anchor" href="#"><label>' + text + '</label><span class="arrow"><label></label></span></a>';
+ defaultSelect.value = value;
+ }
+ if(selected) {
+ markup.push('<li><strong' + title_text + ' value="' + value + '">' + text + '</strong></li>');
+ } else {
+ markup.push('<li><a' + title_text + ' value="' + value + '">' + text + '</a></li>');
+ }
+ },
+
+ registerEvents: function(select) {
+ select.delegate("click", function(e, self) {
+ var elem = e.currentTarget;
+ var text = elem.get('text'),
+ value = elem.getAttribute('value'),
+ title = elem.getAttribute('title'),
+ title_text = '',
+ oldValue = self.one('input').get('value'),
+ oldText = self.one(".anchor label").get('text');
+ if(title) {
+ title_text = ' title="' + title + '"';
+ }
+ self.one(".anchor label").set('text', text);
+ self.one('input').set('value', value);
+
+ var oldNode = select.one("strong");
+ var oldTitle = oldNode.getAttribute('title'),
+ old_title_text = '';
+ if(oldTitle) {
+ old_title_text = ' title="' + oldTitle + '"';
+ }
+ var newUnselectedMarkup = '<a' + old_title_text + ' value="' + oldValue + '">' + oldText + '</a>';
+ oldNode.insert(newUnselectedMarkup, oldNode);
+ oldNode.remove(true);
+
+ var newSelectedMarkup = '<strong' + title_text + ' value="' + value + '">' + text + '</strong>';
+ elem.insert(newSelectedMarkup, elem);
+ elem.remove(true);
+ select.one(".container").removeClass("menu-visible");
+ },".container a", this, select);
+ }
+};
+
+
+}, 'gallery-2011.06.01-20-18' ,{requires:['node', 'event', 'gallery-simple-menu']});
View
1 build/gallery-dropdown/gallery-dropdown-min.js
@@ -0,0 +1 @@
+YUI.add("gallery-dropdown",function(a){a.namespace("HTML");a.HTML.DropDown=function(b){this.init(b);};a.HTML.DropDown.prototype={init:function(b){this.setDefaults(b);this.transform();},setDefaults:function(b){if(!b){b={};}b.src=(b.src)?b.src:"select";b.resize=(b.resize!=undefined)?b.resize:true;this.conf=b;this.srcNode=a.all(this.conf.src);},transform:function(){this.srcNode.each(function(h,f){if(h.get("tagName")=="SELECT"||h.get("tagName")=="select"){var d=h.get("name"),e=h.getStyle("width");var b='<div class="yui-gallery-select">',l={markup:"",value:""},c=h.getAttribute("id"),g=h.getAttribute("class"),k=['<div class="container"><ul>'];if(h.all("optgroup").size()>0){h.all("optgroup").each(function(n,m){var i=n.get("label");k.push("<li>"+i+"<ul>");n.get("options").each(function(p,o){this.buildMarkup(p,k,l,o+m);},this);k.push("</ul></li>");},this);}else{h.get("options").each(function(n,m){this.buildMarkup(n,k,l,m);},this);}k.push('</ul></div><input type="hidden" name="'+d+'" value="'+l.value+'"/></div>');k=b+l.markup+k.join("");var j=a.Node.create(k);h.insert(j,h);h.remove(true);j.set("id",c);j.set("className",g+" "+j.get("className"));if(this.conf.resize){this.resizeWidth(j,e);}j.one(".anchor").plug(a.Plugin.SimpleMenu);this.registerEvents(j);}},this);},resizeWidth:function(b,c){c=parseInt(c,10)+20;b.one(".anchor").setStyle("width",c+"px");b.one(".container").setStyle("width",(c+20)+"px");},buildMarkup:function(b,k,j,d){var c=b.get("selected"),f=b.get("title"),g=b.get("value"),h=b.get("text"),e="";if(f){e=' title="'+f+'"';}if(d==0||c){j.markup='<a class="anchor" href="#"><label>'+h+'</label><span class="arrow"><label></label></span></a>';j.value=g;}if(c){k.push("<li><strong"+e+' value="'+g+'">'+h+"</strong></li>");}else{k.push("<li><a"+e+' value="'+g+'">'+h+"</a></li>");}},registerEvents:function(b){b.delegate("click",function(j,p){var f=j.currentTarget;var n=f.get("text"),l=f.getAttribute("value"),k=f.getAttribute("title"),h="",c=p.one("input").get("value"),o=p.one(".anchor label").get("text");if(k){h=' title="'+k+'"';}p.one(".anchor label").set("text",n);p.one("input").set("value",l);var g=b.one("strong");var q=g.getAttribute("title"),m="";if(q){m=' title="'+q+'"';}var d="<a"+m+' value="'+c+'">'+o+"</a>";g.insert(d,g);g.remove(true);var i="<strong"+h+' value="'+l+'">'+n+"</strong>";f.insert(i,f);f.remove(true);b.one(".container").removeClass("menu-visible");},".container a",this,b);}};},"gallery-2011.06.01-20-18",{requires:["node","event","gallery-simple-menu"]});
View
131 build/gallery-dropdown/gallery-dropdown.js
@@ -0,0 +1,131 @@
+YUI.add('gallery-dropdown', function(Y) {
+
+/**
+ * DropDown plugin to convert html select into div based structure.
+ * @module gallery-dropdown
+ */
+
+Y.namespace("HTML");
+Y.HTML.DropDown = function(conf) {
+ this.init(conf);
+}
+Y.HTML.DropDown.prototype = {
+ init: function(conf) {
+ this.setDefaults(conf);
+ this.transform();
+ },
+
+ setDefaults: function(conf){
+ if(!conf)
+ conf = {};
+ conf.src = (conf.src) ? conf.src : 'select';
+ conf.resize = (conf.resize != undefined) ? conf.resize : true;
+ this.conf = conf;
+ this.srcNode = Y.all(this.conf.src);
+ },
+
+ transform: function() {
+ this.srcNode.each( function(select, i) {
+ if(select.get('tagName') == 'SELECT' || select.get('tagName') == 'select') {
+ var selectName = select.get("name"),
+ selectWidth = select.getStyle('width');
+ var markupStart = '<div class="yui-gallery-select">',
+ defaultSelect = {
+ markup: '',
+ value: ''
+ },
+ selectId = select.getAttribute('id'),
+ selectClass = select.getAttribute('class'),
+ markup = ['<div class="container"><ul>'];
+ if(select.all("optgroup").size() > 0) {
+ select.all("optgroup").each( function(optGrpNode, j) {
+ var label = optGrpNode.get("label");
+ markup.push('<li>' + label + '<ul>');
+ optGrpNode.get("options").each( function(node, i) {
+ this.buildMarkup(node, markup, defaultSelect, i + j);
+ },this);
+ markup.push('</ul></li>');
+ },this);
+ } else {
+ select.get("options").each( function(node, i) {
+ this.buildMarkup(node, markup, defaultSelect, i);
+ }, this);
+ }
+
+ markup.push('</ul></div><input type="hidden" name="' + selectName + '" value="' + defaultSelect.value + '"/></div>');
+ markup = markupStart + defaultSelect.markup + markup.join('');
+ var newSelect = Y.Node.create(markup);
+ select.insert(newSelect, select);
+ select.remove(true);
+ newSelect.set('id', selectId);
+ newSelect.set('className', selectClass+' '+newSelect.get('className'));
+ if(this.conf.resize){
+ this.resizeWidth(newSelect, selectWidth);
+ }
+ newSelect.one('.anchor').plug(Y.Plugin.SimpleMenu);
+ this.registerEvents(newSelect);
+ }
+ },this);
+ },
+
+ resizeWidth: function(select, width){
+ width = parseInt(width,10) + 20;
+ select.one('.anchor').setStyle('width',width + 'px');
+ select.one('.container').setStyle('width',(width + 20) + 'px');
+ },
+
+ buildMarkup: function(node, markup, defaultSelect, i) {
+ var selected = node.get('selected'),
+ title = node.get('title'),
+ value = node.get('value'),
+ text = node.get('text'),
+ title_text = '';
+ if(title) {
+ title_text = ' title="' + title + '"';
+ }
+ if(i==0 || selected) {
+ defaultSelect.markup = '<a class="anchor" href="#"><label>' + text + '</label><span class="arrow"><label></label></span></a>';
+ defaultSelect.value = value;
+ }
+ if(selected) {
+ markup.push('<li><strong' + title_text + ' value="' + value + '">' + text + '</strong></li>');
+ } else {
+ markup.push('<li><a' + title_text + ' value="' + value + '">' + text + '</a></li>');
+ }
+ },
+
+ registerEvents: function(select) {
+ select.delegate("click", function(e, self) {
+ var elem = e.currentTarget;
+ var text = elem.get('text'),
+ value = elem.getAttribute('value'),
+ title = elem.getAttribute('title'),
+ title_text = '',
+ oldValue = self.one('input').get('value'),
+ oldText = self.one(".anchor label").get('text');
+ if(title) {
+ title_text = ' title="' + title + '"';
+ }
+ self.one(".anchor label").set('text', text);
+ self.one('input').set('value', value);
+
+ var oldNode = select.one("strong");
+ var oldTitle = oldNode.getAttribute('title'),
+ old_title_text = '';
+ if(oldTitle) {
+ old_title_text = ' title="' + oldTitle + '"';
+ }
+ var newUnselectedMarkup = '<a' + old_title_text + ' value="' + oldValue + '">' + oldText + '</a>';
+ oldNode.insert(newUnselectedMarkup, oldNode);
+ oldNode.remove(true);
+
+ var newSelectedMarkup = '<strong' + title_text + ' value="' + value + '">' + text + '</strong>';
+ elem.insert(newSelectedMarkup, elem);
+ elem.remove(true);
+ select.one(".container").removeClass("menu-visible");
+ },".container a", this, select);
+ }
+};
+
+
+}, 'gallery-2011.06.01-20-18' ,{requires:['node', 'event', 'gallery-simple-menu']});
View
7 build/gallery-exprbuilder/gallery-exprbuilder-debug.js
@@ -13,11 +13,6 @@ YUI.add('gallery-exprbuilder', function(Y) {
function ExpressionBuilder(config)
{
- if (arguments.length === 0) // derived class prototype
- {
- return;
- }
-
ExpressionBuilder.superclass.constructor.call(this, config);
}
@@ -621,4 +616,4 @@ Y.extend(ExpressionBuilder, Y.Widget,
Y.ExpressionBuilder = ExpressionBuilder;
-}, 'gallery-2011.02.16-20-31' ,{requires:['gallery-querybuilder','gallery-formmgr'], skinnable:true});
+}, 'gallery-2011.06.01-20-18' ,{requires:['gallery-querybuilder','gallery-formmgr'], skinnable:true});
View
2 build/gallery-exprbuilder/gallery-exprbuilder-min.js
@@ -1 +1 @@
-YUI.add("gallery-exprbuilder",function(b){function e(k){if(arguments.length===0){return;}e.superclass.constructor.call(this,k);}e.NAME="exprbuilder";e.ATTRS={fieldId:{value:b.guid(),validator:b.Lang.isString,writeOnce:true},fieldName:{value:"",validator:b.Lang.isString,writeOnce:true},formMgr:{validator:function(k){return(!k||k instanceof b.FormManager);},writeOnce:true},queryBuilder:{validator:function(k){return(!k||k instanceof b.QueryBuilder);},writeOnce:true},combinatorMap:{validator:b.Lang.isObject},parenLabel:{value:"()",validator:b.Lang.isString,writeOnce:true},andLabel:{value:"AND",validator:b.Lang.isString,writeOnce:true},orLabel:{value:"OR",validator:b.Lang.isString,writeOnce:true},notLabel:{value:"NOT",validator:b.Lang.isString,writeOnce:true},clearLabel:{value:"Clear",validator:b.Lang.isString,writeOnce:true},insertLabel:{value:"Insert",validator:b.Lang.isString,writeOnce:true},resetLabel:{value:"Cancel",validator:b.Lang.isString,writeOnce:true},tooManyParensError:{value:'The expression contains an extra closing parenthesis at "{context}...".',validator:b.Lang.isString},unmatchedSingleQuoteError:{value:'The expression contains an unmatched single quote at "{context}...".',validator:b.Lang.isString},unclosedParenError:{value:'The expression contains an unclosed parenthesis at "{context}...".',validator:b.Lang.isString},noVariableSelectedError:{value:"Please choose a variable.",validator:b.Lang.isString}};function f(){this.ie_range=document.selection.createRange();}function a(o,n){n=n||o.length;this.field.focus();var l=b.Node.getDOMNode(this.field);if(l.setSelectionRange){var p=l.selectionStart;l.value=l.value.substring(0,p)+o+l.value.substring(l.selectionEnd,l.value.length);var k=p+n;l.setSelectionRange(k,k);}else{if(document.selection){if(!this.ie_range){this.ie_range=document.selection.createRange();}var m=this.ie_range.duplicate();m.text=o;this.ie_range.move("character",n);this.ie_range.select();}}}function i(k){a.call(this,"()",1);k.halt();}function j(k){return function(l){a.call(this," "+this.get(k+"Label")+" ");l.halt();};}function d(k){this.clear();k.halt();}function h(t){if(!this.qb_form.validateForm()){t.halt();return;}var o=this.get("queryBuilder");var v=o.toDatabaseQuery();if(v.length===0){var n=o.get("contentBox").one("select");this.qb_form.displayMessage(n,this.get("noVariableSelectedError"),"error");t.halt();return;}var l=this.get("combinatorMap");var w="";var r=" "+this.get("andLabel")+" ";for(var p=0;p<v.length;p++){var k=v[p];if(p>0){w+=r;}w+=k[0];var u=k[1];if(u.indexOf("{")==-1){u+="{value}";}var m=l&&l[k[1]];if(m){r=m.operator;u=m.pattern;}w+=b.Lang.substitute(u,{value:k[2].replace(/'/g,"\\'")});}a.call(this,w);o.reset();t.halt();}function g(k){this.qb_form.clearMessages();this.get("queryBuilder").reset();k.halt();}function c(l){if(l){var k=this;l.setFunction(this.get("fieldId"),function(m,n){return k._validateExpression(m,n,this);});}}b.extend(e,b.Widget,{initializer:function(k){c.call(this,k.formMgr);this.after("formMgrChange",function(l){if(l.prevVal){l.prevVal.setFunction(this.get("fieldId"),null);}c.call(this,l.newVal);});},renderUI:function(){var m=b.guid();var k=this.get("contentBox");k.set("innerHTML",this._field());this.field=k.one("#"+this.get("fieldId"));if(document.selection){this.field.on("change",f,this);}k.one("."+this.getClassName("paren")).on("click",i,this);var o=["and","or","not"];for(var l=0;l<o.length;l++){k.one("."+this.getClassName(o[l])).on("click",j(o[l]),this);}k.one("."+this.getClassName("clear")).on("click",d,this);var n=this.get("queryBuilder");if(n){k.appendChild(b.Node.create(this._query(m)));n.render(k.one("."+this.getClassName("querybuilder")));k.one("."+this.getClassName("insert")).on("click",h,this);k.one("."+this.getClassName("reset")).on("click",g,this);this.qb_form=new b.FormManager(m);this.qb_form.prepareForm();}},destructor:function(){var k=this.get("queryBuilder");if(k){k.destroy();}this.ie_range=null;},clear:function(){this.field.set("value","");this.field.focus();},_validateExpression:function(m,q,r){var u=q.get("value");var t=0;var p=-1;var k=false;var l=-1;for(var o=0;o<u.length;o++){if(!k&&u[o]=="("){if(t===0){p=o;}t++;}else{if(!k&&u[o]==")"){t--;if(t<0){var n=b.Lang.substitute(this.get("tooManyParensError"),{context:u.substr(0,o+1)});r.displayMessage(q,n,"error");return false;}}else{if(u[o]=="'"&&(o===0||u[o-1]!="\\")){if(!k){l=o;}k=!k;}}}}if(k&&(t===0||l<p)){var n=b.Lang.substitute(this.get("unmatchedSingleQuoteError"),{context:u.substr(0,l+1)});r.displayMessage(q,n,"error");return false;}else{if(t>0){var n=b.Lang.substitute(this.get("unclosedParenError"),{context:u.substr(0,p+1)});r.displayMessage(q,n,"error");return false;}}return true;},_field:function(){var k='<div class="{td}">'+'<textarea id="{tid}" name="{tn}" class="formmgr-field {ta}"></textarea>'+"</div>"+'<div class="{fctl}">'+'<button class="{pc}">{paren}</button>'+'<button class="{ac}">{and}</button>'+'<button class="{oc}">{or}</button>'+'<button class="{nc}">{not}</button>'+'<button class="{cc}">{clear}</button>'+"</div>";return b.Lang.substitute(k,{td:this.getClassName("field-container"),ta:this.getClassName("field"),tid:this.get("fieldId"),tn:this.get("fieldName"),fctl:this.getClassName("controls"),pc:this.getClassName("paren"),ac:this.getClassName("and"),oc:this.getClassName("or"),nc:this.getClassName("not"),cc:this.getClassName("clear"),paren:this.get("parenLabel"),and:this.get("andLabel"),or:this.get("orLabel"),not:this.get("notLabel"),clear:this.get("clearLabel")});},_query:function(l){var k='<form name="{qbf}">'+'<div class="{qb}"></div>'+'<div class="{qbctl} formmgr-row">'+'<button class="{ic}">{insert}</button>'+'<button class="{rc}">{reset}</button>'+"</div>"+"</form>";return b.Lang.substitute(k,{qbf:l,qb:this.getClassName("querybuilder"),qbctl:this.getClassName("querybuilder-controls"),ic:this.getClassName("insert"),rc:this.getClassName("reset"),insert:this.get("insertLabel"),reset:this.get("resetLabel")});}});b.ExpressionBuilder=e;},"gallery-2011.02.16-20-31",{requires:["gallery-querybuilder","gallery-formmgr"],skinnable:true});
+YUI.add("gallery-exprbuilder",function(b){function e(k){e.superclass.constructor.call(this,k);}e.NAME="exprbuilder";e.ATTRS={fieldId:{value:b.guid(),validator:b.Lang.isString,writeOnce:true},fieldName:{value:"",validator:b.Lang.isString,writeOnce:true},formMgr:{validator:function(k){return(!k||k instanceof b.FormManager);},writeOnce:true},queryBuilder:{validator:function(k){return(!k||k instanceof b.QueryBuilder);},writeOnce:true},combinatorMap:{validator:b.Lang.isObject},parenLabel:{value:"()",validator:b.Lang.isString,writeOnce:true},andLabel:{value:"AND",validator:b.Lang.isString,writeOnce:true},orLabel:{value:"OR",validator:b.Lang.isString,writeOnce:true},notLabel:{value:"NOT",validator:b.Lang.isString,writeOnce:true},clearLabel:{value:"Clear",validator:b.Lang.isString,writeOnce:true},insertLabel:{value:"Insert",validator:b.Lang.isString,writeOnce:true},resetLabel:{value:"Cancel",validator:b.Lang.isString,writeOnce:true},tooManyParensError:{value:'The expression contains an extra closing parenthesis at "{context}...".',validator:b.Lang.isString},unmatchedSingleQuoteError:{value:'The expression contains an unmatched single quote at "{context}...".',validator:b.Lang.isString},unclosedParenError:{value:'The expression contains an unclosed parenthesis at "{context}...".',validator:b.Lang.isString},noVariableSelectedError:{value:"Please choose a variable.",validator:b.Lang.isString}};function f(){this.ie_range=document.selection.createRange();}function a(o,n){n=n||o.length;this.field.focus();var l=b.Node.getDOMNode(this.field);if(l.setSelectionRange){var p=l.selectionStart;l.value=l.value.substring(0,p)+o+l.value.substring(l.selectionEnd,l.value.length);var k=p+n;l.setSelectionRange(k,k);}else{if(document.selection){if(!this.ie_range){this.ie_range=document.selection.createRange();}var m=this.ie_range.duplicate();m.text=o;this.ie_range.move("character",n);this.ie_range.select();}}}function i(k){a.call(this,"()",1);k.halt();}function j(k){return function(l){a.call(this," "+this.get(k+"Label")+" ");l.halt();};}function d(k){this.clear();k.halt();}function h(t){if(!this.qb_form.validateForm()){t.halt();return;}var o=this.get("queryBuilder");var v=o.toDatabaseQuery();if(v.length===0){var n=o.get("contentBox").one("select");this.qb_form.displayMessage(n,this.get("noVariableSelectedError"),"error");t.halt();return;}var l=this.get("combinatorMap");var w="";var r=" "+this.get("andLabel")+" ";for(var p=0;p<v.length;p++){var k=v[p];if(p>0){w+=r;}w+=k[0];var u=k[1];if(u.indexOf("{")==-1){u+="{value}";}var m=l&&l[k[1]];if(m){r=m.operator;u=m.pattern;}w+=b.Lang.substitute(u,{value:k[2].replace(/'/g,"\\'")});}a.call(this,w);o.reset();t.halt();}function g(k){this.qb_form.clearMessages();this.get("queryBuilder").reset();k.halt();}function c(l){if(l){var k=this;l.setFunction(this.get("fieldId"),function(m,n){return k._validateExpression(m,n,this);});}}b.extend(e,b.Widget,{initializer:function(k){c.call(this,k.formMgr);this.after("formMgrChange",function(l){if(l.prevVal){l.prevVal.setFunction(this.get("fieldId"),null);}c.call(this,l.newVal);});},renderUI:function(){var m=b.guid();var k=this.get("contentBox");k.set("innerHTML",this._field());this.field=k.one("#"+this.get("fieldId"));if(document.selection){this.field.on("change",f,this);}k.one("."+this.getClassName("paren")).on("click",i,this);var o=["and","or","not"];for(var l=0;l<o.length;l++){k.one("."+this.getClassName(o[l])).on("click",j(o[l]),this);}k.one("."+this.getClassName("clear")).on("click",d,this);var n=this.get("queryBuilder");if(n){k.appendChild(b.Node.create(this._query(m)));n.render(k.one("."+this.getClassName("querybuilder")));k.one("."+this.getClassName("insert")).on("click",h,this);k.one("."+this.getClassName("reset")).on("click",g,this);this.qb_form=new b.FormManager(m);this.qb_form.prepareForm();}},destructor:function(){var k=this.get("queryBuilder");if(k){k.destroy();}this.ie_range=null;},clear:function(){this.field.set("value","");this.field.focus();},_validateExpression:function(m,q,r){var u=q.get("value");var t=0;var p=-1;var k=false;var l=-1;for(var o=0;o<u.length;o++){if(!k&&u[o]=="("){if(t===0){p=o;}t++;}else{if(!k&&u[o]==")"){t--;if(t<0){var n=b.Lang.substitute(this.get("tooManyParensError"),{context:u.substr(0,o+1)});r.displayMessage(q,n,"error");return false;}}else{if(u[o]=="'"&&(o===0||u[o-1]!="\\")){if(!k){l=o;}k=!k;}}}}if(k&&(t===0||l<p)){var n=b.Lang.substitute(this.get("unmatchedSingleQuoteError"),{context:u.substr(0,l+1)});r.displayMessage(q,n,"error");return false;}else{if(t>0){var n=b.Lang.substitute(this.get("unclosedParenError"),{context:u.substr(0,p+1)});r.displayMessage(q,n,"error");return false;}}return true;},_field:function(){var k='<div class="{td}">'+'<textarea id="{tid}" name="{tn}" class="formmgr-field {ta}"></textarea>'+"</div>"+'<div class="{fctl}">'+'<button class="{pc}">{paren}</button>'+'<button class="{ac}">{and}</button>'+'<button class="{oc}">{or}</button>'+'<button class="{nc}">{not}</button>'+'<button class="{cc}">{clear}</button>'+"</div>";return b.Lang.substitute(k,{td:this.getClassName("field-container"),ta:this.getClassName("field"),tid:this.get("fieldId"),tn:this.get("fieldName"),fctl:this.getClassName("controls"),pc:this.getClassName("paren"),ac:this.getClassName("and"),oc:this.getClassName("or"),nc:this.getClassName("not"),cc:this.getClassName("clear"),paren:this.get("parenLabel"),and:this.get("andLabel"),or:this.get("orLabel"),not:this.get("notLabel"),clear:this.get("clearLabel")});},_query:function(l){var k='<form name="{qbf}">'+'<div class="{qb}"></div>'+'<div class="{qbctl} formmgr-row">'+'<button class="{ic}">{insert}</button>'+'<button class="{rc}">{reset}</button>'+"</div>"+"</form>";return b.Lang.substitute(k,{qbf:l,qb:this.getClassName("querybuilder"),qbctl:this.getClassName("querybuilder-controls"),ic:this.getClassName("insert"),rc:this.getClassName("reset"),insert:this.get("insertLabel"),reset:this.get("resetLabel")});}});b.ExpressionBuilder=e;},"gallery-2011.06.01-20-18",{requires:["gallery-querybuilder","gallery-formmgr"],skinnable:true});
View
7 build/gallery-exprbuilder/gallery-exprbuilder.js
@@ -13,11 +13,6 @@ YUI.add('gallery-exprbuilder', function(Y) {
function ExpressionBuilder(config)
{
- if (arguments.length === 0) // derived class prototype
- {
- return;
- }
-
ExpressionBuilder.superclass.constructor.call(this, config);
}
@@ -621,4 +616,4 @@ Y.extend(ExpressionBuilder, Y.Widget,
Y.ExpressionBuilder = ExpressionBuilder;
-}, 'gallery-2011.02.16-20-31' ,{requires:['gallery-querybuilder','gallery-formmgr'], skinnable:true});
+}, 'gallery-2011.06.01-20-18' ,{requires:['gallery-querybuilder','gallery-formmgr'], skinnable:true});
View
8 build/gallery-formmgr-css-validation/gallery-formmgr-css-validation-debug.js
@@ -167,7 +167,7 @@ Y.FormManager.validateFromCSSData = function(
if (hasLimit(m[1]) && hasLimit(m[2]) &&
parseInt(m[1], 10) > parseInt(m[2], 10))
{
- Y.log(e.name+' has min_length > max_length', 'error', 'FormManager');
+ Y.error(e.name+' has min_length > max_length', null, 'FormManager');
}
var msg = null;
@@ -213,7 +213,7 @@ Y.FormManager.validateFromCSSData = function(
if (hasLimit(m[1]) && hasLimit(m[2]) &&
parseInt(m[1], 10) > parseInt(m[2], 10))
{
- Y.log(e.name+' has min_value > max_value', 'error', 'FormManager');
+ Y.error(e.name+' has min_value > max_value', null, 'FormManager');
}
var value = parseInt(e.value, 10);
@@ -254,7 +254,7 @@ Y.FormManager.validateFromCSSData = function(
if (hasLimit(m[1]) && hasLimit(m[2]) &&
parseFloat(m[1]) > parseFloat(m[2]))
{
- Y.log(e.name+' has min_value > max_value', 'error', 'FormManager');
+ Y.error(e.name+' has min_value > max_value', null, 'FormManager');
}
var value = parseFloat(e.value);
@@ -295,4 +295,4 @@ Y.FormManager.validateFromCSSData = function(
};
-}, 'gallery-2011.04.13-22-38' ,{requires:['substitute']});
+}, 'gallery-2011.06.01-20-18' ,{requires:['substitute']});
View
2 build/gallery-formmgr-css-validation/gallery-formmgr-css-validation-min.js
@@ -1 +1 @@
-YUI.add("gallery-formmgr-css-validation",function(f){f.namespace("FormManager");var c="yiv-required";var a=/(?:^|\s+)yiv-length:\[([0-9]+)?,([1-9][0-9]*)?\](?:\s+|$)/;var b=/(?:^|\s+)yiv-integer(?::\[([-+]?[0-9]+)?,([-+]?[0-9]+)?\])?(?:\s+|$)/;var e=/(?:^|\s+)yiv-decimal(?::\[([-+]?(?:[0-9]+\.?|[0-9]+\.[0-9]+|\.[0-9]+))?,([-+]?(?:[0-9]+\.?|[0-9]+\.[0-9]+|\.[0-9]+))?\])?(?:\s+|$)/;f.FormManager.integer_value_re=/^[-+]?[0-9]+$/;f.FormManager.decimal_value_re=/^[-+]?(?:[0-9]+\.?|[0-9]*\.[0-9]+)$/;f.FormManager.Strings={validation_error:"Correct errors in the highlighted fields before continuing.",required_string:"This field requires a value.",required_menu:"This field is required. Choose a value from the pull-down list.",length_too_short:"Enter text that is at least {min} characters or longer.",length_too_long:"Enter text that is up to {max} characters long.",length_out_of_range:"Enter text that is {min} to {max} characters long.",integer:"Enter a whole number (no decimal point).",integer_too_small:"Enter a number that is {min} or higher (no decimal point).",integer_too_large:"Enter a number that is {max} or lower (no decimal point).",integer_out_of_range:"Enter a number between or including {min} and {max} (no decimal point).",decimal:"Enter a number.",decimal_too_small:"Enter a number that is {min} or higher.",decimal_too_large:"Enter a number that is {max} or lower.",decimal_out_of_range:"Enter a number between or including {min} and {max}."};function d(g){return(!f.Lang.isUndefined(g)&&g.length>0);}f.FormManager.validateFromCSSData=function(l,h){var k=f.FormManager.Strings;if(l instanceof f.Node){l=f.Node.getDOMNode(l);}var o=f.DOM.hasClass(l,c);if(o&&l.value===""){var n=null;if(h&&h.required){n=h.required;}else{if(l.tagName.toLowerCase()=="select"){n=k.required_menu;}else{n=k.required_string;}}return{keepGoing:false,error:n};}else{if(!o&&l.value===""){return{keepGoing:false};}}if(l.className){var g=l.className.match(a);if(g&&g.length){if(d(g[1])&&d(g[2])&&parseInt(g[1],10)>parseInt(g[2],10)){}var n=null;var i=(d(g[1])&&g[1]!=="0");if(i&&d(g[2])){n=k.length_out_of_range;}else{if(i){n=k.length_too_short;}else{if(d(g[2])){n=k.length_too_long;}}}if(l.value&&d(g[1])&&l.value.length<parseInt(g[1],10)){if(h&&h.min_length){n=h.min_length;}n=f.substitute(n,{min:parseInt(g[1],10),max:parseInt(g[2],10)});return{keepGoing:false,error:n};}if(l.value&&d(g[2])&&l.value.length>parseInt(g[2],10)){if(h&&h.max_length){n=h.max_length;}n=f.substitute(n,{min:parseInt(g[1],10),max:parseInt(g[2],10)});return{keepGoing:false,error:n};}}var g=l.className.match(b);if(g&&g.length){if(d(g[1])&&d(g[2])&&parseInt(g[1],10)>parseInt(g[2],10)){}var j=parseInt(l.value,10);if(l.value&&(!f.FormManager.integer_value_re.test(l.value)||(d(g[1])&&j<parseInt(g[1],10))||(d(g[2])&&j>parseInt(g[2],10)))){var n=null;if(h&&h.integer){n=h.integer;}else{if(d(g[1])&&d(g[2])){n=k.integer_out_of_range;}else{if(d(g[1])){n=k.integer_too_small;}else{if(d(g[2])){n=k.integer_too_large;}else{n=k.integer;}}}}n=f.substitute(n,{min:parseInt(g[1],10),max:parseInt(g[2],10)});return{keepGoing:false,error:n};}}var g=l.className.match(e);if(g&&g.length){if(d(g[1])&&d(g[2])&&parseFloat(g[1])>parseFloat(g[2])){}var j=parseFloat(l.value);if(l.value&&(!f.FormManager.decimal_value_re.test(l.value)||(d(g[1])&&j<parseFloat(g[1]))||(d(g[2])&&j>parseFloat(g[2])))){var n=null;if(h&&h.decimal){n=h.decimal;}else{if(d(g[1])&&d(g[2])){n=k.decimal_out_of_range;}else{if(d(g[1])){n=k.decimal_too_small;}else{if(d(g[2])){n=k.decimal_too_large;}else{n=k.decimal;}}}}n=f.substitute(n,{min:parseFloat(g[1],10),max:parseFloat(g[2],10)});return{keepGoing:false,error:n};}}}return{keepGoing:true};};},"gallery-2011.04.13-22-38",{requires:["substitute"]});
+YUI.add("gallery-formmgr-css-validation",function(f){f.namespace("FormManager");var c="yiv-required";var a=/(?:^|\s+)yiv-length:\[([0-9]+)?,([1-9][0-9]*)?\](?:\s+|$)/;var b=/(?:^|\s+)yiv-integer(?::\[([-+]?[0-9]+)?,([-+]?[0-9]+)?\])?(?:\s+|$)/;var e=/(?:^|\s+)yiv-decimal(?::\[([-+]?(?:[0-9]+\.?|[0-9]+\.[0-9]+|\.[0-9]+))?,([-+]?(?:[0-9]+\.?|[0-9]+\.[0-9]+|\.[0-9]+))?\])?(?:\s+|$)/;f.FormManager.integer_value_re=/^[-+]?[0-9]+$/;f.FormManager.decimal_value_re=/^[-+]?(?:[0-9]+\.?|[0-9]*\.[0-9]+)$/;f.FormManager.Strings={validation_error:"Correct errors in the highlighted fields before continuing.",required_string:"This field requires a value.",required_menu:"This field is required. Choose a value from the pull-down list.",length_too_short:"Enter text that is at least {min} characters or longer.",length_too_long:"Enter text that is up to {max} characters long.",length_out_of_range:"Enter text that is {min} to {max} characters long.",integer:"Enter a whole number (no decimal point).",integer_too_small:"Enter a number that is {min} or higher (no decimal point).",integer_too_large:"Enter a number that is {max} or lower (no decimal point).",integer_out_of_range:"Enter a number between or including {min} and {max} (no decimal point).",decimal:"Enter a number.",decimal_too_small:"Enter a number that is {min} or higher.",decimal_too_large:"Enter a number that is {max} or lower.",decimal_out_of_range:"Enter a number between or including {min} and {max}."};function d(g){return(!f.Lang.isUndefined(g)&&g.length>0);}f.FormManager.validateFromCSSData=function(l,h){var k=f.FormManager.Strings;if(l instanceof f.Node){l=f.Node.getDOMNode(l);}var o=f.DOM.hasClass(l,c);if(o&&l.value===""){var n=null;if(h&&h.required){n=h.required;}else{if(l.tagName.toLowerCase()=="select"){n=k.required_menu;}else{n=k.required_string;}}return{keepGoing:false,error:n};}else{if(!o&&l.value===""){return{keepGoing:false};}}if(l.className){var g=l.className.match(a);if(g&&g.length){if(d(g[1])&&d(g[2])&&parseInt(g[1],10)>parseInt(g[2],10)){f.error(l.name+" has min_length > max_length",null,"FormManager");}var n=null;var i=(d(g[1])&&g[1]!=="0");if(i&&d(g[2])){n=k.length_out_of_range;}else{if(i){n=k.length_too_short;}else{if(d(g[2])){n=k.length_too_long;}}}if(l.value&&d(g[1])&&l.value.length<parseInt(g[1],10)){if(h&&h.min_length){n=h.min_length;}n=f.substitute(n,{min:parseInt(g[1],10),max:parseInt(g[2],10)});return{keepGoing:false,error:n};}if(l.value&&d(g[2])&&l.value.length>parseInt(g[2],10)){if(h&&h.max_length){n=h.max_length;}n=f.substitute(n,{min:parseInt(g[1],10),max:parseInt(g[2],10)});return{keepGoing:false,error:n};}}var g=l.className.match(b);if(g&&g.length){if(d(g[1])&&d(g[2])&&parseInt(g[1],10)>parseInt(g[2],10)){f.error(l.name+" has min_value > max_value",null,"FormManager");}var j=parseInt(l.value,10);if(l.value&&(!f.FormManager.integer_value_re.test(l.value)||(d(g[1])&&j<parseInt(g[1],10))||(d(g[2])&&j>parseInt(g[2],10)))){var n=null;if(h&&h.integer){n=h.integer;}else{if(d(g[1])&&d(g[2])){n=k.integer_out_of_range;}else{if(d(g[1])){n=k.integer_too_small;}else{if(d(g[2])){n=k.integer_too_large;}else{n=k.integer;}}}}n=f.substitute(n,{min:parseInt(g[1],10),max:parseInt(g[2],10)});return{keepGoing:false,error:n};}}var g=l.className.match(e);if(g&&g.length){if(d(g[1])&&d(g[2])&&parseFloat(g[1])>parseFloat(g[2])){f.error(l.name+" has min_value > max_value",null,"FormManager");}var j=parseFloat(l.value);if(l.value&&(!f.FormManager.decimal_value_re.test(l.value)||(d(g[1])&&j<parseFloat(g[1]))||(d(g[2])&&j>parseFloat(g[2])))){var n=null;if(h&&h.decimal){n=h.decimal;}else{if(d(g[1])&&d(g[2])){n=k.decimal_out_of_range;}else{if(d(g[1])){n=k.decimal_too_small;}else{if(d(g[2])){n=k.decimal_too_large;}else{n=k.decimal;}}}}n=f.substitute(n,{min:parseFloat(g[1],10),max:parseFloat(g[2],10)});return{keepGoing:false,error:n};}}}return{keepGoing:true};};},"gallery-2011.06.01-20-18",{requires:["substitute"]});
View
5 build/gallery-formmgr-css-validation/gallery-formmgr-css-validation.js
@@ -167,6 +167,7 @@ Y.FormManager.validateFromCSSData = function(
if (hasLimit(m[1]) && hasLimit(m[2]) &&
parseInt(m[1], 10) > parseInt(m[2], 10))
{
+ Y.error(e.name+' has min_length > max_length', null, 'FormManager');
}
var msg = null;
@@ -212,6 +213,7 @@ Y.FormManager.validateFromCSSData = function(
if (hasLimit(m[1]) && hasLimit(m[2]) &&
parseInt(m[1], 10) > parseInt(m[2], 10))
{
+ Y.error(e.name+' has min_value > max_value', null, 'FormManager');
}
var value = parseInt(e.value, 10);
@@ -252,6 +254,7 @@ Y.FormManager.validateFromCSSData = function(
if (hasLimit(m[1]) && hasLimit(m[2]) &&
parseFloat(m[1]) > parseFloat(m[2]))
{
+ Y.error(e.name+' has min_value > max_value', null, 'FormManager');
}
var value = parseFloat(e.value);
@@ -292,4 +295,4 @@ Y.FormManager.validateFromCSSData = function(
};
-}, 'gallery-2011.04.13-22-38' ,{requires:['substitute']});
+}, 'gallery-2011.06.01-20-18' ,{requires:['substitute']});
View
37 build/gallery-formmgr/gallery-formmgr-debug.js
@@ -125,15 +125,8 @@ function FormManager(
/* string */ form_name,
/* object */ config) // {status_node, default_value_map}
{
- if (arguments.length === 0) // derived class prototype
- {
- return;
- }
-
- if (!config)
- {
- config = {};
- }
+ config = config || {};
+ FormManager.superclass.constructor.call(this, config);
this.form_name = form_name;
this.status_node = Y.one(config.status_node);
@@ -486,7 +479,7 @@ function populateForm1()
}
}
-FormManager.prototype =
+Y.extend(FormManager, Y.Plugin.Host,
{
/* *********************************************************************
* Access functions.
@@ -598,7 +591,7 @@ FormManager.prototype =
if (!this.validation_msgs[id] || !this.validation_msgs[id].regex)
{
- Y.log(Y.substitute('No error message provided for regex validation of {id}!', {id:id}), 'error', 'FormManager');
+ Y.error(Y.substitute('No error message provided for regex validation of {id}!', {id:id}), null, 'FormManager');
}
},
@@ -917,7 +910,9 @@ FormManager.prototype =
*/
/**
- * Register a button that can be disabled. Buttons contained within
+ * Register an object that can be disabled. The object must support
+ * the set('disabled', ...) API. (The exception is DOM nodes, since
+ * they are automatically wrapped in Y.Node.) Buttons contained within
* the form DOM element are automatically registered.
*
* @param el {String|Object} The selector for the element or the element itself
@@ -927,7 +922,7 @@ FormManager.prototype =
{
var info =
{
- e: Y.one(el)
+ e: Y.Lang.isString(el) || el.tagName ? Y.one(el) : el
};
this.user_button_list.push(info);
@@ -1177,20 +1172,12 @@ FormManager.prototype =
Y.log(msg, 'warn', 'FormManager');
}
}
-};
+});
-if (Y.FormManager) // static data & functions from gallery-formmgr-css-validation
-{
- for (var key in Y.FormManager)
- {
- if (Y.FormManager.hasOwnProperty(key))
- {
- FormManager[key] = Y.FormManager[key];
- }
- }
-}
+// static data & functions from gallery-formmgr-css-validation
+Y.aggregate(FormManager, Y.FormManager);
Y.FormManager = FormManager;
-}, 'gallery-2011.04.13-22-38' ,{requires:['gallery-node-optimizations','gallery-formmgr-css-validation']});
+}, 'gallery-2011.06.01-20-18' ,{requires:['pluginhost-base','gallery-node-optimizations','gallery-formmgr-css-validation'], optional:['gallery-scrollintoview']});
View
4 build/gallery-formmgr/gallery-formmgr-min.js
@@ -1,2 +1,2 @@
-YUI.add("gallery-formmgr",function(d){function k(o,n){if(arguments.length===0){return;}if(!n){n={};}this.form_name=o;this.status_node=d.one(n.status_node);this.enabled=true;this.default_value_map=n.default_value_map;this.validation={fn:{},regex:{}};this.validation_msgs={};this.has_messages=false;this.has_errors=false;this.button_list=[];this.user_button_list=[];this.has_file_inputs=false;}var e="(?:^|\\s)(?:";var h=")(?:\\s|$)";k.row_marker_class="formmgr-row";k.field_marker_class="formmgr-field";k.status_marker_class="formmgr-message-text";k.status_none_class="formmgr-status-hidden";k.status_success_class="formmgr-status-success";k.status_failure_class="formmgr-status-failure";k.row_status_prefix="formmgr-has";var g;var m;var l;function b(){if(!g){g=k.status_success_class+"|"+k.status_failure_class;}return g;}function c(){if(!m){m=k.row_status_prefix+"([^\\s]+)";}return m;}function a(){if(!l){l=new RegExp(e+c()+h);}return l;}k.status_order=["error","warn","success","info"];k.getStatusPrecedence=function(n){for(var o=0;o<k.status_order.length;o++){if(n==k.status_order[o]){return o;}}return k.status_order.length;};k.statusTakesPrecendence=function(o,n){return(!o||k.getStatusPrecedence(n)<k.getStatusPrecedence(o));};k.getElementStatus=function(o){var n=d.one(o).get("className").match(a());return(n&&n.length>1?n[1]:false);};function f(n){if(d.Lang.isString(n)){return n.replace(/^#/,"");}else{if(n instanceof d.Node){return n.get("id");}else{return n.id;}}}k.cleanValues=function(r){var q=false;for(var o=0;o<r.length;o++){var n=r[o];var p=n.type&&n.type.toLowerCase();if(p=="file"){q=true;}else{if(p=="select-multiple"){}else{if(n.value){n.value=d.Lang.trim(n.value);}}}}return q;};function i(){var r=(this.button_list.length===0);for(var q=0;q<this.form.elements.length;q++){var u=this.form.elements[q];var p=u.tagName.toLowerCase();var s=(u.type?u.type.toLowerCase():null);if(r&&(s=="submit"||s=="reset"||p=="button")){this.button_list.push(u);}if(!u.name){continue;}var n=this.default_value_map[u.name];if(p=="input"&&s=="file"){u.value="";}else{if(d.Lang.isUndefined(n)){if(p=="input"&&(s=="password"||s=="text")){this.default_value_map[u.name]=u.value;}else{if(p=="input"&&s=="checkbox"){this.default_value_map[u.name]=(u.checked?u.value:"");}else{if(p=="input"&&s=="radio"){var t=this.form[u.name];if(t&&!t.length){this.default_value_map[u.name]=t.value;}else{if(t){this.default_value_map[u.name]=t[0].value;for(var o=0;o<t.length;o++){if(t[o].checked){this.default_value_map[u.name]=t[o].value;break;}}}}}else{if((p=="select"&&s=="select-one")||p=="textarea"){this.default_value_map[u.name]=u.value;}}}}}else{if(p=="input"&&(s=="password"||s=="text")){u.value=n;}else{if(p=="input"&&(s=="checkbox"||s=="radio")){u.checked=(u.value==n);}else{if(p=="select"&&s=="select-one"){u.value=n;if(u.selectedIndex>=0&&u.options[u.selectedIndex].value!==n.toString()){u.selectedIndex=-1;}}else{if(p=="textarea"){u.value=n;}}}}}}}}k.prototype={getForm:function(){if(!this.form){this.form=d.config.doc.forms[this.form_name];}return this.form;},hasFileInputs:function(){return this.has_file_inputs;},setDefaultValues:function(n){this.default_value_map=n;},setDefaultValue:function(o,n){this.default_value_map[o]=n;},saveCurrentValuesAsDefault:function(){this.default_value_map={};this.button_list=[];i.call(this);},setFunction:function(o,n){this.validation.fn[f(o)]=n;},setRegex:function(p,o,n){p=f(p);if(d.Lang.isString(o)){this.validation.regex[p]=new RegExp(o,n);}else{this.validation.regex[p]=o;}if(!this.validation_msgs[p]||!this.validation_msgs[p].regex){}},setErrorMessages:function(o,n){this.validation_msgs[f(o)]=n;},addErrorMessage:function(p,n,o){p=f(p);if(!this.validation_msgs[p]){this.validation_msgs[p]={};}this.validation_msgs[p][n]=o;},clearForm:function(){this.clearMessages();this.form.reset();this.postPopulateForm();},populateForm:function(){if(!this.default_value_map){this.default_value_map={};}this.clearMessages();i.call(this);this.postPopulateForm();},postPopulateForm:function(){},isChanged:function(){for(var p=0;p<this.form.elements.length;p++){var s=this.form.elements[p];if(!s.name){continue;}var q=(s.type?s.type.toLowerCase():null);var o=s.tagName.toLowerCase();var n=this.default_value_map[s.name];if(n===null||typeof n==="undefined"){n="";}if(o=="input"&&q=="file"){if(s.value){return true;}}else{if(o=="input"&&(q=="password"||q=="text"||q=="file")){if(s.value!=n){return true;}}else{if(o=="input"&&(q=="checkbox"||q=="radio")){var r=(s.value==n);if((r&&!s.checked)||(!r&&s.checked)){return true;}}else{if((o=="select"&&q=="select-one")||o=="textarea"){if(s.value!=n){return true;}}}}}}return false;},prepareForm:function(){this.getForm();if(!this.prePrepareForm.apply(this,arguments)){return false;}this.populateForm();return this.postPrepareForm.apply(this,arguments);},prePrepareForm:function(){return true;},postPrepareForm:function(){return true;},initFocus:function(){for(var p=0;p<this.form.elements.length;p++){var r=this.form.elements[p];if(r.disabled||r.offsetHeight===0){continue;}var n=r.tagName.toLowerCase();var q=(r.type?r.type.toLowerCase():null);if((n=="input"&&(q=="file"||q=="password"||q=="text"))||n=="textarea"){try{r.focus();}catch(o){}r.select();break;}}},validateForm:function(){this.clearMessages();var o=true;var t=this.form.elements;this.has_file_inputs=k.cleanValues(t);for(var p=0;p<t.length;p++){var u=t[p].id;var n=this.validation_msgs[u];var s=k.validateFromCSSData(t[p],n);if(s.error){this.displayMessage(t[p],s.error,"error");o=false;continue;}if(s.keepGoing){if(this.validation.regex[u]&&!this.validation.regex[u].test(t[p].value)){this.displayMessage(t[p],n?n.regex:null,"error");o=false;continue;}}var r=this.validation.fn[u];var q=this;if(d.Lang.isFunction(r)){}else{if(d.Lang.isString(r)){r=q[r];}else{if(r&&r.scope){q=r.scope;r=(d.Lang.isString(r.fn)?q[r.fn]:r.fn);}else{r=null;}}}if(r&&!r.call(q,this.form,d.one(t[p]))){o=false;continue;}}if(!this.postValidateForm(this.form)){o=false;}if(!o){this.notifyErrors();
-}return o;},postValidateForm:function(n){return true;},registerButton:function(n){var o={e:d.one(n)};this.user_button_list.push(o);},isFormEnabled:function(){return this.enabled;},enableForm:function(){this.setFormEnabled(true);},disableForm:function(){this.setFormEnabled(false);},setFormEnabled:function(n){this.enabled=n;var p=!n;for(var o=0;o<this.button_list.length;o++){this.button_list[o].disabled=p;}for(o=0;o<this.user_button_list.length;o++){var q=this.user_button_list[o];q.e.set("disabled",p);}},hasMessages:function(){return this.has_messages;},hasErrors:function(){return this.has_errors;},getRowStatus:function(o){var n=d.one(o).getAncestorByClassName(k.row_marker_class,true);return k.getElementStatus(n);},clearMessages:function(){this.has_messages=false;this.has_errors=false;if(this.status_node){this.status_node.set("innerHTML","");this.status_node.replaceClass(b(),k.status_none_class);}for(var o=0;o<this.form.elements.length;o++){var s=this.form.elements[o];var n=s.tagName.toLowerCase();var q=(s.type?s.type.toLowerCase():null);if(n=="button"||q=="submit"||q=="reset"){continue;}var r=d.one(s).getAncestorByClassName(k.row_marker_class);if(r&&r.hasClass(c())){r.all("."+k.status_marker_class).set("innerHTML","");r.removeClass(c());r.all("."+k.field_marker_class).removeClass(c());}}d.one(this.form).all("fieldset").removeClass(c());},displayMessage:function(s,o,u,v){if(d.Lang.isUndefined(v)){v=true;}s=d.one(s);var n=s.getAncestorByClassName(k.row_marker_class);if(n&&k.statusTakesPrecendence(k.getElementStatus(n),u)){var r=n.all("."+k.field_marker_class);if(r){r.removeClass(c());}if(o){n.one("."+k.status_marker_class).set("innerHTML",o);}var q=k.row_status_prefix+u;n.replaceClass(c(),q);r=s.getAncestorByClassName(k.field_marker_class,true);if(r){r.replaceClass(c(),q);}var w=s.getAncestorByTagName("fieldset");if(w&&k.statusTakesPrecendence(k.getElementStatus(w),u)){w.removeClass(c());w.addClass(k.row_status_prefix+u);}if(!this.has_messages&&v){n.scrollIntoView();try{s.focus();}catch(t){}}this.has_messages=true;if(u=="error"){this.has_errors=true;}return true;}return false;},notifyErrors:function(){this.displayFormMessage(k.Strings.validation_error,true,false);},displayFormMessage:function(p,o,n){if(d.Lang.isUndefined(n)){n=true;}if(this.status_node){if(!this.status_node.innerHTML){this.status_node.replaceClass(k.status_none_class,(o?k.status_failure_class:k.status_success_class));this.status_node.set("innerHTML",p);}if(n){this.status_node.scrollIntoView();}}else{}}};if(d.FormManager){for(var j in d.FormManager){if(d.FormManager.hasOwnProperty(j)){k[j]=d.FormManager[j];}}}d.FormManager=k;},"gallery-2011.04.13-22-38",{requires:["gallery-node-optimizations","gallery-formmgr-css-validation"]});
+YUI.add("gallery-formmgr",function(d){function j(n,m){m=m||{};j.superclass.constructor.call(this,m);this.form_name=n;this.status_node=d.one(m.status_node);this.enabled=true;this.default_value_map=m.default_value_map;this.validation={fn:{},regex:{}};this.validation_msgs={};this.has_messages=false;this.has_errors=false;this.button_list=[];this.user_button_list=[];this.has_file_inputs=false;}var e="(?:^|\\s)(?:";var h=")(?:\\s|$)";j.row_marker_class="formmgr-row";j.field_marker_class="formmgr-field";j.status_marker_class="formmgr-message-text";j.status_none_class="formmgr-status-hidden";j.status_success_class="formmgr-status-success";j.status_failure_class="formmgr-status-failure";j.row_status_prefix="formmgr-has";var g;var l;var k;function b(){if(!g){g=j.status_success_class+"|"+j.status_failure_class;}return g;}function c(){if(!l){l=j.row_status_prefix+"([^\\s]+)";}return l;}function a(){if(!k){k=new RegExp(e+c()+h);}return k;}j.status_order=["error","warn","success","info"];j.getStatusPrecedence=function(m){for(var n=0;n<j.status_order.length;n++){if(m==j.status_order[n]){return n;}}return j.status_order.length;};j.statusTakesPrecendence=function(n,m){return(!n||j.getStatusPrecedence(m)<j.getStatusPrecedence(n));};j.getElementStatus=function(o){var n=d.one(o).get("className").match(a());return(n&&n.length>1?n[1]:false);};function f(m){if(d.Lang.isString(m)){return m.replace(/^#/,"");}else{if(m instanceof d.Node){return m.get("id");}else{return m.id;}}}j.cleanValues=function(q){var p=false;for(var n=0;n<q.length;n++){var m=q[n];var o=m.type&&m.type.toLowerCase();if(o=="file"){p=true;}else{if(o=="select-multiple"){}else{if(m.value){m.value=d.Lang.trim(m.value);}}}}return p;};function i(){var q=(this.button_list.length===0);for(var p=0;p<this.form.elements.length;p++){var t=this.form.elements[p];var o=t.tagName.toLowerCase();var r=(t.type?t.type.toLowerCase():null);if(q&&(r=="submit"||r=="reset"||o=="button")){this.button_list.push(t);}if(!t.name){continue;}var m=this.default_value_map[t.name];if(o=="input"&&r=="file"){t.value="";}else{if(d.Lang.isUndefined(m)){if(o=="input"&&(r=="password"||r=="text")){this.default_value_map[t.name]=t.value;}else{if(o=="input"&&r=="checkbox"){this.default_value_map[t.name]=(t.checked?t.value:"");}else{if(o=="input"&&r=="radio"){var s=this.form[t.name];if(s&&!s.length){this.default_value_map[t.name]=s.value;}else{if(s){this.default_value_map[t.name]=s[0].value;for(var n=0;n<s.length;n++){if(s[n].checked){this.default_value_map[t.name]=s[n].value;break;}}}}}else{if((o=="select"&&r=="select-one")||o=="textarea"){this.default_value_map[t.name]=t.value;}}}}}else{if(o=="input"&&(r=="password"||r=="text")){t.value=m;}else{if(o=="input"&&(r=="checkbox"||r=="radio")){t.checked=(t.value==m);}else{if(o=="select"&&r=="select-one"){t.value=m;if(t.selectedIndex>=0&&t.options[t.selectedIndex].value!==m.toString()){t.selectedIndex=-1;}}else{if(o=="textarea"){t.value=m;}}}}}}}}d.extend(j,d.Plugin.Host,{getForm:function(){if(!this.form){this.form=d.config.doc.forms[this.form_name];}return this.form;},hasFileInputs:function(){return this.has_file_inputs;},setDefaultValues:function(m){this.default_value_map=m;},setDefaultValue:function(n,m){this.default_value_map[n]=m;},saveCurrentValuesAsDefault:function(){this.default_value_map={};this.button_list=[];i.call(this);},setFunction:function(n,m){this.validation.fn[f(n)]=m;},setRegex:function(o,n,m){o=f(o);if(d.Lang.isString(n)){this.validation.regex[o]=new RegExp(n,m);}else{this.validation.regex[o]=n;}if(!this.validation_msgs[o]||!this.validation_msgs[o].regex){d.error(d.substitute("No error message provided for regex validation of {id}!",{id:o}),null,"FormManager");}},setErrorMessages:function(n,m){this.validation_msgs[f(n)]=m;},addErrorMessage:function(o,m,n){o=f(o);if(!this.validation_msgs[o]){this.validation_msgs[o]={};}this.validation_msgs[o][m]=n;},clearForm:function(){this.clearMessages();this.form.reset();this.postPopulateForm();},populateForm:function(){if(!this.default_value_map){this.default_value_map={};}this.clearMessages();i.call(this);this.postPopulateForm();},postPopulateForm:function(){},isChanged:function(){for(var o=0;o<this.form.elements.length;o++){var r=this.form.elements[o];if(!r.name){continue;}var p=(r.type?r.type.toLowerCase():null);var n=r.tagName.toLowerCase();var m=this.default_value_map[r.name];if(m===null||typeof m==="undefined"){m="";}if(n=="input"&&p=="file"){if(r.value){return true;}}else{if(n=="input"&&(p=="password"||p=="text"||p=="file")){if(r.value!=m){return true;}}else{if(n=="input"&&(p=="checkbox"||p=="radio")){var q=(r.value==m);if((q&&!r.checked)||(!q&&r.checked)){return true;}}else{if((n=="select"&&p=="select-one")||n=="textarea"){if(r.value!=m){return true;}}}}}}return false;},prepareForm:function(){this.getForm();if(!this.prePrepareForm.apply(this,arguments)){return false;}this.populateForm();return this.postPrepareForm.apply(this,arguments);},prePrepareForm:function(){return true;},postPrepareForm:function(){return true;},initFocus:function(){for(var o=0;o<this.form.elements.length;o++){var q=this.form.elements[o];if(q.disabled||q.offsetHeight===0){continue;}var m=q.tagName.toLowerCase();var p=(q.type?q.type.toLowerCase():null);if((m=="input"&&(p=="file"||p=="password"||p=="text"))||m=="textarea"){try{q.focus();}catch(n){}q.select();break;}}},validateForm:function(){this.clearMessages();var n=true;var s=this.form.elements;this.has_file_inputs=j.cleanValues(s);for(var o=0;o<s.length;o++){var t=s[o].id;var m=this.validation_msgs[t];var r=j.validateFromCSSData(s[o],m);if(r.error){this.displayMessage(s[o],r.error,"error");n=false;continue;}if(r.keepGoing){if(this.validation.regex[t]&&!this.validation.regex[t].test(s[o].value)){this.displayMessage(s[o],m?m.regex:null,"error");n=false;continue;}}var q=this.validation.fn[t];var p=this;if(d.Lang.isFunction(q)){}else{if(d.Lang.isString(q)){q=p[q];}else{if(q&&q.scope){p=q.scope;q=(d.Lang.isString(q.fn)?p[q.fn]:q.fn);}else{q=null;}}}if(q&&!q.call(p,this.form,d.one(s[o]))){n=false;
+continue;}}if(!this.postValidateForm(this.form)){n=false;}if(!n){this.notifyErrors();}return n;},postValidateForm:function(m){return true;},registerButton:function(m){var n={e:d.Lang.isString(m)||m.tagName?d.one(m):m};this.user_button_list.push(n);},isFormEnabled:function(){return this.enabled;},enableForm:function(){this.setFormEnabled(true);},disableForm:function(){this.setFormEnabled(false);},setFormEnabled:function(m){this.enabled=m;var o=!m;for(var n=0;n<this.button_list.length;n++){this.button_list[n].disabled=o;}for(n=0;n<this.user_button_list.length;n++){var p=this.user_button_list[n];p.e.set("disabled",o);}},hasMessages:function(){return this.has_messages;},hasErrors:function(){return this.has_errors;},getRowStatus:function(n){var m=d.one(n).getAncestorByClassName(j.row_marker_class,true);return j.getElementStatus(m);},clearMessages:function(){this.has_messages=false;this.has_errors=false;if(this.status_node){this.status_node.set("innerHTML","");this.status_node.replaceClass(b(),j.status_none_class);}for(var n=0;n<this.form.elements.length;n++){var r=this.form.elements[n];var m=r.tagName.toLowerCase();var o=(r.type?r.type.toLowerCase():null);if(m=="button"||o=="submit"||o=="reset"){continue;}var q=d.one(r).getAncestorByClassName(j.row_marker_class);if(q&&q.hasClass(c())){q.all("."+j.status_marker_class).set("innerHTML","");q.removeClass(c());q.all("."+j.field_marker_class).removeClass(c());}}d.one(this.form).all("fieldset").removeClass(c());},displayMessage:function(r,n,t,u){if(d.Lang.isUndefined(u)){u=true;}r=d.one(r);var m=r.getAncestorByClassName(j.row_marker_class);if(m&&j.statusTakesPrecendence(j.getElementStatus(m),t)){var q=m.all("."+j.field_marker_class);if(q){q.removeClass(c());}if(n){m.one("."+j.status_marker_class).set("innerHTML",n);}var o=j.row_status_prefix+t;m.replaceClass(c(),o);q=r.getAncestorByClassName(j.field_marker_class,true);if(q){q.replaceClass(c(),o);}var v=r.getAncestorByTagName("fieldset");if(v&&j.statusTakesPrecendence(j.getElementStatus(v),t)){v.removeClass(c());v.addClass(j.row_status_prefix+t);}if(!this.has_messages&&u){m.scrollIntoView();try{r.focus();}catch(s){}}this.has_messages=true;if(t=="error"){this.has_errors=true;}return true;}return false;},notifyErrors:function(){this.displayFormMessage(j.Strings.validation_error,true,false);},displayFormMessage:function(o,n,m){if(d.Lang.isUndefined(m)){m=true;}if(this.status_node){if(!this.status_node.innerHTML){this.status_node.replaceClass(j.status_none_class,(n?j.status_failure_class:j.status_success_class));this.status_node.set("innerHTML",o);}if(m){this.status_node.scrollIntoView();}}else{}}});d.aggregate(j,d.FormManager);d.FormManager=j;},"gallery-2011.06.01-20-18",{requires:["pluginhost-base","gallery-node-optimizations","gallery-formmgr-css-validation"],optional:["gallery-scrollintoview"]});
View
36 build/gallery-formmgr/gallery-formmgr.js
@@ -125,15 +125,8 @@ function FormManager(
/* string */ form_name,
/* object */ config) // {status_node, default_value_map}
{
- if (arguments.length === 0) // derived class prototype
- {
- return;
- }
-
- if (!config)
- {
- config = {};
- }
+ config = config || {};
+ FormManager.superclass.constructor.call(this, config);
this.form_name = form_name;
this.status_node = Y.one(config.status_node);
@@ -486,7 +479,7 @@ function populateForm1()
}
}
-FormManager.prototype =
+Y.extend(FormManager, Y.Plugin.Host,
{
/* *********************************************************************
* Access functions.
@@ -598,6 +591,7 @@ FormManager.prototype =
if (!this.validation_msgs[id] || !this.validation_msgs[id].regex)
{
+ Y.error(Y.substitute('No error message provided for regex validation of {id}!', {id:id}), null, 'FormManager');
}
},
@@ -916,7 +910,9 @@ FormManager.prototype =
*/
/**
- * Register a button that can be disabled. Buttons contained within
+ * Register an object that can be disabled. The object must support
+ * the set('disabled', ...) API. (The exception is DOM nodes, since
+ * they are automatically wrapped in Y.Node.) Buttons contained within
* the form DOM element are automatically registered.
*
* @param el {String|Object} The selector for the element or the element itself
@@ -926,7 +922,7 @@ FormManager.prototype =
{
var info =
{
- e: Y.one(el)
+ e: Y.Lang.isString(el) || el.tagName ? Y.one(el) : el
};
this.user_button_list.push(info);
@@ -1175,20 +1171,12 @@ FormManager.prototype =
{
}
}
-};
+});
-if (Y.FormManager) // static data & functions from gallery-formmgr-css-validation
-{
- for (var key in Y.FormManager)
- {
- if (Y.FormManager.hasOwnProperty(key))
- {
- FormManager[key] = Y.FormManager[key];
- }
- }
-}
+// static data & functions from gallery-formmgr-css-validation
+Y.aggregate(FormManager, Y.FormManager);
Y.FormManager = FormManager;
-}, 'gallery-2011.04.13-22-38' ,{requires:['gallery-node-optimizations','gallery-formmgr-css-validation']});
+}, 'gallery-2011.06.01-20-18' ,{requires:['pluginhost-base','gallery-node-optimizations','gallery-formmgr-css-validation'], optional:['gallery-scrollintoview']});
View
55 build/gallery-instancemanager/gallery-instancemanager-debug.js
@@ -134,41 +134,38 @@ InstanceManager.prototype =
isFunction = Y.Lang.isFunction(behavior),
isObject = Y.Lang.isObject(behavior);
- for (var name in map)
+ Y.Object.each(map, function(item, name)
{
- if (map.hasOwnProperty(name))
+ if (!item && skip_unconstructed)
{
- var item = map[ name ];
- if (!item && skip_unconstructed)
- {
- continue;
- }
- else if (!item)
- {
- item = this.get(name);
- }
-
- if (isFunction || isObject)
- {
- // apply the function and pass the map item as an argument
-
- var fn = isFunction ? behavior : behavior.fn,
- scope = isFunction ? window : behavior.scope;
-
- fn.apply(scope, [ { key:name, value:item } ].concat( args ) );
- }
- else if (item && Y.Lang.isFunction(item[ behavior ]))
- {
- // the string is the name of a method
-
- item[ behavior ].apply(item, args);
- }
+ return;
}
- }
+ else if (!item)
+ {
+ item = this.get(name);
+ }
+
+ if (isFunction || isObject)
+ {
+ // apply the function and pass the map item as an argument
+
+ var fn = isFunction ? behavior : behavior.fn,
+ scope = isFunction ? window : behavior.scope;
+
+ fn.apply(scope, [ { key:name, value:item } ].concat( args ) );
+ }
+ else if (item && Y.Lang.isFunction(item[ behavior ]))
+ {
+ // the string is the name of a method
+
+ item[ behavior ].apply(item, args);
+ }
+ },
+ this);
}
};
Y.InstanceManager = InstanceManager;
-}, 'gallery-2011.03.23-22-20' );
+}, 'gallery-2011.06.01-20-18' );
View
2 build/gallery-instancemanager/gallery-instancemanager-min.js
@@ -1 +1 @@
-YUI.add("gallery-instancemanager",function(b){function a(){this._map={};this._constructors={};}a.prototype={get:function(g){if(this._map[g]===null&&this._constructors[g]){var f=this._constructors[g];var d=f.fn.prototype?b.Object(f.fn.prototype):null;var e=f.fn.apply(d,f.args);this._map[g]=b.Lang.isUndefined(e)?d:e;}return this._map[g]||false;},getIfConstructed:function(c){return this._map[c]||false;},put:function(e,d,c){if(this._map[e]){return false;}else{if(b.Lang.isFunction(d)){this._constructors[e]={fn:d,args:b.Lang.isArray(c)?c:[c]};this._map[e]=null;return true;}else{this._map[e]=d;return true;}}},remove:function(d){if(this._map[d]){var c=this._map[d];delete this._map[d];return c;}else{return false;}},clear:function(){this._map={};},applyToAll:function(d,h,g){var c=this._map,f=b.Lang.isFunction(d),l=b.Lang.isObject(d);for(var e in c){if(c.hasOwnProperty(e)){var k=c[e];if(!k&&g){continue;}else{if(!k){k=this.get(e);}}if(f||l){var i=f?d:d.fn,j=f?window:d.scope;i.apply(j,[{key:e,value:k}].concat(h));}else{if(k&&b.Lang.isFunction(k[d])){k[d].apply(k,h);}}}}}};b.InstanceManager=a;},"gallery-2011.03.23-22-20");
+YUI.add("gallery-instancemanager",function(b){function a(){this._map={};this._constructors={};}a.prototype={get:function(g){if(this._map[g]===null&&this._constructors[g]){var f=this._constructors[g];var d=f.fn.prototype?b.Object(f.fn.prototype):null;var e=f.fn.apply(d,f.args);this._map[g]=b.Lang.isUndefined(e)?d:e;}return this._map[g]||false;},getIfConstructed:function(c){return this._map[c]||false;},put:function(e,d,c){if(this._map[e]){return false;}else{if(b.Lang.isFunction(d)){this._constructors[e]={fn:d,args:b.Lang.isArray(c)?c:[c]};this._map[e]=null;return true;}else{this._map[e]=d;return true;}}},remove:function(d){if(this._map[d]){var c=this._map[d];delete this._map[d];return c;}else{return false;}},clear:function(){this._map={};},applyToAll:function(f,e,d){var g=this._map,h=b.Lang.isFunction(f),c=b.Lang.isObject(f);b.Object.each(g,function(l,i){if(!l&&d){return;}else{if(!l){l=this.get(i);}}if(h||c){var k=h?f:f.fn,j=h?window:f.scope;k.apply(j,[{key:i,value:l}].concat(e));}else{if(l&&b.Lang.isFunction(l[f])){l[f].apply(l,e);}}},this);}};b.InstanceManager=a;},"gallery-2011.06.01-20-18");
View
55 build/gallery-instancemanager/gallery-instancemanager.js
@@ -134,41 +134,38 @@ InstanceManager.prototype =
isFunction = Y.Lang.isFunction(behavior),
isObject = Y.Lang.isObject(behavior);
- for (var name in map)
+ Y.Object.each(map, function(item, name)
{
- if (map.hasOwnProperty(name))
+ if (!item && skip_unconstructed)
{
- var item = map[ name ];
- if (!item && skip_unconstructed)
- {
- continue;
- }
- else if (!item)
- {
- item = this.get(name);
- }
-
- if (isFunction || isObject)
- {
- // apply the function and pass the map item as an argument
-
- var fn = isFunction ? behavior : behavior.fn,
- scope = isFunction ? window : behavior.scope;
-
- fn.apply(scope, [ { key:name, value:item } ].concat( args ) );
- }
- else if (item && Y.Lang.isFunction(item[ behavior ]))
- {
- // the string is the name of a method
-
- item[ behavior ].apply(item, args);
- }
+ return;
}
- }
+ else if (!item)
+ {
+ item = this.get(name);
+ }
+
+ if (isFunction || isObject)
+ {
+ // apply the function and pass the map item as an argument
+
+ var fn = isFunction ? behavior : behavior.fn,
+ scope = isFunction ? window : behavior.scope;
+
+ fn.apply(scope, [ { key:name, value:item } ].concat( args ) );
+ }
+ else if (item && Y.Lang.isFunction(item[ behavior ]))
+ {
+ // the string is the name of a method
+
+ item[ behavior ].apply(item, args);
+ }
+ },
+ this);
}
};
Y.InstanceManager = InstanceManager;
-}, 'gallery-2011.03.23-22-20' );
+}, 'gallery-2011.06.01-20-18' );
View
27 build/gallery-io-multiresponse/gallery-io-multiresponse-debug.js
@@ -135,18 +135,14 @@ function _setAttrs(f, id, uri, method) {
* @return {void}
*/
function _resetAttrs(f, a){
- var p;
-
- for (p in a) {
- if (a.hasOwnProperty(p)) {
- if (a[p]) {
- f.setAttribute(p, f[p]);
- }
- else {
- f.removeAttribute(p);
- }
+ Y.Object.each(a, function(v, p) {
+ if (v) {
+ f.setAttribute(p, v);
}
- }
+ else {
+ f.removeAttribute(p);
+ }
+ });
}
/**
@@ -376,7 +372,7 @@ Y.io.upload = function(o, uri, c) {
YUI.Env.io_multi_response_callback[ o.id ] = function(data) {
if (!data) {
- Y.log('Callback ' + o.id + ' invoked without data.', 'error', 'io');
+ Y.error('Callback ' + o.id + ' invoked without data.', null, 'io');
return;
}
@@ -402,7 +398,10 @@ Y.io.upload = function(o, uri, c) {
return _send(o, uri, c);
};
-YUI.Env.io_multi_response_callback = [];
+if (!YUI.Env.io_multi_response_callback)
+{
+ YUI.Env.io_multi_response_callback = [];
+}
var orig_io = Y.io;
@@ -428,4 +427,4 @@ Y.io = function(uri, c, i) {
Y.mix(Y.io, orig_io);
-}, 'gallery-2011.03.16-21-24' ,{requires:['io-upload-iframe'], optional:['json-stringify']});
+}, 'gallery-2011.06.01-20-18' ,{requires:['io-upload-iframe'], optional:['json-stringify']});
View
2 build/gallery-io-multiresponse/gallery-io-multiresponse-min.js
@@ -1 +1 @@
-YUI.add("gallery-io-multiresponse",function(a){var l=a.config.win,s=a.config.doc,b=(s.documentMode&&s.documentMode>=8),e=decodeURIComponent;function i(y,x){var z=[],d=x.split("="),w,v;for(w=0,v=d.length-1;w<v;w++){z[w]=s.createElement("input");z[w].type="hidden";z[w].name=e(d[w].substring(d[w].lastIndexOf("&")+1));z[w].value=(w+1===v)?e(d[w+1]):e(d[w+1].substring(0,(d[w+1].lastIndexOf("&"))));y.appendChild(z[w]);}return z;}function g(w,v){if(!a.Lang.isString(v)){v=a.JSON.stringify(v);}var d=s.createElement("input");d.type="hidden";d.name="json";d.value=v;w.appendChild(d);return d;}function k(w,x){var v,d;for(v=0,d=x.length;v<d;v++){w.removeChild(x[v]);}}function f(v,x,d,w){v.setAttribute("action",d);v.setAttribute("method",w||"POST");v.setAttribute("target","io-multi-response-"+x);v.setAttribute(a.UA.ie&&!b?"encoding":"enctype","multipart/form-data");}function c(v,d){var w;for(w in d){if(d.hasOwnProperty(w)){if(d[w]){v.setAttribute(w,v[w]);}else{v.removeAttribute(w);}}}}function p(d,v){a.io._timeout[d.id]=l.setTimeout(function(){var w={id:d.id,status:"timeout"};a.io.end(w,v);},v.timeout);}function m(d){l.clearTimeout(a.io._timeout[d]);delete a.io._timeout[d];}function j(v,d){if(!d.debug){a.Event.purgeElement("#io-multi-response-"+v,false);a.one("body").removeChild(a.one("#io-multi-response-"+v));}if(d.form.id.indexOf("io-multi-response-form-")===0){a.one("body").removeChild(a.one("#"+d.form.id));}}function h(d,v){if(v.timeout){m(d.id);}a.io.end(d,v);l.setTimeout(function(){j(d.id,v);},0);}function r(v,w){var d=a.Node.create('<iframe id="io-multi-response-'+v.id+'" name="io-multi-response-'+v.id+'" />');d._node.style.position="absolute";d._node.style.top="-1000px";d._node.style.left="-1000px";a.one("body").appendChild(d);a.on("load",function(){h(v,w);},"#io-multi-response-"+v.id);}function q(w){var v=a.guid("io-multi-response-form-"),d=a.Node.create('<form id="'+v+'" name="'+v+'" />');d._node.style.position="absolute";d._node.style.top="-1000px";d._node.style.left="-1000px";a.one("body").appendChild(d);return v;}function u(y,w,z){var x=(typeof z.form.id==="string")?s.getElementById(z.form.id):z.form.id,v=[],d={method:x.getAttribute("method"),action:x.getAttribute("action"),target:x.getAttribute("target")};f(x,y.id,w,z.method);if(z.data){v=i(x,z.data);}if(z.json){v.push(g(x,z.json));}if(z.timeout){p(y,z);}x.submit();a.io.start(y.id,z);if(z.data){k(x,v);}c(x,d);return{id:y.id,abort:function(){var A={id:y.id,status:"abort"};if(a.one("#io-multi-response-"+y.id)){j(y.id,z);a.io.end(A,z);}else{return false;}},isInProgress:function(){return a.one("#io-multi-response-"+y.id)?true:false;}};}function n(x,y){var w=new a.EventTarget().publish("transaction:"+x),d=y.arguments,v=y.context||a;if(d){w.on(y.on[x],v,d);}else{w.on(y.on[x],v);}return w;}var o=a.io.upload;a.io.upload=function(w,d,x){if(!x.multiresponse){return o.apply(this,arguments);}YUI.Env.io_multi_response_callback[w.id]=function(y){if(!y){return;}if(x.timeout){m(w.id);p(w,x);}if(x.on&&x.on.response){n("response",x).fire(w.id,y);}};var v="callback="+encodeURIComponent("window.parent.YUI.Env.io_multi_response_callback["+w.id+"]");x.data=x.data?x.data+"&"+v:v;if(x.form&&!x.form.id){delete x.form;}r(w,x);return u(w,d,x);};YUI.Env.io_multi_response_callback=[];var t=a.io;a.io=function(v,w,d){if(w.multiresponse&&!w.form){w.form={id:q(w),upload:true};}else{if(w.multiresponse&&!w.form.upload){w.form.upload=true;}}t.call(this,v,w,d);};a.mix(a.io,t);},"gallery-2011.03.16-21-24",{requires:["io-upload-iframe"],optional:["json-stringify"]});
+YUI.add("gallery-io-multiresponse",function(a){var l=a.config.win,s=a.config.doc,b=(s.documentMode&&s.documentMode>=8),e=decodeURIComponent;function i(y,x){var z=[],d=x.split("="),w,v;for(w=0,v=d.length-1;w<v;w++){z[w]=s.createElement("input");z[w].type="hidden";z[w].name=e(d[w].substring(d[w].lastIndexOf("&")+1));z[w].value=(w+1===v)?e(d[w+1]):e(d[w+1].substring(0,(d[w+1].lastIndexOf("&"))));y.appendChild(z[w]);}return z;}function g(w,v){if(!a.Lang.isString(v)){v=a.JSON.stringify(v);}var d=s.createElement("input");d.type="hidden";d.name="json";d.value=v;w.appendChild(d);return d;}function k(w,x){var v,d;for(v=0,d=x.length;v<d;v++){w.removeChild(x[v]);}}function f(v,x,d,w){v.setAttribute("action",d);v.setAttribute("method",w||"POST");v.setAttribute("target","io-multi-response-"+x);v.setAttribute(a.UA.ie&&!b?"encoding":"enctype","multipart/form-data");}function c(v,d){a.Object.each(d,function(w,x){if(w){v.setAttribute(x,w);}else{v.removeAttribute(x);}});}function p(d,v){a.io._timeout[d.id]=l.setTimeout(function(){var w={id:d.id,status:"timeout"};a.io.end(w,v);},v.timeout);}function m(d){l.clearTimeout(a.io._timeout[d]);delete a.io._timeout[d];}function j(v,d){if(!d.debug){a.Event.purgeElement("#io-multi-response-"+v,false);a.one("body").removeChild(a.one("#io-multi-response-"+v));}if(d.form.id.indexOf("io-multi-response-form-")===0){a.one("body").removeChild(a.one("#"+d.form.id));}}function h(d,v){if(v.timeout){m(d.id);}a.io.end(d,v);l.setTimeout(function(){j(d.id,v);},0);}function r(v,w){var d=a.Node.create('<iframe id="io-multi-response-'+v.id+'" name="io-multi-response-'+v.id+'" />');d._node.style.position="absolute";d._node.style.top="-1000px";d._node.style.left="-1000px";a.one("body").appendChild(d);a.on("load",function(){h(v,w);},"#io-multi-response-"+v.id);}function q(w){var v=a.guid("io-multi-response-form-"),d=a.Node.create('<form id="'+v+'" name="'+v+'" />');d._node.style.position="absolute";d._node.style.top="-1000px";d._node.style.left="-1000px";a.one("body").appendChild(d);return v;}function u(y,w,z){var x=(typeof z.form.id==="string")?s.getElementById(z.form.id):z.form.id,v=[],d={method:x.getAttribute("method"),action:x.getAttribute("action"),target:x.getAttribute("target")};f(x,y.id,w,z.method);if(z.data){v=i(x,z.data);}if(z.json){v.push(g(x,z.json));}if(z.timeout){p(y,z);}x.submit();a.io.start(y.id,z);if(z.data){k(x,v);}c(x,d);return{id:y.id,abort:function(){var A={id:y.id,status:"abort"};if(a.one("#io-multi-response-"+y.id)){j(y.id,z);a.io.end(A,z);}else{return false;}},isInProgress:function(){return a.one("#io-multi-response-"+y.id)?true:false;}};}function n(x,y){var w=new a.EventTarget().publish("transaction:"+x),d=y.arguments,v=y.context||a;if(d){w.on(y.on[x],v,d);}else{w.on(y.on[x],v);}return w;}var o=a.io.upload;a.io.upload=function(w,d,x){if(!x.multiresponse){return o.apply(this,arguments);}YUI.Env.io_multi_response_callback[w.id]=function(y){if(!y){a.error("Callback "+w.id+" invoked without data.",null,"io");return;}if(x.timeout){m(w.id);p(w,x);}if(x.on&&x.on.response){n("response",x).fire(w.id,y);}};var v="callback="+encodeURIComponent("window.parent.YUI.Env.io_multi_response_callback["+w.id+"]");x.data=x.data?x.data+"&"+v:v;if(x.form&&!x.form.id){delete x.form;}r(w,x);return u(w,d,x);};if(!YUI.Env.io_multi_response_callback){YUI.Env.io_multi_response_callback=[];}var t=a.io;a.io=function(v,w,d){if(w.multiresponse&&!w.form){w.form={id:q(w),upload:true};}else{if(w.multiresponse&&!w.form.upload){w.form.upload=true;}}t.call(this,v,w,d);};a.mix(a.io,t);},"gallery-2011.06.01-20-18",{requires:["io-upload-iframe"],optional:["json-stringify"]});
View
26 build/gallery-io-multiresponse/gallery-io-multiresponse.js
@@ -133,18 +133,14 @@ function _setAttrs(f, id, uri, method) {
* @return {void}
*/
function _resetAttrs(f, a){
- var p;
-
- for (p in a) {
- if (a.hasOwnProperty(p)) {
- if (a[p]) {
- f.setAttribute(p, f[p]);
- }
- else {
- f.removeAttribute(p);
- }
+ Y.Object.each(a, function(v, p) {
+ if (v) {
+ f.setAttribute(p, v);
}
- }
+ else {
+ f.removeAttribute(p);
+ }
+ });
}
/**
@@ -368,6 +364,7 @@ Y.io.upload = function(o, uri, c) {
YUI.Env.io_multi_response_callback[ o.id ] = function(data) {
if (!data) {
+ Y.error('Callback ' + o.id + ' invoked without data.', null, 'io');
return;
}
@@ -393,7 +390,10 @@ Y.io.upload = function(o, uri, c) {
return _send(o, uri, c);
};
-YUI.Env.io_multi_response_callback = [];
+if (!YUI.Env.io_multi_response_callback)
+{
+ YUI.Env.io_multi_response_callback = [];
+}
var orig_io = Y.io;
@@ -419,4 +419,4 @@ Y.io = function(uri, c, i) {
Y.mix(Y.io, orig_io);
-}, 'gallery-2011.03.16-21-24' ,{requires:['io-upload-iframe'], optional:['json-stringify']});
+}, 'gallery-2011.06.01-20-18' ,{requires:['io-upload-iframe'], optional:['json-stringify']});
View
7 build/gallery-querybuilder/gallery-querybuilder-debug.js
@@ -77,11 +77,6 @@ function QueryBuilder(
/* object */ operators,
/* object */ config)
{
- if (arguments.length === 0) // derived class prototype
- {
- return;
- }
-
if (!Y.FormManager)
{
Y.FormManager =
@@ -1011,4 +1006,4 @@ QueryBuilder.plugin_mapping =
};
-}, 'gallery-2011.04.13-22-38' ,{skinnable:true, optional:['gallery-formmgr','gallery-scrollintoview','autocomplete'], requires:['widget','substitute']});
+}, 'gallery-2011.06.01-20-18' ,{skinnable:true, optional:['gallery-formmgr','gallery-scrollintoview','autocomplete'], requires:['widget','substitute']});
View
4 build/gallery-querybuilder/gallery-querybuilder-min.js
@@ -1,2 +1,2 @@
-YUI.add("gallery-querybuilder",function(a){var d=(0<a.UA.ie&&a.UA.ie<9);function b(k,j,l){if(arguments.length===0){return;}if(!a.FormManager){a.FormManager={row_marker_class:"",status_marker_class:"",required_class:""};}this.var_list=k.slice(0);this.op_list=a.clone(j,true);this.op_list.none=[];this.row_list=[];b.superclass.constructor.call(this,l);}b.NAME="querybuilder";b.ATTRS={chooseVarPrompt:{value:"Choose a Variable",validator:a.Lang.isString,writeOnce:true},fieldPrefix:{value:"",validator:a.Lang.isString,writeOnce:true},pluginConfig:{value:{},validator:a.Lang.isObject,writeOnce:true}};function f(){this.var_list.unshift({name:"yui3-querybuilder-choose-prompt",type:"none",text:this.get("chooseVarPrompt")});}function i(l,m){var k=l.length;for(var j=0;j<k;j++){if(l[j].row==m){return j;}}return -1;}function h(k,j){this.appendNew();}function g(l,k){var j=i(this.row_list,k);if(j>=0){this.remove(j);}}function c(l,k){var j=i(this.row_list,k);if(j>=0){this.update(j);}}function e(j){if(j.keyCode!=13){this._notifyChanged();}}a.extend(b,a.Widget,{initializer:function(j){var k=this.get("fieldPrefix");this.var_menu_name_pattern=k+"query_var_{i}";this.get("pluginConfig").field_prefix=k;this.plugin_column_count=0;f.call(this);},renderUI:function(){var j=this.get("contentBox");j.on("change",this._notifyChanged,this);j.on("keyup",e,this);this.table=a.Node.create("<table></table>");j.appendChild(this.table);this.appendNew();},destructor:function(){for(var j=0;j<this.row_list.length;j++){if(this.row_list[j].plugin){this.row_list[j].plugin.destroy();}}this.row_list=null;this.table=null;},reset:function(k,j){this._allow_remove_last_row=true;for(var l=this.row_list.length-1;l>=0;l--){this.remove(l);}this._allow_remove_last_row=false;if(k){this.var_list=k.slice(0);f.call(this);}if(j){this.op_list=a.clone(j,true);this.op_list.none=[];}this.appendNew();},appendNew:function(m,w){if(m&&this.row_list.length==1){var o=this.row_list[0].var_menu;if(o.get("selectedIndex")===0){for(var r=0;r<this.var_list.length;r++){if(this.var_list[r].name==m){o.set("selectedIndex",r);break;}}this.update(0,w);return this.row_list[0].plugin;}}var u=this.row_list.length;var k=a.Node.create("<tbody></tbody>");k.set("className",a.FormManager.row_marker_class);var t=a.Node.create("<tr></tr>");t.set("className",this.getClassName("error"));k.appendChild(t);var l=this._createContainer();l.set("colSpan",1+this.plugin_column_count);l.set("innerHTML",'<p class="'+a.FormManager.status_marker_class+'"></p>');t.appendChild(l);t.appendChild(this._createContainer());var q=a.Node.create("<tr></tr>");q.set("className",this.getClassName("criterion"));k.appendChild(q);var j=this._createContainer();j.set("className",this.getClassName("variable"));q.appendChild(j);j.set("innerHTML",this._variablesMenu(this.variableName(u)));var o=j.one("select");o.on("change",c,this,q);var x=a.Node.getDOMNode(o).options;for(var r=0;r<this.var_list.length;r++){x[r]=new Option(this.var_list[r].text,this.var_list[r].name);if(this.var_list[r].name==m){o.set("selectedIndex",r);}}if(d){o.on("change",this._notifyChanged,this);}var s=this._createContainer();s.set("className",this.getClassName("controls"));s.set("innerHTML",this._rowControls());q.appendChild(s);var n=s.one("."+this.getClassName("insert"));if(n){n.on("click",h,this,q);}var v=s.one("."+this.getClassName("remove"));if(v){v.on("click",g,this,q);}this.table.appendChild(k);var p={body:k,row:q,var_menu:o,control:s,error:l};this.row_list.push(p);this.update(u,w);k.scrollIntoView();return this.row_list[u].plugin;},update:function(u,v){var r=this.row_list[u].row;var t=this.row_list[u].control;this.row_list[u].error.one("."+a.FormManager.status_marker_class).set("innerHTML","");if(this.row_list[u].plugin){this.row_list[u].plugin.destroy();this.row_list[u].plugin=null;}while(r.get("children").size()>2){var m=r.get("children").item(0).next();m.remove(true);}var n=this.row_list[u].var_menu;var l=this.var_list[n.get("selectedIndex")];var w=[];if(l.type!="none"){this.row_list[u].plugin=new b.plugin_mapping[l.type](this,this.get("pluginConfig"));w=this.row_list[u].plugin.create(u,l,this.op_list[l.type],v);}while(w.length<this.plugin_column_count){w.push(this._createContainer());}for(var q=0;q<w.length;q++){r.insertBefore(w[q],t);}if(w.length>this.plugin_column_count){var k=1+w.length;for(var q=0;q<this.row_list.length;q++){var x=this.row_list[q].row;this.row_list[q].error.set("colSpan",k);if(x!=r){var p=this.row_list[q].control;for(var o=this.plugin_column_count;o<w.length;o++){x.insertBefore(this._createContainer(),p);}}}this.plugin_column_count=w.length;}var s=this.row_list[u].plugin;if(s&&a.Lang.isFunction(s.postCreate)){this.row_list[u].plugin.postCreate(u,l,this.op_list[l.type],v);}},remove:function(l){if(this.row_list.length<=0){return false;}if(!this._allow_remove_last_row&&this.row_list.length==1){var k=this.row_list[0].var_menu;k.set("selectedIndex",0);this.update(0);this.fire("queryChanged",{remove:true});return true;}var n=this.row_list[l].body;if(n===null){return false;}if(this.row_list[l].plugin){this.row_list[l].plugin.destroy();}n.remove(true);this.row_list.splice(l,1);for(var j=0;j<this.row_list.length;j++){var k=this.row_list[j].var_menu;k.setAttribute("name",this.variableName(j));var m=this.var_list[k.get("selectedIndex")];if(m.type!="none"){this.row_list[j].plugin.updateName(j);}}this.fire("queryChanged",{remove:true});return true;},getPlugin:function(j){return this.row_list[j].plugin;},toDatabaseQuery:function(){var k=[];for(var m=0;m<this.row_list.length;m++){var p=this.row_list[m];var n=p.plugin;if(n){var o=n.toDatabaseQuery();for(var l=0;l<o.length;l++){k.push([p.var_menu.get("value")].concat(o[l]));}}}return k;},_createContainer:function(){return a.Node.create("<td></td>");},_notifyChanged:function(){this.fire("queryChanged");},variableName:function(j){return a.Lang.substitute(this.var_menu_name_pattern,{i:j});},_variablesMenu:function(k){var j='<select name="{n}" class="formmgr-field {c}" />';return a.Lang.substitute(j,{n:k,c:this.getClassName("field")});
-},_rowControls:function(){var j='<span class="{ci}"></span>'+'<span class="{cr}"></span>';if(!this._controls_markup){this._controls_markup=a.Lang.substitute(j,{ci:this.getClassName("insert"),cr:this.getClassName("remove")});}return this._controls_markup;}});a.QueryBuilder=b;b.String=function(k,j){this.qb=k;this.op_menu_name_pattern=j.field_prefix+"query_op_{i}";this.val_input_name_pattern=j.field_prefix+"query_val_{i}";};b.String.prototype={create:function(o,n,j,p){var m=this.qb._createContainer();m.set("className",this.qb.getClassName("operator"));m.set("innerHTML",this._operationsMenu(this.operationName(o)));this.op_menu=m.one("select");var k=a.Node.getDOMNode(this.op_menu).options;for(var l=0;l<j.length;l++){k[l]=new Option(j[l].text,j[l].value);}p=p||["",""];if(p[0]){this.op_menu.set("value",p[0]);}if(d){this.op_menu.on("change",this.qb._notifyChanged,this.qb);}var q=this.qb._createContainer();q.set("className",this.qb.getClassName("value"));q.set("innerHTML",this._valueInput(this.valueName(o),n.validation));this.value_input=q.one("input");this.value_input.set("value",p[1]);return[m,q];},postCreate:function(l,k,j,m){a.Lang.later(1,this,function(){if(this.value_input){if(k.autocomplete){var n=a.clone(k.autocomplete);n.render=a.one("body");this.value_input.plug(a.Plugin.AutoComplete,n);if(k.autocomplete.containerClassName){this.value_input.ac.get("boundingBox").addClass(k.autocomplete.containerClassName);}}try{this.value_input.focus();}catch(o){}}});},destroy:function(){if(this.value_input.unplug){this.value_input.unplug(a.Plugin.AutoComplete);}this.op_menu=null;this.value_input=null;},updateName:function(j){this.op_menu.setAttribute("name",this.operationName(j));this.value_input.setAttribute("name",this.valueName(j));},set:function(j,k){this.op_menu.set("value",k[this.operationName(j)]);this.value_input.set("value",k[this.valueName(j)]);},toDatabaseQuery:function(){return[[this.op_menu.get("value"),this.value_input.get("value")]];},operationName:function(j){return a.Lang.substitute(this.op_menu_name_pattern,{i:j});},valueName:function(j){return a.Lang.substitute(this.val_input_name_pattern,{i:j});},_operationsMenu:function(k){var j='<select name="{n}" class="formmgr-field {c}" />';return a.Lang.substitute(j,{n:k,c:this.qb.getClassName("field")});},_valueInput:function(l,k){var j='<input type="text" name="{n}" class="yiv-required formmgr-field {c}"/>';return a.Lang.substitute(j,{n:l,c:k+" "+this.qb.getClassName("field")});}};b.Select=function(k,j){this.qb=k;this.val_input_name_pattern=j.field_prefix+"query_val_{i}";};b.Select.prototype={create:function(o,n,j,p){var q=this.qb._createContainer();q.set("className",this.qb.getClassName("value"));q.set("innerHTML",this._valuesMenu(this.valueName(o)));this.value_menu=q.one("select");var k=a.Node.getDOMNode(this.value_menu).options;var m=n.value_list;for(var l=0;l<m.length;l++){k[l]=new Option(m[l].text,m[l].value);}if(p){this.value_menu.set("value",p);}if(d){this.value_menu.on("change",this.qb._notifyChanged,this.qb);}this.db_query_equals=j[0];return[q];},postCreate:function(l,k,j,m){try{this.value_menu.focus();}catch(n){}},destroy:function(){this.value_menu=null;},updateName:function(j){this.value_menu.setAttribute("name",this.valueName(j));},set:function(j,k){this.value_menu.set("value",k[this.valueName(j)]);},toDatabaseQuery:function(){return[[this.db_query_equals,this.value_menu.get("value")]];},valueName:function(j){return a.Lang.substitute(this.val_input_name_pattern,{i:j});},_valuesMenu:function(k){var j='<select name="{n}" class="formmgr-field {c}" />';return a.Lang.substitute(j,{n:k,c:this.qb.getClassName("field")});}};b.plugin_mapping={string:b.String,number:b.String,select:b.Select};},"gallery-2011.04.13-22-38",{skinnable:true,optional:["gallery-formmgr","gallery-scrollintoview","autocomplete"],requires:["widget","substitute"]});
+YUI.add("gallery-querybuilder",function(a){var d=(0<a.UA.ie&&a.UA.ie<9);function b(k,j,l){if(!a.FormManager){a.FormManager={row_marker_class:"",status_marker_class:"",required_class:""};}this.var_list=k.slice(0);this.op_list=a.clone(j,true);this.op_list.none=[];this.row_list=[];b.superclass.constructor.call(this,l);}b.NAME="querybuilder";b.ATTRS={chooseVarPrompt:{value:"Choose a Variable",validator:a.Lang.isString,writeOnce:true},fieldPrefix:{value:"",validator:a.Lang.isString,writeOnce:true},pluginConfig:{value:{},validator:a.Lang.isObject,writeOnce:true}};function f(){this.var_list.unshift({name:"yui3-querybuilder-choose-prompt",type:"none",text:this.get("chooseVarPrompt")});}function i(l,m){var k=l.length;for(var j=0;j<k;j++){if(l[j].row==m){return j;}}return -1;}function h(k,j){this.appendNew();}function g(l,k){var j=i(this.row_list,k);if(j>=0){this.remove(j);}}function c(l,k){var j=i(this.row_list,k);if(j>=0){this.update(j);}}function e(j){if(j.keyCode!=13){this._notifyChanged();}}a.extend(b,a.Widget,{initializer:function(j){var k=this.get("fieldPrefix");this.var_menu_name_pattern=k+"query_var_{i}";this.get("pluginConfig").field_prefix=k;this.plugin_column_count=0;f.call(this);},renderUI:function(){var j=this.get("contentBox");j.on("change",this._notifyChanged,this);j.on("keyup",e,this);this.table=a.Node.create("<table></table>");j.appendChild(this.table);this.appendNew();},destructor:function(){for(var j=0;j<this.row_list.length;j++){if(this.row_list[j].plugin){this.row_list[j].plugin.destroy();}}this.row_list=null;this.table=null;},reset:function(k,j){this._allow_remove_last_row=true;for(var l=this.row_list.length-1;l>=0;l--){this.remove(l);}this._allow_remove_last_row=false;if(k){this.var_list=k.slice(0);f.call(this);}if(j){this.op_list=a.clone(j,true);this.op_list.none=[];}this.appendNew();},appendNew:function(m,w){if(m&&this.row_list.length==1){var o=this.row_list[0].var_menu;if(o.get("selectedIndex")===0){for(var r=0;r<this.var_list.length;r++){if(this.var_list[r].name==m){o.set("selectedIndex",r);break;}}this.update(0,w);return this.row_list[0].plugin;}}var u=this.row_list.length;var k=a.Node.create("<tbody></tbody>");k.set("className",a.FormManager.row_marker_class);var t=a.Node.create("<tr></tr>");t.set("className",this.getClassName("error"));k.appendChild(t);var l=this._createContainer();l.set("colSpan",1+this.plugin_column_count);l.set("innerHTML",'<p class="'+a.FormManager.status_marker_class+'"></p>');t.appendChild(l);t.appendChild(this._createContainer());var q=a.Node.create("<tr></tr>");q.set("className",this.getClassName("criterion"));k.appendChild(q);var j=this._createContainer();j.set("className",this.getClassName("variable"));q.appendChild(j);j.set("innerHTML",this._variablesMenu(this.variableName(u)));var o=j.one("select");o.on("change",c,this,q);var x=a.Node.getDOMNode(o).options;for(var r=0;r<this.var_list.length;r++){x[r]=new Option(this.var_list[r].text,this.var_list[r].name);if(this.var_list[r].name==m){o.set("selectedIndex",r);}}if(d){o.on("change",this._notifyChanged,this);}var s=this._createContainer();s.set("className",this.getClassName("controls"));s.set("innerHTML",this._rowControls());q.appendChild(s);var n=s.one("."+this.getClassName("insert"));if(n){n.on("click",h,this,q);}var v=s.one("."+this.getClassName("remove"));if(v){v.on("click",g,this,q);}this.table.appendChild(k);var p={body:k,row:q,var_menu:o,control:s,error:l};this.row_list.push(p);this.update(u,w);k.scrollIntoView();return this.row_list[u].plugin;},update:function(u,v){var r=this.row_list[u].row;var t=this.row_list[u].control;this.row_list[u].error.one("."+a.FormManager.status_marker_class).set("innerHTML","");if(this.row_list[u].plugin){this.row_list[u].plugin.destroy();this.row_list[u].plugin=null;}while(r.get("children").size()>2){var m=r.get("children").item(0).next();m.remove(true);}var n=this.row_list[u].var_menu;var l=this.var_list[n.get("selectedIndex")];var w=[];if(l.type!="none"){this.row_list[u].plugin=new b.plugin_mapping[l.type](this,this.get("pluginConfig"));w=this.row_list[u].plugin.create(u,l,this.op_list[l.type],v);}while(w.length<this.plugin_column_count){w.push(this._createContainer());}for(var q=0;q<w.length;q++){r.insertBefore(w[q],t);}if(w.length>this.plugin_column_count){var k=1+w.length;for(var q=0;q<this.row_list.length;q++){var x=this.row_list[q].row;this.row_list[q].error.set("colSpan",k);if(x!=r){var p=this.row_list[q].control;for(var o=this.plugin_column_count;o<w.length;o++){x.insertBefore(this._createContainer(),p);}}}this.plugin_column_count=w.length;}var s=this.row_list[u].plugin;if(s&&a.Lang.isFunction(s.postCreate)){this.row_list[u].plugin.postCreate(u,l,this.op_list[l.type],v);}},remove:function(l){if(this.row_list.length<=0){return false;}if(!this._allow_remove_last_row&&this.row_list.length==1){var k=this.row_list[0].var_menu;k.set("selectedIndex",0);this.update(0);this.fire("queryChanged",{remove:true});return true;}var n=this.row_list[l].body;if(n===null){return false;}if(this.row_list[l].plugin){this.row_list[l].plugin.destroy();}n.remove(true);this.row_list.splice(l,1);for(var j=0;j<this.row_list.length;j++){var k=this.row_list[j].var_menu;k.setAttribute("name",this.variableName(j));var m=this.var_list[k.get("selectedIndex")];if(m.type!="none"){this.row_list[j].plugin.updateName(j);}}this.fire("queryChanged",{remove:true});return true;},getPlugin:function(j){return this.row_list[j].plugin;},toDatabaseQuery:function(){var k=[];for(var m=0;m<this.row_list.length;m++){var p=this.row_list[m];var n=p.plugin;if(n){var o=n.toDatabaseQuery();for(var l=0;l<o.length;l++){k.push([p.var_menu.get("value")].concat(o[l]));}}}return k;},_createContainer:function(){return a.Node.create("<td></td>");},_notifyChanged:function(){this.fire("queryChanged");},variableName:function(j){return a.Lang.substitute(this.var_menu_name_pattern,{i:j});},_variablesMenu:function(k){var j='<select name="{n}" class="formmgr-field {c}" />';return a.Lang.substitute(j,{n:k,c:this.getClassName("field")});
+},_rowControls:function(){var j='<span class="{ci}"></span>'+'<span class="{cr}"></span>';if(!this._controls_markup){this._controls_markup=a.Lang.substitute(j,{ci:this.getClassName("insert"),cr:this.getClassName("remove")});}return this._controls_markup;}});a.QueryBuilder=b;b.String=function(k,j){this.qb=k;this.op_menu_name_pattern=j.field_prefix+"query_op_{i}";this.val_input_name_pattern=j.field_prefix+"query_val_{i}";};b.String.prototype={create:function(o,n,j,p){var m=this.qb._createContainer();m.set("className",this.qb.getClassName("operator"));m.set("innerHTML",this._operationsMenu(this.operationName(o)));this.op_menu=m.one("select");var k=a.Node.getDOMNode(this.op_menu).options;for(var l=0;l<j.length;l++){k[l]=new Option(j[l].text,j[l].value);}p=p||["",""];if(p[0]){this.op_menu.set("value",p[0]);}if(d){this.op_menu.on("change",this.qb._notifyChanged,this.qb);}var q=this.qb._createContainer();q.set("className",this.qb.getClassName("value"));q.set("innerHTML",this._valueInput(this.valueName(o),n.validation));this.value_input=q.one("input");this.value_input.set("value",p[1]);return[m,q];},postCreate:function(l,k,j,m){a.Lang.later(1,this,function(){if(this.value_input){if(k.autocomplete){var n=a.clone(k.autocomplete);n.render=a.one("body");this.value_input.plug(a.Plugin.AutoComplete,n);if(k.autocomplete.containerClassName){this.value_input.ac.get("boundingBox").addClass(k.autocomplete.containerClassName);}}try{this.value_input.focus();}catch(o){}}});},destroy:function(){if(this.value_input.unplug){this.value_input.unplug(a.Plugin.AutoComplete);}this.op_menu=null;this.value_input=null;},updateName:function(j){this.op_menu.setAttribute("name",this.operationName(j));this.value_input.setAttribute("name",this.valueName(j));},set:function(j,k){this.op_menu.set("value",k[this.operationName(j)]);this.value_input.set("value",k[this.valueName(j)]);},toDatabaseQuery:function(){return[[this.op_menu.get("value"),this.value_input.get("value")]];},operationName:function(j){return a.Lang.substitute(this.op_menu_name_pattern,{i:j});},valueName:function(j){return a.Lang.substitute(this.val_input_name_pattern,{i:j});},_operationsMenu:function(k){var j='<select name="{n}" class="formmgr-field {c}" />';return a.Lang.substitute(j,{n:k,c:this.qb.getClassName("field")});},_valueInput:function(l,k){var j='<input type="text" name="{n}" class="yiv-required formmgr-field {c}"/>';return a.Lang.substitute(j,{n:l,c:k+" "+this.qb.getClassName("field")});}};b.Select=function(k,j){this.qb=k;this.val_input_name_pattern=j.field_prefix+"query_val_{i}";};b.Select.prototype={create:function(o,n,j,p){var q=this.qb._createContainer();q.set("className",this.qb.getClassName("value"));q.set("innerHTML",this._valuesMenu(this.valueName(o)));this.value_menu=q.one("select");var k=a.Node.getDOMNode(this.value_menu).options;var m=n.value_list;for(var l=0;l<m.length;l++){k[l]=new Option(m[l].text,m[l].value);}if(p){this.value_menu.set("value",p);}if(d){this.value_menu.on("change",this.qb._notifyChanged,this.qb);}this.db_query_equals=j[0];return[q];},postCreate:function(l,k,j,m){try{this.value_menu.focus();}catch(n){}},destroy:function(){this.value_menu=null;},updateName:function(j){this.value_menu.setAttribute("name",this.valueName(j));},set:function(j,k){this.value_menu.set("value",k[this.valueName(j)]);},toDatabaseQuery:function(){return[[this.db_query_equals,this.value_menu.get("value")]];},valueName:function(j){return a.Lang.substitute(this.val_input_name_pattern,{i:j});},_valuesMenu:function(k){var j='<select name="{n}" class="formmgr-field {c}" />';return a.Lang.substitute(j,{n:k,c:this.qb.getClassName("field")});}};b.plugin_mapping={string:b.String,number:b.String,select:b.Select};},"gallery-2011.06.01-20-18",{skinnable:true,optional:["gallery-formmgr","gallery-scrollintoview","autocomplete"],requires:["widget","substitute"]});
View
7 build/gallery-querybuilder/gallery-querybuilder.js
@@ -77,11 +77,6 @@ function QueryBuilder(
/* object */ operators,
/* object */ config)
{
- if (arguments.length === 0) // derived class prototype
- {
- return;
- }
-
if (!Y.FormManager)
{
Y.FormManager =
@@ -1011,4 +1006,4 @@ QueryBuilder.plugin_mapping =
};
-}, 'gallery-2011.04.13-22-38' ,{skinnable:true, optional:['gallery-formmgr','gallery-scrollintoview','autocomplete'], requires:['widget','substitute']});
+}, 'gallery-2011.06.01-20-18' ,{skinnable:true, optional:['gallery-formmgr','gallery-scrollintoview','autocomplete'], requires:['widget','substitute']});
View
0 build/gallery-quickedit/assets/gallery-quickedit-core.css~upstream_master
No changes.
View
24 build/gallery-quickedit/gallery-quickedit-debug.js
@@ -55,9 +55,6 @@ Y.Column.ATTRS.qeFormatter =
* <dt>changed</dt><dd>Optional. The function to call with the old and new
* value. Should return true if the values are different.</dd>
*
- * <dt>copyDown</dt><dd>If true, the top cell in the column will have a
- * button to copy the value down to the rest of the rows.</dd>
- *
* <dt>formatter</dt><dd>The cell formatter which will render an
* appropriate form field: &lt;input type="text"&gt;, &lt;textarea&gt;,
* or &lt;select&gt;.</dd>
@@ -114,6 +111,10 @@ Y.Column.ATTRS.qeFormatter =
*/
/*
+ *
+ * <dt>copyDown</dt><dd>If true, the top cell in the column will have a
+ * button to copy the value down to the rest of the rows.</dd>
+ *
* <p>Custom QuickEdit Formatters</p>
*
* <p>To write a custom cell formatter for QuickEdit mode, you must
@@ -415,7 +416,7 @@ function copyDown(
}
}
-/**
+/*
* Called with exactly the same arguments as a normal cell
* formatter, this function inserts a "Copy down" button if the
* cell is in the first row of the DataTable. Call this at the end
@@ -527,8 +528,7 @@ Y.extend(QuickEdit, Y.Plugin.Base,
{
initializer: function(config)
{
- this.get('host').qe = this;
- this.hasMessages = false;
+ this.hasMessages = false;
},
/**
@@ -610,14 +610,10 @@ Y.extend(QuickEdit, Y.Plugin.Base,
delete this.saveEdit;
cols = host.get('columnset').keyHash;
- for (var key in this.saveFmt)
+ Y.Object.each(this.saveFmt, function(fmt, key)
{
- if (this.saveFmt.hasOwnProperty(key))
- {
- var col = cols[key];
- col.set('formatter', this.saveFmt[key]);
- }
- }
+ cols[key].set('formatter', fmt);
+ });
delete this.saveFmt;
var container = host.get('contentBox');
@@ -817,4 +813,4 @@ Y.namespace("Plugin");
Y.Plugin.DataTableQuickEdit = QuickEdit;
-}, 'gallery-2011.04.13-22-38' ,{skinnable:true, optional:['gallery-scrollintoview'], requires:['datatable-base','gallery-formmgr-css-validation','gallery-node-optimizations']});
+}, 'gallery-2011.06.01-20-18' ,{skinnable:true, optional:['gallery-scrollintoview'], requires:['datatable-base','gallery-formmgr-css-validation','gallery-node-optimizations']});
View
6 build/gallery-quickedit/gallery-quickedit-min.js
@@ -1,4 +1,4 @@
-YUI.add("gallery-quickedit",function(d){d.Column.ATTRS.quickEdit={};d.Column.ATTRS.qeFormatter={validator:d.Lang.isFunction};function j(s){j.superclass.constructor.call(this,s);}j.NAME="QuickEditPlugin";j.NS="qe";j.ATTRS={changesAlwaysInclude:{value:[],validator:d.Lang.isArray}};var o="(?:^|\\s)(?:",a=")(?:\\s|$)",f=/quickedit-key:([^\s]+)/,c="quickedit-has",n=c+"([a-z]+)",g=new RegExp(o+n+a),h="quickedit-has",b=h+"([a-z]+)",m=new RegExp(o+b+a);j.status_order=["error","warn","success","info"];function i(s){for(var t=0;t<j.status_order.length;t++){if(s==j.status_order[t]){return t;}}return j.status_order.length;}function e(t,s){return(!t||i(s)<i(t));}j.error_text_class="quickedit-message-text";j.error_display_markup='<div class="quickedit-message-text"></div>';j.textFormatter=function(u){var s='<input type="text" class="{yiv} quickedit-field quickedit-key:{key}" value="{value}"/>'+j.error_display_markup;var t=u.column.get("quickEdit");return d.Lang.sub(s,{key:u.column.get("key"),yiv:t.validation?(t.validation.css||""):"",value:u.value||u.value===0?u.value.toString().replace('"',""):""});};j.textareaFormatter=function(u){var s='<textarea class="{yiv} quickedit-field quickedit-key:{key}" value="{value}"/>'+j.error_display_markup;var t=u.column.get("quickEdit");return d.Lang.sub(s,{key:u.column.get("key"),yiv:t.validation?(t.validation.css||""):"",value:u.value||u.value===0?u.value.toString().replace('"',""):""});};j.readonlyEmailFormatter=function(s){return(s.value||"");};j.readonlyLinkFormatter=function(s){return(s.value||"");};function r(u,t){var w=null;this._tbodyNode.get("children").some(function(x){if(x.contains(u)){w=x;return true;}});if(!w){return null;}var s=u.getAncestorByTagName("td",true);var v=-1;w.get("children").some(function(y,x){if(y===s){v=x;return true;}});w=(t<0?w.previous():w.next());return w?w.get("children").item(v):null;}function p(v,s){var u=s.one(".quickedit-field");if(!u){return;}var t=d.Lang.trim(u.get("value"));if(!t&&t!==0){return;}while(1){s=r.call(this,s,+1);if(!s){break;}u=s.one(".quickedit-field");if(u){u.set("value",t);}}}j.copyDownFormatter=function(t){if(t.column.get("quickEdit").copyDown&&t.rowindex===0){var s=d.Node.create("<button></button>");s.set("title","Copy down");s.set("innerHTML","&darr;");t.td.insert(s,t.td.one("."+j.error_text_class));s.on("click",p,t.td,this);}};function k(t,s){return function(u){return(u.record?t:s).apply(this,arguments);};}function q(u){var s=r.call(this,u.target,u.charCode==38?-1:+1);if(s){var t=s.one(".quickedit-field");if(t){t.focus();t.select();u.halt(true);}}}function l(y){var B=this.get("host");var z=B.get("columnset").keyHash;var u=true;var w=y.size();for(var v=0;v<w;v++){var x=y.item(v);var t=z[this._getColumnKey(x)].get("quickEdit");if(!t){continue;}var A=t.validation?t.validation.msg:null;var s=d.FormManager.validateFromCSSData(x,A);if(s.error){this.displayMessage(x,s.error,"error");u=false;continue;}if(s.keepGoing){if(t.validation&&t.validation.regex instanceof RegExp&&!t.validation.regex.test(x.get("value"))){this.displayMessage(x,A?A.regex:null,"error");u=false;continue;}}if(t.validation&&d.Lang.isFunction(t.validation.fn)&&!t.validation.fn.call(B,x)){u=false;continue;}}return u;}d.extend(j,d.Plugin.Base,{initializer:function(s){this.get("host").qe=this;this.hasMessages=false;},start:function(){this.fire("clearErrorNotification");var B=this.get("host");var y=B.get("columnset").keys;this.saveSort=[];this.saveEdit={};this.saveFmt={};for(var w=0;w<y.length;w++){var u=y[w];var A=u.get("key");this.saveSort.push(u.get("sortable"));u.set("sortable",false);var v=u.get("quickEdit");var C=u.get("qeFormatter");if(
+YUI.add("gallery-quickedit",function(d){d.Column.ATTRS.quickEdit={};d.Column.ATTRS.qeFormatter={validator:d.Lang.isFunction};function j(s){j.superclass.constructor.call(this,s);}j.NAME="QuickEditPlugin";j.NS="qe";j.ATTRS={changesAlwaysInclude:{value:[],validator:d.Lang.isArray}};var o="(?:^|\\s)(?:",a=")(?:\\s|$)",f=/quickedit-key:([^\s]+)/,c="quickedit-has",n=c+"([a-z]+)",g=new RegExp(o+n+a),h="quickedit-has",b=h+"([a-z]+)",m=new RegExp(o+b+a);j.status_order=["error","warn","success","info"];function i(s){for(var t=0;t<j.status_order.length;t++){if(s==j.status_order[t]){return t;}}return j.status_order.length;}function e(t,s){return(!t||i(s)<i(t));}j.error_text_class="quickedit-message-text";j.error_display_markup='<div class="quickedit-message-text"></div>';j.textFormatter=function(u){var s='<input type="text" class="{yiv} quickedit-field quickedit-key:{key}" value="{value}"/>'+j.error_display_markup;var t=u.column.get("quickEdit");return d.Lang.sub(s,{key:u.column.get("key"),yiv:t.validation?(t.validation.css||""):"",value:u.value||u.value===0?u.value.toString().replace('"',""):""});};j.textareaFormatter=function(u){var s='<textarea class="{yiv} quickedit-field quickedit-key:{key}" value="{value}"/>'+j.error_display_markup;var t=u.column.get("quickEdit");return d.Lang.sub(s,{key:u.column.get("key"),yiv:t.validation?(t.validation.css||""):"",value:u.value||u.value===0?u.value.toString().replace('"',""):""});};j.readonlyEmailFormatter=function(s){return(s.value||"");};j.readonlyLinkFormatter=function(s){return(s.value||"");};function r(u,t){var w=null;this._tbodyNode.get("children").some(function(x){if(x.contains(u)){w=x;return true;}});if(!w){return null;}var s=u.getAncestorByTagName("td",true);var v=-1;w.get("children").some(function(y,x){if(y===s){v=x;return true;}});w=(t<0?w.previous():w.next());return w?w.get("children").item(v):null;}function p(v,s){var u=s.one(".quickedit-field");if(!u){return;}var t=d.Lang.trim(u.get("value"));if(!t&&t!==0){return;}while(1){s=r.call(this,s,+1);if(!s){break;}u=s.one(".quickedit-field");if(u){u.set("value",t);}}}j.copyDownFormatter=function(t){if(t.column.get("quickEdit").copyDown&&t.rowindex===0){var s=d.Node.create("<button></button>");s.set("title","Copy down");s.set("innerHTML","&darr;");t.td.insert(s,t.td.one("."+j.error_text_class));s.on("click",p,t.td,this);}};function k(t,s){return function(u){return(u.record?t:s).apply(this,arguments);};}function q(u){var s=r.call(this,u.target,u.charCode==38?-1:+1);if(s){var t=s.one(".quickedit-field");if(t){t.focus();t.select();u.halt(true);}}}function l(y){var B=this.get("host");var z=B.get("columnset").keyHash;var u=true;var w=y.size();for(var v=0;v<w;v++){var x=y.item(v);var t=z[this._getColumnKey(x)].get("quickEdit");if(!t){continue;}var A=t.validation?t.validation.msg:null;var s=d.FormManager.validateFromCSSData(x,A);if(s.error){this.displayMessage(x,s.error,"error");u=false;continue;}if(s.keepGoing){if(t.validation&&t.validation.regex instanceof RegExp&&!t.validation.regex.test(x.get("value"))){this.displayMessage(x,A?A.regex:null,"error");u=false;continue;}}if(t.validation&&d.Lang.isFunction(t.validation.fn)&&!t.validation.fn.call(B,x)){u=false;continue;}}return u;}d.extend(j,d.Plugin.Base,{initializer:function(s){this.hasMessages=false;},start:function(){this.fire("clearErrorNotification");var B=this.get("host");var y=B.get("columnset").keys;this.saveSort=[];this.saveEdit={};this.saveFmt={};for(var w=0;w<y.length;w++){var u=y[w];var A=u.get("key");this.saveSort.push(u.get("sortable"));u.set("sortable",false);var v=u.get("quickEdit");var C=u.get("qeFormatter");if(
/*!col.hidden &&*/
-(v||C)){var z=null;if(v&&d.Lang.isFunction(v.formatter)){z=v.formatter;}else{if(d.Lang.isFunction(C)){z=C;}else{z=j.textFormatter;}}if(z){var x=u.get("formatter");var t=k.call(this,z,x);this.saveFmt[A]=x;u.set("formatter",t);}}}var s=B.get("contentBox");s.addClass(B.getClassName("quickedit"));this.move_event_handle=s.on("key",q,"down:38+ctrl,40+ctrl",B);B.syncUI();},cancel:function(){this.fire("clearErrorNotification");var w=this.get("host");var x=w.get("columnset").keys;for(var v=0;v<x.length;v++){var t=x[v];t.set("sortable",this.saveSort[v]);}delete this.saveSort;delete this.saveEdit;x=w.get("columnset").keyHash;for(var u in this.saveFmt){if(this.saveFmt.hasOwnProperty(u)){var t=x[u];t.set("formatter",this.saveFmt[u]);}}delete this.saveFmt;var s=w.get("contentBox");s.removeClass(w.getClassName("quickedit"));if(this.move_event_handle){this.move_event_handle.detach();delete this.move_event_handle;}w.syncUI();},getChanges:function(){if(!this.validate()){return false;}var I=[];var w=this.get("changesAlwaysInclude");var C=this.get("host");var G=C.get("recordset");var x=C._tbodyNode.get("children");var A=x.size();var y=C.get("columnset").keyHash;for(var F=0;F<A;F++){var v=G.getRecord(F);var H=x.item(F).all(".quickedit-field");var z={};I.push(z);var B=H.size();for(var E=0;E<B;E++){var s=H.item(E);var K=this._getColumnKey(s);var t=y[K];var u=t.get("quickEdit");var D=v.getValue(K);var J=d.Lang.trim(s.get("value"));if(u.changed?u.changed(D,J):J!==(D?D.toString():"")){z[K]=J;}}for(var E=0;E<w.length;E++){var K=w[E];z[K]=v.getValue(K);}}return I;},validate:function(){this.clearMessages();var s=true;var t=this.get("host");var w=t._tbodyNode.getElementsByTagName("input");var v=t._tbodyNode.getElementsByTagName("textarea");var u=t._tbodyNode.getElementsByTagName("select");s=l.call(this,w)&&s;s=l.call(this,v)&&s;s=l.call(this,u)&&s;if(!s){this.fire("notifyErrors");}return s;},clearMessages:function(){this.hasMessages=false;this.fire("clearErrorNotification");var s=this.get("host");s._tbodyNode.getElementsByClassName(n).removeClass(n);s._tbodyNode.getElementsByClassName(b).removeClass(b);s._tbodyNode.all("."+j.error_text_class).set("innerHTML","");},displayMessage:function(v,x,u,t){if(d.Lang.isUndefined(t)){t=true;}v=d.one(v);var w=v.getAncestorByTagName("tr");if(e(this._getElementStatus(w,g),u)){if(!this.hasMessages&&t){d.one(w.get("firstChild")).scrollIntoView();
-}w.replaceClass(n,c+u);this.hasMessages=true;}var s=v.getAncestorByTagName("td");if(e(this._getElementStatus(s,m),u)){if(x){s.one("."+j.error_text_class).set("innerHTML",x);}s.replaceClass(b,h+u);this.hasMessages=true;}},_getElementStatus:function(u,t){var s=u.get("className").match(t);return((s&&s.length)?s[1]:false);},_getColumnKey:function(t){var s=f.exec(t.get("className"));return s[1];}});d.namespace("Plugin");d.Plugin.DataTableQuickEdit=j;},"gallery-2011.04.13-22-38",{skinnable:true,optional:["gallery-scrollintoview"],requires:["datatable-base","gallery-formmgr-css-validation","gallery-node-optimizations"]});
+(v||C)){var z=null;if(v&&d.Lang.isFunction(v.formatter)){z=v.formatter;}else{if(d.Lang.isFunction(C)){z=C;}else{z=j.textFormatter;}}if(z){var x=u.get("formatter");var t=k.call(this,z,x);this.saveFmt[A]=x;u.set("formatter",t);}}}var s=B.get("contentBox");s.addClass(B.getClassName("quickedit"));this.move_event_handle=s.on("key",q,"down:38+ctrl,40+ctrl",B);B.syncUI();},cancel:function(){this.fire("clearErrorNotification");var v=this.get("host");var w=v.get("columnset").keys;for(var u=0;u<w.length;u++){var t=w[u];t.set("sortable",this.saveSort[u]);}delete this.saveSort;delete this.saveEdit;w=v.get("columnset").keyHash;d.Object.each(this.saveFmt,function(x,y){w[y].set("formatter",x);});delete this.saveFmt;var s=v.get("contentBox");s.removeClass(v.getClassName("quickedit"));if(this.move_event_handle){this.move_event_handle.detach();delete this.move_event_handle;}v.syncUI();},getChanges:function(){if(!this.validate()){return false;}var I=[];var w=this.get("changesAlwaysInclude");var C=this.get("host");var G=C.get("recordset");var x=C._tbodyNode.get("children");var A=x.size();var y=C.get("columnset").keyHash;for(var F=0;F<A;F++){var v=G.getRecord(F);var H=x.item(F).all(".quickedit-field");var z={};I.push(z);var B=H.size();for(var E=0;E<B;E++){var s=H.item(E);var K=this._getColumnKey(s);var t=y[K];var u=t.get("quickEdit");var D=v.getValue(K);var J=d.Lang.trim(s.get("value"));if(u.changed?u.changed(D,J):J!==(D?D.toString():"")){z[K]=J;}}for(var E=0;E<w.length;E++){var K=w[E];z[K]=v.getValue(K);}}return I;},validate:function(){this.clearMessages();var s=true;var t=this.get("host");var w=t._tbodyNode.getElementsByTagName("input");var v=t._tbodyNode.getElementsByTagName("textarea");var u=t._tbodyNode.getElementsByTagName("select");s=l.call(this,w)&&s;s=l.call(this,v)&&s;s=l.call(this,u)&&s;if(!s){this.fire("notifyErrors");}return s;},clearMessages:function(){this.hasMessages=false;this.fire("clearErrorNotification");var s=this.get("host");s._tbodyNode.getElementsByClassName(n).removeClass(n);s._tbodyNode.getElementsByClassName(b).removeClass(b);s._tbodyNode.all("."+j.error_text_class).set("innerHTML","");},displayMessage:function(v,x,u,t){if(d.Lang.isUndefined(t)){t=true;}v=d.one(v);var w=v.getAncestorByTagName("tr");if(e(this._getElementStatus(w,g),u)){if(!this.hasMessages&&t){d.one(w.get("firstChild")).scrollIntoView();}w.replaceClass(n,c+u);
+this.hasMessages=true;}var s=v.getAncestorByTagName("td");if(e(this._getElementStatus(s,m),u)){if(x){s.one("."+j.error_text_class).set("innerHTML",x);}s.replaceClass(b,h+u);this.hasMessages=true;}},_getElementStatus:function(u,t){var s=u.get("className").match(t);return((s&&s.length)?s[1]:false);},_getColumnKey:function(t){var s=f.exec(t.get("className"));return s[1];}});d.namespace("Plugin");d.Plugin.DataTableQuickEdit=j;},"gallery-2011.06.01-20-18",{skinnable:true,optional:["gallery-scrollintoview"],requires:["datatable-base","gallery-formmgr-css-validation","gallery-node-optimizations"]});
View
24 build/gallery-quickedit/gallery-quickedit.js
@@ -55,9 +55,6 @@ Y.Column.ATTRS.qeFormatter =
* <dt>changed</dt><dd>Optional. The function to call with the old and new
* value. Should return true if the values are different.</dd>
*
- * <dt>copyDown</dt><dd>If true, the top cell in the column will have a
- * button to copy the value down to the rest of the rows.</dd>
- *
* <dt>formatter</dt><dd>The cell formatter which will render an
* appropriate form field: &lt;input type="text"&gt;, &lt;textarea&gt;,
* or &lt;select&gt;.</dd>
@@ -114,6 +111,10 @@ Y.Column.ATTRS.qeFormatter =
*/
/*
+ *
+ * <dt>copyDown</dt><dd>If true, the top cell in the column will have a
+ * button to copy the value down to the rest of the rows.</dd>
+ *
* <p>Custom QuickEdit Formatters</p>
*
* <p>To write a custom cell formatter for QuickEdit mode, you must
@@ -415,7 +416,7 @@ function copyDown(
}
}
-/**
+/*
* Called with exactly the same arguments as a normal cell
* formatter, this function inserts a "Copy down" button if the
* cell is in the first row of the DataTable. Call this at the end
@@ -527,8 +528,7 @@ Y.extend(QuickEdit, Y.Plugin.Base,
{
initializer: function(config)
{
- this.get('host').qe = this;
- this.hasMessages = false;
+ this.hasMessages = false;
},
/**
@@ -610,14 +610,10 @@ Y.extend(QuickEdit, Y.Plugin.Base,
delete this.saveEdit;
cols = host.get('columnset').keyHash;
- for (var key in this.saveFmt)
+ Y.Object.each(this.saveFmt, function(fmt, key)
{
- if (this.saveFmt.hasOwnProperty(key))
- {
- var col = cols[key];
- col.set('formatter', this.saveFmt[key]);
- }
- }
+ cols[key].set('formatter', fmt);
+ });
delete this.saveFmt;
var container = host.get('contentBox');
@@ -817,4 +813,4 @@ Y.namespace("Plugin");
Y.Plugin.DataTableQuickEdit = QuickEdit;
-}, 'gallery-2011.04.13-22-38' ,{skinnable:true, optional:['gallery-scrollintoview'], requires:['datatable-base','gallery-formmgr-css-validation','gallery-node-optimizations']});
+}, 'gallery-2011.06.01-20-18' ,{skinnable:true, optional:['gallery-scrollintoview'], requires:['datatable-base','gallery-formmgr-css-validation','gallery-node-optimizations']});
View
8 build/gallery-split-desktop/assets/gallery-split-desktop-core.css
@@ -30,7 +30,7 @@ HTML {
height: 100%;
position:absolute;
top: 0px;
- background: transparent url(../../pix-blue.gif) repeat-x bottom;
+ background: transparent url(pix-blue.gif) repeat-x bottom;
}
@@ -81,14 +81,10 @@ HTML {
border: none;
clear: both;
background-repeat: no-repeat;
- background: transparent url(../../drag-here.png) no-repeat 162px 7px; /* xx */
+ background: transparent url(drag-here.png) no-repeat 162px 7px; /* xx */
overflow-y: auto;
overflow-x: hidden;
-<<<<<<< HEAD:src/gallery-split-desktop/assets/gallery-split-desktop-core.css
width: 981px;/* hide scrollbar behind page_wrapper 960 + 21 */
-=======
- width: 981px;/* hide scrollbar behind page_wrapper */
->>>>>>> upstream/master:src/gallery-split-desktop/assets/gallery-split-desktop-core.css
}
#ea_body_main{
View
11 build/gallery-split-desktop/gallery-split-desktop-debug.js
@@ -21,7 +21,6 @@ var PX = 'px',
E_CROWN = 'Crown',
E_NE = 'NE',
E_NW = 'NW',
- E_CROWN = 'Crown',
PAGE_DEF_WIDTH = 960,
NW_MIN_WIDTH = 150,
DEF_MAIN_HEIGHT = 700,
@@ -214,7 +213,7 @@ Corresponding nodes are fetched after configuration based on updated selector
i,
HANDLE_IMG_URL = BASE_URL + PATH_TO_IMAGES + HANDLE_IMG;
- HANDLE_IMG_TPL = IMG_OPEN_TPL + ID_OPEN_TPL + DEF_PREFIX + HANDLE_ID + ID_CLOSE_TPL + SRC_OPEN_TPL + HANDLE_IMG_URL + SRC_CLOSE_TPL + IMG_CLOSE_TPL
+ HANDLE_IMG_TPL = IMG_OPEN_TPL + ID_OPEN_TPL + DEF_PREFIX + HANDLE_ID + ID_CLOSE_TPL + SRC_OPEN_TPL + HANDLE_IMG_URL + SRC_CLOSE_TPL + IMG_CLOSE_TPL;
Y.log('HANDLE_IMG_TPL ' + HANDLE_IMG_TPL, 'info', SplitDesktop.NAME);
for (i in config) {
@@ -460,7 +459,7 @@ hence the current x y is not necessarily at the bottom left corner of the window
_getBaseUrl : function () {
Y.log("setting baseurl. Dumping config if Y.dump is present", 'info', SplitDesktop.NAME);
- if(Y.dump){ Y.log(Y.dump(Y.config))};
+ if(Y.dump){ Y.log(Y.dump(Y.config));}
if(Y.config.modules){
if(Y.config.modules[GALLERYSPLITDESKTOP]){
/* defined as single module */
@@ -489,7 +488,7 @@ hence the current x y is not necessarily at the bottom left corner of the window
//extract root, assets relative to root
var url = Y.config.fullpath;
Y.log("Baseurl based on general fullpath", 'info', SplitDesktop.NAME);
- return url.substring(0,lastIndexOf('/',url)+1);
+ return url.substring(0,url.lastIndexOf('/')+1);
}else{
Y.log("Baseurl based on fallback path", 'info', SplitDesktop.NAME);
@@ -554,7 +553,7 @@ hence the current x y is not necessarily at the bottom left corner of the window
secondaryNode.setStyle(HEIGHT, val);
}
handleImgNode.setStyle('bottom', '0px');
- handleImgNode.setStyle('top', '')
+ handleImgNode.setStyle('top', '');
}
@@ -563,4 +562,4 @@ hence the current x y is not necessarily at the bottom left corner of the window
Y.namespace('Widget').SplitDesktop = SplitDesktop;
-}, 'gallery-2011.05.18-19-11' ,{requires:['widget','dd-constrain','event-hover']});
+}, 'gallery-2011.06.01-20-18' ,{requires:['widget','dd-constrain','event-hover']});
View
4 build/gallery-split-desktop/gallery-split-desktop-min.js
@@ -1,2 +1,2 @@
-YUI.add("gallery-split-desktop",function(Z){var aa="px",z="#",G="HTML",J="width",aw="height",aF="backgroundImage",i="backgroundPosition",S="assets/",az="/gallery-split-desktop/",ap="gallery-split-desktop",C="enter",s="drag",ad="close",ax="open",aj="Main",m="init",B="start",y="end",e="Crown",at="NE",an="NW",e="Crown",aC=960,ai=150,Q=700,b=30,aE="drag-here.png",aA=S+aE,R=162,O=7,aG="center-handle.png",ab=null,g="handle",N="ea_",W='id="',ar='" ',k="<img ",A='src="',ay='" ',l="/>",a=z+"99cccc",ac="pix-blue.gif",I=S+ac,X={wrapper:"page_wrapper",crown:"crown",nw:"nw",nwbody:"body_nw",ne:"ne",borders:"borders",nebody:"body_ne",main:"main"},v="pageWidth",av="bordersColor",ak="dragHereImg",D="pathToImages",T="borderPixImg",ag="handleImg",q="dragHereLeft",au="dragHereTop",F="mainHeight",am="crownHeight",H="isDragging",c="prefix",ao="closeCrownHeight",af="closeNWWidth",aB="closeNEWidth",aq="isCloseCrown",o="isCloseNW",x="isCloseNE",aD=z+N+X.ne,p=z+N+X.nwbody,n=z+N+X.main,L=z+N+X.wrapper,ah=null,r=null,f=null,ae=null,V=null,al=false,u=0,E=0,K=0,U=0,M=5,P=null,t=null,j=null;function d(h){d.superclass.constructor.apply(this,arguments);}d.NAME="splitDesktop";d.ATTRS={boundingBox:{value:G},contentBox:{value:"page_wrapper"},pageWidth:{value:aC+aa},bodyHeight:{value:Q+aa},dragHereImg:{value:aE},pathToImages:{value:S},pathToStyles:{value:S},pointerLeftPos:{value:R+aa},pointerTopPos:{value:O+aa},handleImage:{value:aG},handleId:{value:g},dragHereImgPath:{value:aA},defaultPrefix:{value:N},mainDivId:{value:X.main},bordersColor:{value:a},borderPixImg:{value:I},markupIsValidated:{value:null},handleImg:{value:aG},dragHereLeft:{value:R+aa},dragHereTop:{value:O+aa},mainHeight:{value:Q+aa},crownHeight:{value:b+aa,setter:"_setCrownHeight"},prefix:{value:N},baseUrl:{getter:"_getBaseUrl",lazyAdd:false},isDragging:{value:false},closeCrownHeight:{value:40,validator:"_validateCloseCrownHeight"},closeNWWidth:{value:30,validator:"_validateCloseNwWidth"},closeNEWidth:{value:30,validator:"_validateCloseNeWidth"},isCloseCrown:{value:false},isCloseNW:{value:false},isCloseNE:{value:false}};Z.extend(d,Z.Widget,{initializer:function(Y){var aJ=this.get("baseUrl"),aH,w=aJ+S+aG;ab=k+W+N+g+ar+A+w+ay+l;for(aH in Y){if(Y.hasOwnProperty(aH)){switch(aH){case v:aC=this.get(aH);var aI=aC-ai;var h=aC+21;Z.one(z+N+X.wrapper).setStyle("width",aC);Z.one(z+N+X.ne).setStyle("width",aI);Z.one(z+N+X.main).setStyle("width",h);break;case av:var aK=this.get(av);Z.one(z+N+X.borders).setStyle("borderLeftColor",aK).setStyle("borderBottomColor",aK);Z.one(z+N+X.wrapper).setStyle("borderColor",aK);break;case ak:case D:case T:case ag:aA=this.get(D)+this.get(ak);Z.one(z+N+X.main).setStyle(aF,'url("'+aA+'")');I=this.get(D)+this.get(T);if(aH===T||aH===D){Z.one(z+N+X.nw).setStyle(aF,I);}if(aH===ag||aH===D){N=this.get(c);w=this.get(D)+this.get(ag);ab=k+W+N+g+ar+A+w+ay+l;}break;case q:N=this.get(c);Z.one(z+N+X.main).setStyle(i,this.get(q)+aa+" "+this.get(au)+aa);break;case au:N=this.get(c);Z.one(z+N+X.main).setStyle(i,this.get(q)+aa+" "+this.get(au)+aa);break;case F:N=this.get(c);Z.one(z+N+X.main).setStyle(aw,this.get(F)+aa);break;case am:N=this.get(c);Z.one(z+N+X.ne).setStyle(aw,this.get(am)+aa);break;case c:N=this.get(c);aD=z+N+X.ne;p=z+N+X.nwbody;n=z+N+X.main;L=z+N+X.wrapper;ab=k+W+N+g+ar+A+w+ay+l;break;}}}this.publish(C+aj,{bubbles:true});this.publish(C+at,{bubbles:true});this.publish(C+an,{bubbles:true});this.publish(s+m,{});this.publish(s+B,{});this.publish(s+y,{});this.publish(ad+at,{});this.publish(ad+an,{});this.publish(ad+e,{});this.publish(ax+e,{});this.publish(ax+at,{});this.publish(ax+an,{});this._over=function(aL){switch(z+aL.currentTarget.get("id")){case p:if(!this.get("isDragging")){this.fire(C+an);}break;case aD:if(!this.get("isDragging")){this.fire(C+at);}break;case n:if(!this.get("isDragging")){this.fire(C+aj);}break;}};this._out=function(aL){return;};Z.one(L).delegate("hover",this._over,this._out,".sdt-active",this);},renderUI:function(){ah=Z.one(aD);ae=Z.Node.create(ab,ah);ah.append(ae);V=new Z.DD.Drag({node:z+N+g});V.plug(Z.Plugin.DDConstrained,{constrain2node:L});},bindUI:function(){V.on("drag:start",this._onDragStart,this);V.on("drag:drag",this._onDragDrag,this);V.on("drag:end",this._onDragEnd,this);},syncUI:function(){Z.one(G).setStyle("display","block");},_onDragStart:function(h){f=Z.one(n);this.set(H,true);switch(al){case false:this.fire(s+m);f.setStyle(aF,"none");case true:this.fire(s+B);U=parseInt(ah.getStyle(aw).toString().replace(aa,""),10);K=parseInt(ah.getStyle(J).toString().replace(aa,""),10);al=true;break;}},_onDragDrag:function(Y){r=Z.one(p);ah=Z.one(aD);var h=parseInt(Y.info.offset[0],10),w=parseInt(Y.info.offset[1],10);u=K-h;E=U+w;if(!t){t=this.get(v)-6-this.get(af);}if(!P){P=this.get(aB);}if(!j){j=this.get(ao);}this._isPaneClosed(o,an,t,u,true);this._isPaneClosed(x,at,P,u,false);this._isPaneClosed(aq,e,j,E,false);ah.setStyle(J,u);ah.setStyle(aw,E);r.setStyle(J,aC-u+M);r.setStyle(aw,E);},_onDragEnd:function(h){this.fire(s+y);this.set(H,false);this._repositionHandle();},_getBaseUrl:function(){if(Z.config.modules){if(Z.config.modules[ap]){if(Z.config.modules[ap].gallery){return Z.Env.base+Z.config.modules[ap].gallery+"/build/gallery-split-desktop/";}else{if(Z.config.modules[ap].fullpath){var h=Z.config.modules[ap].fullpath;return h.substring(0,h.lastIndexOf("/")+1);}else{if(Z.config.modules.base){return Z.config.modules.base;}}}}}else{if(Z.config.gallery){return Z.Env.base+Z.config.gallery+"/build/gallery-split-desktop/";}else{if(Z.config.fullpath){var h=Z.config.fullpath;return h.substring(0,lastIndexOf("/",h)+1);}else{return az;}}}},_getMain:function(){return Z.one(n);},_getSecondary:function(){return Z.one(p);},_getResizer:function(){return Z.one(aD);},_validateCloseCrownHeight:function(h){return(h>=this.get(am));},_validateCloseNWWidth:function(h){return(h>=0&&h<=parseInt(this.get(v).replace(aa,""),10)/4);},_validateCloseNEWidth:function(h){return(h>=0&&h<=parseInt(this.get(v).replace(aa,""),10)/4);},_isPaneClosed:function(aI,h,Y,aH,w){if(!this.get(aI)){if(this._evalLimits(Y<=aH,w)){this.set(aI,true);
-this.fire(ad+h);}}else{if(this._evalLimits(Y>aH,w)){this.set(aI,false);this.fire(ax+h);}}},_evalLimits:function(h,w){return w?h:!h;},_setCrownHeight:function(h){N=this.get(c);Z.one(z+N+X.ne).setStyle(aw,h+aa);this._repositionHandle(h);},_repositionHandle:function(h){ae.setStyle("left","0px");if(h){r.setStyle(aw,h);}ae.setStyle("bottom","0px");ae.setStyle("top","");}});Z.namespace("Widget").SplitDesktop=d;},"gallery-2011.05.18-19-11",{requires:["widget","dd-constrain","event-hover"]});