FR.initLayout=function(){Ext.get(document).on("dragover",function(e){e=e.browserEvent;e.dataTransfer.dropEffect="none"},false,{stopEvent:true});Ext.get(document).on("drop",function(e){},false,{stopEvent:true});var body=Ext.getBody();body.on("mousemove",function(e){FR.UI.xy=e.getXY()});body.on("contextmenu",function(e,el){if(!Ext.fly(el).hasClass("x-form-field")){e.stopEvent()}});if(Settings.ui_dark_mode){body.addClass("darkMode")}FR.UI.gridPanel=new FR.components.gridPanel({id:"FR-Grid-Panel",padding:Settings.layout.grid&&Settings.layout.grid.padding?Settings.layout.grid.padding:"0",tbar:FR.UI.gridToolbar});window.addEventListener("focus",function(){if(!Ext.WindowMgr.getActive()){var fEl=FR.UI.gridPanel.view.focusEl;if(fEl){fEl.focus()}}});FR.UI.AudioPlayer=new FR.components.AudioPlayer({id:"FR-AudioPlayer",region:"south",height:110,animCollapse:false,stateful:false,collapsed:true});var l=FR.UI.layout.infoPanel;FR.UI.infoPanel=new FR.components.infoPanel({id:"FR-Info-Region",region:"east",minWidth:l.minWidth,maxWidth:500,width:l.width,collapsed:l.collapsed,stateful:!l.float,split:true,autoHide:false,listeners:{collapse:function(){FR.UI.actions.info.show()},expand:function(){FR.UI.actions.info.hide();this.refresh()},slideout:function(region){if(!this.modalMaskCenter){this.modalMaskCenter=new Ext.Mask({targetEl:region.layout.center.el,autoShow:false,onClick:FR.UI.collapseInfo})}if(!this.modalMaskWest){this.modalMaskWest=new Ext.Mask({targetEl:region.layout.west.el,autoShow:false,onClick:FR.UI.collapseInfo})}this.modalMaskWest.show();this.modalMaskCenter.show();this.refresh()},slidein:function(region){this.modalMaskWest.hide();this.modalMaskCenter.hide()}}});FR.UI.explorerPanel=new Ext.Panel({region:"center",id:"FR-Center-Region",layout:"border",split:true,tbar:FR.UI.headerTBar,items:[FR.UI.gridPanel,FR.UI.AudioPlayer]});var logoHTML="&nbsp;";if(Settings.ui_user_logo.length>0){logoHTML=FR.UI.getImageLogo(Settings.ui_user_logo)}else if(Settings.ui_logo_url){logoHTML=FR.UI.getImageLogo(Settings.ui_logo_url)}else if(Settings.ui_title_logo){logoHTML=FR.UI.getTextLogo(Settings.title)}if(logoHTML!="&nbsp;"){FR.UI.hasLogo=true}var l=FR.UI.layout.treePanel;FR.UI.window=new Ext.Viewport({layout:"border",items:[{id:"FR-Tree-Region",region:"west",width:l.width,minWidth:l.minWidth,maxWidth:600,collapsed:l.float,split:!l.float,stateful:!l.float,autoHide:false,layout:"border",title:logoHTML,headerStyle:"height:"+FR.UI.layout.northBarsHeight+"px",westSplitBarOffset:Settings.layout.tree&&Settings.layout.tree.hasOwnProperty("westSplitBarOffset")?Settings.layout.tree.westSplitBarOffset:5,tools:[{iconCls:"fa-arrow-to-left",toolType:"collapse",tooltip:"Hide panel",handler:FR.UI.colapseTree}],items:[FR.UI.tree.panel,{region:"south",margins:Settings.layout.cornerMenu&&Settings.layout.cornerMenu.margins?Settings.layout.cornerMenu.margins:"0 15px 7px 15px",height:FR.UI.cornerMenu.getHeight(),items:FR.UI.cornerMenu}],listeners:{render:function(p){FR.UI.actions.openTree.setHidden(!p.collapsed)},collapse:function(p){FR.UI.actions.openTree.show()},expand:function(p){FR.UI.actions.openTree.hide()},slideout:function(region){if(!this.modalMask){this.modalMask=new Ext.Mask({targetEl:region.layout.center.el,autoShow:false,onClick:FR.UI.colapseTree})}this.modalMask.show()},slidein:function(region){this.modalMask.hide()}}},FR.UI.explorerPanel,FR.UI.infoPanel]});if(User.perms.space_quota_max){window.setTimeout(FR.UI.refreshQuotaUsage,1e3)}};