Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
此号慢热型
o2oa
提交
109507a0
o2oa
项目概览
此号慢热型
/
o2oa
与 Fork 源项目一致
Fork自
浙江兰德纵横网络技术股份有限公司 / o2oa
通知
5
Star
0
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,发现更多精彩内容 >>
提交
109507a0
编写于
11月 23, 2020
作者:
U
unknown
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
操作条的操作系统和自定义操作可以混合排序
上级
17b9f020
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
267 addition
and
138 deletion
+267
-138
o2web/source/x_component_cms_FormDesigner/Module/Actionbar.js
...b/source/x_component_cms_FormDesigner/Module/Actionbar.js
+83
-72
o2web/source/x_component_cms_FormDesigner/ModuleImplements.js
...b/source/x_component_cms_FormDesigner/ModuleImplements.js
+18
-0
o2web/source/x_component_cms_FormDesigner/Property.js
o2web/source/x_component_cms_FormDesigner/Property.js
+17
-0
o2web/source/x_component_cms_FormDesigner/widget/ActionsEditor.js
...urce/x_component_cms_FormDesigner/widget/ActionsEditor.js
+4
-3
o2web/source/x_component_cms_Xform/Actionbar.js
o2web/source/x_component_cms_Xform/Actionbar.js
+28
-16
o2web/source/x_component_process_FormDesigner/Module/Actionbar.js
...urce/x_component_process_FormDesigner/Module/Actionbar.js
+76
-42
o2web/source/x_component_process_FormDesigner/Module/Actionbar/actionbar.html
...nent_process_FormDesigner/Module/Actionbar/actionbar.html
+3
-2
o2web/source/x_component_process_FormDesigner/Property.js
o2web/source/x_component_process_FormDesigner/Property.js
+17
-0
o2web/source/x_component_process_FormDesigner/widget/ActionsEditor.js
.../x_component_process_FormDesigner/widget/ActionsEditor.js
+4
-3
o2web/source/x_component_query_ViewDesigner/Property.js
o2web/source/x_component_query_ViewDesigner/Property.js
+17
-0
未找到文件。
o2web/source/x_component_cms_FormDesigner/Module/Actionbar.js
浏览文件 @
109507a0
...
...
@@ -24,6 +24,7 @@ MWF.xApplication.cms.FormDesigner.Module.Actionbar = MWF.CMSFCActionbar = new Cl
this
.
containerNode
=
null
;
this
.
systemTools
=
[];
this
.
customTools
=
[];
this
.
multiTools
=
[];
},
setTemplateStyles
:
function
(
styles
){
this
.
json
.
style
=
styles
.
style
;
...
...
@@ -60,7 +61,8 @@ MWF.xApplication.cms.FormDesigner.Module.Actionbar = MWF.CMSFCActionbar = new Cl
this
.
toolbarWidget
=
new
MWF
.
widget
.
SimpleToolbar
(
this
.
toolbarNode
,
{
"
style
"
:
this
.
json
.
style
},
this
);
MWF
.
getJSON
(
this
.
path
+
"
toolbars.json
"
,
function
(
json
){
this
.
json
.
defaultTools
=
json
;
//this.json.defaultTools = json;
this
.
json
.
multiTools
=
json
.
map
(
function
(
d
)
{
d
.
system
=
true
;
return
d
;
});
this
.
setToolbars
(
json
,
this
.
toolbarNode
);
this
.
toolbarWidget
.
load
();
this
.
_setEditStyle_custom
(
"
hideSystemTools
"
);
...
...
@@ -90,63 +92,34 @@ MWF.xApplication.cms.FormDesigner.Module.Actionbar = MWF.CMSFCActionbar = new Cl
if
(
!
this
.
json
.
actionStyles
)
this
.
json
.
actionStyles
=
Object
.
clone
(
this
.
toolbarWidget
.
css
);
this
.
toolbarWidget
.
css
=
this
.
json
.
actionStyles
;
if
(
this
.
json
.
defaultTools
){
var
json
=
Array
.
clone
(
this
.
json
.
defaultTools
);
this
.
setToolbars
(
json
,
this
.
toolbarNode
);
//if (this.json.tools) json.append(this.json.tools);
//this.setToolbars(json, this.toolbarNode);
if
(
this
.
json
.
tools
){
this
.
setCustomToolbars
(
Array
.
clone
(
this
.
json
.
tools
),
this
.
toolbarNode
);
}
this
.
toolbarWidget
.
load
();
this
.
_setEditStyle_custom
(
"
hideSystemTools
"
);
this
.
_setEditStyle_custom
(
"
hideSetPopularDocumentTool
"
);
//json = null;
}
else
{
MWF
.
getJSON
(
this
.
path
+
"
toolbars.json
"
,
function
(
json
){
this
.
json
.
defaultTools
=
json
;
var
json
=
Array
.
clone
(
this
.
json
.
defaultTools
);
this
.
setToolbars
(
json
,
this
.
toolbarNode
);
//if (this.json.tools) json.append(this.json.tools);
//this.setToolbars(json, this.toolbarNode);
if
(
this
.
json
.
tools
){
this
.
setCustomToolbars
(
Array
.
clone
(
this
.
json
.
tools
),
this
.
toolbarNode
);
}
this
.
toolbarWidget
.
load
();
this
.
_setEditStyle_custom
(
"
hideSystemTools
"
);
this
.
_setEditStyle_custom
(
"
hideSetPopularDocumentTool
"
);
//json = null;
}.
bind
(
this
),
false
);
}
this
.
loadMultiToolbar
();
// if (this.json.sysTools.editTools){
// this.setToolbars(this.json.sysTools.editTools, this.toolbarNode);
//// this.setToolbars(this.json.tools.editTools, this.toolbarNode);
// }else{
// this.setToolbars(this.json.sysTools, this.toolbarNode);
//// this.setToolbars(this.json.tools, this.toolbarNode);
// }
// if (this.json.defaultTools){
// var json = Array.clone(this.json.defaultTools);
// this.setToolbars(json, this.toolbarNode);
// if (this.json.tools){
// this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
// }
// this.toolbarWidget.load();
// this._setEditStyle_custom( "hideSystemTools" );
// this._setEditStyle_custom( "hideSetPopularDocumentTool" );
// }else{
// MWF.getJSON(this.path+"toolbars.json", function(json){
// this.json.defaultTools = json;
// var json = Array.clone(this.json.defaultTools);
// this.setToolbars(json, this.toolbarNode);
// if (this.json.tools){
// this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
// }
// this.toolbarWidget.load();
// this._setEditStyle_custom( "hideSystemTools" );
// this._setEditStyle_custom( "hideSetPopularDocumentTool" );
// }.bind(this), false);
// }
}
},
//_refreshActionbar: function(){
// if (this.form.options.mode == "Mobile"){
// this.node.set("text", MWF.APPFD.LP.notice.notUseModuleInMobile+"("+this.moduleName+")");
// this.node.setStyles({"height": "24px", "line-height": "24px", "background-color": "#999"});
// }else{
// this.toolbarNode = this.node.getFirst("div");
// this.toolbarNode.empty();
// this.toolbarWidget = new MWF.widget.SimpleToolbar(this.toolbarNode, {"style": this.json.style}, this);
//
// MWF.getJSON(this.path+"toolbars.json", function(json){
// this.setToolbars(json, this.toolbarNode);
// this.toolbarWidget.load();
// this._setEditStyle_custom( "hideSetPopularDocumentTool" );
// }.bind(this), false);
// }
//
//},
_resetActionbar
:
function
(){
if
(
this
.
form
.
options
.
mode
==
"
Mobile
"
){
this
.
node
.
set
(
"
text
"
,
MWF
.
APPFD
.
LP
.
notice
.
notUseModuleInMobile
+
"
(
"
+
this
.
moduleName
+
"
)
"
);
...
...
@@ -163,30 +136,66 @@ MWF.xApplication.cms.FormDesigner.Module.Actionbar = MWF.CMSFCActionbar = new Cl
this
.
json
.
actionStyles
=
Object
.
clone
(
this
.
toolbarWidget
.
css
);
}
if
(
this
.
json
.
defaultTools
){
var
json
=
Array
.
clone
(
this
.
json
.
defaultTools
);
//if (this.json.tools) json.append(this.json.tools);
this
.
setToolbars
(
json
,
this
.
toolbarNode
);
this
.
loadMultiToolbar
();
// if (this.json.defaultTools){
// var json = Array.clone(this.json.defaultTools);
// this.setToolbars(json, this.toolbarNode);
// if (this.json.tools){
// this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
// }
// this.toolbarWidget.load();
// }else{
// MWF.getJSON(this.path+"toolbars.json", function(json){
// this.json.defaultTools = json;
// var json = Array.clone(this.json.defaultTools);
// this.setToolbars(json, this.toolbarNode);
// if (this.json.tools){
// this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
// }
// this.toolbarWidget.load();
// }.bind(this), false);
// }
}
},
loadMultiToolbar
:
function
(){
if
(
this
.
json
.
multiTools
){
var
json
=
Array
.
clone
(
this
.
json
.
multiTools
);
this
.
setMultiToolbars
(
json
,
this
.
toolbarNode
);
this
.
toolbarWidget
.
load
();
this
.
_setEditStyle_custom
(
"
hideSystemTools
"
);
this
.
_setEditStyle_custom
(
"
hideSetPopularDocumentTool
"
);
}
else
if
(
this
.
json
.
defaultTools
){
this
.
json
.
multiTools
=
this
.
json
.
defaultTools
.
map
(
function
(
d
)
{
d
.
system
=
true
;
return
d
;
});
if
(
this
.
json
.
tools
){
this
.
json
.
multiTools
=
this
.
json
.
multiTools
.
concat
(
this
.
json
.
tools
)
}
this
.
setMultiToolbars
(
Array
.
clone
(
this
.
json
.
multiTools
),
this
.
toolbarNode
);
this
.
toolbarWidget
.
load
();
this
.
_setEditStyle_custom
(
"
hideSystemTools
"
);
this
.
_setEditStyle_custom
(
"
hideSetPopularDocumentTool
"
);
}
else
{
MWF
.
getJSON
(
this
.
path
+
"
toolbars.json
"
,
function
(
json
){
this
.
json
.
multiTools
=
json
.
map
(
function
(
d
)
{
d
.
system
=
true
;
return
d
;
});
if
(
this
.
json
.
tools
){
this
.
setCustomToolbars
(
Array
.
clone
(
this
.
json
.
tools
),
this
.
toolbarNode
);
this
.
json
.
multiTools
=
this
.
json
.
multiTools
.
concat
(
this
.
json
.
tools
)
}
this
.
setMultiToolbars
(
Array
.
clone
(
this
.
json
.
multiTools
),
this
.
toolbarNode
);
this
.
toolbarWidget
.
load
();
//json = null;
}
else
{
MWF
.
getJSON
(
this
.
path
+
"
toolbars.json
"
,
function
(
json
){
this
.
json
.
defaultTools
=
json
;
var
json
=
Array
.
clone
(
this
.
json
.
defaultTools
);
//if (this.json.tools) json.append(this.json.tools);
this
.
setToolbars
(
json
,
this
.
toolbarNode
);
if
(
this
.
json
.
tools
){
this
.
setCustomToolbars
(
Array
.
clone
(
this
.
json
.
tools
),
this
.
toolbarNode
);
}
this
.
toolbarWidget
.
load
();
//json = null;
}.
bind
(
this
),
false
);
}
this
.
_setEditStyle_custom
(
"
hideSystemTools
"
);
this
.
_setEditStyle_custom
(
"
hideSetPopularDocumentTool
"
);
}.
bind
(
this
),
false
);
}
},
setMultiToolbars
:
function
(
tools
,
node
){
tools
.
each
(
function
(
tool
){
if
(
tool
.
system
){
this
.
setToolbars
(
[
tool
],
node
);
}
else
{
this
.
setCustomToolbars
(
[
tool
],
node
);
}
}.
bind
(
this
));
},
setToolbars
:
function
(
tools
,
node
){
tools
.
each
(
function
(
tool
){
var
actionNode
=
new
Element
(
"
div
"
,
{
...
...
@@ -198,6 +207,7 @@ MWF.xApplication.cms.FormDesigner.Module.Actionbar = MWF.CMSFCActionbar = new Cl
"
MWFButtonText
"
:
tool
.
text
}).
inject
(
node
);
this
.
systemTools
.
push
(
actionNode
);
this
.
multiTools
.
push
(
actionNode
);
if
(
tool
.
sub
){
var
subNode
=
node
.
getLast
();
this
.
setToolbars
(
tool
.
sub
,
subNode
);
...
...
@@ -223,6 +233,7 @@ MWF.xApplication.cms.FormDesigner.Module.Actionbar = MWF.CMSFCActionbar = new Cl
"
MWFButtonText
"
:
tool
.
text
}).
inject
(
node
);
this
.
customTools
.
push
(
actionNode
);
this
.
multiTools
.
push
(
actionNode
);
if
(
tool
.
sub
){
var
subNode
=
node
.
getLast
();
this
.
setToolbars
(
tool
.
sub
,
subNode
);
...
...
o2web/source/x_component_cms_FormDesigner/ModuleImplements.js
浏览文件 @
109507a0
...
...
@@ -125,6 +125,24 @@ if( !MWF.CMSProperty_Process ){
},
loadActionArea_Process
:
MWF
.
CMSProperty_Process
.
loadActionArea
,
loadActionArea_CMS
:
function
(){
var
multiActionArea
=
this
.
propertyContent
.
getElements
(
"
.MWFMultiActionArea
"
);
multiActionArea
.
each
(
function
(
node
){
var
name
=
node
.
get
(
"
name
"
);
var
actionContent
=
this
.
data
[
name
];
MWF
.
xDesktop
.
requireApp
(
"
process.FormDesigner
"
,
"
widget.ActionsEditor
"
,
function
(){
var
actionEditor
=
new
MWF
.
xApplication
.
process
.
FormDesigner
.
widget
.
ActionsEditor
(
node
,
this
.
designer
,
this
.
data
,
{
"
maxObj
"
:
this
.
propertyNode
.
parentElement
.
parentElement
.
parentElement
,
"
isSystemTool
"
:
true
,
"
onChange
"
:
function
(){
this
.
data
[
name
]
=
actionEditor
.
data
;
this
.
changeData
(
name
);
}.
bind
(
this
)
});
actionEditor
.
load
(
actionContent
);
}.
bind
(
this
));
}.
bind
(
this
));
var
actionAreas
=
this
.
propertyContent
.
getElements
(
"
.MWFActionArea
"
);
actionAreas
.
each
(
function
(
node
){
var
name
=
node
.
get
(
"
name
"
);
...
...
o2web/source/x_component_cms_FormDesigner/Property.js
浏览文件 @
109507a0
...
...
@@ -38,6 +38,23 @@ MWF.xApplication.cms.FormDesigner.Property = MWF.CMSFCProperty = new Class({
}
},
loadActionArea
:
function
(){
var
multiActionArea
=
this
.
propertyContent
.
getElements
(
"
.MWFMultiActionArea
"
);
multiActionArea
.
each
(
function
(
node
){
var
name
=
node
.
get
(
"
name
"
);
var
actionContent
=
this
.
data
[
name
];
MWF
.
xDesktop
.
requireApp
(
"
process.FormDesigner
"
,
"
widget.ActionsEditor
"
,
function
(){
var
actionEditor
=
new
MWF
.
xApplication
.
process
.
FormDesigner
.
widget
.
ActionsEditor
(
node
,
this
.
designer
,
this
.
data
,
{
"
maxObj
"
:
this
.
propertyNode
.
parentElement
.
parentElement
.
parentElement
,
"
isSystemTool
"
:
true
,
"
onChange
"
:
function
(){
this
.
data
[
name
]
=
actionEditor
.
data
;
this
.
changeData
(
name
);
}.
bind
(
this
)
});
actionEditor
.
load
(
actionContent
);
}.
bind
(
this
));
}.
bind
(
this
));
var
actionAreas
=
this
.
propertyContent
.
getElements
(
"
.MWFActionArea
"
);
actionAreas
.
each
(
function
(
node
){
var
name
=
node
.
get
(
"
name
"
);
...
...
o2web/source/x_component_cms_FormDesigner/widget/ActionsEditor.js
浏览文件 @
109507a0
...
...
@@ -75,6 +75,7 @@ MWF.xApplication.cms.FormDesigner.widget.ActionsEditor = new Class({
array
.
each
(
function
(
tool
){
for
(
var
i
=
0
;
i
<
list
.
length
;
i
++
){
if
(
list
[
i
].
id
===
tool
.
data
.
id
){
list
[
i
].
system
=
true
;
this
.
data
.
push
(
list
[
i
]
);
var
action
=
new
MWF
.
xApplication
.
cms
.
FormDesigner
.
widget
.
ActionsEditor
.
ButtonAction
(
this
);
action
.
load
(
list
[
i
]);
...
...
@@ -139,7 +140,7 @@ MWF.xApplication.cms.FormDesigner.widget.ActionsEditor.ButtonAction = new Class(
this
.
conditionButton
.
setStyle
(
"
background-image
"
,
"
url(
"
+
this
.
editor
.
path
+
this
.
editor
.
options
.
style
+
"
/icon/code_empty.png)
"
);
}
if
(
!
this
.
editor
.
options
.
noEditShow
){
if
(
!
this
.
editor
.
options
.
noEditShow
&&
!
this
.
data
.
system
){
this
.
editButton
=
new
Element
(
"
div
"
,
{
"
styles
"
:
this
.
css
.
actionEditButtonNode
,
"
title
"
:
this
.
editor
.
designer
.
lp
.
actionbar
.
edithide
}).
inject
(
this
.
titleNode
);
if
(
this
.
data
.
editShow
){
this
.
editButton
.
setStyle
(
"
background-image
"
,
"
url(
"
+
this
.
editor
.
path
+
this
.
editor
.
options
.
style
+
"
/icon/edit.png)
"
);
...
...
@@ -148,7 +149,7 @@ MWF.xApplication.cms.FormDesigner.widget.ActionsEditor.ButtonAction = new Class(
}
}
if
(
!
this
.
editor
.
options
.
noReadShow
){
if
(
!
this
.
editor
.
options
.
noReadShow
&&
!
this
.
data
.
system
){
this
.
readButton
=
new
Element
(
"
div
"
,
{
"
styles
"
:
this
.
css
.
actionReadButtonNode
,
"
title
"
:
this
.
editor
.
designer
.
lp
.
actionbar
.
readhide
}).
inject
(
this
.
titleNode
);
if
(
this
.
data
.
readShow
){
this
.
readButton
.
setStyle
(
"
background-image
"
,
"
url(
"
+
this
.
editor
.
path
+
this
.
editor
.
options
.
style
+
"
/icon/read.png)
"
);
...
...
@@ -162,7 +163,7 @@ MWF.xApplication.cms.FormDesigner.widget.ActionsEditor.ButtonAction = new Class(
var
icon
=
this
.
editor
.
path
+
this
.
editor
.
options
.
style
+
"
/tools/
"
+
this
.
data
.
img
;
this
.
iconNode
.
setStyle
(
"
background-image
"
,
"
url(
"
+
icon
+
"
)
"
);
if
(
!
this
.
editor
.
options
.
noCode
)
{
if
(
!
this
.
editor
.
options
.
noCode
&&
!
this
.
data
.
system
)
{
this
.
scriptNode
=
new
Element
(
"
div
"
,
{
"
styles
"
:
this
.
css
.
actionScriptNode
}).
inject
(
this
.
node
);
this
.
scriptArea
=
new
MWF
.
widget
.
ScriptArea
(
this
.
scriptNode
,
{
"
title
"
:
this
.
editor
.
designer
.
lp
.
actionbar
.
editScript
,
...
...
o2web/source/x_component_cms_Xform/Actionbar.js
浏览文件 @
109507a0
...
...
@@ -36,31 +36,43 @@ MWF.xApplication.cms.Xform.Actionbar = MWF.CMSActionbar = new Class({
//this.setCustomToolbars(this.json.tools, this.toolbarNode);
//
//this.toolbarWidget.load();
if
(
this
.
json
.
hideSystemTools
){
this
.
setCustomToolbars
(
this
.
json
.
tools
,
this
.
toolbarNode
);
if
(
this
.
json
.
multiTools
){
this
.
json
.
multiTools
.
each
(
function
(
tool
)
{
if
(
tool
.
system
){
if
(
!
this
.
json
.
hideSystemTools
){
this
.
setToolbars
(
[
tool
],
this
.
toolbarNode
,
this
.
readonly
);
}
}
else
{
this
.
setCustomToolbars
([
tool
],
this
.
toolbarNode
);
}
}.
bind
(
this
));
this
.
toolbarWidget
.
load
();
}
else
{
if
(
this
.
json
.
defaultTools
){
this
.
setToolbars
(
this
.
json
.
defaultTools
,
this
.
toolbarNode
,
this
.
readonly
);
if
(
this
.
json
.
hideSystemTools
){
this
.
setCustomToolbars
(
this
.
json
.
tools
,
this
.
toolbarNode
);
this
.
toolbarWidget
.
load
();
}
else
{
MWF
.
getJSON
(
"
../x_component_cms_Xform/$Form/toolbars.json
"
,
function
(
json
){
this
.
setToolbars
(
json
,
this
.
toolbarNode
,
this
.
readonly
,
true
);
if
(
this
.
json
.
defaultTools
){
this
.
setToolbars
(
this
.
json
.
defaultTools
,
this
.
toolbarNode
,
this
.
readonly
);
this
.
setCustomToolbars
(
this
.
json
.
tools
,
this
.
toolbarNode
);
this
.
toolbarWidget
.
load
();
}.
bind
(
this
),
false
);
}
}
else
{
MWF
.
getJSON
(
"
../x_component_cms_Xform/$Form/toolbars.json
"
,
function
(
json
){
this
.
setToolbars
(
json
,
this
.
toolbarNode
,
this
.
readonly
,
true
);
this
.
setCustomToolbars
(
this
.
json
.
tools
,
this
.
toolbarNode
);
//MWF.getJSON("../x_component_cms_Xform/$Form/toolbars.json", function(json){
// this.setToolbars(json, this.toolbarNode, this.readonly);
// this.setCustomToolbars(this.json.tools, this.toolbarNode);
//
// this.toolbarWidget.load();
//}.bind(this), false);
}
this
.
toolbarWidget
.
load
();
}.
bind
(
this
),
false
);
}
//MWF.getJSON("../x_component_cms_Xform/$Form/toolbars.json", function(json){
// this.setToolbars(json, this.toolbarNode, this.readonly);
// this.setCustomToolbars(this.json.tools, this.toolbarNode);
//
// this.toolbarWidget.load();
//}.bind(this), false);
}
}
}.
bind
(
this
));
//}
},
...
...
o2web/source/x_component_process_FormDesigner/Module/Actionbar.js
浏览文件 @
109507a0
...
...
@@ -28,6 +28,7 @@ MWF.xApplication.process.FormDesigner.Module.Actionbar = MWF.FCActionbar = new C
this
.
containerNode
=
null
;
this
.
systemTools
=
[];
this
.
customTools
=
[];
this
.
multiTools
=
[];
//this.containers = [];
//this.elements = [];
},
...
...
@@ -79,7 +80,8 @@ MWF.xApplication.process.FormDesigner.Module.Actionbar = MWF.FCActionbar = new C
this
.
toolbarWidget
=
new
MWF
.
widget
.
Toolbar
(
this
.
toolbarNode
,
{
"
style
"
:
this
.
json
.
style
},
this
);
MWF
.
getJSON
(
this
.
path
+
"
toolbars.json
"
,
function
(
json
){
this
.
json
.
defaultTools
=
json
;
// this.json.defaultTools = json;
this
.
json
.
multiTools
=
json
.
map
(
function
(
d
)
{
d
.
system
=
true
;
return
d
;
});
this
.
setToolbars
(
json
,
this
.
toolbarNode
);
this
.
toolbarWidget
.
load
();
}.
bind
(
this
),
false
);
...
...
@@ -119,28 +121,26 @@ MWF.xApplication.process.FormDesigner.Module.Actionbar = MWF.FCActionbar = new C
if
(
!
this
.
json
.
actionStyles
)
this
.
json
.
actionStyles
=
Object
.
clone
(
this
.
toolbarWidget
.
css
);
this
.
toolbarWidget
.
css
=
this
.
json
.
actionStyles
;
if
(
this
.
json
.
defaultTools
){
var
json
=
Array
.
clone
(
this
.
json
.
defaultTools
);
//if (this.json.tools) json.append(this.json.tools);
this
.
setToolbars
(
json
,
this
.
toolbarNode
);
if
(
this
.
json
.
tools
){
this
.
setCustomToolbars
(
Array
.
clone
(
this
.
json
.
tools
),
this
.
toolbarNode
);
}
this
.
toolbarWidget
.
load
();
//json = null;
}
else
{
MWF
.
getJSON
(
this
.
path
+
"
toolbars.json
"
,
function
(
json
){
this
.
json
.
defaultTools
=
json
;
var
json
=
Array
.
clone
(
this
.
json
.
defaultTools
);
//if (this.json.tools) json.append(this.json.tools);
this
.
setToolbars
(
json
,
this
.
toolbarNode
);
if
(
this
.
json
.
tools
){
this
.
setCustomToolbars
(
Array
.
clone
(
this
.
json
.
tools
),
this
.
toolbarNode
);
}
this
.
toolbarWidget
.
load
();
//json = null;
}.
bind
(
this
),
false
);
}
this
.
loadMultiToolbar
();
// if (this.json.defaultTools){
// var json = Array.clone(this.json.defaultTools);
// this.setToolbars(json, this.toolbarNode);
// if (this.json.tools){
// this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
// }
// this.toolbarWidget.load();
// }else{
// MWF.getJSON(this.path+"toolbars.json", function(json){
// this.json.defaultTools = json;
// var json = Array.clone(this.json.defaultTools);
// this.setToolbars(json, this.toolbarNode);
// if (this.json.tools){
// this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
// }
// this.toolbarWidget.load();
// }.bind(this), false);
// }
}
},
...
...
@@ -159,29 +159,60 @@ MWF.xApplication.process.FormDesigner.Module.Actionbar = MWF.FCActionbar = new C
this
.
json
.
actionStyles
=
Object
.
clone
(
this
.
toolbarWidget
.
css
);
}
if
(
this
.
json
.
defaultTools
){
var
json
=
Array
.
clone
(
this
.
json
.
defaultTools
);
//if (this.json.tools) json.append(this.json.tools);
this
.
setToolbars
(
json
,
this
.
toolbarNode
);
this
.
loadMultiToolbar
();
// if (this.json.defaultTools){
// var json = Array.clone(this.json.defaultTools);
// this.setToolbars(json, this.toolbarNode);
// if (this.json.tools){
// this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
// }
// this.toolbarWidget.load();
// }else{
// MWF.getJSON(this.path+"toolbars.json", function(json){
// this.json.defaultTools = json;
// var json = Array.clone(this.json.defaultTools);
// this.setToolbars(json, this.toolbarNode);
// if (this.json.tools){
// this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
// }
// this.toolbarWidget.load();
// //json = null;
// }.bind(this), false);
// }
}
},
loadMultiToolbar
:
function
(){
if
(
this
.
json
.
multiTools
){
var
json
=
Array
.
clone
(
this
.
json
.
multiTools
);
this
.
setMultiToolbars
(
json
,
this
.
toolbarNode
);
this
.
toolbarWidget
.
load
();
}
else
if
(
this
.
json
.
defaultTools
){
this
.
json
.
multiTools
=
this
.
json
.
defaultTools
.
map
(
function
(
d
)
{
d
.
system
=
true
;
return
d
;
});
if
(
this
.
json
.
tools
){
this
.
json
.
multiTools
=
this
.
json
.
multiTools
.
concat
(
this
.
json
.
tools
)
}
this
.
setMultiToolbars
(
Array
.
clone
(
this
.
json
.
multiTools
),
this
.
toolbarNode
);
this
.
toolbarWidget
.
load
();
}
else
{
MWF
.
getJSON
(
this
.
path
+
"
toolbars.json
"
,
function
(
json
){
this
.
json
.
multiTools
=
json
.
map
(
function
(
d
)
{
d
.
system
=
true
;
return
d
;
});
if
(
this
.
json
.
tools
){
this
.
setCustomToolbars
(
Array
.
clone
(
this
.
json
.
tools
),
this
.
toolbarNode
);
this
.
json
.
multiTools
=
this
.
json
.
multiTools
.
concat
(
this
.
json
.
tools
)
}
this
.
setMultiToolbars
(
Array
.
clone
(
this
.
json
.
multiTools
),
this
.
toolbarNode
);
this
.
toolbarWidget
.
load
();
//json = null;
}.
bind
(
this
),
false
);
}
},
setMultiToolbars
:
function
(
tools
,
node
){
tools
.
each
(
function
(
tool
){
if
(
tool
.
system
){
this
.
setToolbars
(
[
tool
],
node
);
}
else
{
MWF
.
getJSON
(
this
.
path
+
"
toolbars.json
"
,
function
(
json
){
this
.
json
.
defaultTools
=
json
;
var
json
=
Array
.
clone
(
this
.
json
.
defaultTools
);
//if (this.json.tools) json.append(this.json.tools);
this
.
setToolbars
(
json
,
this
.
toolbarNode
);
if
(
this
.
json
.
tools
){
this
.
setCustomToolbars
(
Array
.
clone
(
this
.
json
.
tools
),
this
.
toolbarNode
);
}
this
.
toolbarWidget
.
load
();
//json = null;
}.
bind
(
this
),
false
);
this
.
setCustomToolbars
(
[
tool
],
node
);
}
}
}
.
bind
(
this
));
},
setToolbars
:
function
(
tools
,
node
){
tools
.
each
(
function
(
tool
){
...
...
@@ -195,7 +226,9 @@ MWF.xApplication.process.FormDesigner.Module.Actionbar = MWF.FCActionbar = new C
if
(
this
.
json
.
iconOverStyle
){
actionNode
.
set
(
"
MWFButtonImageOver
"
,
this
.
path
+
""
+
this
.
options
.
style
+
"
/tools/
"
+
this
.
json
.
iconOverStyle
+
"
/
"
+
tool
.
img
);
}
actionNode
.
isSystemTool
=
true
;
this
.
systemTools
.
push
(
actionNode
);
this
.
multiTools
.
push
(
actionNode
);
if
(
tool
.
sub
){
var
subNode
=
node
.
getLast
();
this
.
setToolbars
(
tool
.
sub
,
subNode
);
...
...
@@ -221,6 +254,7 @@ MWF.xApplication.process.FormDesigner.Module.Actionbar = MWF.FCActionbar = new C
actionNode
.
set
(
"
MWFButtonImageOver
"
,
this
.
path
+
""
+
this
.
options
.
style
+
"
/custom/
"
+
this
.
json
.
customIconOverStyle
+
"
/
"
+
tool
.
img
);
}
this
.
customTools
.
push
(
actionNode
);
this
.
multiTools
.
push
(
actionNode
);
if
(
tool
.
sub
){
var
subNode
=
node
.
getLast
();
this
.
setToolbars
(
tool
.
sub
,
subNode
);
...
...
@@ -239,7 +273,7 @@ MWF.xApplication.process.FormDesigner.Module.Actionbar = MWF.FCActionbar = new C
});
}
}
if
(
name
==
"
defaultTools
"
||
name
==
"
tools
"
||
name
===
"
actionStyles
"
){
if
(
name
==
"
defaultTools
"
||
name
==
"
tools
"
||
name
==
"
multiTools
"
||
name
==
=
"
actionStyles
"
){
this
.
_refreshActionbar
();
}
...
...
o2web/source/x_component_process_FormDesigner/Module/Actionbar/actionbar.html
浏览文件 @
109507a0
...
...
@@ -30,8 +30,9 @@
</table>
</div>
<div
title=
"操作"
class=
"MWFTab"
style=
"overflow: hidden"
>
<div
class=
"MWFDefaultActionArea"
name=
"defaultTools"
></div>
<div
class=
"MWFActionArea"
name=
"tools"
></div>
<!-- <div class="MWFDefaultActionArea" name="defaultTools"></div>-->
<!-- <div class="MWFActionArea" name="tools"></div>-->
<div
class=
"MWFMultiActionArea"
name=
"multiTools"
></div>
</div>
<div
title=
"样式"
class=
"MWFTab"
>
<div
class=
"MWFActionStylesArea"
name=
"actionStyles"
></div>
...
...
o2web/source/x_component_process_FormDesigner/Property.js
浏览文件 @
109507a0
...
...
@@ -1862,6 +1862,23 @@ debugger;
}.
bind
(
this
));
},
loadActionArea
:
function
(){
var
multiActionArea
=
this
.
propertyContent
.
getElements
(
"
.MWFMultiActionArea
"
);
multiActionArea
.
each
(
function
(
node
){
var
name
=
node
.
get
(
"
name
"
);
var
actionContent
=
this
.
data
[
name
];
MWF
.
xDesktop
.
requireApp
(
"
process.FormDesigner
"
,
"
widget.ActionsEditor
"
,
function
(){
var
actionEditor
=
new
MWF
.
xApplication
.
process
.
FormDesigner
.
widget
.
ActionsEditor
(
node
,
this
.
designer
,
this
.
data
,
{
"
maxObj
"
:
this
.
propertyNode
.
parentElement
.
parentElement
.
parentElement
,
"
isSystemTool
"
:
true
,
"
onChange
"
:
function
(){
this
.
data
[
name
]
=
actionEditor
.
data
;
this
.
changeData
(
name
);
}.
bind
(
this
)
});
actionEditor
.
load
(
actionContent
);
}.
bind
(
this
));
}.
bind
(
this
));
var
actionAreas
=
this
.
propertyContent
.
getElements
(
"
.MWFActionArea
"
);
actionAreas
.
each
(
function
(
node
){
var
name
=
node
.
get
(
"
name
"
);
...
...
o2web/source/x_component_process_FormDesigner/widget/ActionsEditor.js
浏览文件 @
109507a0
...
...
@@ -169,6 +169,7 @@ MWF.xApplication.process.FormDesigner.widget.ActionsEditor = new Class({
array
.
each
(
function
(
tool
){
for
(
var
i
=
0
;
i
<
list
.
length
;
i
++
){
if
(
list
[
i
].
id
===
tool
.
data
.
id
){
list
[
i
].
system
=
true
;
this
.
data
.
push
(
list
[
i
]
);
var
action
=
new
MWF
.
xApplication
.
process
.
FormDesigner
.
widget
.
ActionsEditor
.
ButtonAction
(
this
);
action
.
load
(
list
[
i
]);
...
...
@@ -261,7 +262,7 @@ MWF.xApplication.process.FormDesigner.widget.ActionsEditor.ButtonAction = new Cl
this
.
conditionButton
.
setStyle
(
"
background-image
"
,
"
url(
"
+
this
.
editor
.
path
+
this
.
editor
.
options
.
style
+
"
/icon/code_empty.png)
"
);
}
if
(
!
this
.
editor
.
options
.
noEditShow
){
if
(
!
this
.
editor
.
options
.
noEditShow
&&
!
this
.
data
.
system
){
this
.
editButton
=
new
Element
(
"
div
"
,
{
"
styles
"
:
this
.
css
.
actionEditButtonNode
,
"
title
"
:
this
.
editor
.
designer
.
lp
.
actionbar
.
edithide
}).
inject
(
this
.
titleNode
);
if
(
this
.
data
.
editShow
){
this
.
editButton
.
setStyle
(
"
background-image
"
,
"
url(
"
+
this
.
editor
.
path
+
this
.
editor
.
options
.
style
+
"
/icon/edit.png)
"
);
...
...
@@ -270,7 +271,7 @@ MWF.xApplication.process.FormDesigner.widget.ActionsEditor.ButtonAction = new Cl
}
}
if
(
!
this
.
editor
.
options
.
noReadShow
){
if
(
!
this
.
editor
.
options
.
noReadShow
&&
!
this
.
data
.
system
){
this
.
readButton
=
new
Element
(
"
div
"
,
{
"
styles
"
:
this
.
css
.
actionReadButtonNode
,
"
title
"
:
this
.
editor
.
designer
.
lp
.
actionbar
.
readhide
}).
inject
(
this
.
titleNode
);
if
(
this
.
data
.
readShow
){
this
.
readButton
.
setStyle
(
"
background-image
"
,
"
url(
"
+
this
.
editor
.
path
+
this
.
editor
.
options
.
style
+
"
/icon/read.png)
"
);
...
...
@@ -282,7 +283,7 @@ MWF.xApplication.process.FormDesigner.widget.ActionsEditor.ButtonAction = new Cl
var
icon
=
this
.
editor
.
path
+
this
.
editor
.
options
.
style
+
"
/tools/
"
+
this
.
data
.
img
;
this
.
iconNode
.
setStyle
(
"
background-image
"
,
"
url(
"
+
icon
+
"
)
"
);
if
(
!
this
.
editor
.
options
.
noCode
){
if
(
!
this
.
editor
.
options
.
noCode
&&
!
this
.
data
.
system
){
this
.
scriptNode
=
new
Element
(
"
div
"
,
{
"
styles
"
:
this
.
css
.
actionScriptNode
}).
inject
(
this
.
node
);
this
.
scriptArea
=
new
MWF
.
widget
.
ScriptArea
(
this
.
scriptNode
,
{
"
title
"
:
this
.
editor
.
designer
.
lp
.
actionbar
.
editScript
,
...
...
o2web/source/x_component_query_ViewDesigner/Property.js
浏览文件 @
109507a0
...
...
@@ -934,6 +934,23 @@ MWF.xApplication.query.ViewDesigner.Property = MWF.FVProperty = new Class({
MWF
.
APPFD
=
MWF
.
xApplication
.
process
.
FormDesigner
=
MWF
.
xApplication
.
process
.
FormDesigner
||
{};
MWF
.
xDesktop
.
requireApp
(
"
process.FormDesigner
"
,
"
lp.
"
+
o2
.
language
,
null
,
false
);
var
multiActionArea
=
this
.
propertyContent
.
getElements
(
"
.MWFMultiActionArea
"
);
multiActionArea
.
each
(
function
(
node
){
var
name
=
node
.
get
(
"
name
"
);
var
actionContent
=
this
.
data
[
name
];
MWF
.
xDesktop
.
requireApp
(
"
process.FormDesigner
"
,
"
widget.ActionsEditor
"
,
function
(){
var
actionEditor
=
new
MWF
.
xApplication
.
process
.
FormDesigner
.
widget
.
ActionsEditor
(
node
,
this
.
designer
,
this
.
data
,
{
"
maxObj
"
:
this
.
propertyNode
.
parentElement
.
parentElement
.
parentElement
,
"
isSystemTool
"
:
true
,
"
onChange
"
:
function
(){
this
.
data
[
name
]
=
actionEditor
.
data
;
this
.
changeData
(
name
);
}.
bind
(
this
)
});
actionEditor
.
load
(
actionContent
);
}.
bind
(
this
));
}.
bind
(
this
));
var
actionAreas
=
this
.
propertyContent
.
getElements
(
"
.MWFActionArea
"
);
actionAreas
.
each
(
function
(
node
)
{
var
name
=
node
.
get
(
"
name
"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录