提交 52f4a780 编写于 作者: NoSubject's avatar NoSubject

Merge branch 'feature/cloudSetting' into 'develop'

[平台配置]增加云服务配置选项卡

See merge request o2oa/o2oa!1528
MWF.xDesktop.requireApp("Setting", "Document", null, false);
MWF.xDesktop.requireApp("Setting", "SettingBase", null, false);
MWF.xDesktop.requireApp("Setting", "SettingMobile", null, false);
MWF.xDesktop.requireApp("Setting", "SettingCloud", null, false);
MWF.xDesktop.requireApp("Setting", "SettingLoginUI", null, false);
MWF.xDesktop.requireApp("Setting", "SettingIndexUI", null, false);
MWF.xDesktop.requireApp("Setting", "SettingModuleUI", null, false);
......@@ -9,26 +10,27 @@ MWF.xDesktop.requireApp("Setting", "SettingModuleResource", 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": "1020",
"height": "660",
"title": MWF.xApplication.Setting.LP.title
},
onQueryLoad: function(){
this.lp = MWF.xApplication.Setting.LP;
Extends: MWF.xApplication.Common.Main,
Implements: [Options, Events],
options: {
"style": "default",
"name": "Setting",
"icon": "icon.png",
"width": "1020",
"height": "660",
"title": MWF.xApplication.Setting.LP.title
},
onQueryLoad: function(){
this.lp = MWF.xApplication.Setting.LP;
this.actions = MWF.Actions.get("x_program_center");
//this.actions = new MWF.xApplication.Setting.Actions.RestActions();
},
loadApplication: function(callback){
},
loadApplication: function(callback){
this.baseAreaNode = new Element("div", {"styles": this.css.tabAreaNode}).inject(this.content);
this.uiAreaNode = new Element("div", {"styles": this.css.tabAreaNode}).inject(this.content);
this.mobileAreaNode = new Element("div", {"styles": this.css.tabAreaNode}).inject(this.content);
this.cloudAreaNode = new Element("div", {"styles": this.css.tabAreaNode}).inject(this.content);
this.disposeAreaNode = new Element("div", {"styles": this.css.tabAreaNode}).inject(this.content);
......@@ -44,8 +46,8 @@ MWF.xApplication.Setting.Main = new Class({
this.basePage = this.tab.addTab(this.baseAreaNode, this.lp.tab_base, false);
this.uiPage = this.tab.addTab(this.uiAreaNode, this.lp.tab_ui, false);
this.cloudPage = this.tab.addTab(this.cloudAreaNode, this.lp.tab_cloud, false);
this.mobilePage = this.tab.addTab(this.mobileAreaNode, this.lp.tab_mobile, false);
this.disposePage = this.tab.addTab(this.disposeAreaNode, this.lp.tab_dispose, false);
this.basePage.addEvent("postShow", function(){
......@@ -60,6 +62,11 @@ MWF.xApplication.Setting.Main = new Class({
if (!this.mobileExplorer) this.mobileExplorer = new MWF.xApplication.Setting.MobileExplorer(this, this.mobileAreaNode);
}.bind(this));
this.cloudPage.addEvent("postShow", function(){
if (!this.cloudExplorer) this.cloudExplorer = new MWF.xApplication.Setting.CloudExplorer(this, this.cloudAreaNode);
}.bind(this));
this.disposePage.addEvent("postShow", function(){
if (!this.disposeExplorer) this.disposeExplorer = new MWF.xApplication.Setting.DisposeExplorer(this, this.disposeAreaNode);
}.bind(this));
......@@ -98,7 +105,7 @@ MWF.xApplication.Setting.Main = new Class({
//}.bind(this));
//this.loadApplicationServers();
},
},
loadTitle: function(){
......@@ -320,11 +327,6 @@ MWF.xApplication.Setting.MobileExplorer = new Class({
getNaviJson: function(){
return [
{
"text": this.app.lp.tab_mobile_connect,
"icon": "connect",
"action": "loadMobileConnectSetting"
},
{
"text": this.app.lp.tab_mobile_module,
"icon": "module",
......@@ -364,14 +366,14 @@ MWF.xApplication.Setting.MobileExplorer = new Class({
},
loadMobileConnectSetting: function(item){
if (MWF.AC.isAdministrator()) if (this.proxyData && this.nativeData && this.imagesData){
this.mobileConnectSetting = new MWF.xApplication.Setting.MobileConnectDocument(this, this.contentAreaNode);
item.store("content", this.mobileConnectSetting);
}else{
this.loadDataBack = function(){this.loadMobileConnectSetting(item)}.bind(this);
}
},
// loadMobileConnectSetting: function(item){
// if (MWF.AC.isAdministrator()) if (this.proxyData && this.nativeData && this.imagesData){
// this.mobileConnectSetting = new MWF.xApplication.Setting.MobileConnectDocument(this, this.contentAreaNode);
// item.store("content", this.mobileConnectSetting);
// }else{
// this.loadDataBack = function(){this.loadMobileConnectSetting(item)}.bind(this);
// }
// },
loadMobileModuleSetting: function(item){
if (MWF.AC.isAdministrator()) if (this.proxyData && this.nativeData && this.imagesData){
......@@ -391,6 +393,67 @@ MWF.xApplication.Setting.MobileExplorer = new Class({
}
}
});
MWF.xApplication.Setting.CloudExplorer = new Class({
Extends: MWF.xApplication.Setting.BaseExplorer,
initialize: function(app, content){
this.app = app;
this.lp = this.app.lp;
this.container = content;
this.actions = this.app.actions;
this.css = this.app.css;
this.naviItems = [];
this.collectData = null;
this.personData = null;
this.tokenData = null;
this.loadDataBack = null;
this.load();
},
getNaviJson: function(){
return [
{
"text": this.app.lp.tab_cloud_connect,
"icon": "connect",
"action": "loadCloudConnectSetting"
}
];
},
getData: function(){
var checkData = function(){
if (this.proxyData && this.nativeData && this.imagesData){
if (this.loadDataBack){
var fun = this.loadDataBack;
this.loadDataBack = null;
fun();
}
}
}.bind(this);
this.actions.getProxy(function(json){
this.proxyData = json.data;
checkData();
}.bind(this));
this.actions.mobile_currentStyle(function(json){
this.nativeData = {"indexType": json.data.indexType, "indexPortal": json.data.indexPortal, "nativeAppList": Array.clone(json.data.nativeAppList)};
this.imagesData = {"images": Array.clone(json.data.images)};
//this.indexData = {"indexType": json.data.indexType, "indexId": json.data.indexId};
this.portalData = {"portalList": Array.clone(json.data.portalList)};
delete json.data;
json = null;
checkData();
}.bind(this));
},
loadCloudConnectSetting: function(item){
if (MWF.AC.isAdministrator()) if (this.proxyData && this.nativeData && this.imagesData){
this.mobileConnectSetting = new MWF.xApplication.Setting.CloudConnectDocument(this, this.contentAreaNode);
item.store("content", this.mobileConnectSetting);
}else{
this.loadDataBack = function(){this.loadCloudConnectSetting(item)}.bind(this);
}
},
});
MWF.xApplication.Setting.UIExplorer = new Class({
Extends: MWF.xApplication.Setting.BaseExplorer,
initialize: function(app, content){
......
MWF.xDesktop.requireApp("Setting", "Document", null, false);
MWF.xApplication.Setting.CloudConnectDocument = new Class({
Extends: MWF.xApplication.Setting.Document,
load: function(){
this.node = new Element("div", {"styles": {"overflow": "hidden", "padding-bottom": "80px"}}).inject(this.contentAreaNode);
this.titleName = new Element("div", {"styles": this.explorer.css.explorerContentTitleNode}).inject(this.node);
this.titleName.set("text", this.lp.cloud_connectSetting);
var o2CloudConnected = false;
this.actions.collectConnected(function(json){
o2CloudConnected = json.data.value;
}.bind(this), function(json){
o2CloudConnected = false;
}.bind(this), false);
this.mobileO2CloudConnectInput = new MWF.xApplication.Setting.Document.Button(this.explorer, this.node, {
"lp": {"title": this.lp.mobile_connectO2Cloud, "infor": this.mobile_connectO2Cloud_infor, "action": this.lp.mobile_connectO2Cloud_action},
//"data": {"key": "proxyData", "valueKey": "ssos", "notEmpty": false },
"value": o2CloudConnected ? this.lp.mobile_connectO2Cloud_success : this.lp.mobile_connectO2Cloud_error,
"itemTitle": o2CloudConnected ? this.lp.mobile_connectO2Cloud_success : this.lp.mobile_connectO2Cloud_error,
"icon": o2CloudConnected ? "cloud.png" : "cloud_error.png",
"action": function(e){
layout.desktop.openApplication(e, "Collect");
}.bind(this)
});
this.mobileHttpProtocolInput = new MWF.xApplication.Setting.Document.Select(this.explorer, this.node, {
"lp": {"title": this.lp.mobile_httpProtocol, "infor": this.lp.mobile_httpProtocol_infor},
"data": {"key": "proxyData", "valueKey": "httpProtocol"},
"value": this.explorer.proxyData.httpProtocol,
"options": [{"value": "http", "text": "http"}, {"value": "https", "text": "https"}]
});
this.mobileCenterInput = new MWF.xApplication.Setting.Document.List(this.explorer, this.node, {
"lp": {"title": this.lp.mobile_center, "infor": this.lp.mobile_center_infor, "editAction": this.lp.mobile_center_action},
"data": {"key": "proxyData", "valueKey": "center", "notEmpty": false},
"value": this.explorer.proxyData.center,
"itemTitle": "{proxyHost}:{proxyPort}",
"icon": "center.png"
});
this.mobileWebInput = new MWF.xApplication.Setting.Document.List(this.explorer, this.node, {
"lp": {"title": this.lp.mobile_web, "infor": this.lp.mobile_web_infor, "editAction": this.lp.mobile_web_action},
"data": {"key": "proxyData", "valueKey": "web", "notEmpty": false},
"value": this.explorer.proxyData.web,
"itemTitle": "{proxyHost}:{proxyPort}",
"icon": "webserver.png"
});
this.mobileApplicationInput = new MWF.xApplication.Setting.Document.List(this.explorer, this.node, {
"lp": {"title": this.lp.mobile_application, "infor": this.lp.mobile_application_infor, "editAction": this.lp.mobile_application_action},
"data": {"key": "proxyData", "valueKey": "applicationList", "notEmpty": false},
"value": this.explorer.proxyData.applicationList,
"itemTitle": "{proxyHost}:{proxyPort}",
"readonly": ["node"],
"icon": "server.png"
});
}
});
\ No newline at end of file
MWF.xApplication.Setting.LP = {
"title": "系统设置",
"title": "系统设置",
"default": "默认",
"tab_base": "基础配置",
"tab_ui": "界面配置",
"tab_mobile": "移动办公配置",
"tab_cloud": "云服务配置",
"tab_dispose": "系统部署",
"tab_name": "系统名称配置",
"tab_user": "系统用户配置",
......@@ -12,6 +13,8 @@ MWF.xApplication.Setting.LP = {
"tab_sso": "系统SSO配置",
"tab_config": "平台配置",
"tab_cloud_connect": "连接配置",
"tab_mobile_connect": "连接配置",
"tab_mobile_module": "模块配置",
"tab_mobile_style": "样式配置",
......@@ -117,6 +120,7 @@ MWF.xApplication.Setting.LP = {
"mobile_connectSetting": "移动办公连接配置",
"cloud_connectSetting": "云服务连接配置",
"mobile_connectO2Cloud": "连接到O2云",
"mobile_connectO2Cloud_infor": "使用移动办公请先连接到O2云,这有助于APP定位到您的企业服务器,可以使用短信服务等",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册