Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
bdab2925
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,发现更多精彩内容 >>
提交
bdab2925
编写于
7月 29, 2021
作者:
NoSubject
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
组件拖动定位优化
上级
2ca95cc0
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
61 addition
and
9 deletion
+61
-9
o2web/source/x_component_process_FormDesigner/Module/$Component.js
...rce/x_component_process_FormDesigner/Module/$Component.js
+1
-0
o2web/source/x_component_process_FormDesigner/Module/$Container.js
...rce/x_component_process_FormDesigner/Module/$Container.js
+14
-1
o2web/source/x_component_process_FormDesigner/Module/$Element.js
...ource/x_component_process_FormDesigner/Module/$Element.js
+1
-0
o2web/source/x_component_process_FormDesigner/Module/$Module.js
...source/x_component_process_FormDesigner/Module/$Module.js
+41
-4
o2web/source/x_component_process_FormDesigner/Module/Form.js
o2web/source/x_component_process_FormDesigner/Module/Form.js
+2
-2
o2web/source/x_component_process_FormDesigner/Module/Stat/default/css.wcss
...mponent_process_FormDesigner/Module/Stat/default/css.wcss
+2
-2
未找到文件。
o2web/source/x_component_process_FormDesigner/Module/$Component.js
浏览文件 @
bdab2925
...
@@ -91,6 +91,7 @@ MWF.xApplication.process.FormDesigner.Module.$Component = MWF.FC$Component = new
...
@@ -91,6 +91,7 @@ MWF.xApplication.process.FormDesigner.Module.$Component = MWF.FC$Component = new
var
copyNode
=
module
.
_getCopyNode
(
this
);
var
copyNode
=
module
.
_getCopyNode
(
this
);
copyNode
.
show
();
copyNode
.
show
();
copyNode
.
inject
(
this
.
node
,
"
before
"
);
copyNode
.
inject
(
this
.
node
,
"
before
"
);
this
.
_positionCopyNode
(
copyNode
);
}
}
// var copyNode = module._getCopyNode();
// var copyNode = module._getCopyNode();
...
...
o2web/source/x_component_process_FormDesigner/Module/$Container.js
浏览文件 @
bdab2925
...
@@ -59,6 +59,8 @@ MWF.xApplication.process.FormDesigner.Module.$Container = MWF.FC$Container = new
...
@@ -59,6 +59,8 @@ MWF.xApplication.process.FormDesigner.Module.$Container = MWF.FC$Container = new
var
copyNode
=
module
.
_getCopyNode
(
this
);
var
copyNode
=
module
.
_getCopyNode
(
this
);
copyNode
.
show
();
copyNode
.
show
();
copyNode
.
inject
(
this
.
node
);
copyNode
.
inject
(
this
.
node
);
//copyNode.setStyle("position", "static");
//this._positionCopyNode(copyNode, "in");
}
}
//this._showInjectAction( module );
//this._showInjectAction( module );
...
@@ -105,7 +107,11 @@ MWF.xApplication.process.FormDesigner.Module.$Container = MWF.FC$Container = new
...
@@ -105,7 +107,11 @@ MWF.xApplication.process.FormDesigner.Module.$Container = MWF.FC$Container = new
//this.parentContainer.node.setStyles({"border": "1px solid #ffa200"});
//this.parentContainer.node.setStyles({"border": "1px solid #ffa200"});
var
copyNode
=
module
.
_getCopyNode
();
var
copyNode
=
module
.
_getCopyNode
();
copyNode
.
inject
(
this
.
node
,
"
before
"
);
copyNode
.
inject
(
this
.
node
,
"
before
"
);
this
.
_positionCopyNode
(
copyNode
);
},
},
_getSubModule
:
function
(){
_getSubModule
:
function
(){
var
modules
=
[];
var
modules
=
[];
var
subNode
=
this
.
node
.
getFirst
();
var
subNode
=
this
.
node
.
getFirst
();
...
@@ -122,7 +128,6 @@ MWF.xApplication.process.FormDesigner.Module.$Container = MWF.FC$Container = new
...
@@ -122,7 +128,6 @@ MWF.xApplication.process.FormDesigner.Module.$Container = MWF.FC$Container = new
return
modules
;
return
modules
;
},
},
load
:
function
(
json
,
node
,
parent
){
load
:
function
(
json
,
node
,
parent
){
this
.
json
=
json
;
this
.
json
=
json
;
this
.
node
=
node
;
this
.
node
=
node
;
this
.
node
.
store
(
"
module
"
,
this
);
this
.
node
.
store
(
"
module
"
,
this
);
...
@@ -134,6 +139,14 @@ MWF.xApplication.process.FormDesigner.Module.$Container = MWF.FC$Container = new
...
@@ -134,6 +139,14 @@ MWF.xApplication.process.FormDesigner.Module.$Container = MWF.FC$Container = new
this
.
_initModule
();
this
.
_initModule
();
this
.
_loadTreeNode
(
parent
);
this
.
_loadTreeNode
(
parent
);
if
(
!
this
.
json
.
id
){
var
id
=
this
.
_getNewId
(((
parent
)
?
parent
.
json
.
id
:
null
));
this
.
json
.
id
=
id
;
}
if
(
!
this
.
form
.
json
.
moduleList
[
this
.
json
.
id
]){
this
.
form
.
json
.
moduleList
[
this
.
json
.
id
]
=
this
.
json
;
}
this
.
parseModules
();
this
.
parseModules
();
this
.
parentContainer
=
this
.
treeNode
.
parentNode
.
module
;
this
.
parentContainer
=
this
.
treeNode
.
parentNode
.
module
;
...
...
o2web/source/x_component_process_FormDesigner/Module/$Element.js
浏览文件 @
bdab2925
...
@@ -29,6 +29,7 @@ MWF.xApplication.process.FormDesigner.Module.$Element = MWF.FC$Element = new Cla
...
@@ -29,6 +29,7 @@ MWF.xApplication.process.FormDesigner.Module.$Element = MWF.FC$Element = new Cla
var
copyNode
=
module
.
_getCopyNode
(
this
);
var
copyNode
=
module
.
_getCopyNode
(
this
);
copyNode
.
show
();
copyNode
.
show
();
copyNode
.
inject
(
this
.
node
,
"
before
"
);
copyNode
.
inject
(
this
.
node
,
"
before
"
);
this
.
_positionCopyNode
(
copyNode
)
}
}
//this._showInjectAction( module );
//this._showInjectAction( module );
...
...
o2web/source/x_component_process_FormDesigner/Module/$Module.js
浏览文件 @
bdab2925
...
@@ -305,6 +305,10 @@ MWF.xApplication.process.FormDesigner.Module.$Module = MWF.FC$Module = new Class
...
@@ -305,6 +305,10 @@ MWF.xApplication.process.FormDesigner.Module.$Module = MWF.FC$Module = new Class
this
.
close
();
this
.
close
();
},
null
);
},
null
);
},
},
selectedContainer
:
function
(){
debugger
;
if
(
this
.
parentContainer
)
this
.
parentContainer
.
selected
();
},
styleBrush
:
function
(){
styleBrush
:
function
(){
//@todo
//@todo
this
.
form
.
styleBrushContent
=
Object
.
clone
(
this
.
json
.
styles
);
this
.
form
.
styleBrushContent
=
Object
.
clone
(
this
.
json
.
styles
);
...
@@ -374,10 +378,10 @@ MWF.xApplication.process.FormDesigner.Module.$Module = MWF.FC$Module = new Class
...
@@ -374,10 +378,10 @@ MWF.xApplication.process.FormDesigner.Module.$Module = MWF.FC$Module = new Class
_hideActions
:
function
(){
_hideActions
:
function
(){
if
(
this
.
actionArea
)
this
.
actionArea
.
setStyle
(
"
display
"
,
"
none
"
);
if
(
this
.
actionArea
)
this
.
actionArea
.
setStyle
(
"
display
"
,
"
none
"
);
},
},
selected
:
function
(){
selected
:
function
(
force
){
if
(
this
.
form
&&
this
.
form
.
node
)
this
.
form
.
node
.
focus
();
if
(
this
.
form
&&
this
.
form
.
node
)
this
.
form
.
node
.
focus
();
if
(
this
.
form
.
currentSelectedModule
){
if
(
this
.
form
.
currentSelectedModule
){
if
(
this
.
form
.
currentSelectedModule
==
this
){
if
(
!
force
&&
this
.
form
.
currentSelectedModule
==
this
){
return
true
;
return
true
;
}
else
{
}
else
{
this
.
form
.
currentSelectedModule
.
unSelected
();
this
.
form
.
currentSelectedModule
.
unSelected
();
...
@@ -461,7 +465,8 @@ MWF.xApplication.process.FormDesigner.Module.$Module = MWF.FC$Module = new Class
...
@@ -461,7 +465,8 @@ MWF.xApplication.process.FormDesigner.Module.$Module = MWF.FC$Module = new Class
if
(
this
.
property
)
this
.
property
.
hide
();
if
(
this
.
property
)
this
.
property
.
hide
();
},
},
create
:
function
(
data
,
e
){
create
:
function
(
data
,
e
,
group
){
data
.
moduleGroup
=
group
;
this
.
json
=
data
;
this
.
json
=
data
;
this
.
json
.
id
=
this
.
_getNewId
();
this
.
json
.
id
=
this
.
_getNewId
();
this
.
_createMoveNode
();
this
.
_createMoveNode
();
...
@@ -488,6 +493,8 @@ MWF.xApplication.process.FormDesigner.Module.$Module = MWF.FC$Module = new Class
...
@@ -488,6 +493,8 @@ MWF.xApplication.process.FormDesigner.Module.$Module = MWF.FC$Module = new Class
_onEnterOther
:
function
(
dragging
,
inObj
){
_onEnterOther
:
function
(
dragging
,
inObj
){
},
},
_onLeaveOther
:
function
(
dragging
,
inObj
){
_onLeaveOther
:
function
(
dragging
,
inObj
){
if
(
this
.
copyNode
)
this
.
copyNode
.
destroy
();
this
.
copyNode
=
null
;
},
},
_onMoveEnter
:
function
(
dragging
,
inObj
){
_onMoveEnter
:
function
(
dragging
,
inObj
){
var
module
=
inObj
.
retrieve
(
"
module
"
);
var
module
=
inObj
.
retrieve
(
"
module
"
);
...
@@ -569,6 +576,33 @@ MWF.xApplication.process.FormDesigner.Module.$Module = MWF.FC$Module = new Class
...
@@ -569,6 +576,33 @@ MWF.xApplication.process.FormDesigner.Module.$Module = MWF.FC$Module = new Class
// this.copyNode.setStyle("display", "block");
// this.copyNode.setStyle("display", "block");
return
this
.
copyNode
;
return
this
.
copyNode
;
},
},
_positionCopyNode
:
function
(
copyNode
,
isIn
){
var
display
=
this
.
node
.
getStyle
(
"
display
"
);
copyNode
.
setStyle
(
"
margin
"
,
"
0
"
);
if
(
display
.
indexOf
(
"
inline
"
)
!==-
1
){
var
size
=
this
.
node
.
getComputedSize
();
copyNode
.
setStyle
(
"
position
"
,
"
absolute
"
);
copyNode
.
setStyle
(
"
width
"
,
"
1px
"
);
copyNode
.
setStyle
(
"
min-width
"
,
"
0
"
);
copyNode
.
setStyle
(
"
height
"
,
size
.
height
+
"
px
"
);
copyNode
.
position
({
relativeTo
:
this
.
node
,
position
:
'
leftTop
'
,
edge
:
'
rightTop
'
})
}
else
{
var
w
=
copyNode
.
getStyle
(
"
width
"
).
toFloat
();
if
(
!
w
)
w
=
copyNode
.
getSize
().
x
;
copyNode
.
setStyle
(
"
position
"
,
"
absolute
"
);
copyNode
.
setStyle
(
"
width
"
,
""
+
w
+
"
px
"
);
copyNode
.
position
({
relativeTo
:
this
.
node
,
position
:
(
!!
isIn
)
?
'
leftBottom
'
:
'
leftTop
'
,
edge
:
'
leftBottom
'
})
}
},
_createCopyNode
:
function
(){
_createCopyNode
:
function
(){
this
.
copyNode
=
this
.
moveNode
.
clone
();
this
.
copyNode
=
this
.
moveNode
.
clone
();
this
.
copyNode
.
setStyles
(
this
.
css
.
moduleNodeShow
);
this
.
copyNode
.
setStyles
(
this
.
css
.
moduleNodeShow
);
...
@@ -934,10 +968,13 @@ MWF.xApplication.process.FormDesigner.Module.$Module = MWF.FC$Module = new Class
...
@@ -934,10 +968,13 @@ MWF.xApplication.process.FormDesigner.Module.$Module = MWF.FC$Module = new Class
}
}
if
(
name
==
"
properties
"
){
if
(
name
==
"
properties
"
){
try
{
try
{
this
.
node
.
setProperties
(
this
.
json
.
properties
);
this
.
setCustomProperties
(
);
}
catch
(
e
){}
}
catch
(
e
){}
}
}
},
},
setCustomProperties
:
function
(){
this
.
node
.
setProperties
(
this
.
json
.
properties
);
},
setCustomNodeStyles
:
function
(
node
,
styles
){
setCustomNodeStyles
:
function
(
node
,
styles
){
var
border
=
node
.
getStyle
(
"
border
"
);
var
border
=
node
.
getStyle
(
"
border
"
);
node
.
clearStyles
();
node
.
clearStyles
();
...
...
o2web/source/x_component_process_FormDesigner/Module/Form.js
浏览文件 @
bdab2925
...
@@ -542,11 +542,11 @@ MWF.xApplication.process.FormDesigner.Module.Form = MWF.FCForm = new Class({
...
@@ -542,11 +542,11 @@ MWF.xApplication.process.FormDesigner.Module.Form = MWF.FCForm = new Class({
return
module
;
return
module
;
},
},
createModule
:
function
(
className
,
e
){
createModule
:
function
(
className
,
e
,
group
){
this
.
getTemplateData
(
className
,
function
(
data
){
this
.
getTemplateData
(
className
,
function
(
data
){
var
moduleData
=
Object
.
clone
(
data
);
var
moduleData
=
Object
.
clone
(
data
);
var
newTool
=
new
MWF
[
"
FC
"
+
className
](
this
);
var
newTool
=
new
MWF
[
"
FC
"
+
className
](
this
);
newTool
.
create
(
moduleData
,
e
);
newTool
.
create
(
moduleData
,
e
,
group
);
}.
bind
(
this
));
}.
bind
(
this
));
},
},
getTemplateData
:
function
(
className
,
callback
,
async
){
getTemplateData
:
function
(
className
,
callback
,
async
){
...
...
o2web/source/x_component_process_FormDesigner/Module/Stat/default/css.wcss
浏览文件 @
bdab2925
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
"left": "auto",
"left": "auto",
"width": "auto",
"width": "auto",
"opacity": 0.5,
"opacity": 0.5,
"background": "#ff
ffff
"
"background": "#ff
a200
"
},
},
"moduleNode": {
"moduleNode": {
"border": "1px dashed #333",
"border": "1px dashed #333",
...
@@ -89,4 +89,4 @@
...
@@ -89,4 +89,4 @@
"padding": "0px 10px"
"padding": "0px 10px"
}
}
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录