Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
cfc33353
o2oa
项目概览
ghsby
/
o2oa
落后 Fork 源项目 2880 个版本
Fork自
浙江兰德纵横网络技术股份有限公司 / o2oa
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
o2oa
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
cfc33353
编写于
12月 21, 2021
作者:
楼
楼国栋
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'feature/cms_app_edit' into 'wrdp'
内容管理移动端编辑需求 See merge request o2oa/o2oa!6380
上级
d8c98c01
09ebc746
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
73 addition
and
27 deletion
+73
-27
o2web/source/x_component_cms_Xform/Form.js
o2web/source/x_component_cms_Xform/Form.js
+57
-19
o2web/source/x_desktop/js/base.js
o2web/source/x_desktop/js/base.js
+4
-2
o2web/source/x_desktop/js/base_simple.js
o2web/source/x_desktop/js/base_simple.js
+4
-2
o2web/source/x_desktop/js/base_simple_anonymous.js
o2web/source/x_desktop/js/base_simple_anonymous.js
+4
-2
o2web/source/x_desktop/js/xbase.js
o2web/source/x_desktop/js/xbase.js
+4
-2
未找到文件。
o2web/source/x_component_cms_Xform/Form.js
浏览文件 @
cfc33353
...
...
@@ -743,7 +743,7 @@ MWF.xApplication.cms.Xform.Form = MWF.CMSForm = new Class(
return
;
}
//移动端去掉操作栏
if
(
this
.
app
.
mobile
&&
json
.
type
===
"
Actionbar
"
)
{
if
(
layout
.
mobile
&&
json
.
type
===
"
Actionbar
"
)
{
return
;
}
var
module
=
this
.
_loadModule
(
json
,
node
);
...
...
@@ -1056,10 +1056,10 @@ MWF.xApplication.cms.Xform.Form = MWF.CMSForm = new Class(
this
.
businessData
.
data
.
isNew
=
false
;
this
.
fireEvent
(
"
afterPublish
"
,
[
this
,
json
.
data
]);
if
(
this
.
app
)
if
(
this
.
app
.
fireEvent
)
this
.
app
.
fireEvent
(
"
afterPublish
"
,[
this
,
json
.
data
]);
if
(
callback
)
callback
();
if
(
this
.
app
.
mobile
)
{
// if (callback) callback(); // 传进来不是function
if
(
layout
.
mobile
)
{
this
.
app
.
content
.
unmask
();
// console.log('这里是移动端'
);
this
.
closeWindowOnMobile
(
);
}
else
{
if
(
this
.
businessData
.
document
.
title
)
{
this
.
app
.
notice
(
MWF
.
xApplication
.
cms
.
Xform
.
LP
.
documentPublished
+
"
: “
"
+
this
.
businessData
.
document
.
title
+
"
”
"
,
"
success
"
);
...
...
@@ -1067,20 +1067,22 @@ MWF.xApplication.cms.Xform.Form = MWF.CMSForm = new Class(
this
.
app
.
notice
(
MWF
.
xApplication
.
cms
.
Xform
.
LP
.
documentPublished
,
"
success
"
);
}
this
.
options
.
saveOnClose
=
false
;
}
debugger
;
if
(
layout
.
inBrowser
){
try
{
if
(
window
.
opener
&&
window
.
opener
.
o2RefreshCMSView
){
window
.
opener
.
o2RefreshCMSView
();
}
}
catch
(
e
)
{}
window
.
setTimeout
(
function
()
{
debugger
;
if
(
layout
.
inBrowser
){
try
{
if
(
window
.
opener
&&
window
.
opener
.
o2RefreshCMSView
){
window
.
opener
.
o2RefreshCMSView
();
}
}
catch
(
e
)
{}
window
.
setTimeout
(
function
()
{
this
.
app
.
close
();
}.
bind
(
this
),
1500
)
}
else
{
this
.
app
.
close
();
}.
bind
(
this
),
1500
)
}
else
{
this
.
app
.
close
();
}
}
}.
bind
(
this
));
//}.bind(this))
...
...
@@ -1122,7 +1124,7 @@ MWF.xApplication.cms.Xform.Form = MWF.CMSForm = new Class(
//},
deleteDocumentForMobile
:
function
()
{
if
(
this
.
app
.
mobile
)
{
if
(
layout
.
mobile
)
{
this
.
app
.
content
.
mask
({
"
style
"
:
{
"
background-color
"
:
"
#999
"
,
...
...
@@ -1140,7 +1142,7 @@ MWF.xApplication.cms.Xform.Form = MWF.CMSForm = new Class(
this
.
options
.
autoSave
=
false
;
this
.
options
.
saveOnClose
=
false
;
this
.
fireEvent
(
"
postDelete
"
);
this
.
app
.
clos
e
();
this
.
closeWindowOnMobil
e
();
}.
bind
(
this
));
}
},
...
...
@@ -1233,7 +1235,7 @@ MWF.xApplication.cms.Xform.Form = MWF.CMSForm = new Class(
* this.form.getApp().appForm.editDocumentForMobile();
*/
editDocumentForMobile
:
function
()
{
if
(
this
.
app
.
mobile
)
{
if
(
layout
.
mobile
)
{
this
.
app
.
options
.
readonly
=
false
;
this
.
app
.
loadDocument
(
this
.
app
.
options
);
}
...
...
@@ -1372,6 +1374,42 @@ MWF.xApplication.cms.Xform.Form = MWF.CMSForm = new Class(
this
.
close
();
});
},
/**
* 移动端处理关闭
*/
closeWindowOnMobile
:
function
()
{
if
(
window
.
o2android
&&
window
.
o2android
.
closeDocumentWindow
)
{
window
.
o2android
.
closeDocumentWindow
(
""
);
}
else
if
(
window
.
webkit
&&
window
.
webkit
.
messageHandlers
&&
window
.
webkit
.
messageHandlers
.
closeDocumentWindow
)
{
window
.
webkit
.
messageHandlers
.
closeDocumentWindow
.
postMessage
(
""
);
}
else
if
(
window
.
wx
&&
window
.
__wxjs_environment
===
'
miniprogram
'
)
{
//微信小程序 关闭页面
wx
.
miniProgram
.
navigateBack
({
delta
:
1
});
}
else
if
(
window
.
uni
&&
window
.
uni
.
navigateBack
)
{
// uniapp 关闭页面
window
.
uni
.
navigateBack
();
}
else
if
(
this
.
json
.
afterProcessAction
===
"
redirect
"
&&
this
.
json
.
afterProcessRedirectScript
&&
this
.
json
.
afterProcessRedirectScript
.
code
)
{
var
url
=
this
.
Macro
.
exec
(
this
.
json
.
afterProcessRedirectScript
.
code
,
this
);
(
new
URI
(
url
)).
go
();
}
else
{
var
uri
=
new
URI
(
window
.
location
.
href
);
var
redirectlink
=
uri
.
getData
(
"
redirectlink
"
);
if
(
redirectlink
)
{
history
.
replaceState
(
null
,
"
work
"
,
redirectlink
);
redirectlink
.
toURI
().
go
();
}
else
{
this
.
app
.
close
();
}
// var len = window.history.length;
// if (len > 1) {
// history.back();
// } else {
// // window.location = o2.filterUrl("../x_desktop/appMobile.html?app=process.TaskCenter");
// history.replaceState(null, "work", o2.filterUrl("../x_desktop/appMobile.html?app=process.TaskCenter"));
// o2.filterUrl("../x_desktop/appMobile.html?app=process.TaskCenter").toURI().go();
// }
}
},
...
...
o2web/source/x_desktop/js/base.js
浏览文件 @
cfc33353
...
...
@@ -158,12 +158,14 @@ if (!window.layout || !layout.desktop || !layout.addReady) {
var
title
=
typeOf
(
options
)
===
"
object
"
?
(
options
.
docTitle
||
options
.
title
)
:
""
;
title
=
title
||
""
;
var
par
=
"
app=
"
+
encodeURIComponent
(
appNames
)
+
"
&status=
"
+
encodeURIComponent
((
statusObj
)
?
JSON
.
encode
(
statusObj
)
:
""
)
+
"
&option=
"
+
encodeURIComponent
((
options
)
?
JSON
.
encode
(
options
)
:
""
);
if
(
window
.
o2android
&&
window
.
o2android
.
openO2CmsDocument
)
{
if
(
window
.
o2android
&&
window
.
o2android
.
openO2CmsDocumentV2
)
{
window
.
o2android
.
openO2CmsDocumentV2
(
options
.
documentId
,
title
,
JSON
.
stringify
(
options
));
}
else
if
(
window
.
o2android
&&
window
.
o2android
.
openO2CmsDocument
)
{
window
.
o2android
.
openO2CmsDocument
(
options
.
documentId
,
title
);
}
else
if
(
window
.
webkit
&&
window
.
webkit
.
messageHandlers
&&
window
.
webkit
.
messageHandlers
.
openO2CmsDocument
)
{
window
.
webkit
.
messageHandlers
.
openO2CmsDocument
.
postMessage
({
"
docId
"
:
options
.
documentId
,
"
docTitle
"
:
title
"
docTitle
"
:
title
,
"
options
"
:
JSON
.
stringify
(
options
)
});
}
else
{
window
.
location
=
o2
.
filterUrl
(
"
../x_desktop/appMobile.html?
"
+
par
+
((
layout
.
debugger
)
?
"
&debugger
"
:
""
));
...
...
o2web/source/x_desktop/js/base_simple.js
浏览文件 @
cfc33353
...
...
@@ -339,10 +339,12 @@ o2.addReady(function () {
var
title
=
typeOf
(
options
)
===
"
object
"
?
(
options
.
docTitle
||
options
.
title
)
:
""
;
title
=
title
||
""
;
var
par
=
"
app=
"
+
encodeURIComponent
(
appNames
)
+
"
&status=
"
+
encodeURIComponent
((
statusObj
)
?
JSON
.
encode
(
statusObj
)
:
""
)
+
"
&option=
"
+
encodeURIComponent
((
options
)
?
JSON
.
encode
(
options
)
:
""
);
if
(
window
.
o2android
&&
window
.
o2android
.
openO2CmsDocument
)
{
if
(
window
.
o2android
&&
window
.
o2android
.
openO2CmsDocumentV2
)
{
window
.
o2android
.
openO2CmsDocumentV2
(
options
.
documentId
,
title
,
JSON
.
stringify
(
options
));
}
else
if
(
window
.
o2android
&&
window
.
o2android
.
openO2CmsDocument
)
{
window
.
o2android
.
openO2CmsDocument
(
options
.
documentId
,
title
);
}
else
if
(
window
.
webkit
&&
window
.
webkit
.
messageHandlers
&&
window
.
webkit
.
messageHandlers
.
openO2CmsDocument
)
{
window
.
webkit
.
messageHandlers
.
openO2CmsDocument
.
postMessage
({
"
docId
"
:
options
.
documentId
,
"
docTitle
"
:
title
});
window
.
webkit
.
messageHandlers
.
openO2CmsDocument
.
postMessage
({
"
docId
"
:
options
.
documentId
,
"
docTitle
"
:
title
,
"
options
"
:
JSON
.
stringify
(
options
)
});
}
else
{
window
.
location
=
o2
.
filterUrl
(
"
../x_desktop/appMobile.html?
"
+
par
+
((
layout
.
debugger
)
?
"
&debugger
"
:
""
));
}
...
...
o2web/source/x_desktop/js/base_simple_anonymous.js
浏览文件 @
cfc33353
...
...
@@ -286,10 +286,12 @@ o2.addReady(function () {
var
title
=
typeOf
(
options
)
===
"
object
"
?
(
options
.
docTitle
||
options
.
title
)
:
""
;
title
=
title
||
""
;
var
par
=
"
app=
"
+
encodeURIComponent
(
appNames
)
+
"
&status=
"
+
encodeURIComponent
((
statusObj
)
?
JSON
.
encode
(
statusObj
)
:
""
)
+
"
&option=
"
+
encodeURIComponent
((
options
)
?
JSON
.
encode
(
options
)
:
""
);
if
(
window
.
o2android
&&
window
.
o2android
.
openO2CmsDocument
)
{
if
(
window
.
o2android
&&
window
.
o2android
.
openO2CmsDocumentV2
)
{
window
.
o2android
.
openO2CmsDocumentV2
(
options
.
documentId
,
title
,
JSON
.
stringify
(
options
));
}
else
if
(
window
.
o2android
&&
window
.
o2android
.
openO2CmsDocument
)
{
window
.
o2android
.
openO2CmsDocument
(
options
.
documentId
,
title
);
}
else
if
(
window
.
webkit
&&
window
.
webkit
.
messageHandlers
&&
window
.
webkit
.
messageHandlers
.
openO2CmsDocument
)
{
window
.
webkit
.
messageHandlers
.
openO2CmsDocument
.
postMessage
({
"
docId
"
:
options
.
documentId
,
"
docTitle
"
:
title
});
window
.
webkit
.
messageHandlers
.
openO2CmsDocument
.
postMessage
({
"
docId
"
:
options
.
documentId
,
"
docTitle
"
:
title
,
"
options
"
:
JSON
.
stringify
(
options
)
});
}
else
{
window
.
location
=
o2
.
filterUrl
(
"
../x_desktop/appMobile.html?
"
+
par
+
((
layout
.
debugger
)
?
"
&debugger
"
:
""
));
}
...
...
o2web/source/x_desktop/js/xbase.js
浏览文件 @
cfc33353
...
...
@@ -123,10 +123,12 @@ o2.xDesktop.requireApp = function (module, clazz, callback, async) {
var
title
=
typeOf
(
options
)
===
"
object
"
?
(
options
.
docTitle
||
options
.
title
)
:
""
;
title
=
title
||
""
;
var
par
=
"
app=
"
+
encodeURIComponent
(
appNames
)
+
"
&status=
"
+
encodeURIComponent
((
statusObj
)
?
JSON
.
encode
(
statusObj
)
:
""
)
+
"
&option=
"
+
encodeURIComponent
((
options
)
?
JSON
.
encode
(
options
)
:
""
);
if
(
window
.
o2android
&&
window
.
o2android
.
openO2CmsDocument
)
{
if
(
window
.
o2android
&&
window
.
o2android
.
openO2CmsDocumentV2
)
{
window
.
o2android
.
openO2CmsDocumentV2
(
options
.
documentId
,
title
,
JSON
.
stringify
(
options
));
}
else
if
(
window
.
o2android
&&
window
.
o2android
.
openO2CmsDocument
)
{
window
.
o2android
.
openO2CmsDocument
(
options
.
documentId
,
title
);
}
else
if
(
window
.
webkit
&&
window
.
webkit
.
messageHandlers
&&
window
.
webkit
.
messageHandlers
.
openO2CmsDocument
)
{
window
.
webkit
.
messageHandlers
.
openO2CmsDocument
.
postMessage
({
"
docId
"
:
options
.
documentId
,
"
docTitle
"
:
title
});
window
.
webkit
.
messageHandlers
.
openO2CmsDocument
.
postMessage
({
"
docId
"
:
options
.
documentId
,
"
docTitle
"
:
title
,
"
options
"
:
JSON
.
stringify
(
options
)
});
}
else
{
window
.
location
=
o2
.
filterUrl
(
"
../x_desktop/appMobile.html?
"
+
par
+
((
layout
.
debugger
)
?
"
&debugger
"
:
""
));
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录