Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
26578c48
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,发现更多精彩内容 >>
提交
26578c48
编写于
12月 21, 2021
作者:
U
unknown
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
eltreee
上级
440b5750
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
58 addition
and
38 deletion
+58
-38
o2web/source/o2_core/o2/widget/$Tree/editor/code.png
o2web/source/o2_core/o2/widget/$Tree/editor/code.png
+0
-0
o2web/source/o2_core/o2/widget/$Tree/editor/code_empty.png
o2web/source/o2_core/o2/widget/$Tree/editor/code_empty.png
+0
-0
o2web/source/o2_core/o2/widget/$Tree/editor/css.wcss
o2web/source/o2_core/o2/widget/$Tree/editor/css.wcss
+6
-0
o2web/source/x_component_process_FormDesigner/widget/ElTreeEditor.js
...e/x_component_process_FormDesigner/widget/ElTreeEditor.js
+52
-38
未找到文件。
o2web/source/o2_core/o2/widget/$Tree/editor/code.png
0 → 100644
浏览文件 @
26578c48
2.9 KB
o2web/source/o2_core/o2/widget/$Tree/editor/code_empty.png
0 → 100644
浏览文件 @
26578c48
427 字节
o2web/source/o2_core/o2/widget/$Tree/editor/css.wcss
浏览文件 @
26578c48
...
@@ -99,6 +99,12 @@
...
@@ -99,6 +99,12 @@
"float": "right",
"float": "right",
"background": "url("+o2.session.path+"/widget/$Tree/form/script.png) center center no-repeat"
"background": "url("+o2.session.path+"/widget/$Tree/form/script.png) center center no-repeat"
},
},
"itemPropertyActionNode": {
"width": "20px",
"height": "22px",
"float": "right",
"background": "url("+o2.session.path+"/widget/$Tree/editor/code.png) center center no-repeat"
},
"scriptNode":{
"scriptNode":{
"width": "98%",
"width": "98%",
"height": "98%",
"height": "98%",
...
...
o2web/source/x_component_process_FormDesigner/widget/ElTreeEditor.js
浏览文件 @
26578c48
...
@@ -203,12 +203,12 @@ MWF.xApplication.process.FormDesigner.widget.ElTreeEditor.Tree = new Class({
...
@@ -203,12 +203,12 @@ MWF.xApplication.process.FormDesigner.widget.ElTreeEditor.Tree = new Class({
return
treeNode
;
return
treeNode
;
},
},
expandOrCollapseNode
:
function
(
treeNode
){
expandOrCollapseNode
:
function
(
treeNode
){
if
(
treeNode
.
data
.
expand
){
if
(
treeNode
.
options
.
expand
){
this
.
collapse
(
treeNode
);
this
.
collapse
(
treeNode
);
treeNode
.
data
.
expand
=
false
;
treeNode
.
options
.
expand
=
false
;
}
else
{
}
else
{
this
.
expand
(
treeNode
);
this
.
expand
(
treeNode
);
treeNode
.
data
.
expand
=
true
;
treeNode
.
options
.
expand
=
true
;
}
}
treeNode
.
setOperateIcon
();
treeNode
.
setOperateIcon
();
this
.
editor
.
fireEvent
(
"
change
"
);
this
.
editor
.
fireEvent
(
"
change
"
);
...
@@ -245,12 +245,12 @@ MWF.xApplication.process.FormDesigner.widget.ElTreeEditor.Tree = new Class({
...
@@ -245,12 +245,12 @@ MWF.xApplication.process.FormDesigner.widget.ElTreeEditor.Tree = new Class({
MWF
.
xApplication
.
process
.
FormDesigner
.
widget
.
ElTreeEditor
.
Tree
.
Node
=
new
Class
({
MWF
.
xApplication
.
process
.
FormDesigner
.
widget
.
ElTreeEditor
.
Tree
.
Node
=
new
Class
({
Implements
:
[
Options
,
Events
],
Implements
:
[
Options
,
Events
],
//
options: {
options
:
{
// "expand": true,
"
expand
"
:
true
// "label": "",
// "label": "",
// "default" : false,
// "default" : false,
// "icon": ""
// "icon": ""
//
},
},
srciptOption
:
{
srciptOption
:
{
"
width
"
:
300
,
"
width
"
:
300
,
"
height
"
:
300
,
"
height
"
:
300
,
...
@@ -266,10 +266,10 @@ MWF.xApplication.process.FormDesigner.widget.ElTreeEditor.Tree.Node = new Class(
...
@@ -266,10 +266,10 @@ MWF.xApplication.process.FormDesigner.widget.ElTreeEditor.Tree.Node = new Class(
initialize
:
function
(
tree
,
data
){
initialize
:
function
(
tree
,
data
){
debugger
;
debugger
;
Object
.
each
({
Object
.
each
({
"
expand
"
:
true
,
//
"expand": true,
"
label
"
:
""
,
"
label
"
:
""
"
default
"
:
false
,
//
"default" : false,
"
icon
"
:
""
//
"icon": ""
},
function
(
value
,
key
){
},
function
(
value
,
key
){
if
(
!
data
.
hasOwnProperty
(
key
)
){
if
(
!
data
.
hasOwnProperty
(
key
)
){
data
[
key
]
=
value
;
data
[
key
]
=
value
;
...
@@ -296,22 +296,26 @@ MWF.xApplication.process.FormDesigner.widget.ElTreeEditor.Tree.Node = new Class(
...
@@ -296,22 +296,26 @@ MWF.xApplication.process.FormDesigner.widget.ElTreeEditor.Tree.Node = new Class(
"
styles
"
:
this
.
tree
.
css
.
treeChildrenNode
"
styles
"
:
this
.
tree
.
css
.
treeChildrenNode
}).
inject
(
this
.
node
);
}).
inject
(
this
.
node
);
if
(
!
this
.
data
.
expand
){
if
(
!
this
.
options
.
expand
){
this
.
childrenNode
.
setStyle
(
"
display
"
,
"
none
"
);
this
.
childrenNode
.
setStyle
(
"
display
"
,
"
none
"
);
}
}
this
.
itemNode
.
addEvents
({
this
.
itemNode
.
addEvents
({
"
mouseover
"
:
function
(){
"
mouseover
"
:
function
(){
if
(
!
this
.
isEditScript
)
this
.
itemNode
.
setStyles
(
this
.
tree
.
css
.
treeItemNodeOver
);
if
(
this
.
tree
.
currentEditNode
!==
this
)
{
this
.
itemNode
.
setStyles
(
this
.
tree
.
css
.
treeItemNodeOver
);
this
.
showItemAction
();
this
.
showItemAction
();
}
}.
bind
(
this
),
}.
bind
(
this
),
"
mouseout
"
:
function
(){
"
mouseout
"
:
function
(){
if
(
!
this
.
isEditScript
)
this
.
itemNode
.
setStyles
(
this
.
tree
.
css
.
treeItemNode
);
if
(
this
.
tree
.
currentEditNode
!==
this
)
{
this
.
itemNode
.
setStyles
(
this
.
tree
.
css
.
treeItemNode
);
this
.
hideItemAction
();
this
.
hideItemAction
();
}.
bind
(
this
),
}
"
click
"
:
function
()
{
this
.
editItemProperties
();
}.
bind
(
this
)
}.
bind
(
this
)
// "click": function () {
// this.editItemProperties();
// }.bind(this)
});
});
},
},
load
:
function
(){
load
:
function
(){
...
@@ -379,9 +383,9 @@ MWF.xApplication.process.FormDesigner.widget.ElTreeEditor.Tree.Node = new Class(
...
@@ -379,9 +383,9 @@ MWF.xApplication.process.FormDesigner.widget.ElTreeEditor.Tree.Node = new Class(
}.
bind
(
this
));
}.
bind
(
this
));
textDivNode
.
inject
(
this
.
textNode
);
textDivNode
.
inject
(
this
.
textNode
);
if
(
this
.
data
.
default
){
//
if( this.data.default ){
textDivNode
.
click
();
//
textDivNode.click();
}
//
}
},
},
clickNode
:
function
(
e
){
clickNode
:
function
(
e
){
this
.
selectNode
(
e
);
this
.
selectNode
(
e
);
...
@@ -402,7 +406,7 @@ MWF.xApplication.process.FormDesigner.widget.ElTreeEditor.Tree.Node = new Class(
...
@@ -402,7 +406,7 @@ MWF.xApplication.process.FormDesigner.widget.ElTreeEditor.Tree.Node = new Class(
this
.
tree
.
fireEvent
(
"
afterSelect
"
,
[
this
]);
this
.
tree
.
fireEvent
(
"
afterSelect
"
,
[
this
]);
},
},
setOperateIcon
:
function
(){
setOperateIcon
:
function
(){
var
imgStr
=
(
this
.
data
.
expand
)
?
this
.
imgs
.
expand
:
this
.
imgs
.
collapse
;
var
imgStr
=
(
this
.
options
.
expand
)
?
this
.
imgs
.
expand
:
this
.
imgs
.
collapse
;
imgStr
=
this
.
tree
.
path
+
this
.
tree
.
options
.
style
+
"
/
"
+
imgStr
;
imgStr
=
this
.
tree
.
path
+
this
.
tree
.
options
.
style
+
"
/
"
+
imgStr
;
if
(
!
this
.
firstChild
)
imgStr
=
this
.
tree
.
path
+
this
.
tree
.
options
.
style
+
"
/
"
+
this
.
imgs
.
blank
;
if
(
!
this
.
firstChild
)
imgStr
=
this
.
tree
.
path
+
this
.
tree
.
options
.
style
+
"
/
"
+
this
.
imgs
.
blank
;
...
@@ -503,25 +507,29 @@ MWF.xApplication.process.FormDesigner.widget.ElTreeEditor.Tree.Node = new Class(
...
@@ -503,25 +507,29 @@ MWF.xApplication.process.FormDesigner.widget.ElTreeEditor.Tree.Node = new Class(
"
events
"
:
{
"
events
"
:
{
"
click
"
:
function
(
e
){
"
click
"
:
function
(
e
){
this
.
deleteItem
(
e
);
this
.
deleteItem
(
e
);
e
.
stopPropagation
();
}.
bind
(
this
)
}.
bind
(
this
)
}
}
}).
inject
(
this
.
actionNode
);
}).
inject
(
this
.
actionNode
);
// var script
Action = new Element("div", {
var
property
Action
=
new
Element
(
"
div
"
,
{
// "styles": this.tree.css.itemScript
ActionNode,
"
styles
"
:
this
.
tree
.
css
.
itemProperty
ActionNode
,
// "title": o2.LP.process.formAction["script
"],
"
title
"
:
o2
.
LP
.
process
.
formAction
[
"
property
"
],
//
"events": {
"
events
"
:
{
//
"click": function(e){
"
click
"
:
function
(
e
){
// this.editScriptItem
(e);
this
.
editItemProperties
(
e
);
//
}.bind(this)
}.
bind
(
this
)
//
}
}
//
}).inject(this.actionNode);
}).
inject
(
this
.
actionNode
);
var
addAction
=
new
Element
(
"
div
"
,
{
var
addAction
=
new
Element
(
"
div
"
,
{
"
styles
"
:
this
.
tree
.
css
.
itemAddActionNode
,
"
styles
"
:
this
.
tree
.
css
.
itemAddActionNode
,
"
title
"
:
o2
.
LP
.
process
.
formAction
.
add
,
"
title
"
:
o2
.
LP
.
process
.
formAction
.
add
,
"
events
"
:
{
"
events
"
:
{
"
click
"
:
this
.
addChild
.
bind
(
this
)
"
click
"
:
function
(
ev
){
this
.
addChild
();
ev
.
stopPropagation
();
}.
bind
(
this
)
}
}
}).
inject
(
this
.
actionNode
);
}).
inject
(
this
.
actionNode
);
},
},
...
@@ -624,6 +632,7 @@ MWF.xApplication.process.FormDesigner.widget.ElTreeEditor.Tree.Node = new Class(
...
@@ -624,6 +632,7 @@ MWF.xApplication.process.FormDesigner.widget.ElTreeEditor.Tree.Node = new Class(
},
},
completeItemProperties
:
function
(){
completeItemProperties
:
function
(){
this
.
hideItemAction
();
this
.
itemNode
.
setStyles
(
this
.
tree
.
css
.
treeItemNode
);
this
.
itemNode
.
setStyles
(
this
.
tree
.
css
.
treeItemNode
);
this
.
isEditProperty
=
false
;
this
.
isEditProperty
=
false
;
this
.
tree
.
currentEditNode
=
null
;
this
.
tree
.
currentEditNode
=
null
;
...
@@ -654,6 +663,7 @@ MWF.xApplication.process.FormDesigner.widget.ElTreeEditor.Tree.Node = new Class(
...
@@ -654,6 +663,7 @@ MWF.xApplication.process.FormDesigner.widget.ElTreeEditor.Tree.Node = new Class(
events
:
{
events
:
{
blur
:
function
()
{
blur
:
function
()
{
this
.
data
.
label
=
this
.
labelInput
.
get
(
"
value
"
);
this
.
data
.
label
=
this
.
labelInput
.
get
(
"
value
"
);
this
.
textNode
.
getElement
(
"
div
"
).
set
(
"
text
"
,
this
.
data
.
label
);
}.
bind
(
this
)
}.
bind
(
this
)
}
}
}).
inject
(
td
);
}).
inject
(
td
);
...
@@ -675,7 +685,6 @@ MWF.xApplication.process.FormDesigner.widget.ElTreeEditor.Tree.Node = new Class(
...
@@ -675,7 +685,6 @@ MWF.xApplication.process.FormDesigner.widget.ElTreeEditor.Tree.Node = new Class(
MWF
.
require
(
"
MWF.widget.Maplist
"
,
function
()
{
MWF
.
require
(
"
MWF.widget.Maplist
"
,
function
()
{
var
maplist
=
new
MWF
.
widget
.
Maplist
(
td
,
{
var
maplist
=
new
MWF
.
widget
.
Maplist
(
td
,
{
"
title
"
:
"
其他属性
"
,
"
title
"
:
"
其他属性
"
,
"
ignoreKeyList
"
:
[
"
id
"
,
"
label
"
,
"
children
"
],
"
collapse
"
:
false
,
"
collapse
"
:
false
,
"
onChange
"
:
function
()
{
"
onChange
"
:
function
()
{
// var oldData = this.data[name];
// var oldData = this.data[name];
...
@@ -696,7 +705,7 @@ MWF.xApplication.process.FormDesigner.widget.ElTreeEditor.Tree.Node = new Class(
...
@@ -696,7 +705,7 @@ MWF.xApplication.process.FormDesigner.widget.ElTreeEditor.Tree.Node = new Class(
if
(
!
[
"
id
"
,
"
label
"
,
"
children
"
].
contains
(
key
)
)
data
[
key
]
=
this
.
data
[
key
]
if
(
!
[
"
id
"
,
"
label
"
,
"
children
"
].
contains
(
key
)
)
data
[
key
]
=
this
.
data
[
key
]
}
}
maplist
.
load
(
data
);
maplist
.
load
(
data
);
})
}
.
bind
(
this
)
)
}
}
this
.
propertyArea
.
setStyle
(
"
display
"
,
"
block
"
);
this
.
propertyArea
.
setStyle
(
"
display
"
,
"
block
"
);
...
@@ -718,8 +727,11 @@ MWF.xApplication.process.FormDesigner.widget.ElTreeEditor.Tree.Node = new Class(
...
@@ -718,8 +727,11 @@ MWF.xApplication.process.FormDesigner.widget.ElTreeEditor.Tree.Node = new Class(
var
treeNode
=
this
.
appendChild
(
obj
);
var
treeNode
=
this
.
appendChild
(
obj
);
if
(
!
this
.
data
.
expand
)
this
.
tree
.
expandOrCollapseNode
(
this
);
if
(
!
this
.
options
.
expand
)
this
.
tree
.
expandOrCollapseNode
(
this
);
treeNode
.
selectNode
();
treeNode
.
selectNode
();
treeNode
.
showItemAction
();
treeNode
.
editItemProperties
();
var
textDivNode
=
treeNode
.
textNode
.
getElement
(
"
div
"
);
var
textDivNode
=
treeNode
.
textNode
.
getElement
(
"
div
"
);
treeNode
.
editItem
(
textDivNode
);
treeNode
.
editItem
(
textDivNode
);
...
@@ -799,6 +811,8 @@ MWF.xApplication.process.FormDesigner.widget.ElTreeEditor.Tree.Node = new Class(
...
@@ -799,6 +811,8 @@ MWF.xApplication.process.FormDesigner.widget.ElTreeEditor.Tree.Node = new Class(
node
.
set
(
"
html
"
,
text
);
node
.
set
(
"
html
"
,
text
);
if
(
this
.
labelInput
)
this
.
labelInput
.
set
(
"
value
"
,
text
);
this
.
tree
.
editor
.
fireEvent
(
"
change
"
);
this
.
tree
.
editor
.
fireEvent
(
"
change
"
);
return
true
;
return
true
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录