Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_42566577
o2oa
提交
df566467
o2oa
项目概览
weixin_42566577
/
o2oa
与 Fork 源项目一致
Fork自
浙江兰德纵横网络技术股份有限公司 / o2oa
通知
1
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,发现更多精彩内容 >>
提交
df566467
编写于
8月 18, 2022
作者:
U
unknown
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
数组件添加设置默认节点的功能
上级
ee9673b4
变更
9
显示空白变更内容
内联
并排
Showing
9 changed file
with
149 addition
and
18 deletion
+149
-18
o2web/source/o2_core/o2/lp/en.js
o2web/source/o2_core/o2/lp/en.js
+3
-1
o2web/source/o2_core/o2/lp/zh-cn.js
o2web/source/o2_core/o2/lp/zh-cn.js
+3
-1
o2web/source/o2_core/o2/widget/$Tree/editor/check.png
o2web/source/o2_core/o2/widget/$Tree/editor/check.png
+0
-0
o2web/source/o2_core/o2/widget/$Tree/editor/checked.png
o2web/source/o2_core/o2/widget/$Tree/editor/checked.png
+0
-0
o2web/source/o2_core/o2/widget/$Tree/editor/css.wcss
o2web/source/o2_core/o2/widget/$Tree/editor/css.wcss
+35
-2
o2web/source/o2_core/o2/widget/Tree.js
o2web/source/o2_core/o2/widget/Tree.js
+19
-9
o2web/source/o2_core/o2/widget/TreeEditor.js
o2web/source/o2_core/o2/widget/TreeEditor.js
+87
-3
o2web/source/x_component_portal_PageDesigner/Module/Tab.js
o2web/source/x_component_portal_PageDesigner/Module/Tab.js
+1
-1
o2web/source/x_component_process_FormDesigner/Module/Tab.js
o2web/source/x_component_process_FormDesigner/Module/Tab.js
+1
-1
未找到文件。
o2web/source/o2_core/o2/lp/en.js
浏览文件 @
df566467
...
...
@@ -124,7 +124,9 @@ o2.LP.process = {
"
copy
"
:
"
Copy
"
,
"
delete
"
:
"
Delete
"
,
"
add
"
:
"
Add
"
,
"
script
"
:
"
Script
"
"
script
"
:
"
Script
"
,
"
clickScript
"
:
"
Click Event Script
"
,
"
defaultNode
"
:
"
Default Node
"
}
};
o2
.
LP
.
desktop
=
{
...
...
o2web/source/o2_core/o2/lp/zh-cn.js
浏览文件 @
df566467
...
...
@@ -124,7 +124,9 @@ o2.LP.process = {
"
copy
"
:
"
复制
"
,
"
delete
"
:
"
删除
"
,
"
add
"
:
"
添加
"
,
"
script
"
:
"
脚本
"
"
script
"
:
"
脚本
"
,
"
clickScript
"
:
"
点击事件脚本
"
,
"
defaultNode
"
:
"
默认节点
"
}
};
o2
.
LP
.
desktop
=
{
...
...
o2web/source/o2_core/o2/widget/$Tree/editor/check.png
0 → 100644
浏览文件 @
df566467
2.8 KB
o2web/source/o2_core/o2/widget/$Tree/editor/checked.png
0 → 100644
浏览文件 @
df566467
2.9 KB
o2web/source/o2_core/o2/widget/$Tree/editor/css.wcss
浏览文件 @
df566467
...
...
@@ -16,7 +16,8 @@
"treeItemNode":{
"height": "24px",
"border-bottom": "1px solid #DDD",
"background": "transparent"
"background": "transparent",
"position": "relative"
},
"treeChildrenNode": {
},
...
...
@@ -75,7 +76,7 @@
"font-family": "Verdana, Geneva, sans-serif"
},
"itemActionNode": {
"width": "
70
px",
"width": "
86
px",
"height": "22px",
"position": "absolute",
"z-index": 10000,
...
...
@@ -105,6 +106,38 @@
"float": "right",
"background": "url("+o2.session.path+"/widget/$Tree/editor/code.png) center center no-repeat"
},
"itemCheckActionNode": {
"padding-left": "3px",
"width": "19px",
"height": "22px",
"line-height": "20px",
"font-size": "8px",
"font-weight": "bold",
"float": "right",
"color": "#333"
},
"itemCheckedActionNode": {
"padding-left": "3px",
"width": "19px",
"height": "22px",
"line-height": "20px",
"float": "right",
"font-size": "8px",
"font-weight": "bold",
"color": "#4A90E2"
},
"itemCheckedNode": {
"position": "absolute",
"right": "0px",
"top": "1px",
"width": "19px",
"height": "22px",
"line-height": "20px",
"float": "right",
"font-size": "8px",
"font-weight": "bold",
"color": "#4A90E2"
},
"scriptNode":{
"width": "98%",
"height": "98%",
...
...
o2web/source/o2_core/o2/widget/Tree.js
浏览文件 @
df566467
...
...
@@ -374,18 +374,28 @@ o2.widget.Tree.Node = new Class({
this
.
selectNode
(
e
);
this
.
doAction
(
e
);
},
selectNode
:
function
(){
this
.
tree
.
fireEvent
(
"
beforeSelect
"
,
[
this
]);
if
(
this
.
tree
.
currentNode
){
this
.
tree
.
currentNode
.
fireEvent
(
"
unselect
"
);
var
textDivNode
=
this
.
tree
.
currentNode
.
textNode
.
getElement
(
"
div
"
);
unselectNode
:
function
(){
this
.
fireEvent
(
"
unselect
"
);
var
textDivNode
=
this
.
textNode
.
getElement
(
"
div
"
);
textDivNode
.
setStyles
(
this
.
tree
.
css
.
textDivNode
);
if
(
this
.
tree
.
currentNode
.
options
.
style
){
if
(
this
.
tree
.
css
[
this
.
tree
.
currentNode
.
options
.
style
]){
textDivNode
.
setStyles
(
this
.
tree
.
css
[
this
.
tree
.
currentNode
.
options
.
style
].
textDivNode
);
if
(
this
.
options
.
style
){
if
(
this
.
tree
.
css
[
this
.
options
.
style
]){
textDivNode
.
setStyles
(
this
.
tree
.
css
[
this
.
options
.
style
].
textDivNode
);
}
}
},
selectNode
:
function
(){
this
.
tree
.
fireEvent
(
"
beforeSelect
"
,
[
this
]);
if
(
this
.
tree
.
currentNode
){
this
.
tree
.
currentNode
.
unselectNode
();
// this.tree.currentNode.fireEvent("unselect");
// var textDivNode = this.tree.currentNode.textNode.getElement("div");
// textDivNode.setStyles(this.tree.css.textDivNode);
// if (this.tree.currentNode.options.style){
// if (this.tree.css[this.tree.currentNode.options.style]){
// textDivNode.setStyles(this.tree.css[this.tree.currentNode.options.style].textDivNode);
// }
// }
}
var
textDivNode
=
this
.
textNode
.
getElement
(
"
div
"
);
textDivNode
.
setStyles
(
this
.
tree
.
css
.
textDivNodeSelected
);
...
...
o2web/source/o2_core/o2/widget/TreeEditor.js
浏览文件 @
df566467
...
...
@@ -172,6 +172,9 @@ o2.widget.TreeEditor.Tree.Node = new Class({
this
.
hideItemAction
();
}.
bind
(
this
)
});
if
(
this
.
options
.
default
){
this
.
setDefaultItem
();
}
},
appendChild
:
function
(
obj
){
...
...
@@ -196,12 +199,52 @@ o2.widget.TreeEditor.Tree.Node = new Class({
return
treeNode
;
},
createTextNode
:
function
(){
this
.
textNode
=
new
Element
(
"
td
"
,{
"
styles
"
:
this
.
tree
.
css
.
textNode
}).
inject
(
this
.
nodeArea
);
if
(
this
.
options
.
style
){
if
(
this
.
tree
.
css
[
this
.
options
.
style
]){
this
.
textNode
.
setStyles
(
this
.
tree
.
css
[
this
.
options
.
style
].
textNode
);
}
}
// var width = this.tree.container.getSize().x - (this.level*20+40);
// this.textNode.setStyle("width", ""+width+"px");
var
textDivNode
=
new
Element
(
"
div
"
,
{
"
styles
"
:
{
"
display
"
:
"
inline-block
"
},
// "html": this.options.text,
"
title
"
:
this
.
options
.
title
});
textDivNode
.
setStyles
(
this
.
tree
.
css
.
textDivNode
);
if
(
this
.
options
.
style
){
if
(
this
.
tree
.
css
[
this
.
options
.
style
]){
textDivNode
.
setStyles
(
this
.
tree
.
css
[
this
.
options
.
style
].
textDivNode
);
}
}
if
(
this
.
tree
.
options
.
text
==
"
html
"
){
textDivNode
.
set
(
"
html
"
,
this
.
options
.
text
);
}
else
{
textDivNode
.
set
(
"
text
"
,
this
.
options
.
text
);
}
textDivNode
.
addEvent
(
"
click
"
,
function
(
e
){
this
.
clickNode
(
e
);
}.
bind
(
this
));
textDivNode
.
inject
(
this
.
textNode
);
if
(
this
.
options
.
default
){
this
.
selectNode
();
}
},
doAction
:
function
(
e
){
var
textNode
=
e
.
target
;
this
.
editItem
(
textNode
);
},
hideItemAction
:
function
(){
if
(
this
.
actionNode
)
this
.
actionNode
.
setStyle
(
"
display
"
,
"
none
"
);
if
(
this
.
defaultNode
)
this
.
defaultNode
.
show
();
},
setActionPosition
:
function
(){
if
(
this
.
actionNode
){
...
...
@@ -226,12 +269,22 @@ o2.widget.TreeEditor.Tree.Node = new Class({
if
(
!
this
.
actionNode
)
this
.
createItemActionNode
();
this
.
setActionPosition
();
this
.
actionNode
.
setStyle
(
"
display
"
,
"
block
"
);
if
(
this
.
defaultNode
)
this
.
defaultNode
.
hide
();
},
createItemActionNode
:
function
(){
this
.
actionNode
=
new
Element
(
"
div
"
,
{
"
styles
"
:
this
.
tree
.
css
.
itemActionNode
}).
inject
(
this
.
itemNode
);
this
.
defaultAction
=
new
Element
(
"
div
"
,
{
"
styles
"
:
this
.
tree
.
css
.
itemCheckActionNode
,
"
title
"
:
o2
.
LP
.
process
.
formAction
.
defaultNode
,
"
text
"
:
"
✔
"
,
"
events
"
:
{
"
click
"
:
this
.
switchDefaultItem
.
bind
(
this
)
}
}).
inject
(
this
.
actionNode
);
var
deleteAction
=
new
Element
(
"
div
"
,
{
"
styles
"
:
this
.
tree
.
css
.
itemDeleteActionNode
,
"
title
"
:
o2
.
LP
.
process
.
formAction
[
"
delete
"
],
...
...
@@ -244,7 +297,7 @@ o2.widget.TreeEditor.Tree.Node = new Class({
var
scriptAction
=
new
Element
(
"
div
"
,
{
"
styles
"
:
this
.
tree
.
css
.
itemScriptActionNode
,
"
title
"
:
o2
.
LP
.
process
.
formAction
[
"
s
cript
"
],
"
title
"
:
o2
.
LP
.
process
.
formAction
[
"
clickS
cript
"
],
"
events
"
:
{
"
click
"
:
function
(
e
){
this
.
editScriptItem
(
e
);
...
...
@@ -317,7 +370,7 @@ o2.widget.TreeEditor.Tree.Node = new Class({
var
node
=
new
Element
(
"
div
"
).
inject
(
this
.
itemNode
,
"
after
"
);
o2
.
require
(
"
o2.widget.ScriptArea
"
,
function
(){
this
.
scriptArea
=
new
o2
.
widget
.
ScriptArea
(
node
,
{
"
title
"
:
o2
.
LP
.
process
.
formAction
[
"
s
cript
"
],
"
title
"
:
o2
.
LP
.
process
.
formAction
[
"
clickS
cript
"
],
"
maxObj
"
:
this
.
tree
.
editor
.
options
.
maxObj
,
"
style
"
:
"
treeEditor
"
,
"
onChange
"
:
function
(){
...
...
@@ -349,7 +402,7 @@ o2.widget.TreeEditor.Tree.Node = new Class({
this
.
scriptArea
.
container
.
scrollIntoView
();
this
.
scriptArea
.
focus
();
this
.
setActionPosition
();
}.
bind
(
this
));
;
}.
bind
(
this
));
this
.
isEditScript
=
true
;
this
.
tree
.
currentEditNode
=
this
;
...
...
@@ -372,6 +425,37 @@ o2.widget.TreeEditor.Tree.Node = new Class({
treeNode
.
editItem
(
textDivNode
);
},
switchDefaultItem
:
function
(
e
){
if
(
this
.
options
.
default
){
this
.
unsetDefaultItem
();
}
else
{
if
(
this
.
tree
.
defaultItem
){
this
.
tree
.
defaultItem
.
unsetDefaultItem
();
}
this
.
setDefaultItem
(
e
);
}
this
.
tree
.
editor
.
fireEvent
(
"
change
"
);
},
unsetDefaultItem
:
function
(){
this
.
options
.
default
=
false
;
if
(
this
.
defaultNode
)
this
.
defaultNode
.
destroy
();
this
.
defaultAction
.
setStyles
(
this
.
tree
.
css
.
itemCheckActionNode
);
this
.
tree
.
defaultItem
=
null
;
this
.
unselectNode
();
},
setDefaultItem
:
function
(
e
){
this
.
defaultNode
=
new
Element
(
"
div
"
,
{
"
styles
"
:
this
.
tree
.
css
.
itemCheckedNode
,
"
title
"
:
o2
.
LP
.
process
.
formAction
.
defaultNode
,
"
text
"
:
"
✔
"
}).
inject
(
this
.
itemNode
);
this
.
tree
.
defaultItem
=
this
;
if
(
e
){
this
.
options
.
default
=
true
;
this
.
defaultNode
.
hide
();
this
.
defaultAction
.
setStyles
(
this
.
tree
.
css
.
itemCheckedActionNode
);
}
},
deleteItem
:
function
(
e
){
var
treeNode
=
this
;
...
...
o2web/source/x_component_portal_PageDesigner/Module/Tab.js
浏览文件 @
df566467
...
...
@@ -70,7 +70,7 @@ MWF.xApplication.portal.PageDesigner.Module.Tab = MWF.PCTab = new Class({
}.
bind
(
this
));
},
addPage
:
function
(){
tabNode
=
new
Element
(
"
div
"
);
var
tabNode
=
new
Element
(
"
div
"
);
var
page
=
this
.
tabWidget
.
addTab
(
tabNode
,
"
page
"
,
false
);
this
.
form
.
getTemplateData
(
"
Tab$Page
"
,
function
(
data
){
...
...
o2web/source/x_component_process_FormDesigner/Module/Tab.js
浏览文件 @
df566467
...
...
@@ -197,7 +197,7 @@ MWF.xApplication.process.FormDesigner.Module.Tab = MWF.FCTab = new Class({
this
.
tabWidget
.
css
.
tabNode
=
this
.
json
.
tabStyles
;
this
.
tabWidget
.
css
.
tabTextNode
=
this
.
json
.
tabTextStyles
;
this
.
tabWidget
.
css
.
tabNodeCurrent
=
this
.
json
.
tabCurrentStyles
;
this
.
tabWidget
.
css
.
contentNodeContainer
.
clear
=
"
both
"
;
if
(
!
this
.
json
.
contentNodeContainer
||
!
this
.
json
.
contentNodeContainer
.
clear
)
this
.
tabWidget
.
css
.
contentNodeContainer
.
clear
=
"
both
"
;
this
.
tabWidget
.
css
.
tabTextNodeCurrent
=
this
.
json
.
tabTextCurrentStyles
;
},
_getElements
:
function
(){
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录