diff --git a/lib/yuilib/2in3/2.9.0/build/yui2-treeview/yui2-treeview-debug.js b/lib/yuilib/2in3/2.9.0/build/yui2-treeview/yui2-treeview-debug.js index fb761a003cb..4fa25cc390c 100644 --- a/lib/yuilib/2in3/2.9.0/build/yui2-treeview/yui2-treeview-debug.js +++ b/lib/yuilib/2in3/2.9.0/build/yui2-treeview/yui2-treeview-debug.js @@ -2533,11 +2533,13 @@ YAHOO.widget.Node.prototype = { sb[sb.length] = '
'; } - if (this.hasIcon) { + if (this.hasIcon && this.hasChildren()) { sb[sb.length] = ' '; + } else { + sb[sb.length] = '
'; } sb[sb.length] = '0||(d&&this.isDynamic()&&!this.dynamicLoadComplete));}},toggle:function(){if(!this.tree.locked&&(this.hasChildren(true)||this.isDynamic())){if(this.expanded){this.collapse();}else{this.expand();}}},getHtml:function(){this.childrenRendered=false;return['
',this.getNodeHtml(),this.getChildrenHtml(),"
"].join("");},getChildrenHtml:function(){var d=[];d[d.length]='
";return d.join("");},renderChildren:function(){var d=this;if(this.isDynamic()&&!this.dynamicLoadComplete){this.isLoading=true;this.tree.locked=true;if(this.dataLoader){setTimeout(function(){d.dataLoader(d,function(){d.loadComplete();});},10);}else{if(this.tree.root.dataLoader){setTimeout(function(){d.tree.root.dataLoader(d,function(){d.loadComplete(); -});},10);}else{return"Error: data loader not found or not specified.";}}return"";}else{return this.completeRender();}},completeRender:function(){var e=[];for(var d=0;d=this.depth||e<0){return null;}var d=this.parent;while(d.depth>e){d=d.parent;}return d;},getDepthStyle:function(d){return(this.getAncestor(d).nextSibling)?"ygtvdepthcell":"ygtvblankdepthcell";},getNodeHtml:function(){var e=[];e[e.length]='
';}if(this.hasIcon){e[e.length]='';}e[e.length]='
 
";return e.join("");},getContentHtml:function(){return"";},refresh:function(){this.getChildrenEl().innerHTML=this.completeRender();if(this.hasIcon){var d=this.getToggleEl();if(d){d.className=d.className.replace(/\bygtv[lt][nmp]h*\b/gi,this.getStyle());}}},toString:function(){return this._type+" ("+this.index+")";},_focusHighlightedItems:[],_focusedItem:null,_canHaveFocus:function(){return this.getEl().getElementsByTagName("a").length>0;},_removeFocus:function(){if(this._focusedItem){a.removeListener(this._focusedItem,"blur");this._focusedItem=null;}var d;while((d=this._focusHighlightedItems.shift())){b.removeClass(d,YAHOO.widget.TreeView.FOCUS_CLASS_NAME);}},focus:function(){var f=false,d=this;if(this.tree.currentFocus){this.tree.currentFocus._removeFocus();}var e=function(g){if(g.parent){e(g.parent);g.parent.expand();}};e(this);b.getElementsBy(function(g){return(/ygtv(([tl][pmn]h?)|(content))/).test(g.className);},"td",d.getEl().firstChild,function(h){b.addClass(h,YAHOO.widget.TreeView.FOCUS_CLASS_NAME);if(!f){var g=h.getElementsByTagName("a");if(g.length){g=g[0];g.focus();d._focusedItem=g;a.on(g,"blur",function(){d.tree.fireEvent("focusChanged",{oldNode:d.tree.currentFocus,newNode:null});d.tree.currentFocus=null;d._removeFocus();});f=true;}}d._focusHighlightedItems.push(h);});if(f){this.tree.fireEvent("focusChanged",{oldNode:this.tree.currentFocus,newNode:this});this.tree.currentFocus=this;}else{this.tree.fireEvent("focusChanged",{oldNode:d.tree.currentFocus,newNode:null});this.tree.currentFocus=null;this._removeFocus();}return f;},getNodeCount:function(){for(var d=0,e=0;d":"";return d.join("");},getNodeDefinition:function(){var d=YAHOO.widget.TextNode.superclass.getNodeDefinition.call(this);if(d===false){return false;}d.label=this.label;if(this.labelStyle!="ygtvlabel"){d.style=this.labelStyle;}if(this.title){d.title=this.title;}if(this.href){d.href=this.href;}if(this.target!="_self"){d.target=this.target;}return d;},toString:function(){return YAHOO.widget.TextNode.superclass.toString.call(this)+": "+this.label;},onLabelClick:function(){return false;},refresh:function(){YAHOO.widget.TextNode.superclass.refresh.call(this);var d=this.getLabelEl();d.innerHTML=this.label;if(d.tagName.toUpperCase()=="A"){d.href=this.href;d.target=this.target;}}});})();YAHOO.widget.MenuNode=function(c,b,a){YAHOO.widget.MenuNode.superclass.constructor.call(this,c,b,a);this.multiExpand=false;};YAHOO.extend(YAHOO.widget.MenuNode,YAHOO.widget.TextNode,{_type:"MenuNode"});(function(){var b=YAHOO.util.Dom,c=YAHOO.lang,a=YAHOO.util.Event;var d=function(h,g,f,e){if(h){this.init(h,g,f);this.initContent(h,e);}};YAHOO.widget.HTMLNode=d;YAHOO.extend(d,YAHOO.widget.Node,{contentStyle:"ygtvhtml",html:null,_type:"HTMLNode",initContent:function(f,e){this.setHtml(f);this.contentElId="ygtvcontentel"+this.index;if(!c.isUndefined(e)){this.hasIcon=e;}},setHtml:function(f){this.html=(c.isObject(f)&&"html" in f)?f.html:f;var e=this.getContentEl();if(e){if(f.nodeType&&f.nodeType==1&&f.tagName){e.innerHTML="";}else{e.innerHTML=this.html;}}},getContentHtml:function(){if(typeof this.html==="string"){return this.html;}else{d._deferredNodes.push(this);if(!d._timer){d._timer=window.setTimeout(function(){var e;while((e=d._deferredNodes.pop())){e.getContentEl().appendChild(e.html);}d._timer=null;},0);}return"";}},getNodeDefinition:function(){var e=d.superclass.getNodeDefinition.call(this);if(e===false){return false;}e.html=this.html;return e;}});d._deferredNodes=[];d._timer=null;})();(function(){var b=YAHOO.util.Dom,c=YAHOO.lang,a=YAHOO.util.Event,d=YAHOO.widget.Calendar;YAHOO.widget.DateNode=function(g,f,e){YAHOO.widget.DateNode.superclass.constructor.call(this,g,f,e);};YAHOO.extend(YAHOO.widget.DateNode,YAHOO.widget.TextNode,{_type:"DateNode",calendarConfig:null,fillEditorContainer:function(g){var h,f=g.inputContainer;if(c.isUndefined(d)){b.replaceClass(g.editorPanel,"ygtv-edit-DateNode","ygtv-edit-TextNode");YAHOO.widget.DateNode.superclass.fillEditorContainer.call(this,g);return;}if(g.nodeType!=this._type){g.nodeType=this._type;g.saveOnEnter=false;g.node.destroyEditorContents(g);g.inputObject=h=new d(f.appendChild(document.createElement("div")));if(this.calendarConfig){h.cfg.applyConfig(this.calendarConfig,true);h.cfg.fireQueue();}h.selectEvent.subscribe(function(){this.tree._closeEditor(true);},this,true);}else{h=g.inputObject;}g.oldValue=this.label;h.cfg.setProperty("selected",this.label,false);var i=h.cfg.getProperty("DATE_FIELD_DELIMITER");var e=this.label.split(i);h.cfg.setProperty("pagedate",e[h.cfg.getProperty("MDY_MONTH_POSITION")-1]+i+e[h.cfg.getProperty("MDY_YEAR_POSITION")-1]);h.cfg.fireQueue();h.render();h.oDomContainer.focus();},getEditorValue:function(f){if(c.isUndefined(d)){return f.inputElement.value;}else{var h=f.inputObject,g=h.getSelectedDates()[0],e=[];e[h.cfg.getProperty("MDY_DAY_POSITION")-1]=g.getDate();e[h.cfg.getProperty("MDY_MONTH_POSITION")-1]=g.getMonth()+1;e[h.cfg.getProperty("MDY_YEAR_POSITION")-1]=g.getFullYear();return e.join(h.cfg.getProperty("DATE_FIELD_DELIMITER"));}},displayEditedValue:function(g,e){var f=e.node;f.label=g;f.getLabelEl().innerHTML=g;},getNodeDefinition:function(){var e=YAHOO.widget.DateNode.superclass.getNodeDefinition.call(this);if(e===false){return false;}if(this.calendarConfig){e.calendarConfig=this.calendarConfig;}return e;}});})();(function(){var e=YAHOO.util.Dom,f=YAHOO.lang,b=YAHOO.util.Event,d=YAHOO.widget.TreeView,c=d.prototype;d.editorData={active:false,whoHasIt:null,nodeType:null,editorPanel:null,inputContainer:null,buttonsContainer:null,node:null,saveOnEnter:true,oldValue:undefined}; -c.validator=null;c._initEditor=function(){this.createEvent("editorSaveEvent",this);this.createEvent("editorCancelEvent",this);};c._nodeEditing=function(m){if(m.fillEditorContainer&&m.editable){var i,k,l,j,h=d.editorData;h.active=true;h.whoHasIt=this;if(!h.nodeType){h.editorPanel=i=this.getEl().appendChild(document.createElement("div"));e.addClass(i,"ygtv-label-editor");i.tabIndex=0;l=h.buttonsContainer=i.appendChild(document.createElement("div"));e.addClass(l,"ygtv-button-container");j=l.appendChild(document.createElement("button"));e.addClass(j,"ygtvok");j.innerHTML=" ";j=l.appendChild(document.createElement("button"));e.addClass(j,"ygtvcancel");j.innerHTML=" ";b.on(l,"click",function(q){var r=b.getTarget(q),o=d.editorData,p=o.node,n=o.whoHasIt;if(e.hasClass(r,"ygtvok")){b.stopEvent(q);n._closeEditor(true);}if(e.hasClass(r,"ygtvcancel")){b.stopEvent(q);n._closeEditor(false);}});h.inputContainer=i.appendChild(document.createElement("div"));e.addClass(h.inputContainer,"ygtv-input");b.on(i,"keydown",function(q){var p=d.editorData,n=YAHOO.util.KeyListener.KEY,o=p.whoHasIt;switch(q.keyCode){case n.ENTER:b.stopEvent(q);if(p.saveOnEnter){o._closeEditor(true);}break;case n.ESCAPE:b.stopEvent(q);o._closeEditor(false);break;}});}else{i=h.editorPanel;}h.node=m;if(h.nodeType){e.removeClass(i,"ygtv-edit-"+h.nodeType);}e.addClass(i," ygtv-edit-"+m._type);e.setStyle(i,"display","block");e.setXY(i,e.getXY(m.getContentEl()));i.focus();m.fillEditorContainer(h);return true;}};c.onEventEditNode=function(h){if(h instanceof YAHOO.widget.Node){h.editNode();}else{if(h.node instanceof YAHOO.widget.Node){h.node.editNode();}}return false;};c._closeEditor=function(j){var h=d.editorData,i=h.node,k=true;if(!i||!h.active){return;}if(j){k=h.node.saveEditorValue(h)!==false;}else{this.fireEvent("editorCancelEvent",i);}if(k){e.setStyle(h.editorPanel,"display","none");h.active=false;i.focus();}};c._destroyEditor=function(){var h=d.editorData;if(h&&h.nodeType&&(!h.active||h.whoHasIt===this)){b.removeListener(h.editorPanel,"keydown");b.removeListener(h.buttonContainer,"click");h.node.destroyEditorContents(h);document.body.removeChild(h.editorPanel);h.nodeType=h.editorPanel=h.inputContainer=h.buttonsContainer=h.whoHasIt=h.node=null;h.active=false;}};var g=YAHOO.widget.Node.prototype;g.editable=false;g.editNode=function(){this.tree._nodeEditing(this);};g.fillEditorContainer=null;g.destroyEditorContents=function(h){b.purgeElement(h.inputContainer,true);h.inputContainer.innerHTML="";};g.saveEditorValue=function(h){var j=h.node,k,i=j.tree.validator;k=this.getEditorValue(h);if(f.isFunction(i)){k=i(k,h.oldValue,j);if(f.isUndefined(k)){return false;}}if(this.tree.fireEvent("editorSaveEvent",{newValue:k,oldValue:h.oldValue,node:j})!==false){this.displayEditedValue(k,h);}};g.getEditorValue=function(h){};g.displayEditedValue=function(i,h){};var a=YAHOO.widget.TextNode.prototype;a.fillEditorContainer=function(i){var h;if(i.nodeType!=this._type){i.nodeType=this._type;i.saveOnEnter=true;i.node.destroyEditorContents(i);i.inputElement=h=i.inputContainer.appendChild(document.createElement("input"));}else{h=i.inputElement;}i.oldValue=this.label;h.value=this.label;h.focus();h.select();};a.getEditorValue=function(h){return h.inputElement.value;};a.displayEditedValue=function(j,h){var i=h.node;i.label=j;i.getLabelEl().innerHTML=j;};a.destroyEditorContents=function(h){h.inputContainer.innerHTML="";};})();YAHOO.widget.TVAnim=function(){return{FADE_IN:"TVFadeIn",FADE_OUT:"TVFadeOut",getAnim:function(b,a,c){if(YAHOO.widget[b]){return new YAHOO.widget[b](a,c);}else{return null;}},isValid:function(a){return(YAHOO.widget[a]);}};}();YAHOO.widget.TVFadeIn=function(a,b){this.el=a;this.callback=b;};YAHOO.widget.TVFadeIn.prototype={animate:function(){var e=this;var d=this.el.style;d.opacity=0.1;d.filter="alpha(opacity=10)";d.display="";var c=0.4;var b=new YAHOO.util.Anim(this.el,{opacity:{from:0.1,to:1,unit:""}},c);b.onComplete.subscribe(function(){e.onComplete();});b.animate();},onComplete:function(){this.callback();},toString:function(){return"TVFadeIn";}};YAHOO.widget.TVFadeOut=function(a,b){this.el=a;this.callback=b;};YAHOO.widget.TVFadeOut.prototype={animate:function(){var d=this;var c=0.4;var b=new YAHOO.util.Anim(this.el,{opacity:{from:1,to:0.1,unit:""}},c);b.onComplete.subscribe(function(){d.onComplete();});b.animate();},onComplete:function(){var a=this.el.style;a.display="none";a.opacity=1;a.filter="alpha(opacity=100)";this.callback();},toString:function(){return"TVFadeOut";}};YAHOO.register("treeview",YAHOO.widget.TreeView,{version:"2.9.0",build:"2800"}); -}, '2.9.0' ,{"requires": ["yui2-yahoo", "yui2-dom", "yui2-event", "yui2-skin-sam-treeview"], "optional": ["yui2-skin-sam-calendar", "yui2-calendar", "yui2-animation"]}); +YUI.add("yui2-treeview",function(b){var a=b.YUI2;(function(){var f=a.util.Dom,d=a.util.Event,h=a.lang,g=a.widget;a.widget.TreeView=function(j,i){if(j){this.init(j)}if(i){this.buildTreeFromObject(i)}else{if(h.trim(this._el.innerHTML)){this.buildTreeFromMarkup(j)}}};var e=g.TreeView;e.prototype={id:null,_el:null,_nodes:null,locked:false,_expandAnim:null,_collapseAnim:null,_animCount:0,maxAnim:2,_hasDblClickSubscriber:false,_dblClickTimer:null,currentFocus:null,singleNodeHighlight:false,_currentlyHighlighted:null,setExpandAnim:function(i){this._expandAnim=(g.TVAnim.isValid(i))?i:null},setCollapseAnim:function(i){this._collapseAnim=(g.TVAnim.isValid(i))?i:null},animateExpand:function(k,l){if(this._expandAnim&&this._animCount0||(f&&this.isDynamic()&&!this.dynamicLoadComplete))}},toggle:function(){if(!this.tree.locked&&(this.hasChildren(true)||this.isDynamic())){if(this.expanded){this.collapse()}else{this.expand()}}},getHtml:function(){this.childrenRendered=false;return['
',this.getNodeHtml(),this.getChildrenHtml(),"
"].join("")},getChildrenHtml:function(){var f=[];f[f.length]='
";return f.join("")},renderChildren:function(){var f=this;if(this.isDynamic()&&!this.dynamicLoadComplete){this.isLoading=true;this.tree.locked=true;if(this.dataLoader){setTimeout(function(){f.dataLoader(f,function(){f.loadComplete()})},10)}else{if(this.tree.root.dataLoader){setTimeout(function(){f.tree.root.dataLoader(f,function(){f.loadComplete()})},10)}else{return"Error: data loader not found or not specified."}}return""}else{return this.completeRender()}},completeRender:function(){var g=[];for(var f=0;f=this.depth||g<0){return null}var f=this.parent;while(f.depth>g){f=f.parent}return f},getDepthStyle:function(f){return(this.getAncestor(f).nextSibling)?"ygtvdepthcell":"ygtvblankdepthcell"},getNodeHtml:function(){var g=[];g[g.length]='
'}if(this.hasIcon&&this.hasChildren()){g[g.length]=''}else{g[g.length]=''}g[g.length]='
 
";return g.join("")},getContentHtml:function(){return""},refresh:function(){this.getChildrenEl().innerHTML=this.completeRender();if(this.hasIcon){var f=this.getToggleEl();if(f){f.className=f.className.replace(/\bygtv[lt][nmp]h*\b/gi,this.getStyle())}}},toString:function(){return this._type+" ("+this.index+")"},_focusHighlightedItems:[],_focusedItem:null,_canHaveFocus:function(){return this.getEl().getElementsByTagName("a").length>0},_removeFocus:function(){if(this._focusedItem){c.removeListener(this._focusedItem,"blur");this._focusedItem=null}var f;while((f=this._focusHighlightedItems.shift())){d.removeClass(f,a.widget.TreeView.FOCUS_CLASS_NAME)}},focus:function(){var h=false,f=this;if(this.tree.currentFocus){this.tree.currentFocus._removeFocus()}var g=function(i){if(i.parent){g(i.parent);i.parent.expand()}};g(this);d.getElementsBy(function(i){return(/ygtv(([tl][pmn]h?)|(content))/).test(i.className)},"td",f.getEl().firstChild,function(j){d.addClass(j,a.widget.TreeView.FOCUS_CLASS_NAME);if(!h){var i=j.getElementsByTagName("a");if(i.length){i=i[0];i.focus();f._focusedItem=i;c.on(i,"blur",function(){f.tree.fireEvent("focusChanged",{oldNode:f.tree.currentFocus,newNode:null});f.tree.currentFocus=null;f._removeFocus()});h=true}}f._focusHighlightedItems.push(j)});if(h){this.tree.fireEvent("focusChanged",{oldNode:this.tree.currentFocus,newNode:this});this.tree.currentFocus=this}else{this.tree.fireEvent("focusChanged",{oldNode:f.tree.currentFocus,newNode:null});this.tree.currentFocus=null;this._removeFocus()}return h},getNodeCount:function(){for(var f=0,g=0;f":"";return f.join("")},getNodeDefinition:function(){var f=a.widget.TextNode.superclass.getNodeDefinition.call(this);if(f===false){return false}f.label=this.label;if(this.labelStyle!="ygtvlabel"){f.style=this.labelStyle}if(this.title){f.title=this.title}if(this.href){f.href=this.href}if(this.target!="_self"){f.target=this.target}return f},toString:function(){return a.widget.TextNode.superclass.toString.call(this)+": "+this.label},onLabelClick:function(){return false},refresh:function(){a.widget.TextNode.superclass.refresh.call(this);var f=this.getLabelEl();f.innerHTML=this.label;if(f.tagName.toUpperCase()=="A"){f.href=this.href;f.target=this.target}}})})();a.widget.MenuNode=function(e,d,c){a.widget.MenuNode.superclass.constructor.call(this,e,d,c);this.multiExpand=false};a.extend(a.widget.MenuNode,a.widget.TextNode,{_type:"MenuNode"});(function(){var d=a.util.Dom,e=a.lang,c=a.util.Event;var f=function(j,i,h,g){if(j){this.init(j,i,h);this.initContent(j,g)}};a.widget.HTMLNode=f;a.extend(f,a.widget.Node,{contentStyle:"ygtvhtml",html:null,_type:"HTMLNode",initContent:function(h,g){this.setHtml(h);this.contentElId="ygtvcontentel"+this.index;if(!e.isUndefined(g)){this.hasIcon=g}},setHtml:function(h){this.html=(e.isObject(h)&&"html" in h)?h.html:h;var g=this.getContentEl();if(g){if(h.nodeType&&h.nodeType==1&&h.tagName){g.innerHTML=""}else{g.innerHTML=this.html}}},getContentHtml:function(){if(typeof this.html==="string"){return this.html}else{f._deferredNodes.push(this);if(!f._timer){f._timer=window.setTimeout(function(){var g;while((g=f._deferredNodes.pop())){g.getContentEl().appendChild(g.html)}f._timer=null},0)}return""}},getNodeDefinition:function(){var g=f.superclass.getNodeDefinition.call(this);if(g===false){return false}g.html=this.html;return g}});f._deferredNodes=[];f._timer=null})();(function(){var d=a.util.Dom,e=a.lang,c=a.util.Event,f=a.widget.Calendar;a.widget.DateNode=function(i,h,g){a.widget.DateNode.superclass.constructor.call(this,i,h,g)};a.extend(a.widget.DateNode,a.widget.TextNode,{_type:"DateNode",calendarConfig:null,fillEditorContainer:function(i){var j,h=i.inputContainer;if(e.isUndefined(f)){d.replaceClass(i.editorPanel,"ygtv-edit-DateNode","ygtv-edit-TextNode");a.widget.DateNode.superclass.fillEditorContainer.call(this,i);return}if(i.nodeType!=this._type){i.nodeType=this._type;i.saveOnEnter=false;i.node.destroyEditorContents(i);i.inputObject=j=new f(h.appendChild(document.createElement("div")));if(this.calendarConfig){j.cfg.applyConfig(this.calendarConfig,true);j.cfg.fireQueue()}j.selectEvent.subscribe(function(){this.tree._closeEditor(true)},this,true)}else{j=i.inputObject}i.oldValue=this.label;j.cfg.setProperty("selected",this.label,false);var k=j.cfg.getProperty("DATE_FIELD_DELIMITER");var g=this.label.split(k);j.cfg.setProperty("pagedate",g[j.cfg.getProperty("MDY_MONTH_POSITION")-1]+k+g[j.cfg.getProperty("MDY_YEAR_POSITION")-1]);j.cfg.fireQueue();j.render();j.oDomContainer.focus()},getEditorValue:function(h){if(e.isUndefined(f)){return h.inputElement.value}else{var j=h.inputObject,i=j.getSelectedDates()[0],g=[];g[j.cfg.getProperty("MDY_DAY_POSITION")-1]=i.getDate();g[j.cfg.getProperty("MDY_MONTH_POSITION")-1]=i.getMonth()+1;g[j.cfg.getProperty("MDY_YEAR_POSITION")-1]=i.getFullYear();return g.join(j.cfg.getProperty("DATE_FIELD_DELIMITER"))}},displayEditedValue:function(i,g){var h=g.node;h.label=i;h.getLabelEl().innerHTML=i},getNodeDefinition:function(){var g=a.widget.DateNode.superclass.getNodeDefinition.call(this);if(g===false){return false}if(this.calendarConfig){g.calendarConfig=this.calendarConfig}return g}})})();(function(){var g=a.util.Dom,h=a.lang,d=a.util.Event,f=a.widget.TreeView,e=f.prototype;f.editorData={active:false,whoHasIt:null,nodeType:null,editorPanel:null,inputContainer:null,buttonsContainer:null,node:null,saveOnEnter:true,oldValue:undefined};e.validator=null;e._initEditor=function(){this.createEvent("editorSaveEvent",this);this.createEvent("editorCancelEvent",this)};e._nodeEditing=function(o){if(o.fillEditorContainer&&o.editable){var k,m,n,l,j=f.editorData;j.active=true;j.whoHasIt=this;if(!j.nodeType){j.editorPanel=k=this.getEl().appendChild(document.createElement("div"));g.addClass(k,"ygtv-label-editor");k.tabIndex=0;n=j.buttonsContainer=k.appendChild(document.createElement("div"));g.addClass(n,"ygtv-button-container");l=n.appendChild(document.createElement("button"));g.addClass(l,"ygtvok");l.innerHTML=" ";l=n.appendChild(document.createElement("button"));g.addClass(l,"ygtvcancel");l.innerHTML=" ";d.on(n,"click",function(s){var t=d.getTarget(s),q=f.editorData,r=q.node,p=q.whoHasIt;if(g.hasClass(t,"ygtvok")){d.stopEvent(s);p._closeEditor(true)}if(g.hasClass(t,"ygtvcancel")){d.stopEvent(s);p._closeEditor(false)}});j.inputContainer=k.appendChild(document.createElement("div"));g.addClass(j.inputContainer,"ygtv-input");d.on(k,"keydown",function(s){var r=f.editorData,p=a.util.KeyListener.KEY,q=r.whoHasIt;switch(s.keyCode){case p.ENTER:d.stopEvent(s);if(r.saveOnEnter){q._closeEditor(true)}break;case p.ESCAPE:d.stopEvent(s);q._closeEditor(false);break}})}else{k=j.editorPanel}j.node=o;if(j.nodeType){g.removeClass(k,"ygtv-edit-"+j.nodeType)}g.addClass(k," ygtv-edit-"+o._type);g.setStyle(k,"display","block");g.setXY(k,g.getXY(o.getContentEl()));k.focus();o.fillEditorContainer(j);return true}};e.onEventEditNode=function(j){if(j instanceof a.widget.Node){j.editNode()}else{if(j.node instanceof a.widget.Node){j.node.editNode()}}return false};e._closeEditor=function(l){var j=f.editorData,k=j.node,m=true;if(!k||!j.active){return}if(l){m=j.node.saveEditorValue(j)!==false}else{this.fireEvent("editorCancelEvent",k)}if(m){g.setStyle(j.editorPanel,"display","none");j.active=false;k.focus()}};e._destroyEditor=function(){var j=f.editorData;if(j&&j.nodeType&&(!j.active||j.whoHasIt===this)){d.removeListener(j.editorPanel,"keydown");d.removeListener(j.buttonContainer,"click");j.node.destroyEditorContents(j);document.body.removeChild(j.editorPanel);j.nodeType=j.editorPanel=j.inputContainer=j.buttonsContainer=j.whoHasIt=j.node=null;j.active=false}};var i=a.widget.Node.prototype;i.editable=false;i.editNode=function(){this.tree._nodeEditing(this)};i.fillEditorContainer=null;i.destroyEditorContents=function(j){d.purgeElement(j.inputContainer,true);j.inputContainer.innerHTML=""};i.saveEditorValue=function(j){var l=j.node,m,k=l.tree.validator;m=this.getEditorValue(j);if(h.isFunction(k)){m=k(m,j.oldValue,l);if(h.isUndefined(m)){return false}}if(this.tree.fireEvent("editorSaveEvent",{newValue:m,oldValue:j.oldValue,node:l})!==false){this.displayEditedValue(m,j)}};i.getEditorValue=function(j){};i.displayEditedValue=function(k,j){};var c=a.widget.TextNode.prototype;c.fillEditorContainer=function(k){var j;if(k.nodeType!=this._type){k.nodeType=this._type;k.saveOnEnter=true;k.node.destroyEditorContents(k);k.inputElement=j=k.inputContainer.appendChild(document.createElement("input"))}else{j=k.inputElement}k.oldValue=this.label;j.value=this.label;j.focus();j.select()};c.getEditorValue=function(j){return j.inputElement.value};c.displayEditedValue=function(l,j){var k=j.node;k.label=l;k.getLabelEl().innerHTML=l};c.destroyEditorContents=function(j){j.inputContainer.innerHTML=""}})();a.widget.TVAnim=function(){return{FADE_IN:"TVFadeIn",FADE_OUT:"TVFadeOut",getAnim:function(d,c,e){if(a.widget[d]){return new a.widget[d](c,e)}else{return null}},isValid:function(c){return(a.widget[c])}}}();a.widget.TVFadeIn=function(c,d){this.el=c;this.callback=d};a.widget.TVFadeIn.prototype={animate:function(){var f=this;var e=this.el.style;e.opacity=0.1;e.filter="alpha(opacity=10)";e.display="";var d=0.4;var c=new a.util.Anim(this.el,{opacity:{from:0.1,to:1,unit:""}},d);c.onComplete.subscribe(function(){f.onComplete()});c.animate()},onComplete:function(){this.callback()},toString:function(){return"TVFadeIn"}};a.widget.TVFadeOut=function(c,d){this.el=c;this.callback=d};a.widget.TVFadeOut.prototype={animate:function(){var e=this;var d=0.4;var c=new a.util.Anim(this.el,{opacity:{from:1,to:0.1,unit:""}},d);c.onComplete.subscribe(function(){e.onComplete()});c.animate()},onComplete:function(){var c=this.el.style;c.display="none";c.opacity=1;c.filter="alpha(opacity=100)";this.callback()},toString:function(){return"TVFadeOut"}};a.register("treeview",a.widget.TreeView,{version:"2.9.0",build:"2800"})},"2.9.0",{requires:["yui2-yahoo","yui2-dom","yui2-event","yui2-skin-sam-treeview"],optional:["yui2-skin-sam-calendar","yui2-calendar","yui2-animation"]}); diff --git a/lib/yuilib/2in3/2.9.0/build/yui2-treeview/yui2-treeview.js b/lib/yuilib/2in3/2.9.0/build/yui2-treeview/yui2-treeview.js index 8893656f7be..62b359647d3 100644 --- a/lib/yuilib/2in3/2.9.0/build/yui2-treeview/yui2-treeview.js +++ b/lib/yuilib/2in3/2.9.0/build/yui2-treeview/yui2-treeview.js @@ -2473,11 +2473,13 @@ YAHOO.widget.Node.prototype = { sb[sb.length] = '
'; } - if (this.hasIcon) { + if (this.hasIcon && this.hasChildren()) { sb[sb.length] = ' '; + } else { + sb[sb.length] = '
'; } sb[sb.length] = '