Main.min.js 12 KB

1
  1. MWF.xDesktop.requireApp("Setting","Actions.RestActions",null,false);MWF.xApplication.Setting.Main=new Class({Extends:MWF.xApplication.Common.Main,Implements:[Options,Events],options:{style:"default",name:"Setting",icon:"icon.png",width:"1280",height:"660",title:MWF.xApplication.Setting.LP.title},onQueryLoad:function(){this.lp=MWF.xApplication.Setting.LP;this.actions=new MWF.xApplication.Setting.Actions.RestActions},loadApplication:function(t){this.serverAreaNode=new Element("div",{styles:this.css.tabAreaNode}).inject(this.content);this.applicationAreaNode=new Element("div",{styles:this.css.tabAreaNode}).inject(this.content);this.resourceAreaNode=new Element("div",{styles:this.css.tabAreaNode}).inject(this.content);this.mobileAreaNode=new Element("div",{styles:this.css.tabAreaNode}).inject(this.content);MWF.require("MWF.widget.Tab",function(){this.tab=new MWF.widget.Tab(this.content,{style:"administrator"});this.tab.load();this.serverPage=this.tab.addTab(this.serverAreaNode,this.lp.tab_Server,false);this.applicationPage=this.tab.addTab(this.applicationAreaNode,this.lp.tab_Application,false);this.resourcePage=this.tab.addTab(this.resourceAreaNode,this.lp.tab_Resource,false);this.mobilePage=this.tab.addTab(this.mobileAreaNode,this.lp.tab_Mobile,false);this.serverPage.addEvent("postShow",function(){if(!this.serversExplorer)this.serversExplorer=new MWF.xApplication.Setting.ServersExplorer(this)}.bind(this));this.applicationPage.addEvent("postShow",function(){if(!this.applicationExplorer)this.applicationExplorer=new MWF.xApplication.Setting.ApplicationsExplorer(this)}.bind(this));this.resourcePage.addEvent("postShow",function(){if(!this.resourceExplorer)this.resourceExplorer=new MWF.xApplication.Setting.ResourceExplorer(this)}.bind(this));this.mobilePage.addEvent("postShow",function(){if(!this.mobileExplorer)this.mobileExplorer=new MWF.xApplication.Setting.MobileExplorer(this)}.bind(this));this.serverPage.showIm();this.setContentHeight();this.addEvent("resize",function(){this.setContentHeight()}.bind(this))}.bind(this))},loadTitle:function(){this.titleBar=new Element("div",{styles:this.css.titleBar}).inject(this.content);this.taskTitleTextNode=new Element("div",{styles:this.css.titleTextNode,text:this.lp.title}).inject(this.titleBar)},setContentHeight:function(t){var e=this.content.getSize();var i=this.tab.tabNodeContainer.getSize();var n=e.y-i.y;this.tab.pages.each(function(t){t.contentNodeArea.setStyles({height:""+n+"px",overflow:"auto"})})}});MWF.xApplication.Setting.ServersExplorer=new Class({Implements:[Events],initialize:function(t){this.app=t;this.container=this.app.serverAreaNode;this.css=this.app.css;this.naviItems=[];this.load()},load:function(){this.naviAreaNode=new Element("div",{styles:this.css.serverNaviAreaNode}).inject(this.container);this.naviNode=new Element("div",{styles:this.css.serverNaviNode}).inject(this.naviAreaNode);this.contentAreaNode=new Element("div",{styles:this.css.serverContentAreaNode}).inject(this.container);this.loadNavi()},loadNavi:function(){var t=this.getNaviJson();t.each(function(t){this.naviItems.push(this.createNaviItem(t))}.bind(this));this.naviItems[0].click()},createNaviItem:function(t){var e=new Element("div",{styles:this.css.naviItemNode}).inject(this.naviNode);e.setStyle("background-image","url(/x_component_Setting/$Main/default/icon/"+t.icon+".png)");e.set("text",t.text);e.store("navi",t);var i=this;e.addEvent("click",function(){i.setNavi(this)});return e},setNavi:function(t){var e=t.retrieve("navi");this.naviItems.each(function(t){var e=t.retrieve("navi");var i=t.retrieve("content",null);if(i)i.destroy();t.eliminate("content");t.setStyles(this.css.naviItemNode);t.setStyle("background-image","url(/x_component_Setting/$Main/default/icon/"+e.icon+".png)")}.bind(this));t.setStyles(this.css.naviItemNode_current);t.setStyle("background-image","url(/x_component_Setting/$Main/default/icon/"+e.icon+"_current.png)");if(this[e.action])this[e.action](t)},loadApplicationServers:function(t){this.applicationServerContent=new Element("div",{styles:this.css.applicationServerContent}).inject(this.contentAreaNode);MWF.xDesktop.requireApp("Setting","servers.ApplicationServers",function(){this.applicationServerList=new MWF.xApplication.Setting.servers.ApplicationServers(this);t.store("content",this.applicationServerList)}.bind(this))},loadDataServers:function(t){this.dataServerContent=new Element("div",{styles:this.css.applicationServerContent}).inject(this.contentAreaNode);MWF.xDesktop.requireApp("Setting","servers.DataServers",function(){this.dataServerList=new MWF.xApplication.Setting.servers.DataServers(this);t.store("content",this.dataServerList)}.bind(this))},loadStorageServers:function(t){this.storageServerContent=new Element("div",{styles:this.css.applicationServerContent}).inject(this.contentAreaNode);MWF.xDesktop.requireApp("Setting","servers.StorageServers",function(){this.storageServerList=new MWF.xApplication.Setting.servers.StorageServers(this);t.store("content",this.storageServerList)}.bind(this))},loadWebServers:function(t){this.webServerContent=new Element("div",{styles:this.css.applicationServerContent}).inject(this.contentAreaNode);MWF.xDesktop.requireApp("Setting","servers.WebServers",function(){this.webServerList=new MWF.xApplication.Setting.servers.WebServers(this);t.store("content",this.webServerList)}.bind(this))},loadCenterServer:function(t){this.centerServerContent=new Element("div",{styles:this.css.applicationServerContent}).inject(this.contentAreaNode);MWF.xDesktop.requireApp("Setting","servers.CenterServer",function(){this.centerServerList=new MWF.xApplication.Setting.servers.CenterServer(this);t.store("content",this.centerServerList)}.bind(this))},getNaviJson:function(){return[{text:this.app.lp.tab_centerServer,icon:"center",action:"loadCenterServer"},{text:this.app.lp.tab_ApplicationServer,icon:"application",action:"loadApplicationServers"},{text:this.app.lp.tab_WebServer,icon:"web",action:"loadWebServers"},{text:this.app.lp.tab_DataServer,icon:"data",action:"loadDataServers"},{text:this.app.lp.tab_StorageServer,icon:"storage",action:"loadStorageServers"}]}});MWF.xApplication.Setting.ApplicationsExplorer=new Class({Extends:MWF.xApplication.Setting.ServersExplorer,initialize:function(t){this.app=t;this.container=this.app.applicationAreaNode;this.css=this.app.css;this.naviItems=[];this.load()},getNaviJson:function(){return[{text:"Applications",icon:"app",action:"loadApplications"},{text:"Datas",icon:"data",action:"loadDatas"},{text:"Storages",icon:"storage",action:"loadStorages"}]},loadApplications:function(t){this.applicationsContent=new Element("div",{styles:this.css.applicationsContent}).inject(this.contentAreaNode);MWF.xDesktop.requireApp("Setting","applications.Applications",function(){this.applicationList=new MWF.xApplication.Setting.applications.Applications(this);t.store("content",this.applicationList)}.bind(this))},loadDatas:function(t){this.datasContent=new Element("div",{styles:this.css.applicationsContent}).inject(this.contentAreaNode);MWF.xDesktop.requireApp("Setting","applications.Datas",function(){this.dataList=new MWF.xApplication.Setting.applications.Datas(this);t.store("content",this.dataList)}.bind(this))},loadStorages:function(t){this.storagesContent=new Element("div",{styles:this.css.applicationsContent}).inject(this.contentAreaNode);MWF.xDesktop.requireApp("Setting","applications.Storages",function(){this.storageList=new MWF.xApplication.Setting.applications.Storages(this);t.store("content",this.storageList)}.bind(this))}});MWF.xApplication.Setting.ResourceExplorer=new Class({Extends:MWF.xApplication.Setting.ServersExplorer,initialize:function(t){this.app=t;this.container=this.app.resourceAreaNode;this.css=this.app.css;this.naviItems=[];this.load()},getNaviJson:function(){return[{text:"Administrator",icon:"admin",action:"loadAdministrator"},{text:"Collect",icon:"collect",action:"loadCollect"},{text:"OpenMeeting",icon:"openmeeting",action:"loadOpenMeeting"},{text:"Password",icon:"password",action:"loadPassword"},{text:"Person",icon:"person",action:"loadPerson"},{text:"SSO",icon:"sso",action:"loadSSO"},{text:"WorkTime",icon:"time",action:"loadWorkTime"}]},loadAdministrator:function(t){this.adminContent=new Element("div",{styles:this.css.applicationsContent}).inject(this.contentAreaNode);MWF.xDesktop.requireApp("Setting","resource.Administrator",function(){this.adminConfig=new MWF.xApplication.Setting.resource.Administrator(this);t.store("content",this.adminConfig)}.bind(this))},loadCollect:function(t){this.collectContent=new Element("div",{styles:this.css.applicationsContent}).inject(this.contentAreaNode);MWF.xDesktop.requireApp("Setting","resource.Collect",function(){this.collectConfig=new MWF.xApplication.Setting.resource.Collect(this);t.store("content",this.collectConfig)}.bind(this))},loadOpenMeeting:function(t){this.openmeetingContent=new Element("div",{styles:this.css.applicationsContent}).inject(this.contentAreaNode);MWF.xDesktop.requireApp("Setting","resource.Openmeeting",function(){this.openmeetingConfig=new MWF.xApplication.Setting.resource.Openmeeting(this);t.store("content",this.openmeetingConfig)}.bind(this))},loadPassword:function(t){this.passwordContent=new Element("div",{styles:this.css.applicationsContent}).inject(this.contentAreaNode);MWF.xDesktop.requireApp("Setting","resource.Password",function(){this.passwordConfig=new MWF.xApplication.Setting.resource.Password(this);t.store("content",this.passwordConfig)}.bind(this))},loadPerson:function(t){this.personContent=new Element("div",{styles:this.css.applicationsContent}).inject(this.contentAreaNode);MWF.xDesktop.requireApp("Setting","resource.Person",function(){this.personConfig=new MWF.xApplication.Setting.resource.Person(this);t.store("content",this.personConfig)}.bind(this))},loadSSO:function(t){this.ssoContent=new Element("div",{styles:this.css.applicationsContent}).inject(this.contentAreaNode);MWF.xDesktop.requireApp("Setting","resource.SSO",function(){this.ssoConfig=new MWF.xApplication.Setting.resource.SSO(this);t.store("content",this.ssoConfig)}.bind(this))},loadWorkTime:function(t){this.worktimeContent=new Element("div",{styles:this.css.applicationsContent}).inject(this.contentAreaNode);MWF.xDesktop.requireApp("Setting","resource.Worktime",function(){this.worktimeConfig=new MWF.xApplication.Setting.resource.Worktime(this);t.store("content",this.worktimeConfig)}.bind(this))}});MWF.xApplication.Setting.MobileExplorer=new Class({Extends:MWF.xApplication.Setting.ServersExplorer,initialize:function(t){this.app=t;this.container=this.app.mobileAreaNode;this.css=this.app.css;this.naviItems=[];this.load()},getNaviJson:function(){return[{text:this.app.lp.mobileSetting1,icon:"online",action:"checkOnlineSetting"},{text:this.app.lp.mobileSetting2,icon:"account",action:"accountSetting"},{text:this.app.lp.mobileSetting3,icon:"application",action:"serverSetting"}]},checkOnlineSetting:function(t){this.checkOnlineContent=new Element("div",{styles:this.css.applicationsContent}).inject(this.contentAreaNode);MWF.xDesktop.requireApp("Setting","mobile.CheckOnline",function(){this.checkOnline=new MWF.xApplication.Setting.mobile.CheckOnline(this);t.store("content",this.checkOnline)}.bind(this))},accountSetting:function(t){this.accountContent=new Element("div",{styles:this.css.applicationsContent}).inject(this.contentAreaNode);MWF.xDesktop.requireApp("Setting","mobile.Account",function(){this.account=new MWF.xApplication.Setting.mobile.Account(this);t.store("content",this.account)}.bind(this))},serverSetting:function(t){this.serverSettingContent=new Element("div",{styles:this.css.applicationsContent}).inject(this.contentAreaNode);MWF.xDesktop.requireApp("Setting","mobile.ServerSetting",function(){this.server=new MWF.xApplication.Setting.mobile.ServerSetting(this);t.store("content",this.server)}.bind(this))}});