FR.components.TreeNodeCustomUI=Ext.extend(Ext.tree.TreeNodeUI,{getIcons:function(){var a=this.node.attributes;var icons="";if(a.custom){if(a.custom.notInfo){icons+=' <i class="fa fa-thin fa-bell-o" ext:qtip="'+FR.T("This item has notifications enabled")+'"></i>'}if(a.custom.star){icons+=' <i class="fa fa-thin fa-star-o" ext:qtip="'+FR.T("This item is starred")+'"></i>'}if(a.custom.weblink){icons+=' <i class="fa fa-thin fa-link" ext:qtip="'+FR.T("This item is shared with link")+'"></i>'}}if(a["new"]){icons+=' <i class="fa fa-thin fa-bolt" ext:qtip="'+FR.T("This item has recent changes")+'"></i>'}return icons},updateIcons:function(){this.iconNode.className=this.getIconClass();this.iconNode.style=this.getIconStyle();Ext.fly(this.elNode.childNodes[4]).update(this.getIcons())},getIconClass:function(){var a=this.node.attributes;if(a.custom&&a.custom.label){a.custom.label=FR.utils.parseRawLabel(a.custom.label)}var iconCls="";if(a.uid){iconCls="x-tree-node-icon basicAvatar"}else{iconCls+="x-tree-node-icon fa ";iconCls+=a.iconCls||(a.custom&&a.custom.share?"fa-folder-user":"fa-folder")}if(a.custom&&a.custom.label){iconCls+=" fas"}return iconCls},getIconStyle:function(){var a=this.node.attributes;var iconStyle="";if(a.uid){iconStyle+="background-image:url('a/?uid="+a.uid+"');"}if(a.custom&&a.custom.label){iconStyle+="color:"+a.custom.label.color}return iconStyle},getIconHTML:function(){var a=this.node.attributes;var icon="<i";var iconCls=this.getIconClass();var iconStyle=this.getIconStyle();if(a.custom&&a.custom.label){icon+=' ext:qtip="'+a.custom.label.text+'"'}icon+=' class="'+iconCls+'" style="'+iconStyle+'"></i>';return icon},renderElements:function(n,a,targetNode,bulkRender){this.indentMarkup=n.parentNode?n.parentNode.ui.getChildIndent():"";var showMenuTrigger=["myfiles","sharedFolder","trash","collection"].indexOf(a.section)!=-1;var nel,buf='<li class="x-tree-node">'+'<div ext:tree-node-id="'+n.id+'" class="x-tree-node-el '+(a.cls||"")+'">'+this.indentMarkup+'<i class="x-tree-ec-icon fa"></i>'+this.getIconHTML()+'<a hidefocus="on">'+n.text+"</a>"+'<span class="icons">'+this.getIcons()+"</span>"+(showMenuTrigger?'<div class="nodeMenu"><i class="fa fa-lg fa-ellipsis-v"></i></div>':"")+"</div>"+'<ul class="x-tree-node-ct" style="display:none;"></ul>'+"</li>";if(bulkRender!==true&&n.nextSibling&&(nel=n.nextSibling.ui.getEl())){this.wrap=Ext.DomHelper.insertHtml("beforeBegin",nel,buf)}else{this.wrap=Ext.DomHelper.insertHtml("beforeEnd",targetNode,buf)}this.elNode=this.wrap.firstChild;this.ctNode=this.wrap.lastChild;var cs=this.elNode.childNodes;this.indentNode=cs[0];this.ecNode=cs[1];this.iconNode=cs[2];this.anchor=cs[3];this.textNode=cs[3];if(showMenuTrigger){Ext.fly(cs[5]).on("click",function(e){FR.UI.tree.showContextMenu(n,e);e.stopEvent()})}}});