Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
fuyue82
o2oa
提交
c202a061
o2oa
项目概览
fuyue82
/
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,发现更多精彩内容 >>
提交
c202a061
编写于
10月 12, 2020
作者:
NoSubject
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
表单默认值支持异步处理
上级
56b4459a
变更
7
展开全部
隐藏空白更改
内联
并排
Showing
7 changed file
with
327 addition
and
231 deletion
+327
-231
o2web/source/o2_core/o2/xScript/Environment.js
o2web/source/o2_core/o2/xScript/Environment.js
+110
-86
o2web/source/x_component_process_FormDesigner/Module/Checkbox/checkbox.html
...ponent_process_FormDesigner/Module/Checkbox/checkbox.html
+9
-8
o2web/source/x_component_process_FormDesigner/Module/Radio/radio.html
.../x_component_process_FormDesigner/Module/Radio/radio.html
+9
-8
o2web/source/x_component_process_FormDesigner/Module/Select/select.html
..._component_process_FormDesigner/Module/Select/select.html
+38
-38
o2web/source/x_component_process_ProcessDesigner/$Process/flat/css.wcss
..._component_process_ProcessDesigner/$Process/flat/css.wcss
+1
-2
o2web/source/x_component_process_Xform/Checkbox.js
o2web/source/x_component_process_Xform/Checkbox.js
+80
-45
o2web/source/x_component_process_Xform/Radio.js
o2web/source/x_component_process_Xform/Radio.js
+80
-44
未找到文件。
o2web/source/o2_core/o2/xScript/Environment.js
浏览文件 @
c202a061
此差异已折叠。
点击以展开。
o2web/source/x_component_process_FormDesigner/Module/Checkbox/checkbox.html
浏览文件 @
c202a061
...
...
@@ -13,13 +13,6 @@
<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
class=
"editTableRadio"
onclick=
"if (this.checked){ $('text{$.pid}selectEditItemValues').setStyle('display', 'block'); $('text{$.pid}selectEditItemScript').setStyle('display', 'none')}"
name=
"itemType"
text
{($
.itemType=
='values')?'checked':''}
type=
"radio"
value=
"values"
/>
固定值
<input
class=
"editTableRadio"
onclick=
"if (this.checked){ $('text{$.pid}selectEditItemScript').setStyle('display', 'block'); $('text{$.pid}selectEditItemValues').setStyle('display', 'none')}"
name=
"itemType"
text
{($
.itemType=
='script')?'checked':''}
type=
"radio"
value=
"script"
/>
脚本
</td>
</tr>
<tr>
<td
class=
"editTableTitle"
>
是否只读:
</td>
<td
class=
"editTableValue"
>
...
...
@@ -27,6 +20,14 @@
<input
type=
"radio"
name=
"isReadonly"
value=
"false"
text
{(!$.
isReadonly
)?'
checked
'
:
''}
/>
否
</td>
</tr>
<tr>
<td
class=
"editTableTitle"
>
可选值:
</td>
<td
class=
"editTableValue"
>
<input
class=
"editTableRadio"
onclick=
"if (this.checked){ $('text{$.pid}selectEditItemValues').setStyle('display', 'block'); $('text{$.pid}selectEditItemScript').setStyle('display', 'none')}"
name=
"itemType"
text
{($
.itemType=
='values')?'checked':''}
type=
"radio"
value=
"values"
/>
固定值
<input
class=
"editTableRadio"
onclick=
"if (this.checked){ $('text{$.pid}selectEditItemScript').setStyle('display', 'block'); $('text{$.pid}selectEditItemValues').setStyle('display', 'none')}"
name=
"itemType"
text
{($
.itemType=
='script')?'checked':''}
type=
"radio"
value=
"script"
/>
脚本
</td>
</tr>
</table>
<div
id=
"text{$.pid}selectEditItemValues"
style=
"display: text{($.itemType=='values')?'block':'none'}"
class=
"MWFArraylist"
name=
"itemValues"
title=
"可选值"
></div>
...
...
@@ -90,4 +91,4 @@
<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
</div>
o2web/source/x_component_process_FormDesigner/Module/Radio/radio.html
浏览文件 @
c202a061
...
...
@@ -13,13 +13,6 @@
<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
class=
"editTableRadio"
onclick=
"if (this.checked){ $('text{$.pid}selectEditItemValues').setStyle('display', 'block'); $('text{$.pid}selectEditItemScript').setStyle('display', 'none')}"
name=
"itemType"
text
{($
.itemType=
='values')?'checked':''}
type=
"radio"
value=
"values"
/>
固定值
<input
class=
"editTableRadio"
onclick=
"if (this.checked){ $('text{$.pid}selectEditItemScript').setStyle('display', 'block'); $('text{$.pid}selectEditItemValues').setStyle('display', 'none')}"
name=
"itemType"
text
{($
.itemType=
='script')?'checked':''}
type=
"radio"
value=
"script"
/>
脚本
</td>
</tr>
<tr>
<td
class=
"editTableTitle"
>
是否只读:
</td>
<td
class=
"editTableValue"
>
...
...
@@ -27,6 +20,14 @@
<input
type=
"radio"
name=
"isReadonly"
value=
"false"
text
{(!$.
isReadonly
)?'
checked
'
:
''}
/>
否
</td>
</tr>
<tr>
<td
class=
"editTableTitle"
>
可选值:
</td>
<td
class=
"editTableValue"
>
<input
class=
"editTableRadio"
onclick=
"if (this.checked){ $('text{$.pid}selectEditItemValues').setStyle('display', 'block'); $('text{$.pid}selectEditItemScript').setStyle('display', 'none')}"
name=
"itemType"
text
{($
.itemType=
='values')?'checked':''}
type=
"radio"
value=
"values"
/>
固定值
<input
class=
"editTableRadio"
onclick=
"if (this.checked){ $('text{$.pid}selectEditItemScript').setStyle('display', 'block'); $('text{$.pid}selectEditItemValues').setStyle('display', 'none')}"
name=
"itemType"
text
{($
.itemType=
='script')?'checked':''}
type=
"radio"
value=
"script"
/>
脚本
</td>
</tr>
</table>
<div
id=
"text{$.pid}selectEditItemValues"
style=
"display: text{($.itemType=='values')?'block':'none'}"
class=
"MWFArraylist"
name=
"itemValues"
title=
"可选值"
></div>
...
...
@@ -90,4 +91,4 @@
<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
</div>
o2web/source/x_component_process_FormDesigner/Module/Select/select.html
浏览文件 @
c202a061
<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
class=
"editTableRadio"
onclick=
"if (this.checked){ $('text{$.pid}selectEditItemValues').setStyle('display', 'block'); $('text{$.pid}selectEditItemScript').setStyle('display', 'none')}"
name=
"itemType"
text
{($
.itemType=
='values')?'checked':''}
type=
"radio"
value=
"values"
/>
固定值
<input
class=
"editTableRadio"
onclick=
"if (this.checked){ $('text{$.pid}selectEditItemScript').setStyle('display', 'block'); $('text{$.pid}selectEditItemValues').setStyle('display', 'none')}"
name=
"itemType"
text
{($
.itemType=
='script')?'checked':''}
type=
"radio"
value=
"script"
/>
脚本
</td>
</tr>
<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"
>
...
...
@@ -27,14 +20,21 @@
<input
type=
"radio"
name=
"isReadonly"
value=
"false"
text
{(!$.
isReadonly
)?'
checked
'
:
''}
/>
否
</td>
</tr>
</table>
<div
id=
"text{$.pid}selectEditItemValues"
style=
"display: text{($.itemType=='values')?'block':'none'}"
class=
"MWFArraylist"
name=
"itemValues"
title=
"可选值"
></div>
<div
id=
"text{$.pid}selectEditItemScript"
style=
"display: text{($.itemType=='script')?'block':'none'}"
class=
"MWFScriptArea"
name=
"itemScript"
title=
"可选值脚本 (S)"
></div>
<div
class=
"MWFMaplist"
name=
"styles"
title=
"样式"
></div>
<tr>
<td
class=
"editTableTitle"
>
可选值:
</td>
<td
class=
"editTableValue"
>
<input
class=
"editTableRadio"
onclick=
"if (this.checked){ $('text{$.pid}selectEditItemValues').setStyle('display', 'block'); $('text{$.pid}selectEditItemScript').setStyle('display', 'none')}"
name=
"itemType"
text
{($
.itemType=
='values')?'checked':''}
type=
"radio"
value=
"values"
/>
固定值
<input
class=
"editTableRadio"
onclick=
"if (this.checked){ $('text{$.pid}selectEditItemScript').setStyle('display', 'block'); $('text{$.pid}selectEditItemValues').setStyle('display', 'none')}"
name=
"itemType"
text
{($
.itemType=
='script')?'checked':''}
type=
"radio"
value=
"script"
/>
脚本
</td>
</tr>
</table>
<div
id=
"text{$.pid}selectEditItemValues"
style=
"display: text{($.itemType=='values')?'block':'none'}"
class=
"MWFArraylist"
name=
"itemValues"
title=
"可选值"
></div>
<div
id=
"text{$.pid}selectEditItemScript"
style=
"display: text{($.itemType=='script')?'block':'none'}"
class=
"MWFScriptArea"
name=
"itemScript"
title=
"可选值脚本 (S)"
></div>
<div
class=
"MWFMaplist"
name=
"styles"
title=
"样式"
></div>
<div
class=
"MWFMaplist"
name=
"inputStyles"
title=
"Select样式"
></div>
<div
class=
"MWFMaplist"
name=
"properties"
title=
"属性"
></div>
<div
class=
"MWFMaplist"
name=
"properties"
title=
"属性"
></div>
<table
width=
"100%"
border=
"0"
cellpadding=
"5"
cellspacing=
"0"
class=
"editTable"
>
<tr>
...
...
@@ -46,12 +46,12 @@
</td>
</tr>
</table>
<div
class=
"MWFScriptArea"
name=
"defaultValue"
title=
"默认值 (S)"
></div>
<div
class=
"MWFScriptArea"
name=
"defaultValue"
title=
"默认值 (S)"
></div>
<div
class=
"MWFValidation"
name=
"validationConfig"
></div>
<div
class=
"MWFScriptArea"
name=
"validation"
title=
"校验脚本 (S)"
></div>
</div>
</div>
<div
title=
"区段"
class=
"MWFTab"
>
<table
width=
"100%"
border=
"0"
cellpadding=
"5"
cellspacing=
"0"
class=
"editTable"
>
<tr>
...
...
@@ -81,13 +81,13 @@
</div>
</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=
"事件"
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
</div>
o2web/source/x_component_process_ProcessDesigner/$Process/flat/css.wcss
浏览文件 @
c202a061
...
...
@@ -838,8 +838,7 @@
"font-size": "12px",
"height": "24px",
"line-height": "24px",
"border-bottom": "1px dashed #CCC",
"word-break":"keep-all"
"border-bottom": "1px dashed #CCC"
},
"editTableHeadTitle": {
"color": "#bf6364",
...
...
o2web/source/x_component_process_Xform/Checkbox.js
浏览文件 @
c202a061
...
...
@@ -93,57 +93,79 @@ MWF.xApplication.process.Xform.Checkbox = MWF.APPCheckbox = new Class({
}
//return [];
},
setOptions
:
function
(){
var
radioValues
=
this
.
getOptions
();
if
(
!
radioValues
)
radioValues
=
[];
if
(
o2
.
typeOf
(
radioValues
)
===
"
array
"
){
var
flag
=
(
new
MWF
.
widget
.
UUID
).
toString
();
radioValues
.
each
(
function
(
item
){
var
tmps
=
item
.
split
(
"
|
"
);
var
text
=
tmps
[
0
];
var
value
=
tmps
[
1
]
||
text
;
var
radio
=
new
Element
(
"
input
"
,
{
"
type
"
:
"
checkbox
"
,
"
name
"
:
((
this
.
json
.
properties
)
?
this
.
json
.
properties
.
name
:
null
)
||
flag
+
this
.
json
.
id
,
"
value
"
:
value
,
"
showText
"
:
text
,
"
styles
"
:
this
.
json
.
buttonStyles
}).
inject
(
this
.
node
);
//radio.appendText(text, "after");
setOptions
:
function
(){
var
optionItems
=
this
.
getOptions
();
this
.
_setOptions
(
optionItems
);
},
_setOptions
:
function
(
optionItems
){
this
.
moduleSelectAG
=
o2
.
AG
.
all
(
optionItems
).
then
(
function
(
radioValues
){
this
.
moduleSelectAG
=
null
;
if
(
!
radioValues
)
radioValues
=
[];
if
(
o2
.
typeOf
(
radioValues
)
===
"
array
"
){
var
flag
=
(
new
MWF
.
widget
.
UUID
).
toString
();
radioValues
.
each
(
function
(
item
){
var
tmps
=
item
.
split
(
"
|
"
);
var
text
=
tmps
[
0
];
var
value
=
tmps
[
1
]
||
text
;
var
textNode
=
new
Element
(
"
span
"
,
{
"
text
"
:
text
,
"
styles
"
:
{
"
cursor
"
:
"
default
"
}
}).
inject
(
this
.
node
);
textNode
.
addEvent
(
"
click
"
,
function
(
ev
){
if
(
this
.
radio
.
get
(
"
disabled
"
)
===
true
||
this
.
radio
.
get
(
"
disabled
"
)
===
"
true
"
)
return
;
this
.
radio
.
checked
=
!
this
.
radio
.
checked
;
this
.
radio
.
fireEvent
(
"
change
"
);
this
.
radio
.
fireEvent
(
"
click
"
);
}.
bind
(
{
radio
:
radio
}
)
);
var
radio
=
new
Element
(
"
input
"
,
{
"
type
"
:
"
checkbox
"
,
"
name
"
:
((
this
.
json
.
properties
)
?
this
.
json
.
properties
.
name
:
null
)
||
flag
+
this
.
json
.
id
,
"
value
"
:
value
,
"
showText
"
:
text
,
"
styles
"
:
this
.
json
.
buttonStyles
}).
inject
(
this
.
node
);
//radio.appendText(text, "after");
radio
.
addEvent
(
"
click
"
,
function
(){
this
.
validationMode
();
if
(
this
.
validation
())
this
.
_setBusinessData
(
this
.
getInputData
(
"
change
"
)
||
[]);
}.
bind
(
this
));
var
textNode
=
new
Element
(
"
span
"
,
{
"
text
"
:
text
,
"
styles
"
:
{
"
cursor
"
:
"
default
"
}
}).
inject
(
this
.
node
);
textNode
.
addEvent
(
"
click
"
,
function
(
ev
){
if
(
this
.
radio
.
get
(
"
disabled
"
)
===
true
||
this
.
radio
.
get
(
"
disabled
"
)
===
"
true
"
)
return
;
this
.
radio
.
checked
=
!
this
.
radio
.
checked
;
this
.
radio
.
fireEvent
(
"
change
"
);
this
.
radio
.
fireEvent
(
"
click
"
);
}.
bind
(
{
radio
:
radio
}
)
);
radio
.
addEvent
(
"
click
"
,
function
(){
this
.
validationMode
();
if
(
this
.
validation
())
this
.
_setBusinessData
(
this
.
getInputData
(
"
change
"
)
||
[]);
}.
bind
(
this
));
Object
.
each
(
this
.
json
.
events
,
function
(
e
,
key
){
if
(
e
.
code
){
if
(
this
.
options
.
moduleEvents
.
indexOf
(
key
)
!=-
1
){
}
else
{
radio
.
addEvent
(
key
,
function
(
event
){
return
this
.
form
.
Macro
.
fire
(
e
.
code
,
this
,
event
);
}.
bind
(
this
));
Object
.
each
(
this
.
json
.
events
,
function
(
e
,
key
){
if
(
e
.
code
){
if
(
this
.
options
.
moduleEvents
.
indexOf
(
key
)
!=-
1
){
}
else
{
radio
.
addEvent
(
key
,
function
(
event
){
return
this
.
form
.
Macro
.
fire
(
e
.
code
,
this
,
event
);
}.
bind
(
this
));
}
}
}
}.
bind
(
this
));
}.
bind
(
this
));
}.
bind
(
this
));
}
}.
bind
(
this
));
}
}.
bind
(
this
));
},
_setValue
:
function
(
value
){
this
.
moduleValueAG
=
o2
.
AG
.
all
(
value
).
then
(
function
(
v
){
if
(
this
.
moduleSelectAG
){
this
.
moduleValueAG
=
this
.
moduleSelectAG
;
this
.
moduleSelectAG
.
then
(
function
(){
this
.
__setValue
(
v
);
}.
bind
(
this
));
}
else
{
this
.
__setValue
(
v
)
}
return
v
;
}.
bind
(
this
));
},
__setValue
:
function
(
value
){
this
.
_setBusinessData
(
value
);
var
radios
=
this
.
node
.
getElements
(
"
input
"
);
for
(
var
i
=
0
;
i
<
radios
.
length
;
i
++
){
...
...
@@ -208,7 +230,20 @@ MWF.xApplication.process.Xform.Checkbox = MWF.APPCheckbox = new Class({
resetData
:
function
(){
this
.
setData
(
this
.
getValue
());
},
setData
:
function
(
data
){
setData
:
function
(
data
){
if
(
data
&&
data
.
isAG
){
this
.
moduleValueAG
=
data
;
data
.
addResolve
(
function
(
v
){
this
.
setData
(
v
);
}.
bind
(
this
));
}
else
{
this
.
__setData
(
data
);
this
.
moduleValueAG
=
null
;
}
},
__setData
:
function
(
data
){
this
.
_setBusinessData
(
data
);
var
inputs
=
this
.
node
.
getElements
(
"
input
"
);
...
...
@@ -319,4 +354,4 @@ MWF.xApplication.process.Xform.Checkbox = MWF.APPCheckbox = new Class({
return
true
;
}
});
\ No newline at end of file
});
o2web/source/x_component_process_Xform/Radio.js
浏览文件 @
c202a061
...
...
@@ -100,56 +100,79 @@ MWF.xApplication.process.Xform.Radio = MWF.APPRadio = new Class({
}
return
[];
},
setOptions
:
function
(){
var
radioValues
=
this
.
getOptions
();
if
(
!
radioValues
)
radioValues
=
[];
if
(
o2
.
typeOf
(
radioValues
)
===
"
array
"
){
var
flag
=
(
new
MWF
.
widget
.
UUID
).
toString
();
radioValues
.
each
(
function
(
item
){
var
tmps
=
item
.
split
(
"
|
"
);
var
text
=
tmps
[
0
];
var
value
=
tmps
[
1
]
||
text
;
setOptions
:
function
(){
var
optionItems
=
this
.
getOptions
();
this
.
_setOptions
(
optionItems
);
},
var
radio
=
new
Element
(
"
input
"
,
{
"
type
"
:
"
radio
"
,
"
name
"
:
(
this
.
json
.
properties
&&
this
.
json
.
properties
.
name
)
?
this
.
json
.
properties
.
name
:
flag
+
this
.
json
.
id
,
"
value
"
:
value
,
"
showText
"
:
text
,
"
styles
"
:
this
.
json
.
buttonStyles
}).
inject
(
this
.
node
);
//radio.appendText(text, "after");
_setOptions
:
function
(
optionItems
){
this
.
moduleSelectAG
=
o2
.
AG
.
all
(
optionItems
).
then
(
function
(
radioValues
){
this
.
moduleSelectAG
=
null
;
var
textNode
=
new
Element
(
"
span
"
,
{
"
text
"
:
text
,
"
styles
"
:
{
"
cursor
"
:
"
default
"
}
}).
inject
(
this
.
node
);
textNode
.
addEvent
(
"
click
"
,
function
(
ev
){
if
(
this
.
radio
.
get
(
"
disabled
"
)
===
true
||
this
.
radio
.
get
(
"
disabled
"
)
===
"
true
"
)
return
;
this
.
radio
.
checked
=
true
;
this
.
radio
.
fireEvent
(
"
change
"
);
this
.
radio
.
fireEvent
(
"
click
"
);
}.
bind
(
{
radio
:
radio
}
)
);
if
(
!
radioValues
)
radioValues
=
[];
if
(
o2
.
typeOf
(
radioValues
)
===
"
array
"
){
var
flag
=
(
new
MWF
.
widget
.
UUID
).
toString
();
radioValues
.
each
(
function
(
item
){
var
tmps
=
item
.
split
(
"
|
"
);
var
text
=
tmps
[
0
];
var
value
=
tmps
[
1
]
||
text
;
radio
.
addEvent
(
"
click
"
,
function
(){
this
.
validationMode
();
if
(
this
.
validation
())
this
.
_setBusinessData
(
this
.
getInputData
(
"
change
"
));
}.
bind
(
this
));
var
radio
=
new
Element
(
"
input
"
,
{
"
type
"
:
"
radio
"
,
"
name
"
:
(
this
.
json
.
properties
&&
this
.
json
.
properties
.
name
)
?
this
.
json
.
properties
.
name
:
flag
+
this
.
json
.
id
,
"
value
"
:
value
,
"
showText
"
:
text
,
"
styles
"
:
this
.
json
.
buttonStyles
}).
inject
(
this
.
node
);
//radio.appendText(text, "after");
var
textNode
=
new
Element
(
"
span
"
,
{
"
text
"
:
text
,
"
styles
"
:
{
"
cursor
"
:
"
default
"
}
}).
inject
(
this
.
node
);
textNode
.
addEvent
(
"
click
"
,
function
(
ev
){
if
(
this
.
radio
.
get
(
"
disabled
"
)
===
true
||
this
.
radio
.
get
(
"
disabled
"
)
===
"
true
"
)
return
;
this
.
radio
.
checked
=
true
;
this
.
radio
.
fireEvent
(
"
change
"
);
this
.
radio
.
fireEvent
(
"
click
"
);
}.
bind
(
{
radio
:
radio
}
)
);
radio
.
addEvent
(
"
click
"
,
function
(){
this
.
validationMode
();
if
(
this
.
validation
())
this
.
_setBusinessData
(
this
.
getInputData
(
"
change
"
));
}.
bind
(
this
));
Object
.
each
(
this
.
json
.
events
,
function
(
e
,
key
){
if
(
e
.
code
){
if
(
this
.
options
.
moduleEvents
.
indexOf
(
key
)
!=-
1
){
}
else
{
radio
.
addEvent
(
key
,
function
(
event
){
return
this
.
form
.
Macro
.
fire
(
e
.
code
,
this
,
event
);
}.
bind
(
this
));
Object
.
each
(
this
.
json
.
events
,
function
(
e
,
key
){
if
(
e
.
code
){
if
(
this
.
options
.
moduleEvents
.
indexOf
(
key
)
!=-
1
){
}
else
{
radio
.
addEvent
(
key
,
function
(
event
){
return
this
.
form
.
Macro
.
fire
(
e
.
code
,
this
,
event
);
}.
bind
(
this
));
}
}
}
}
.
bind
(
this
));
}.
bind
(
this
));
}.
bind
(
this
));
}
}
}.
bind
(
this
))
},
_setValue
:
function
(
value
){
_setValue
:
function
(
value
){
this
.
moduleValueAG
=
o2
.
AG
.
all
(
value
).
then
(
function
(
v
){
if
(
this
.
moduleSelectAG
){
this
.
moduleValueAG
=
this
.
moduleSelectAG
;
this
.
moduleSelectAG
.
then
(
function
(){
this
.
__setValue
(
v
);
}.
bind
(
this
));
}
else
{
this
.
__setValue
(
v
)
}
return
v
;
}.
bind
(
this
));
},
__setValue
:
function
(
value
){
this
.
_setBusinessData
(
value
);
var
radios
=
this
.
node
.
getElements
(
"
input
"
);
for
(
var
i
=
0
;
i
<
radios
.
length
;
i
++
){
...
...
@@ -206,7 +229,20 @@ MWF.xApplication.process.Xform.Radio = MWF.APPRadio = new Class({
}
return
null
;
},
setData
:
function
(
data
){
setData
:
function
(
data
){
if
(
data
&&
data
.
isAG
){
this
.
moduleValueAG
=
data
;
data
.
addResolve
(
function
(
v
){
this
.
setData
(
v
);
}.
bind
(
this
));
}
else
{
this
.
__setData
(
data
);
this
.
moduleValueAG
=
null
;
}
},
__setData
:
function
(
data
){
this
.
_setBusinessData
(
data
);
var
inputs
=
this
.
node
.
getElements
(
"
input
"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录