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

修复手机端草稿模式bug

上级 701ea3ee
......@@ -388,9 +388,21 @@ MWF.xApplication.process.Work.Main = new Class({
this.parseData(workData, control, json_form.data, [], [], []);
if (this.mask) this.mask.hide();
//if (layout.mobile) this.loadMobileActions();
this.openWork();
this.unLoading();
if (layout.session && layout.session.user){
this.openWork();
this.unLoading();
}else{
if (layout.sessionPromise){
layout.sessionPromise.then(function(){
this.openWork();
this.unLoading();
}.bind(this), function(){});
}
}
// this.openWork();
// this.unLoading();
}
}.bind(this), "failure": function(){}}, [work.form, work.application]);
......
......@@ -122,6 +122,18 @@ o2.xDesktop.requireApp = function (module, clazz, callback, async) {
return false;
};
var _openWorkHTML = function (options) {
// var uri = new URI(window.location.href);
// var redirectlink = uri.getData("redirectlink");
// if (!redirectlink) {
// redirectlink = encodeURIComponent(locate.pathname + locate.search);
// } else {
// redirectlink = encodeURIComponent(redirectlink);
// }
// if (options.workId) {
// window.location = o2.filterUrl("../x_desktop/workmobilewithaction.html?workid=" + options.workId + ((layout.debugger) ? "&debugger" : "") + "&redirectlink=" + redirectlink);
// } else if (options.workCompletedId) {
// window.location = o2.filterUrl("../x_desktop/workmobilewithaction.html?workcompletedid=" + options.workCompletedId + ((layout.debugger) ? "&debugger" : "") + "&redirectlink=" + redirectlink);
// }
var uri = new URI(window.location.href);
var redirectlink = uri.getData("redirectlink");
if (!redirectlink) {
......@@ -129,11 +141,19 @@ o2.xDesktop.requireApp = function (module, clazz, callback, async) {
} else {
redirectlink = encodeURIComponent(redirectlink);
}
if (options.workId) {
window.location = o2.filterUrl("../x_desktop/workmobilewithaction.html?workid=" + options.workId + ((layout.debugger) ? "&debugger" : "") + "&redirectlink=" + redirectlink);
} else if (options.workCompletedId) {
window.location = o2.filterUrl("../x_desktop/workmobilewithaction.html?workcompletedid=" + options.workCompletedId + ((layout.debugger) ? "&debugger" : "") + "&redirectlink=" + redirectlink);
var docurl = "../x_desktop/workmobilewithaction.html".toURI();
if (options.draft){
var par = "draft="+encodeURIComponent(JSON.stringify(options.draft));
docurl = "../x_desktop/workmobilewithaction.html?" + par;
}else{
docurl = docurl.setData(options).toString();
}
var job = (options.jobid || options.jobId || options.job);
if (job) docurl += ((docurl.indexOf("?")!=-1) ? "&" : "?") + "jobid="+job;
docurl += ((redirectlink) ? "&redirectlink=" + redirectlink : "");
docurl +=((layout.debugger) ? "&debugger" : "");
window.location = o2.filterUrl(docurl);
};
var _openWork = function (options) {
if (!_openWorkAndroid(options)) if (!_openWorkIOS(options)) _openWorkHTML(options);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册