Ext.define("MyApp.Application",{name:"MyApp",extend:Ext.app.Application,views:[],controllers:[],stores:[]});Ext.define("MyApp.controller.Main",{extend:Ext.app.Controller});Ext.define("MyApp.controller.SettingsTreeController",{extend:Ext.app.Controller,refs:[{ref:"settingsTree",selector:"#settingsTree"},{ref:"welcome",selector:"#welcome"},{ref:"description",selector:"#description"},{ref:"centerContainer",selector:"#centerContainer"}],init:function(a){this.control({"#settingsTree":{select:this.onSettingsSelect}})},onSettingsSelect:function(d,a,c){if(a.get("leaf")){this.getCenterContainer().removeAll();if(Ext.isEmpty(a.get("url"))){this.getCenterContainer().add(Ext.create("widget."+a.get("panel")))}else{var e=Ext.Object.toQueryString(Ext.Object.fromQueryString(document.location.search));var b=a.get("url")+"?"+e;this.getCenterContainer().update('<iframe src="'+b+'" width="100%" height="100%" frameborder="0" style="border-color: white;"></iframe>');this.getCenterContainer().doLayout()}this.getDescription().update(a.get("description"))}},treeContent:function(){var a=[{text:CCS.Translator.getText("AC settings"),leaf:false,expanded:true,children:[{text:CCS.Translator.getText("Language"),leaf:true,panel:null,url:"../settings_language/settings_language.php",description:"<p>"+CCS.Translator.getText("Change how the application handles languages.")+"</p>"},{text:CCS.Translator.getText("Messages"),leaf:true,panel:null,url:"../settings_messages/settings_messages.php",description:"<p>"+CCS.Translator.getText("Handle messages in the system.")+"</p>"},{text:CCS.Translator.getText("System reaction settings"),leaf:true,panel:null,url:"../settings_reactions/settings_reactions.php",description:"<p>"+CCS.Translator.getText("Handle system reaction settings.")+"</p>"}]}]}});Ext.define("MyApp.store.SettingsTreeStore",{extend:Ext.data.TreeStore,constructor:function(a){var b=this;a=a||{};b.callParent([Ext.apply({autoLoad:false,storeId:"SettingsTreeStore",root:{expanded:true,text:"All settings",children:[{text:CCS.Translator.getText("Settings"),leaf:false,expanded:true,children:[{text:CCS.Translator.getText("Data Retention"),leaf:true,panel:null,url:"../system_tool_dataretention/system_tool_dataretention.php",description:"<p>"+CCS.Translator.getText("Manage data retention.")+"</p>"}]},{text:CCS.Translator.getText("Tools"),leaf:false,expanded:true,children:[{text:CCS.Translator.getText("User Anonymization"),leaf:true,panel:null,url:"../system_tool_anonymizer/system_tool_anonymizer.php",description:"<p>"+CCS.Translator.getText("Anonymize data related to a deleted user.")+"</p>"}]}]},fields:[{name:"description"},{name:"panel"},{name:"text"},{name:"leaf"},{name:"children"},{name:"url"}]},a)])}});Ext.define("MyApp.view.Main",{extend:Ext.panel.Panel,layout:"fit",bodyPadding:"3 10 0 10",title:"ComplianceNow - Tools and Settings",initComponent:function(){var a=this;Ext.applyIf(a,{items:[{xtype:"container",layout:{type:"hbox",align:"stretch"},items:[{xtype:"fieldset",title:"Tools and Settings",items:[{xtype:"treepanel",region:"west",split:true,border:false,itemId:"settingsTree",width:200,collapsible:true,header:false,title:"Settings",store:"SettingsTreeStore",viewConfig:{rootVisible:false}}]},{xtype:"splitter"},{xtype:"container",region:"center",flex:1,itemId:"centerContainer",layout:"fit",items:[{xtype:"fieldset",itemId:"welcome",margin:"0 5 10 5",title:"Welcome"}]},{xtype:"splitter"},{xtype:"fieldset",itemId:"description",width:200,title:"Description"}]}]});a.callParent(arguments)}});Ext.define("MyApp.view.Viewport",{extend:Ext.container.Viewport,layout:{type:"fit"},items:[{xtype:"app-main"}]});