MWF.xDesktop.requireApp("cms.ColumnManager","Explorer",null,false);MWF.xApplication.cms.ColumnManager.QueryViewExplorer=new Class({Extends:MWF.xApplication.cms.ColumnManager.Explorer,Implements:[Options,Events],options:{create:MWF.CMSCM.LP.queryView.create,search:MWF.CMSCM.LP.queryView.search,searchText:MWF.CMSCM.LP.queryView.searchText,noElement:MWF.CMSCM.LP.queryView.noViewNoticeText},setTooltip:function(){this.options.tooltip={create:MWF.CMSCM.LP.queryView.create,search:MWF.CMSCM.LP.queryView.search,searchText:MWF.CMSCM.LP.queryView.searchText,noElement:MWF.CMSCM.LP.queryView.noViewNoticeText}},_createElement:function(e){var t=this;var i={onQueryLoad:function(){this.actions=t.app.restActions;this.application=t.app.options.application;this.explorer=t},onPostSave:function(){t.reload()}};this.app.desktop.openApplication(e,"cms.QueryViewDesigner",i)},_loadItemDataList:function(e){this.app.restActions.listQueryView(this.app.options.application.id,e)},_getItemObject:function(e,t){return new MWF.xApplication.cms.ColumnManager.QueryViewExplorer.View(this,e,{index:t})},deleteItems:function(){while(this.deleteMarkItems.length){var e=this.deleteMarkItems.shift();if(this.deleteMarkItems.length){e.deleteView()}else{e.deleteView(function(){this.hideDeleteAction();this.reload()}.bind(this))}}}});MWF.xApplication.cms.ColumnManager.QueryViewExplorer.View=new Class({Extends:MWF.xApplication.cms.ColumnManager.Explorer.Item,_open:function(e){var t=this;var i={onQueryLoad:function(){this.actions=t.explorer.actions;this.category=t;this.options.id=t.data.id;this.application=t.explorer.app.options.application;this.explorer=t.explorer}};this.explorer.app.desktop.openApplication(e,"cms.QueryViewDesigner",i)},_getIcon:function(){var e=(Math.random()*33).toInt();return"process_icon_"+e+".png"},_getLnkPar:function(){return{icon:this.explorer.path+this.explorer.options.style+"/queryViewIcon/lnk.png",title:this.data.name,par:'cms.QueryViewDesigner#{"id": "'+this.data.id+'", "application": '+JSON.stringify(this.explorer.app.options.application)+"}"}},deleteView:function(e){this.explorer.app.restActions.deleteQueryView(this.data.id,function(){this.node.destroy();if(e)e()}.bind(this))}});