Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
22d25dda
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,发现更多精彩内容 >>
提交
22d25dda
编写于
3月 19, 2020
作者:
U
unknown
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
自定义视图
上级
40d3a74a
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
450 addition
and
237 deletion
+450
-237
o2web/source/x_component_query_Query/Viewer.js
o2web/source/x_component_query_Query/Viewer.js
+30
-30
o2web/source/x_component_query_ViewDesigner/$View/actionbar.html
...ource/x_component_query_ViewDesigner/$View/actionbar.html
+42
-0
o2web/source/x_component_query_ViewDesigner/$View/actionbar.json
...ource/x_component_query_ViewDesigner/$View/actionbar.json
+69
-0
o2web/source/x_component_query_ViewDesigner/$View/default/actionbar.wcss
...component_query_ViewDesigner/$View/default/actionbar.wcss
+50
-0
o2web/source/x_component_query_ViewDesigner/$View/default/actionbar/export.png
...ent_query_ViewDesigner/$View/default/actionbar/export.png
+0
-0
o2web/source/x_component_query_ViewDesigner/$View/default/css.wcss
...rce/x_component_query_ViewDesigner/$View/default/css.wcss
+4
-4
o2web/source/x_component_query_ViewDesigner/$View/toolbars.json
...source/x_component_query_ViewDesigner/$View/toolbars.json
+12
-0
o2web/source/x_component_query_ViewDesigner/$View/view_bak.json
...source/x_component_query_ViewDesigner/$View/view_bak.json
+40
-0
o2web/source/x_component_query_ViewDesigner/Property.js
o2web/source/x_component_query_ViewDesigner/Property.js
+152
-152
o2web/source/x_component_query_ViewDesigner/View.js
o2web/source/x_component_query_ViewDesigner/View.js
+51
-51
未找到文件。
o2web/source/x_component_query_Query/Viewer.js
浏览文件 @
22d25dda
...
...
@@ -575,11 +575,11 @@ MWF.xApplication.query.Query.Viewer = MWF.QViewer = new Class({
this
.
viewTitleLine
=
new
Element
(
"
tr
"
,
{
"
styles
"
:
this
.
css
.
viewTitleLineNode
}).
inject
(
this
.
viewTable
);
//if (this.json.select==="single" || this.json.select==="multi") {
this
.
selectTitleCell
=
new
Element
(
"
td
"
,
{
"
styles
"
:
this
.
css
.
viewTitleCellNode
}).
inject
(
this
.
viewTitleLine
);
this
.
selectTitleCell
.
setStyle
(
"
width
"
,
"
10px
"
);
if
(
this
.
json
.
titleStyles
)
this
.
selectTitleCell
.
setStyles
(
this
.
json
.
titleStyles
);
this
.
selectTitleCell
=
new
Element
(
"
td
"
,
{
"
styles
"
:
this
.
css
.
viewTitleCellNode
}).
inject
(
this
.
viewTitleLine
);
this
.
selectTitleCell
.
setStyle
(
"
width
"
,
"
10px
"
);
if
(
this
.
json
.
titleStyles
)
this
.
selectTitleCell
.
setStyles
(
this
.
json
.
titleStyles
);
//}
//序号
...
...
@@ -757,9 +757,9 @@ MWF.xApplication.query.Query.Viewer = MWF.QViewer = new Class({
loadData
:
function
(){
if
(
this
.
gridJson
.
length
){
// if( !this.options.paging ){
this
.
gridJson
.
each
(
function
(
line
,
i
){
this
.
items
.
push
(
new
MWF
.
xApplication
.
query
.
Query
.
Viewer
.
Item
(
this
,
line
,
null
,
i
));
}.
bind
(
this
));
this
.
gridJson
.
each
(
function
(
line
,
i
){
this
.
items
.
push
(
new
MWF
.
xApplication
.
query
.
Query
.
Viewer
.
Item
(
this
,
line
,
null
,
i
));
}.
bind
(
this
));
// }else{
// this.loadPaging();
// }
...
...
@@ -999,9 +999,9 @@ MWF.xApplication.query.Query.Viewer.Item = new Class({
}
//if (this.view.json.select==="single" || this.view.json.select==="multi"){
this
.
selectTd
=
new
Element
(
"
td
"
,
{
"
styles
"
:
this
.
css
.
viewContentTdNode
}).
inject
(
this
.
node
);
this
.
selectTd
.
setStyles
({
"
cursor
"
:
"
pointer
"
});
if
(
this
.
view
.
json
.
itemStyles
)
this
.
selectTd
.
setStyles
(
this
.
view
.
json
.
itemStyles
);
this
.
selectTd
=
new
Element
(
"
td
"
,
{
"
styles
"
:
this
.
css
.
viewContentTdNode
}).
inject
(
this
.
node
);
this
.
selectTd
.
setStyles
({
"
cursor
"
:
"
pointer
"
});
if
(
this
.
view
.
json
.
itemStyles
)
this
.
selectTd
.
setStyles
(
this
.
view
.
json
.
itemStyles
);
//}
//序号
...
...
@@ -1017,22 +1017,22 @@ MWF.xApplication.query.Query.Viewer.Item = new Class({
var
cell
=
this
.
data
.
data
[
k
];
if
(
cell
===
undefined
)
cell
=
""
;
//if (cell){
if
(
this
.
view
.
hideColumns
.
indexOf
(
k
)
===-
1
){
var
td
=
new
Element
(
"
td
"
,
{
"
styles
"
:
this
.
css
.
viewContentTdNode
}).
inject
(
this
.
node
);
if
(
k
!==
this
.
view
.
viewJson
.
group
.
column
){
//var v = (this.view.entries[k].code) ? MWF.Macro.exec(this.view.entries[k].code, {"value": cell, "gridData": this.view.gridJson, "data": this.view.viewData, "entry": this.data}) : cell;
var
v
=
cell
;
if
(
c
.
isHtml
){
td
.
set
(
"
html
"
,
v
);
}
else
{
td
.
set
(
"
text
"
,
v
);
if
(
this
.
view
.
hideColumns
.
indexOf
(
k
)
===-
1
){
var
td
=
new
Element
(
"
td
"
,
{
"
styles
"
:
this
.
css
.
viewContentTdNode
}).
inject
(
this
.
node
);
if
(
k
!==
this
.
view
.
viewJson
.
group
.
column
){
//var v = (this.view.entries[k].code) ? MWF.Macro.exec(this.view.entries[k].code, {"value": cell, "gridData": this.view.gridJson, "data": this.view.viewData, "entry": this.data}) : cell;
var
v
=
cell
;
if
(
c
.
isHtml
){
td
.
set
(
"
html
"
,
v
);
}
else
{
td
.
set
(
"
text
"
,
v
);
}
}
if
(
this
.
view
.
openColumns
.
indexOf
(
k
)
!==-
1
){
this
.
setOpenWork
(
td
,
c
)
}
if
(
this
.
view
.
json
.
itemStyles
)
td
.
setStyles
(
this
.
view
.
json
.
itemStyles
);
}
if
(
this
.
view
.
openColumns
.
indexOf
(
k
)
!==-
1
){
this
.
setOpenWork
(
td
,
c
)
}
if
(
this
.
view
.
json
.
itemStyles
)
td
.
setStyles
(
this
.
view
.
json
.
itemStyles
);
}
//}
}.
bind
(
this
));
...
...
@@ -1300,8 +1300,8 @@ MWF.xApplication.query.Query.Viewer.ItemCategory = new Class({
this
.
node
=
new
Element
(
"
tr
"
,
{
"
styles
"
:
this
.
css
.
viewContentTrNode
}).
inject
(
this
.
view
.
viewTable
);
//if (this.view.json.select==="single" || this.view.json.select==="multi"){
this
.
selectTd
=
new
Element
(
"
td
"
,
{
"
styles
"
:
this
.
css
.
viewContentCategoryTdNode
}).
inject
(
this
.
node
);
if
(
this
.
view
.
json
.
itemStyles
)
this
.
selectTd
.
setStyles
(
this
.
view
.
json
.
itemStyles
);
this
.
selectTd
=
new
Element
(
"
td
"
,
{
"
styles
"
:
this
.
css
.
viewContentCategoryTdNode
}).
inject
(
this
.
node
);
if
(
this
.
view
.
json
.
itemStyles
)
this
.
selectTd
.
setStyles
(
this
.
view
.
json
.
itemStyles
);
//}
this
.
categoryTd
=
new
Element
(
"
td
"
,
{
"
styles
"
:
this
.
css
.
viewContentCategoryTdNode
,
...
...
@@ -1331,9 +1331,9 @@ MWF.xApplication.query.Query.Viewer.ItemCategory = new Class({
},
setEvent
:
function
(){
//if (this.selectTd){
this
.
node
.
addEvents
({
"
click
"
:
function
(){
this
.
expandOrCollapse
();}.
bind
(
this
)
});
this
.
node
.
addEvents
({
"
click
"
:
function
(){
this
.
expandOrCollapse
();}.
bind
(
this
)
});
//}
},
expandOrCollapse
:
function
(){
...
...
o2web/source/x_component_query_ViewDesigner/$View/actionbar.html
0 → 100644
浏览文件 @
22d25dda
<div
style=
"background-color: #FFF; overflow: hidden"
>
<div
title=
"基本"
class=
"MWFTab"
>
<table
width=
"100%"
border=
"0"
cellpadding=
"5"
cellspacing=
"0"
class=
"editTable"
>
<tr>
<td
class=
"editTableTitle"
>
标识:
</td>
<td
class=
"editTableValue"
><input
type=
"text"
name=
"id"
value=
"text{$.id}"
class=
"editTableInput"
/></td>
</tr>
<tr>
<td
class=
"editTableTitle"
>
名称:
</td>
<td
class=
"editTableValue"
><input
type=
"text"
name=
"name"
value=
"text{$.name}"
class=
"editTableInput"
/></td>
</tr>
<tr>
<td
class=
"editTableTitle"
>
描述:
</td>
<td
class=
"editTableValue"
><input
type=
"text"
name=
"description"
value=
"text{$.description}"
class=
"editTableInput"
/></td>
</tr>
<tr>
<td
class=
"editTableTitle"
>
系统操作:
</td>
<td
class=
"editTableValue"
>
<input
type=
"radio"
name=
"hideSystemTools"
value=
"false"
text
{(!$.
hideSystemTools
)?'
checked
'
:
''}
/>
显示
<input
type=
"radio"
name=
"hideSystemTools"
value=
"true"
text
{($.
hideSystemTools
)?'
checked
'
:
''}
/>
不显示
</td>
</tr>
</table>
</div>
<div
title=
"操作"
class=
"MWFTab"
style=
"overflow: hidden"
>
<div
class=
"MWFDefaultActionArea"
name=
"defaultTools"
></div>
<div
class=
"MWFActionArea"
name=
"tools"
></div>
</div>
<div
title=
"样式"
class=
"MWFTab"
>
<div
class=
"MWFActionStylesArea"
name=
"actionStyles"
></div>
</div>
<div
title=
"事件"
class=
"MWFTab"
>
<div
class=
"MWFEventsArea"
name=
"events"
></div>
</div>
<!--<div title="HTML" class="MWFTab">-->
<!--<div class="MWFHTMLArea" style="font-family: Verdana, Geneva, sans-serif; font-size:14px"></div>-->
<!--</div>-->
<div
title=
"JSON"
class=
"MWFTab"
>
<div
class=
"MWFJSONArea"
style=
"font-family: Verdana, Geneva, sans-serif; font-size:14px"
></div>
</div>
</div>
\ No newline at end of file
o2web/source/x_component_query_ViewDesigner/$View/actionbar.json
0 → 100644
浏览文件 @
22d25dda
{
"id"
:
""
,
"name"
:
""
,
"type"
:
"Actionbar"
,
"description"
:
""
,
"tools"
:[],
"style"
:
"view_default"
,
"customIconStyle"
:
""
,
"hideSystemTools"
:
false
,
"container"
:
""
,
"events"
:
{
"queryLoad"
:
{
"code"
:
""
,
"html"
:
""
},
"postLoad"
:
{
"code"
:
""
,
"html"
:
""
},
"load"
:
{
"code"
:
""
,
"html"
:
""
},
"afterLoad"
:
{
"code"
:
""
,
"html"
:
""
},
"click"
:
{
"code"
:
""
,
"html"
:
""
},
"dblclick"
:
{
"code"
:
""
,
"html"
:
""
},
"keydown"
:
{
"code"
:
""
,
"html"
:
""
},
"keypress"
:
{
"code"
:
""
,
"html"
:
""
},
"keyup"
:
{
"code"
:
""
,
"html"
:
""
},
"mousedown"
:
{
"code"
:
""
,
"html"
:
""
},
"mousemove"
:
{
"code"
:
""
,
"html"
:
""
},
"mouseout"
:
{
"code"
:
""
,
"html"
:
""
},
"mouseover"
:
{
"code"
:
""
,
"html"
:
""
},
"mouseup"
:
{
"code"
:
""
,
"html"
:
""
}
}
}
\ No newline at end of file
o2web/source/x_component_query_ViewDesigner/$View/default/actionbar.wcss
0 → 100644
浏览文件 @
22d25dda
{
"moduleNodeMove": {
"border": "2px dashed #ffa200",
"height": "30px",
"overflow": "hidden",
"margin": "3px",
"display": "block",
"-webkit-user-select": "none",
"-moz-user-select": "none",
"position": "absolute",
"z-index": 10002,
"opacity": 0.7,
"width": "100px",
"background-color": "#999",
"cursor": "move"
},
"moduleNodeShow": {
"border": "1px dashed #333",
"height": "2px",
"cursor": "pointer",
"line-height": "22px",
"overflow": "hidden",
"margin": "3px 3px",
"-webkit-user-select": "none",
"-moz-user-select": "none",
"position": "static",
"display": "block",
"top": "auto",
"left": "auto",
"width": "auto",
"opacity": 0.5,
"background": "#ffa200"
},
"moduleNode": {
"border": "1px dashed #999",
"height": "auto",
"overflow": "hidden",
"margin": "auto",
"display": "block",
"-webkit-user-select": "none",
"-moz-user-select": "none",
"position": "static",
"opacity": 1,
"width": "auto",
"margin": "3px 3px",
"background-color": "#999",
"cursor": "pointer"
}
}
\ No newline at end of file
o2web/source/x_component_query_ViewDesigner/$View/default/actionbar/export.png
0 → 100644
浏览文件 @
22d25dda
354 字节
o2web/source/x_component_query_ViewDesigner/$View/default/css.wcss
浏览文件 @
22d25dda
...
...
@@ -5,7 +5,7 @@
"viewAreaNode": {
"overflow": "hidden"
},
"viewTitleNode": {
"viewTitleNode": {
"height": "40px",
"background-color": "#EEE",
"border-bottom": "1px solid #999",
...
...
@@ -338,14 +338,14 @@
},
"toolbarWarpNode_selected": {
"background-color": "#FFF",
// "height": "38px",
// "height": "38px",
"border": "1px solid red",
"white-space": "nowrap"
},
"toolbarWarpNode_over": {
"background-color": "#F9F9F9",
// "height": "38px",
// "height": "38px",
"border": "1px dotted blue",
"white-space": "nowrap"
}
}
,
}
\ No newline at end of file
o2web/source/x_component_query_ViewDesigner/$View/toolbars.json
0 → 100644
浏览文件 @
22d25dda
[
{
"type"
:
"MWFToolBarButton"
,
"img"
:
"export.png"
,
"title"
:
"导出Excel"
,
"action"
:
"exportView"
,
"text"
:
"导出Excel"
,
"id"
:
"action_export"
,
"condition"
:
""
,
"read"
:
true
}
]
\ No newline at end of file
o2web/source/x_component_query_ViewDesigner/$View/view_bak.json
0 → 100644
浏览文件 @
22d25dda
{
"name"
:
""
,
"id"
:
""
,
"application"
:
""
,
"alias"
:
""
,
"description"
:
""
,
"display"
:
true
,
"data"
:
{
"exportGrid"
:
true
,
"exportGoupGrid"
:
true
,
"scopeType"
:
"work"
,
"selectEntryList"
:
[],
"restrictWhereEntry"
:
{
"applicationList"
:
[],
"processList"
:
[],
"companyList"
:
[],
"departmentList"
:
[],
"personList"
:
[],
"identityList"
:
[]
},
"restrictFilterEntryList"
:
[],
"restrictDateRangeEntry"
:
{
"dateRangeType"
:
"none"
,
"dateEffectType"
:
"start"
,
"year"
:
""
,
"month"
:
""
,
"date"
:
""
,
"season"
:
0
,
"week"
:
0
,
"adjust"
:
0
},
"orderEntryList"
:
[],
"groupEntry"
:
{},
"calculate"
:
{}
},
"availableIdentityList"
:
[],
"availableDepartmentList"
:
[],
"availableCompanyList"
:
[]
}
\ No newline at end of file
o2web/source/x_component_query_ViewDesigner/Property.js
浏览文件 @
22d25dda
MWF
.
require
(
"
MWF.widget.Common
"
,
null
,
false
);
MWF
.
require
(
"
MWF.widget.JsonTemplate
"
,
null
,
false
);
MWF
.
xApplication
.
query
.
ViewDesigner
.
Property
=
MWF
.
FVProperty
=
new
Class
({
Extends
:
MWF
.
widget
.
Common
,
Implements
:
[
Options
,
Events
],
options
:
{
"
style
"
:
"
default
"
,
"
path
"
:
"
/x_component_query_FormDesigner/property/property.html
"
},
initialize
:
function
(
module
,
propertyNode
,
designer
,
options
){
this
.
setOptions
(
options
);
this
.
module
=
module
;
this
.
view
=
module
.
view
;
this
.
data
=
module
.
json
;
Extends
:
MWF
.
widget
.
Common
,
Implements
:
[
Options
,
Events
],
options
:
{
"
style
"
:
"
default
"
,
"
path
"
:
"
/x_component_query_FormDesigner/property/property.html
"
},
initialize
:
function
(
module
,
propertyNode
,
designer
,
options
){
this
.
setOptions
(
options
);
this
.
module
=
module
;
this
.
view
=
module
.
view
;
this
.
data
=
module
.
json
;
this
.
data
.
vid
=
this
.
view
.
json
.
id
;
this
.
data
.
vtype
=
this
.
view
.
json
.
type
;
this
.
data
.
pid
=
this
.
view
.
json
.
id
+
this
.
data
.
id
;
this
.
htmlPath
=
this
.
options
.
path
;
this
.
designer
=
designer
;
this
.
propertyNode
=
propertyNode
;
},
load
:
function
(){
if
(
this
.
fireEvent
(
"
queryLoad
"
)){
MWF
.
getRequestText
(
this
.
htmlPath
,
function
(
responseText
,
responseXML
){
this
.
htmlString
=
responseText
;
this
.
data
.
pid
=
this
.
view
.
json
.
id
+
this
.
data
.
id
;
this
.
htmlPath
=
this
.
options
.
path
;
this
.
designer
=
designer
;
this
.
propertyNode
=
propertyNode
;
},
load
:
function
(){
if
(
this
.
fireEvent
(
"
queryLoad
"
)){
MWF
.
getRequestText
(
this
.
htmlPath
,
function
(
responseText
,
responseXML
){
this
.
htmlString
=
responseText
;
this
.
fireEvent
(
"
postLoad
"
);
}.
bind
(
this
));
}
}.
bind
(
this
));
}
this
.
propertyNode
.
addEvent
(
"
keydown
"
,
function
(
e
){
e
.
stopPropagation
();});
},
editProperty
:
function
(
td
){
},
},
editProperty
:
function
(
td
){
},
getHtmlString
:
function
(
callback
){
if
(
!
this
.
htmlString
){
MWF
.
getRequestText
(
this
.
htmlPath
,
function
(
responseText
,
responseXML
){
...
...
@@ -43,7 +43,7 @@ MWF.xApplication.query.ViewDesigner.Property = MWF.FVProperty = new Class({
if
(
callback
)
callback
();
}
},
show
:
function
(){
show
:
function
(){
if
(
!
this
.
propertyContent
){
this
.
getHtmlString
(
function
(){
if
(
this
.
htmlString
){
...
...
@@ -72,17 +72,17 @@ MWF.xApplication.query.ViewDesigner.Property = MWF.FVProperty = new Class({
this
.
propertyContent
.
setStyle
(
"
display
"
,
"
block
"
);
}
},
hide
:
function
(){
//this.JsonTemplate = null;
//this.propertyNode.set("html", "");
},
hide
:
function
(){
//this.JsonTemplate = null;
//this.propertyNode.set("html", "");
if
(
this
.
propertyContent
)
this
.
propertyContent
.
setStyle
(
"
display
"
,
"
none
"
);
},
},
loadJSONArea
:
function
(){
var
jsonNode
=
this
.
propertyContent
.
getElement
(
"
.MWFJSONArea
"
);
loadJSONArea
:
function
(){
var
jsonNode
=
this
.
propertyContent
.
getElement
(
"
.MWFJSONArea
"
);
if
(
jsonNode
){
this
.
propertyTab
.
pages
.
each
(
function
(
page
){
...
...
@@ -99,39 +99,39 @@ MWF.xApplication.query.ViewDesigner.Property = MWF.FVProperty = new Class({
}
}.
bind
(
this
));
}
},
loadPropertyTab
:
function
(){
var
tabNodes
=
this
.
propertyContent
.
getElements
(
"
.MWFTab
"
);
if
(
tabNodes
.
length
){
var
tmpNode
=
this
.
propertyContent
.
getFirst
();
var
tabAreaNode
=
new
Element
(
"
div
"
,
{
"
styles
"
:
this
.
view
.
css
.
propertyTabNode
}).
inject
(
tmpNode
,
"
before
"
);
MWF
.
require
(
"
MWF.widget.Tab
"
,
function
(){
var
tab
=
new
MWF
.
widget
.
Tab
(
tabAreaNode
,
{
"
style
"
:
"
formPropertyList
"
});
tab
.
load
();
var
tabPages
=
[];
tabNodes
.
each
(
function
(
node
){
var
page
=
tab
.
addTab
(
node
,
node
.
get
(
"
title
"
),
false
);
tabPages
.
push
(
page
);
this
.
setScrollBar
(
page
.
contentNodeArea
,
"
small
"
,
null
,
null
);
}.
bind
(
this
));
tabPages
[
0
].
showTab
();
this
.
propertyTab
=
tab
;
this
.
designer
.
resizeNode
();
}.
bind
(
this
),
false
);
}
},
setEditNodeEvent
:
function
(){
var
property
=
this
;
// var inputs = this.process.propertyListNode.getElements(".editTableInput");
var
inputs
=
this
.
propertyContent
.
getElements
(
"
input
"
);
inputs
.
each
(
function
(
input
){
var
jsondata
=
input
.
get
(
"
name
"
);
},
loadPropertyTab
:
function
(){
var
tabNodes
=
this
.
propertyContent
.
getElements
(
"
.MWFTab
"
);
if
(
tabNodes
.
length
){
var
tmpNode
=
this
.
propertyContent
.
getFirst
();
var
tabAreaNode
=
new
Element
(
"
div
"
,
{
"
styles
"
:
this
.
view
.
css
.
propertyTabNode
}).
inject
(
tmpNode
,
"
before
"
);
MWF
.
require
(
"
MWF.widget.Tab
"
,
function
(){
var
tab
=
new
MWF
.
widget
.
Tab
(
tabAreaNode
,
{
"
style
"
:
"
formPropertyList
"
});
tab
.
load
();
var
tabPages
=
[];
tabNodes
.
each
(
function
(
node
){
var
page
=
tab
.
addTab
(
node
,
node
.
get
(
"
title
"
),
false
);
tabPages
.
push
(
page
);
this
.
setScrollBar
(
page
.
contentNodeArea
,
"
small
"
,
null
,
null
);
}.
bind
(
this
));
tabPages
[
0
].
showTab
();
this
.
propertyTab
=
tab
;
this
.
designer
.
resizeNode
();
}.
bind
(
this
),
false
);
}
},
setEditNodeEvent
:
function
(){
var
property
=
this
;
// var inputs = this.process.propertyListNode.getElements(".editTableInput");
var
inputs
=
this
.
propertyContent
.
getElements
(
"
input
"
);
inputs
.
each
(
function
(
input
){
var
jsondata
=
input
.
get
(
"
name
"
);
if
(
jsondata
&&
jsondata
.
substr
(
0
,
1
)
!=
"
_
"
){
if
(
this
.
module
){
var
id
=
this
.
module
.
json
.
id
;
...
...
@@ -184,36 +184,36 @@ MWF.xApplication.query.ViewDesigner.Property = MWF.FVProperty = new Class({
}
}
}
}.
bind
(
this
));
var
selects
=
this
.
propertyContent
.
getElements
(
"
select
"
);
selects
.
each
(
function
(
select
){
var
jsondata
=
select
.
get
(
"
name
"
);
if
(
jsondata
){
select
.
addEvent
(
"
change
"
,
function
(
e
){
property
.
setSelectValue
(
jsondata
,
this
);
});
}.
bind
(
this
));
var
selects
=
this
.
propertyContent
.
getElements
(
"
select
"
);
selects
.
each
(
function
(
select
){
var
jsondata
=
select
.
get
(
"
name
"
);
if
(
jsondata
){
select
.
addEvent
(
"
change
"
,
function
(
e
){
property
.
setSelectValue
(
jsondata
,
this
);
});
//property.setSelectValue(jsondata, select);
}
});
var
textareas
=
this
.
propertyContent
.
getElements
(
"
textarea
"
);
textareas
.
each
(
function
(
input
){
var
jsondata
=
input
.
get
(
"
name
"
);
if
(
jsondata
){
input
.
addEvent
(
"
change
"
,
function
(
e
){
property
.
setValue
(
jsondata
,
this
.
value
);
});
input
.
addEvent
(
"
blur
"
,
function
(
e
){
property
.
setValue
(
jsondata
,
this
.
value
);
});
}
});
var
textareas
=
this
.
propertyContent
.
getElements
(
"
textarea
"
);
textareas
.
each
(
function
(
input
){
var
jsondata
=
input
.
get
(
"
name
"
);
if
(
jsondata
){
input
.
addEvent
(
"
change
"
,
function
(
e
){
property
.
setValue
(
jsondata
,
this
.
value
);
});
input
.
addEvent
(
"
blur
"
,
function
(
e
){
property
.
setValue
(
jsondata
,
this
.
value
);
});
input
.
addEvent
(
"
keydown
"
,
function
(
e
){
e
.
stopPropagation
();
});
}
}.
bind
(
this
));
},
}
}.
bind
(
this
));
},
loadCalendar
:
function
(
node
,
jsondata
){
MWF
.
require
(
"
MWF.widget.Calendar
"
,
function
(){
this
.
calendar
=
new
MWF
.
widget
.
Calendar
(
node
,
{
...
...
@@ -249,14 +249,14 @@ MWF.xApplication.query.ViewDesigner.Property = MWF.FVProperty = new Class({
}.
bind
(
this
));
o
[
key
[
len
]]
=
value
;
},
setRadioValue
:
function
(
name
,
input
){
if
(
input
.
checked
){
setRadioValue
:
function
(
name
,
input
){
if
(
input
.
checked
){
var
i
=
name
.
indexOf
(
"
*
"
);
var
names
=
(
i
==-
1
)
?
name
.
split
(
"
.
"
)
:
name
.
substr
(
i
+
1
,
name
.
length
).
split
(
"
.
"
);
var
value
=
input
.
value
;
if
(
value
==
"
false
"
)
value
=
false
;
if
(
value
==
"
true
"
)
value
=
true
;
if
(
value
==
"
false
"
)
value
=
false
;
if
(
value
==
"
true
"
)
value
=
true
;
var
oldValue
=
this
.
data
;
for
(
var
idx
=
0
;
idx
<
names
.
length
;
idx
++
){
...
...
@@ -268,32 +268,32 @@ MWF.xApplication.query.ViewDesigner.Property = MWF.FVProperty = new Class({
}
}
//var oldValue = this.data[name];
this
.
changeJsonDate
(
names
,
value
);
//var oldValue = this.data[name];
this
.
changeJsonDate
(
names
,
value
);
this
.
changeData
(
name
,
input
,
oldValue
);
}
},
setCheckboxValue
:
function
(
name
,
input
){
}
},
setCheckboxValue
:
function
(
name
,
input
){
var
id
=
this
.
module
.
json
.
id
;
var
checkboxList
=
$$
(
"
input[name='
"
+
id
+
name
+
"
']
"
);
var
values
=
[];
checkboxList
.
each
(
function
(
checkbox
){
if
(
checkbox
.
get
(
"
checked
"
)){
values
.
push
(
checkbox
.
value
);
}
});
var
oldValue
=
this
.
data
[
name
];
//this.data[name] = values;
var
values
=
[];
checkboxList
.
each
(
function
(
checkbox
){
if
(
checkbox
.
get
(
"
checked
"
)){
values
.
push
(
checkbox
.
value
);
}
});
var
oldValue
=
this
.
data
[
name
];
//this.data[name] = values;
this
.
changeJsonDate
(
name
,
values
);
this
.
changeData
(
name
,
input
,
oldValue
);
},
setSelectValue
:
function
(
name
,
select
){
var
idx
=
select
.
selectedIndex
;
var
options
=
select
.
getElements
(
"
option
"
);
var
value
=
""
;
if
(
options
[
idx
]){
value
=
options
[
idx
].
get
(
"
value
"
);
}
},
setSelectValue
:
function
(
name
,
select
){
var
idx
=
select
.
selectedIndex
;
var
options
=
select
.
getElements
(
"
option
"
);
var
value
=
""
;
if
(
options
[
idx
]){
value
=
options
[
idx
].
get
(
"
value
"
);
}
var
i
=
name
.
indexOf
(
"
*
"
);
var
names
=
(
i
==-
1
)
?
name
.
split
(
"
.
"
)
:
name
.
substr
(
i
+
1
,
name
.
length
).
split
(
"
.
"
);
...
...
@@ -309,13 +309,13 @@ MWF.xApplication.query.ViewDesigner.Property = MWF.FVProperty = new Class({
}
}
//var oldValue = this.data[name];
//this.data[name] = value;
//var oldValue = this.data[name];
//this.data[name] = value;
this
.
changeJsonDate
(
names
,
value
);
this
.
changeData
(
name
,
select
,
oldValue
);
},
setValue
:
function
(
name
,
value
,
obj
){
},
setValue
:
function
(
name
,
value
,
obj
){
var
names
=
name
.
split
(
"
.
"
);
var
oldValue
=
this
.
data
;
for
(
var
idx
=
0
;
idx
<
names
.
length
;
idx
++
){
...
...
@@ -327,23 +327,23 @@ MWF.xApplication.query.ViewDesigner.Property = MWF.FVProperty = new Class({
}
}
//var oldValue = this.data[name];
//this.data[name] = value;
//var oldValue = this.data[name];
//this.data[name] = value;
this
.
changeJsonDate
(
names
,
value
);
this
.
changeData
(
name
,
obj
,
oldValue
);
},
setEditNodeStyles
:
function
(
node
){
var
nodes
=
node
.
getChildren
();
if
(
nodes
.
length
){
nodes
.
each
(
function
(
el
){
var
cName
=
el
.
get
(
"
class
"
);
if
(
cName
){
if
(
this
.
view
.
css
[
cName
])
el
.
setStyles
(
this
.
view
.
css
[
cName
]);
}
this
.
setEditNodeStyles
(
el
);
}.
bind
(
this
));
}
},
},
setEditNodeStyles
:
function
(
node
){
var
nodes
=
node
.
getChildren
();
if
(
nodes
.
length
){
nodes
.
each
(
function
(
el
){
var
cName
=
el
.
get
(
"
class
"
);
if
(
cName
){
if
(
this
.
view
.
css
[
cName
])
el
.
setStyles
(
this
.
view
.
css
[
cName
]);
}
this
.
setEditNodeStyles
(
el
);
}.
bind
(
this
));
}
},
loadScriptArea
:
function
(){
var
scriptAreas
=
this
.
propertyContent
.
getElements
(
"
.MWFScriptArea
"
);
var
formulaAreas
=
this
.
propertyContent
.
getElements
(
"
.MWFFormulaArea
"
);
...
...
@@ -1138,26 +1138,26 @@ MWF.xApplication.query.ViewDesigner.Property.Filter = new Class({
switch
(
this
.
property
.
data
.
type
){
case
"
text
"
:
html
+=
"
<option value=''></option><option value='=='
"
+
((
this
.
data
.
comparison
==
"
==
"
)
?
"
selected
"
:
""
)
+
"
>等于(==)</option>
"
+
"
<option value='!='
"
+
((
this
.
data
.
comparison
==
"
!=
"
)
?
"
selected
"
:
""
)
+
"
>不等于(!=)</option>
"
+
"
<option value='@'
"
+
((
this
.
data
.
comparison
==
"
@
"
)
?
"
selected
"
:
""
)
+
"
>包含(@)</option>
"
;
"
<option value='!='
"
+
((
this
.
data
.
comparison
==
"
!=
"
)
?
"
selected
"
:
""
)
+
"
>不等于(!=)</option>
"
+
"
<option value='@'
"
+
((
this
.
data
.
comparison
==
"
@
"
)
?
"
selected
"
:
""
)
+
"
>包含(@)</option>
"
;
break
;
case
"
date
"
:
html
+=
"
<option value=''></option><option value='>'
"
+
((
this
.
data
.
comparison
==
"
>
"
)
?
"
selected
"
:
""
)
+
"
>大于(>)</option>
"
+
"
<option value='<'
"
+
((
this
.
data
.
comparison
==
"
<
"
)
?
"
selected
"
:
""
)
+
"
>小于(<)</option>
"
+
"
<option value='>='
"
+
((
this
.
data
.
comparison
==
"
>=
"
)
?
"
selected
"
:
""
)
+
"
>大于等于(>=)</option>
"
+
"
<option value='<='
"
+
((
this
.
data
.
comparison
==
"
<=
"
)
?
"
selected
"
:
""
)
+
"
>小于等于(<=)</option>
"
;
"
<option value='<'
"
+
((
this
.
data
.
comparison
==
"
<
"
)
?
"
selected
"
:
""
)
+
"
>小于(<)</option>
"
+
"
<option value='>='
"
+
((
this
.
data
.
comparison
==
"
>=
"
)
?
"
selected
"
:
""
)
+
"
>大于等于(>=)</option>
"
+
"
<option value='<='
"
+
((
this
.
data
.
comparison
==
"
<=
"
)
?
"
selected
"
:
""
)
+
"
>小于等于(<=)</option>
"
;
break
;
case
"
number
"
:
html
+=
"
<option value=''></option><option value='=='
"
+
((
this
.
data
.
comparison
==
"
==
"
)
?
"
selected
"
:
""
)
+
"
>等于(==)</option>
"
+
"
<option value='!='
"
+
((
this
.
data
.
comparison
==
"
!=
"
)
?
"
selected
"
:
""
)
+
"
>不等于(!=)</option>
"
+
"
<option value='>'
"
+
((
this
.
data
.
comparison
==
"
>
"
)
?
"
selected
"
:
""
)
+
"
>大于(>)</option>
"
+
"
<option value='<'
"
+
((
this
.
data
.
comparison
==
"
<
"
)
?
"
selected
"
:
""
)
+
"
>小于(<)</option>
"
+
"
<option value='>='
"
+
((
this
.
data
.
comparison
==
"
>=
"
)
?
"
selected
"
:
""
)
+
"
>大于等于(>=)</option>
"
+
"
<option value='<='
"
+
((
this
.
data
.
comparison
==
"
<=
"
)
?
"
selected
"
:
""
)
+
"
>小于等于(<=)</option>
"
;
"
<option value='!='
"
+
((
this
.
data
.
comparison
==
"
!=
"
)
?
"
selected
"
:
""
)
+
"
>不等于(!=)</option>
"
+
"
<option value='>'
"
+
((
this
.
data
.
comparison
==
"
>
"
)
?
"
selected
"
:
""
)
+
"
>大于(>)</option>
"
+
"
<option value='<'
"
+
((
this
.
data
.
comparison
==
"
<
"
)
?
"
selected
"
:
""
)
+
"
>小于(<)</option>
"
+
"
<option value='>='
"
+
((
this
.
data
.
comparison
==
"
>=
"
)
?
"
selected
"
:
""
)
+
"
>大于等于(>=)</option>
"
+
"
<option value='<='
"
+
((
this
.
data
.
comparison
==
"
<=
"
)
?
"
selected
"
:
""
)
+
"
>小于等于(<=)</option>
"
;
break
;
case
"
boolean
"
:
html
+=
"
<option value=''></option><option value='=='
"
+
((
this
.
data
.
comparison
==
"
==
"
)
?
"
selected
"
:
""
)
+
"
>等于(==)</option>
"
+
"
<option value='!='
"
+
((
this
.
data
.
comparison
==
"
!=
"
)
?
"
selected
"
:
""
)
+
"
>不等于(!=)</option>
"
;
"
<option value='!='
"
+
((
this
.
data
.
comparison
==
"
!=
"
)
?
"
selected
"
:
""
)
+
"
>不等于(!=)</option>
"
;
break
;
}
comparisonSelect
.
set
(
"
html
"
,
html
);
...
...
o2web/source/x_component_query_ViewDesigner/View.js
浏览文件 @
22d25dda
...
...
@@ -438,14 +438,14 @@ MWF.xApplication.query.ViewDesigner.View = new Class({
},
loadViewColumns
:
function
(){
// for (var i=0; i<10; i++){
// for (var i=0; i<10; i++){
if
(
this
.
json
.
data
.
selectList
)
{
this
.
json
.
data
.
selectList
.
each
(
function
(
json
)
{
this
.
items
.
push
(
new
MWF
.
xApplication
.
query
.
ViewDesigner
.
View
.
Column
(
json
,
this
));
}.
bind
(
this
));
}
// }
// }
},
loadViewSelectAllNode
:
function
(){
var
_self
=
this
;
...
...
@@ -569,10 +569,10 @@ MWF.xApplication.query.ViewDesigner.View = new Class({
},
save
:
function
(
callback
){
//if (this.designer.tab.showPage==this.page){
if
(
!
this
.
data
.
name
){
this
.
designer
.
notice
(
this
.
designer
.
lp
.
notice
.
inputName
,
"
error
"
);
return
false
;
}
if
(
!
this
.
data
.
name
){
this
.
designer
.
notice
(
this
.
designer
.
lp
.
notice
.
inputName
,
"
error
"
);
return
false
;
}
//}
this
.
designer
.
actions
.
saveView
(
this
.
data
,
function
(
json
){
this
.
designer
.
notice
(
this
.
designer
.
lp
.
notice
.
save_success
,
"
success
"
,
this
.
node
,
{
"
x
"
:
"
left
"
,
"
y
"
:
"
bottom
"
});
...
...
@@ -685,16 +685,16 @@ MWF.xApplication.query.ViewDesigner.View = new Class({
MWF
.
xApplication
.
query
.
ViewDesigner
.
View
.
Column
=
new
Class
({
initialize
:
function
(
json
,
view
,
next
){
initialize
:
function
(
json
,
view
,
next
){
this
.
propertyPath
=
"
/x_component_query_ViewDesigner/$View/column.html
"
;
this
.
view
=
view
;
this
.
view
=
view
;
this
.
json
=
json
;
this
.
next
=
next
;
this
.
css
=
this
.
view
.
css
;
this
.
content
=
this
.
view
.
viewTitleTrNode
;
this
.
domListNode
=
this
.
view
.
domListNode
;
this
.
load
();
},
},
load
:
function
(){
this
.
areaNode
=
new
Element
(
"
td
"
,
{
"
styles
"
:
this
.
css
.
viewTitleColumnAreaNode
});
this
.
areaNode
.
store
(
"
column
"
,
this
);
...
...
@@ -1536,24 +1536,13 @@ MWF.xApplication.query.ViewDesigner.View.Actionbar = new Class({
// 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
.
Toolbar
(
this
.
toolbarNode
,
{
"
style
"
:
this
.
json
.
style
},
this
);
if
(
!
this
.
json
.
actionStyles
)
this
.
json
.
actionStyles
=
Object
.
clone
(
this
.
toolbarWidget
.
css
);
this
.
toolbarWidget
.
css
=
this
.
json
.
actionStyles
;
this
.
toolbarNode
=
this
.
node
.
getFirst
(
"
div
"
);
this
.
toolbarNode
.
empty
();
this
.
toolbarWidget
=
new
MWF
.
widget
.
Toolbar
(
this
.
toolbarNode
,
{
"
style
"
:
this
.
json
.
style
},
this
);
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
;
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
);
...
...
@@ -1562,8 +1551,19 @@ MWF.xApplication.query.ViewDesigner.View.Actionbar = new Class({
}
this
.
toolbarWidget
.
load
();
//json = null;
}.
bind
(
this
),
false
);
}
}
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
);
}
//}
},
...
...
@@ -1572,28 +1572,17 @@ MWF.xApplication.query.ViewDesigner.View.Actionbar = new Class({
// 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
.
Toolbar
(
this
.
toolbarNode
,
{
"
style
"
:
this
.
json
.
style
},
this
);
if
(
!
this
.
json
.
actionStyles
){
this
.
json
.
actionStyles
=
Object
.
clone
(
this
.
toolbarWidget
.
css
);
}
else
{
this
.
toolbarWidget
.
css
=
Object
.
merge
(
Object
.
clone
(
this
.
json
.
actionStyles
),
this
.
toolbarWidget
.
css
);
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
);
if
(
this
.
json
.
tools
){
this
.
setCustomToolbars
(
Array
.
clone
(
this
.
json
.
tools
),
this
.
toolbarNode
);
this
.
toolbarNode
=
this
.
node
.
getFirst
(
"
div
"
);
this
.
toolbarNode
.
empty
();
this
.
toolbarWidget
=
new
MWF
.
widget
.
Toolbar
(
this
.
toolbarNode
,
{
"
style
"
:
this
.
json
.
style
},
this
);
if
(
!
this
.
json
.
actionStyles
){
this
.
json
.
actionStyles
=
Object
.
clone
(
this
.
toolbarWidget
.
css
);
}
else
{
this
.
toolbarWidget
.
css
=
Object
.
merge
(
Object
.
clone
(
this
.
json
.
actionStyles
),
this
.
toolbarWidget
.
css
);
this
.
json
.
actionStyles
=
Object
.
clone
(
this
.
toolbarWidget
.
css
);
}
this
.
toolbarWidget
.
load
();
//json = null;
}
else
{
MWF
.
getJSON
(
this
.
path
+
"
toolbars.json
"
,
function
(
json
){
this
.
json
.
defaultTools
=
json
;
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
);
...
...
@@ -1602,8 +1591,19 @@ MWF.xApplication.query.ViewDesigner.View.Actionbar = new Class({
}
this
.
toolbarWidget
.
load
();
//json = null;
}.
bind
(
this
),
false
);
}
}
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
);
}
//}
},
setToolbars
:
function
(
tools
,
node
){
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录