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

Merge branch 'fix/mobile_draft' into 'wrdp'

修复手机端草稿模式bug

See merge request o2oa/o2oa!2453
...@@ -388,9 +388,21 @@ MWF.xApplication.process.Work.Main = new Class({ ...@@ -388,9 +388,21 @@ MWF.xApplication.process.Work.Main = new Class({
this.parseData(workData, control, json_form.data, [], [], []); this.parseData(workData, control, json_form.data, [], [], []);
if (this.mask) this.mask.hide(); if (this.mask) this.mask.hide();
//if (layout.mobile) this.loadMobileActions();
this.openWork(); if (layout.session && layout.session.user){
this.unLoading(); 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]); }.bind(this), "failure": function(){}}, [work.form, work.application]);
......
...@@ -122,6 +122,18 @@ o2.xDesktop.requireApp = function (module, clazz, callback, async) { ...@@ -122,6 +122,18 @@ o2.xDesktop.requireApp = function (module, clazz, callback, async) {
return false; return false;
}; };
var _openWorkHTML = function (options) { 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 uri = new URI(window.location.href);
var redirectlink = uri.getData("redirectlink"); var redirectlink = uri.getData("redirectlink");
if (!redirectlink) { if (!redirectlink) {
...@@ -129,11 +141,19 @@ o2.xDesktop.requireApp = function (module, clazz, callback, async) { ...@@ -129,11 +141,19 @@ o2.xDesktop.requireApp = function (module, clazz, callback, async) {
} else { } else {
redirectlink = encodeURIComponent(redirectlink); redirectlink = encodeURIComponent(redirectlink);
} }
if (options.workId) { var docurl = "../x_desktop/workmobilewithaction.html".toURI();
window.location = o2.filterUrl("../x_desktop/workmobilewithaction.html?workid=" + options.workId + ((layout.debugger) ? "&debugger" : "") + "&redirectlink=" + redirectlink); if (options.draft){
} else if (options.workCompletedId) { var par = "draft="+encodeURIComponent(JSON.stringify(options.draft));
window.location = o2.filterUrl("../x_desktop/workmobilewithaction.html?workcompletedid=" + options.workCompletedId + ((layout.debugger) ? "&debugger" : "") + "&redirectlink=" + redirectlink); 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) { var _openWork = function (options) {
if (!_openWorkAndroid(options)) if (!_openWorkIOS(options)) _openWorkHTML(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.
先完成此消息的编辑!
想要评论请 注册