Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
b9fadc7e
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,发现更多精彩内容 >>
提交
b9fadc7e
编写于
5月 23, 2022
作者:
U
unknown
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
单选和复选按钮增加每行选项数配置
上级
c9829920
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
128 addition
and
16 deletion
+128
-16
o2web/source/x_component_cms_FormDesigner/Module/Checkbox/checkbox.html
..._component_cms_FormDesigner/Module/Checkbox/checkbox.html
+8
-0
o2web/source/x_component_cms_FormDesigner/Module/Radio/radio.html
...urce/x_component_cms_FormDesigner/Module/Radio/radio.html
+8
-0
o2web/source/x_component_portal_PageDesigner/Module/Checkbox/checkbox.html
...mponent_portal_PageDesigner/Module/Checkbox/checkbox.html
+8
-0
o2web/source/x_component_portal_PageDesigner/Module/Checkbox/template.json
...mponent_portal_PageDesigner/Module/Checkbox/template.json
+1
-0
o2web/source/x_component_portal_PageDesigner/Module/Radio/radio.html
...e/x_component_portal_PageDesigner/Module/Radio/radio.html
+8
-0
o2web/source/x_component_portal_PageDesigner/Module/Radio/template.json
..._component_portal_PageDesigner/Module/Radio/template.json
+1
-0
o2web/source/x_component_process_FormDesigner/Module/Checkbox/checkbox.html
...ponent_process_FormDesigner/Module/Checkbox/checkbox.html
+11
-3
o2web/source/x_component_process_FormDesigner/Module/Checkbox/template.json
...ponent_process_FormDesigner/Module/Checkbox/template.json
+1
-0
o2web/source/x_component_process_FormDesigner/Module/Radio/radio.html
.../x_component_process_FormDesigner/Module/Radio/radio.html
+8
-0
o2web/source/x_component_process_FormDesigner/Module/Radio/template.json
...component_process_FormDesigner/Module/Radio/template.json
+1
-0
o2web/source/x_component_process_FormDesigner/lp/en.js
o2web/source/x_component_process_FormDesigner/lp/en.js
+2
-1
o2web/source/x_component_process_FormDesigner/lp/zh-cn.js
o2web/source/x_component_process_FormDesigner/lp/zh-cn.js
+2
-1
o2web/source/x_component_process_Xform/Checkbox.js
o2web/source/x_component_process_Xform/Checkbox.js
+45
-7
o2web/source/x_component_process_Xform/Radio.js
o2web/source/x_component_process_Xform/Radio.js
+24
-4
未找到文件。
o2web/source/x_component_cms_FormDesigner/Module/Checkbox/checkbox.html
浏览文件 @
b9fadc7e
...
...
@@ -20,6 +20,14 @@
<input
type=
"radio"
name=
"isReadonly"
value=
"false"
text
{(!$.
isReadonly
)?'
checked
'
:
''}
/>
{{$.lp.no}}
</td>
</tr>
<tr>
<td
class=
"editTableTitle"
>
{{$.lp.countPerline}}:
</td>
<td
class=
"editTableValue"
>
<input
type=
"text"
name=
"countPerline"
value=
"text{$.countPerline}"
class=
"editTableInput"
onkeyup=
"this.value=this.value.replace(/[^\d]/g,'')"
/>
<div
style=
"color:#999999; padding:5px;"
>
{{$.lp.countPerlineNote}}
</div>
</td>
</td>
</tr>
<tr>
<td
class=
"editTableTitle"
>
{{$.lp.options}}:
</td>
<td
class=
"editTableValue"
>
...
...
o2web/source/x_component_cms_FormDesigner/Module/Radio/radio.html
浏览文件 @
b9fadc7e
...
...
@@ -20,6 +20,14 @@
<input
type=
"radio"
name=
"isReadonly"
value=
"false"
text
{(!$.
isReadonly
)?'
checked
'
:
''}
/>
{{$.lp.no}}
</td>
</tr>
<tr>
<td
class=
"editTableTitle"
>
{{$.lp.countPerline}}:
</td>
<td
class=
"editTableValue"
>
<input
type=
"text"
name=
"countPerline"
value=
"text{$.countPerline}"
class=
"editTableInput"
onkeyup=
"this.value=this.value.replace(/[^\d]/g,'')"
/>
<div
style=
"color:#999999; padding:5px;"
>
{{$.lp.countPerlineNote}}
</div>
</td>
</td>
</tr>
<tr>
<td
class=
"editTableTitle"
>
{{$.lp.options}}:
</td>
<td
class=
"editTableValue"
>
...
...
o2web/source/x_component_portal_PageDesigner/Module/Checkbox/checkbox.html
浏览文件 @
b9fadc7e
...
...
@@ -19,6 +19,14 @@
<input
type=
"radio"
name=
"isReadonly"
value=
"true"
text
{($.
isReadonly
)?'
checked
'
:
''}
/>
{{$.lp.yes}}
<input
type=
"radio"
name=
"isReadonly"
value=
"false"
text
{(!$.
isReadonly
)?'
checked
'
:
''}
/>
{{$.lp.no}}
</td>
</tr>
<tr>
<td
class=
"editTableTitle"
>
{{$.lp.countPerline}}:
</td>
<td
class=
"editTableValue"
>
<input
type=
"text"
name=
"countPerline"
value=
"text{$.countPerline}"
class=
"editTableInput"
onkeyup=
"this.value=this.value.replace(/[^\d]/g,'')"
/>
<div
style=
"color:#999999; padding:5px;"
>
{{$.lp.countPerlineNote}}
</div>
</td>
</td>
</tr>
<tr>
<td
class=
"editTableTitle"
>
{{$.lp.options}}:
</td>
...
...
o2web/source/x_component_portal_PageDesigner/Module/Checkbox/template.json
浏览文件 @
b9fadc7e
...
...
@@ -5,6 +5,7 @@
"description"
:
""
,
"itemType"
:
"values"
,
"itemValues"
:
[],
"countPerline"
:
"0"
,
"compute"
:
"create"
,
//create
,
show
,
save
"section"
:
"no"
,
"sectionBy"
:
"person"
,
...
...
o2web/source/x_component_portal_PageDesigner/Module/Radio/radio.html
浏览文件 @
b9fadc7e
...
...
@@ -19,6 +19,14 @@
<input
type=
"radio"
name=
"isReadonly"
value=
"true"
text
{($.
isReadonly
)?'
checked
'
:
''}
/>
{{$.lp.yes}}
<input
type=
"radio"
name=
"isReadonly"
value=
"false"
text
{(!$.
isReadonly
)?'
checked
'
:
''}
/>
{{$.lp.no}}
</td>
</tr>
<tr>
<td
class=
"editTableTitle"
>
{{$.lp.countPerline}}:
</td>
<td
class=
"editTableValue"
>
<input
type=
"text"
name=
"countPerline"
value=
"text{$.countPerline}"
class=
"editTableInput"
onkeyup=
"this.value=this.value.replace(/[^\d]/g,'')"
/>
<div
style=
"color:#999999; padding:5px;"
>
{{$.lp.countPerlineNote}}
</div>
</td>
</td>
</tr>
<tr>
<td
class=
"editTableTitle"
>
{{$.lp.options}}:
</td>
...
...
o2web/source/x_component_portal_PageDesigner/Module/Radio/template.json
浏览文件 @
b9fadc7e
...
...
@@ -5,6 +5,7 @@
"description"
:
""
,
"itemType"
:
"values"
,
"itemValues"
:
[],
"countPerline"
:
"0"
,
"itemScript"
:
{
"code"
:
""
,
"html"
:
""
...
...
o2web/source/x_component_process_FormDesigner/Module/Checkbox/checkbox.html
浏览文件 @
b9fadc7e
...
...
@@ -20,11 +20,19 @@
<input
type=
"radio"
name=
"isReadonly"
value=
"false"
text
{(!$.
isReadonly
)?'
checked
'
:
''}
/>
{{$.lp.no}}
</td>
</tr>
<!-- <tr>-->
<!-- <td class="editTableTitle">{{$.lp.newline}}:</td>-->
<!-- <td class="editTableValue">-->
<!-- <input type="radio" name="newline" value="true" text{($.newline)?'checked':''}/>{{$.lp.yes}}-->
<!-- <input type="radio" name="newline" value="false" text{(!$.newline)?'checked':''}/>{{$.lp.no}}-->
<!-- </td>-->
<!-- </tr>-->
<tr>
<td
class=
"editTableTitle"
>
{{$.lp.
new
line}}:
</td>
<td
class=
"editTableTitle"
>
{{$.lp.
countPer
line}}:
</td>
<td
class=
"editTableValue"
>
<input
type=
"radio"
name=
"newline"
value=
"true"
text
{($.
newline
)?'
checked
'
:
''}
/>
{{$.lp.yes}}
<input
type=
"radio"
name=
"newline"
value=
"false"
text
{(!$.
newline
)?'
checked
'
:
''}
/>
{{$.lp.no}}
<input
type=
"text"
name=
"countPerline"
value=
"text{$.countPerline}"
class=
"editTableInput"
onkeyup=
"this.value=this.value.replace(/[^\d]/g,'')"
/>
<div
style=
"color:#999999; padding:5px;"
>
{{$.lp.countPerlineNote}}
</div>
</td>
</td>
</tr>
<tr>
...
...
o2web/source/x_component_process_FormDesigner/Module/Checkbox/template.json
浏览文件 @
b9fadc7e
...
...
@@ -5,6 +5,7 @@
"description"
:
""
,
"itemType"
:
"values"
,
"itemValues"
:
[],
"countPerline"
:
"0"
,
"compute"
:
"create"
,
//create
,
show
,
save
"section"
:
"no"
,
"sectionBy"
:
"person"
,
...
...
o2web/source/x_component_process_FormDesigner/Module/Radio/radio.html
浏览文件 @
b9fadc7e
...
...
@@ -19,6 +19,14 @@
<input
type=
"radio"
name=
"isReadonly"
value=
"true"
text
{($.
isReadonly
)?'
checked
'
:
''}
/>
{{$.lp.yes}}
<input
type=
"radio"
name=
"isReadonly"
value=
"false"
text
{(!$.
isReadonly
)?'
checked
'
:
''}
/>
{{$.lp.no}}
</td>
</tr>
<tr>
<td
class=
"editTableTitle"
>
{{$.lp.countPerline}}:
</td>
<td
class=
"editTableValue"
>
<input
type=
"text"
name=
"countPerline"
value=
"text{$.countPerline}"
class=
"editTableInput"
onkeyup=
"this.value=this.value.replace(/[^\d]/g,'')"
/>
<div
style=
"color:#999999; padding:5px;"
>
{{$.lp.countPerlineNote}}
</div>
</td>
</td>
</tr>
<tr>
<td
class=
"editTableTitle"
>
{{$.lp.options}}:
</td>
...
...
o2web/source/x_component_process_FormDesigner/Module/Radio/template.json
浏览文件 @
b9fadc7e
...
...
@@ -5,6 +5,7 @@
"description"
:
""
,
"itemType"
:
"values"
,
"itemValues"
:
[],
"countPerline"
:
"0"
,
"itemScript"
:
{
"code"
:
""
,
"html"
:
""
...
...
o2web/source/x_component_process_FormDesigner/lp/en.js
浏览文件 @
b9fadc7e
...
...
@@ -1254,7 +1254,8 @@ MWF.xApplication.process.FormDesigner.LP = {
"
menuItem
"
:
"
Menu Item
"
,
"
dropdownDefaultText
"
:
"
Dropdown Menu
"
,
"
showButton
"
:
"
Show Button
"
,
"
newline
"
:
"
one line per option
"
,
"
countPerline
"
:
"
Options per line
"
,
"
countPerlineNote
"
:
"
0 means no limit
"
,
"
wps
"
:
{
"
config
"
:
"
Config
"
,
...
...
o2web/source/x_component_process_FormDesigner/lp/zh-cn.js
浏览文件 @
b9fadc7e
...
...
@@ -1260,7 +1260,8 @@ MWF.xApplication.process.FormDesigner.LP = {
"
menuItem
"
:
"
菜单项
"
,
"
dropdownDefaultText
"
:
"
下拉菜单
"
,
"
showButton
"
:
"
显示按钮
"
,
"
newline
"
:
"
每个选项一行
"
,
"
countPerline
"
:
"
每行选项数
"
,
"
countPerlineNote
"
:
"
0表示不限制
"
,
"
wps
"
:
{
"
config
"
:
"
配置
"
,
...
...
o2web/source/x_component_process_Xform/Checkbox.js
浏览文件 @
b9fadc7e
...
...
@@ -45,7 +45,34 @@ MWF.xApplication.process.Xform.Checkbox = MWF.APPCheckbox = new Class(
texts
.
push
(
t
);
}
});
this
.
node
.
set
(
"
text
"
,
texts
.
join
(
"
,
"
));
if
(
!
this
.
isNumber
(
this
.
json
.
countPerline
)
)
{
if
(
this
.
json
.
newline
){
texts
.
each
(
function
(
t
){
new
Element
(
"
div
"
,
{
"
text
"
:
t
}).
inject
(
this
.
node
)
}.
bind
(
this
))
}
else
{
this
.
node
.
set
(
"
text
"
,
texts
.
join
(
"
,
"
));
}
}
else
{
var
div
;
var
countPerLine
=
this
.
json
.
countPerline
.
toInt
();
if
(
countPerLine
===
0
){
div
=
new
Element
(
"
div
"
).
inject
(
this
.
node
);
div
.
set
(
"
text
"
,
texts
.
join
(
"
,
"
));
}
else
{
var
textsPerLine
=
[];
texts
.
each
(
function
(
t
,
i
){
if
(
i
%
countPerLine
===
0
){
//如果需要换行了
if
(
div
&&
textsPerLine
.
length
)
div
.
set
(
"
text
"
,
textsPerLine
.
join
(
"
,
"
)
+
"
,
"
);
textsPerLine
=
[];
div
=
new
Element
(
"
div
"
).
inject
(
this
.
node
);
}
textsPerLine
.
push
(
t
);
}.
bind
(
this
));
if
(
div
&&
textsPerLine
.
length
)
div
.
set
(
"
text
"
,
textsPerLine
.
join
(
"
,
"
));
}
}
}
},
_resetNodeEdit
:
function
(){
...
...
@@ -154,23 +181,34 @@ MWF.xApplication.process.Xform.Checkbox = MWF.APPCheckbox = new Class(
var
optionItems
=
this
.
getOptions
();
this
.
_setOptions
(
optionItems
);
},
isNumber
:
function
(
d
){
return
parseInt
(
d
).
toString
()
!==
"
NaN
"
},
_setOptions
:
function
(
optionItems
){
var
p
=
o2
.
promiseAll
(
optionItems
).
then
(
function
(
radioValues
){
this
.
moduleSelectAG
=
null
;
if
(
!
radioValues
)
radioValues
=
[];
var
node
;
if
(
o2
.
typeOf
(
radioValues
)
===
"
array
"
){
var
flag
=
(
new
MWF
.
widget
.
UUID
).
toString
();
radioValues
.
each
(
function
(
item
){
radioValues
.
each
(
function
(
item
,
i
){
var
tmps
=
item
.
split
(
"
|
"
);
var
text
=
tmps
[
0
];
var
value
=
tmps
[
1
]
||
text
;
var
node
;
if
(
this
.
json
.
newline
){
node
=
new
Element
(
"
div
"
).
inject
(
this
.
node
);
if
(
!
this
.
isNumber
(
this
.
json
.
countPerline
)
)
{
if
(
this
.
json
.
newline
){
node
=
new
Element
(
"
div
"
).
inject
(
this
.
node
);
}
else
{
node
=
this
.
node
;
}
}
else
{
node
=
this
.
node
;
var
countPerLine
=
this
.
json
.
countPerline
.
toInt
();
if
(
countPerLine
===
0
&&
i
===
0
){
node
=
new
Element
(
"
div
"
).
inject
(
this
.
node
);
}
else
if
(
i
%
countPerLine
===
0
){
node
=
new
Element
(
"
div
"
).
inject
(
this
.
node
);
}
}
var
radio
=
new
Element
(
"
input
"
,
{
...
...
o2web/source/x_component_process_Xform/Radio.js
浏览文件 @
b9fadc7e
...
...
@@ -171,32 +171,52 @@ MWF.xApplication.process.Xform.Radio = MWF.APPRadio = new Class(
var
optionItems
=
this
.
getOptions
();
this
.
_setOptions
(
optionItems
);
},
isNumber
:
function
(
d
){
return
parseInt
(
d
).
toString
()
!==
"
NaN
"
},
_setOptions
:
function
(
optionItems
){
var
p
=
o2
.
promiseAll
(
optionItems
).
then
(
function
(
radioValues
){
this
.
moduleSelectAG
=
null
;
if
(
!
radioValues
)
radioValues
=
[];
var
node
;
if
(
o2
.
typeOf
(
radioValues
)
===
"
array
"
){
var
flag
=
(
new
MWF
.
widget
.
UUID
).
toString
();
radioValues
.
each
(
function
(
item
){
radioValues
.
each
(
function
(
item
,
i
){
var
tmps
=
item
.
split
(
"
|
"
);
var
text
=
tmps
[
0
];
var
value
=
tmps
[
1
]
||
text
;
if
(
!
this
.
isNumber
(
this
.
json
.
countPerline
)
)
{
if
(
this
.
json
.
newline
){
node
=
new
Element
(
"
div
"
).
inject
(
this
.
node
);
}
else
{
node
=
this
.
node
;
}
}
else
{
var
countPerLine
=
this
.
json
.
countPerline
.
toInt
();
if
(
countPerLine
===
0
&&
i
===
0
){
node
=
new
Element
(
"
div
"
).
inject
(
this
.
node
);
}
else
if
(
i
%
countPerLine
===
0
){
node
=
new
Element
(
"
div
"
).
inject
(
this
.
node
);
}
}
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
);
}).
inject
(
node
);
//radio.appendText(text, "after");
var
textNode
=
new
Element
(
"
span
"
,
{
"
text
"
:
text
,
"
styles
"
:
{
"
cursor
"
:
"
default
"
}
}).
inject
(
this
.
node
);
}).
inject
(
node
);
textNode
.
addEvent
(
"
click
"
,
function
(
ev
){
if
(
this
.
radio
.
get
(
"
disabled
"
)
===
true
||
this
.
radio
.
get
(
"
disabled
"
)
===
"
true
"
)
return
;
this
.
radio
.
checked
=
true
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录