text: //>>built
  require({cache:{"url:epi/cms/component/templates/_PageTreeNode.html":"<div class=\"dijitTreeNode\" role=\"presentation\">\r\n    <div data-dojo-attach-point=\"rowNode\" class=\"dijitTreeRow\" role=\"presentation\" data-dojo-attach-event=\"onmouseenter:_onMouseEnter, onmouseleave:_onMouseLeave, onclick:_onClick, ondblclick:_onDblClick\">\r\n        <span data-dojo-attach-point=\"contentNode\" class=\"dijitTreeContent\" role=\"presentation\">\r\n            <span data-dojo-attach-point=\"expandoNode\" class=\"dijitTreeExpando\" role=\"presentation\"></span>\r\n            <span data-dojo-attach-point=\"expandoNodeText\" class=\"dijitExpandoText\" role=\"presentation\"></span>\r\n            <span data-dojo-attach-point=\"iconNode\" class=\"dijitIcon dijitTreeIcon\" role=\"presentation\"></span>\r\n            \r\n            <span data-dojo-attach-point=\"labelNode\" class=\"dijitTreeLabel\" role=\"treeitem\"\r\n                  tabindex=\"-1\" aria-selected=\"false\" data-dojo-attach-event=\"onfocus:_onLabelFocus\">\r\n            </span>\r\n        </span>\r\n        <span data-dojo-attach-point=\"extraIconsContainer\" class=\"epi-dijitExtraIconContainer\" role=\"presentation\">       \r\n            <span data-dojo-attach-point=\"iconNodeLanguage\" class=\"epi-pt-currentLanguageMissing\" role=\"presentation\">&nbsp;</span>\r\n            <span data-dojo-attach-point=\"iconNodeAccess\" class=\"dijitTreeIcon\" role=\"presentation\">&nbsp;</span>\r\n            <span data-dojo-attach-point=\"iconNodeStatus\" class=\"dijitTreeIcon\" role=\"presentation\">&nbsp;</span>\r\n            <span data-dojo-attach-point=\"iconNodeMenu\" class=\"dijitTreeIcon\" role=\"presentation\" data-dojo-attach-event=\"onmousedown:_onMouseDownIconNodeMenu, click: _onClickIconNodeMenu\" >&nbsp;</span>\r\n        </span>\r\n    </div>\r\n    <div data-dojo-attach-point=\"containerNode\" class=\"dijitTreeContainer\" role=\"presentation\" style=\"display: none;\"></div>\r\n</div>"}});define("epi/cms/component/_PageTreeNode",["dojo/_base/array","dojo/_base/declare","dojo/_base/Deferred","dojo/_base/lang","dojo/_base/event","dojo/_base/connect","dojo/dom-attr","dojo/dom-class","dojo/dom-construct","dojo/aspect","dojo/Evented","dojo/text!./templates/_PageTreeNode.html","dijit/Tree","dijit/focus","epi/datetime","epi/dependency","epi/string","epi/shell/widget/_ModelBindingMixin","epi/shell/widget/Tooltip","epi/cms/contentediting/PageShortcutTypeSupport","epi/cms/widget/viewmodel/ContentStatusViewModel","epi/i18n!epi/cms/nls/episerver.cms.components.pagetree"],function(_1,_2,_3,_4,_5,_6,_7,_8,_9,_a,_b,_c,_d,_e,_f,_10,_11,_12,_13,_14,_15,res){return _2("epi.cms.component._PageTreeNode",[_d._TreeNode,_12,_b],{templateString:_c,res:res,_pageLocked:"epi-pt-accessRights",_pageBeingEdited:"epi-pt-edited",_contextMenuClass:"epi-iconContextMenu",_iconNodeClass:"",_tooltip:undefined,_inUseTooltip:undefined,_selected:false,_contentTypeStore:null,postMixInProperties:function(){this.inherited(arguments);var _16=_10.resolve("epi.storeregistry");this._contentTypeStore=_16.get("epi.cms.contenttype");this._application=_10.resolve("epi.cms.Application");},postCreate:function(){this.inherited(arguments);this.set("model",new _15({contentStatus:this.item.status}));_6.subscribe("/epi/cms/action/pageexpirationchange",_4.hitch(this,function(_17){var _18=_17.match("^[0-9]*")[0];if(this.item.contentLink==_18){_3.when(this.model.store.refresh(_18),_4.hitch(this,function(_19){this.item=_19;}));}}));if(this._application.getStartPage()==this.item.contentLink){this.tree._expandNode(this,false);}},modelBindingMap:{"statusIcon":["statusIcon"],"statusMessage":["statusMessage"]},_setStatusMessageAttr:function(_1a){_7.set(this.iconNodeStatus,"title",_11.toTooltipText(_1a));},_setStatusIconAttr:function(_1b){if(!_4.isArray(_1b)){return;}_8.remove(this.iconNodeStatus);_8.add(this.iconNodeStatus,"dijitTreeIcon");_1.forEach(_1b,function(_1c){_8.add(this.iconNodeStatus,_1c);},this);},destroy:function(){this.inherited(arguments);if(this._tooltip){this._tooltip.destroyRecursive();}if(this._inUseTooltip){this._inUseTooltip.destroyRecursive();}},setSelected:function(_1d){this.inherited(arguments);this._selected=_1d;if(this._selected){_8.add(this.iconNodeMenu,this._contextMenuClass);}else{_8.remove(this.iconNodeMenu,this._contextMenuClass);}},_toggleContextMenu:function(_1e){if(!this._selected){_8.toggle(this.iconNodeMenu,this._contextMenuClass);}},_onMouseEnter:function(evt){this.inherited(arguments);this._toggleContextMenu();},_onMouseLeave:function(evt){this.inherited(arguments);this._toggleContextMenu();},_onClickIconNodeMenu:function(evt){_5.stop(evt);this.emit("onContextMenuClick",{node:this,target:evt.target,x:evt.pageX,y:evt.pageY});},_onMouseDownIconNodeMenu:function(evt){_5.stop(evt);},_updateItemClasses:function(_1f){this.inherited(arguments);this._updateLayout();},_updateLayout:function(){this.inherited(arguments);this._updateLanguageIcon();this._updateAccessRightIcon();if(this.model){this.model.set("contentStatus",this.item.status);}this._createTooltip();this._resetFocus();},_resetFocus:function(){if(_e.curNode&&this.tree.selectedNode&&this.tree.selectedNode.labelNode&&_e.curNode!=this.tree.selectedNode.labelNode){return;}if(this.tree.selectedNode){this.tree.focusNode(this.tree.selectedNode);}},_updateAccessRightIcon:function(){if(this.item.accessMask===0||this.item.accessMask==1){_8.add(this.iconNodeAccess,this._pageLocked);_7.set(this.iconNodeAccess,"title",this.res.tooltip.pagelocked);_8.add(this.contentNode,"epi-treeReadOnly");}else{if(this.item.inUseNotifications&&this.item.inUseNotifications.length>0){_8.add(this.iconNodeAccess,this._pageBeingEdited);var _20=[{label:this.res.tooltip.beingedited}];_1.forEach(this.item.inUseNotifications,function(_21){var _22=_f.toUserFriendlyHtml(_21.created);_20.push({label:_21.userName+", "+_22,htmlEncode:false});},this);this._inUseTooltip=this._populateTooltip(_20,[this.iconNodeAccess]);}else{_8.remove(this.iconNodeAccess,this._pageBeingEdited);_8.remove(this.iconNodeAccess,this._pageLocked);_8.remove(this.contentNode,"epi-treeReadOnly");}}},_updateLanguageIcon:function(){if(this.item.missingLanguageBranch){if(this.item.missingLanguageBranch.language){this.iconNodeLanguage.innerHTML=this.item.missingLanguageBranch.language;}if(this.item.missingLanguageBranch.warning){_7.set(this.iconNodeLanguage,"title",this.item.missingLanguageBranch.warning);}}else{_9.empty(this.iconNodeLanguage);_7.remove(this.iconNodeLanguage,"title");}},_getShortcutText:function(){var _23=new _3();var _24=this.item.properties.pageShortcutType;var _25=this.item.properties.pageShortcutLink;var _26={};switch(_24){case _14.pageShortcutTypes.Shortcut:_3.when(this.model.store.get(_25),_4.hitch(this,function(_27){_26={label:res.tooltip.shortcut,text:"["+_25+"] "+(_27.name)};_23.resolve(_26);}));break;case _14.pageShortcutTypes.External:_26={label:res.tooltip.linkto,text:this.item.properties.pageLinkURL};_23.resolve(_26);break;case _14.pageShortcutTypes.Inactive:_26={label:res.tooltip.nolinkonlytext};_23.resolve(_26);break;case _14.pageShortcutTypes.FetchData:_3.when(this.model.store.get(_25),_4.hitch(this,function(_28){_26={label:res.tooltip.fetchesdatafrom,text:"["+_25+"] "+(_28.name)};_23.resolve(_26);}));break;default:_26="";_23.resolve(_26);break;}return _23;},_createTooltip:function(){_3.when(this._contentTypeStore.get(this.item.contentTypeID),_4.hitch(this,function(_29){var _2a=this.item.name+" ("+_29.localizedName+")";_7.set(this.labelNode,"title",_2a);_7.set(this.iconNode,"title",_2a);}));},_populateTooltip:function(_2b,_2c){_1.forEach(_2c,function(_2d){return new _13({tooltipRows:_4.clone(_2b),connectId:[_2d],position:["after-centered","below"]});});}});});