提交 361dd3e5 编写于 作者: NoSubject's avatar NoSubject

增加通过URL传入参数,在Default页面直接打开指定应用的功能。app=appName&option={}&default=false

上级 1ec798fc
......@@ -29,16 +29,32 @@ o2.xDesktop.Default = new Class({
this.session = {};
this.serviceAddressList = layout.serviceAddressList;
this.centerServer = layout.centerServer;
this.session.user = layout.session.user
this.status = layout.userLayout;
this.session.user = layout.session.user;
var uri = new URI(window.location.href);
var df = uri.getData("default") || "";
this.noDefault = df.toString().toLowerCase()==="false";
var appNames = uri.getData("app");
var optionsStr = uri.getData("option");
var options = (optionsStr) ? JSON.decode(optionsStr) : null;
if (appNames){
this.status = layout.userLayout;
this.status.apps = {};
this.status.apps[appNames] = options || {};
this.status.apps[appNames].name = appNames;
this.status.apps[appNames].appId = appNames;
this.status.currentApp = appNames;
}else{
this.status = layout.userLayout;
}
if (this.status && this.status.flatStyle) this.options.style = this.status.flatStyle;
},
load: function(){
this.loadLayout(function(){
this.setEvent();
this.loadDefaultPage();
if (!this.noDefault) this.loadDefaultPage();
window.setTimeout(function(){
var iconsPath = this.path+"icons.json";
o2.JSON.get(iconsPath, function(json) {
......
......@@ -119,6 +119,7 @@ MWF.xApplication.Common.Main = new Class({
this.fireAppEvent("postLoadWindow");
this.fireAppEvent("queryLoadApplication");
//load css
if (this.options.title) this.setTitle(this.options.title);
if (this.stylePath) {
this.content.loadCss(this.stylePath, this.loadWindowApplication.bind(this));
}else{
......@@ -223,6 +224,7 @@ MWF.xApplication.Common.Main = new Class({
this.fireAppEvent("queryLoadApplication");
//load css
if (this.options.title) this.setTitle(this.options.title);
if (this.stylePath) {
this.content.loadCss(this.stylePath, this.loadWindowApplication.bind(this));
}else{
......@@ -278,6 +280,7 @@ MWF.xApplication.Common.Main = new Class({
this.fireAppEvent("queryLoadApplication");
this.setContentEvent();
if (this.options.title) this.setTitle(this.options.title);
if (this.stylePath) o2.loadCss(this.stylePath);
this.loadApplication(function () {
this.fireAppEvent("postLoadApplication");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册