Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
ab5960ac
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,发现更多精彩内容 >>
提交
ab5960ac
编写于
7月 06, 2020
作者:
U
unknown
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
选人界面,自定义选择器当左侧无候选项时显示:无待选项
上级
90820037
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
181 addition
and
41 deletion
+181
-41
o2web/source/x_component_Selector/$Selector/blue_flat/css.wcss
.../source/x_component_Selector/$Selector/blue_flat/css.wcss
+6
-0
o2web/source/x_component_Selector/$Selector/blue_flat_mobile/css.wcss
.../x_component_Selector/$Selector/blue_flat_mobile/css.wcss
+3
-0
o2web/source/x_component_Selector/$Selector/default/css.wcss
o2web/source/x_component_Selector/$Selector/default/css.wcss
+7
-1
o2web/source/x_component_Selector/$Selector/embed/css.wcss
o2web/source/x_component_Selector/$Selector/embed/css.wcss
+6
-0
o2web/source/x_component_Selector/$Selector/mobile/css.wcss
o2web/source/x_component_Selector/$Selector/mobile/css.wcss
+6
-0
o2web/source/x_component_Selector/$Selector/process/css.wcss
o2web/source/x_component_Selector/$Selector/process/css.wcss
+6
-0
o2web/source/x_component_Selector/Identity.js
o2web/source/x_component_Selector/Identity.js
+15
-2
o2web/source/x_component_Selector/IdentityWidthDuty.js
o2web/source/x_component_Selector/IdentityWidthDuty.js
+25
-1
o2web/source/x_component_Selector/IdentityWidthDutyCategoryByUnit.js
...e/x_component_Selector/IdentityWidthDutyCategoryByUnit.js
+11
-1
o2web/source/x_component_Selector/Person.js
o2web/source/x_component_Selector/Person.js
+29
-22
o2web/source/x_component_Selector/Unit.js
o2web/source/x_component_Selector/Unit.js
+28
-3
o2web/source/x_component_Selector/UnitWithType.js
o2web/source/x_component_Selector/UnitWithType.js
+9
-3
o2web/source/x_component_Selector/lp/zh-cn.js
o2web/source/x_component_Selector/lp/zh-cn.js
+1
-1
o2web/source/x_component_Template/Selector/Custom.js
o2web/source/x_component_Template/Selector/Custom.js
+29
-7
未找到文件。
o2web/source/x_component_Selector/$Selector/blue_flat/css.wcss
浏览文件 @
ab5960ac
...
...
@@ -112,6 +112,12 @@
"overflow": "hidden",
"padding" : "20px"
},
"noSelectableItemText" : {
"margin" : "10px auto",
"text-align" : "center",
"width" : "200px",
"color" : "#999"
},
"contentNode_embedded": {
"overflow": "hidden",
"padding" : "5px 0px 0px 0px"
...
...
o2web/source/x_component_Selector/$Selector/blue_flat_mobile/css.wcss
浏览文件 @
ab5960ac
...
...
@@ -85,6 +85,9 @@
"contentNode": {
"overflow": "hidden"
},
"noSelectableItemText" : {
"display" : "none"
},
"contentNode_embedded": {
"overflow": "hidden",
"padding" : "5px 0px 0px 0px"
...
...
o2web/source/x_component_Selector/$Selector/default/css.wcss
浏览文件 @
ab5960ac
...
...
@@ -148,6 +148,12 @@
"contentNode": {
"overflow": "hidden"
},
"noSelectableItemText" : {
"margin" : "10px auto",
"text-align" : "center",
"width" : "200px",
"color" : "#999"
},
"selectNode": {
"width": "331px",
"height": "410px",
...
...
@@ -276,7 +282,7 @@
"padding": "0px 9px",
"height": "40px",
"border-bottom": "1px solid #999",
"background-color": "#EEE"
,
"background-color": "#EEE"
},
"letterNode": {
"height": "20px",
...
...
o2web/source/x_component_Selector/$Selector/embed/css.wcss
浏览文件 @
ab5960ac
...
...
@@ -119,6 +119,12 @@
"contentNode": {
"overflow": "hidden"
},
"noSelectableItemText" : {
"margin" : "10px auto",
"text-align" : "center",
"width" : "200px",
"color" : "#999"
},
"selectNode": {
"height": "410px",
"margin": "0px",
...
...
o2web/source/x_component_Selector/$Selector/mobile/css.wcss
浏览文件 @
ab5960ac
...
...
@@ -47,6 +47,12 @@
"contentNode": {
"overflow": "hidden"
},
"noSelectableItemText" : {
"margin" : "10px auto",
"text-align" : "center",
"width" : "200px",
"color" : "#999"
},
"selectNode": {
"width": "40%",
"height": "80%",
...
...
o2web/source/x_component_Selector/$Selector/process/css.wcss
浏览文件 @
ab5960ac
...
...
@@ -119,6 +119,12 @@
"contentNode": {
"overflow": "hidden"
},
"noSelectableItemText" : {
"margin" : "10px auto",
"text-align" : "center",
"width" : "200px",
"color" : "#999"
},
"selectNode": {
//"width": "200px",
"width": "54%",
...
...
o2web/source/x_component_Selector/Identity.js
浏览文件 @
ab5960ac
...
...
@@ -84,6 +84,13 @@ MWF.xApplication.Selector.Identity = new Class({
}.
bind
(
this
));
}
else
{
// this.loadInclude( function () {
// this.includeLoaded = true;
// if( this.unitLoaded ){
// afterLoadSelectItemFun();
// }
// }.bind(this));
this
.
orgAction
.
listTopUnit
(
function
(
json
){
json
.
data
.
each
(
function
(
data
){
if
(
!
this
.
isExcluded
(
data
)
){
...
...
@@ -91,8 +98,13 @@ MWF.xApplication.Selector.Identity = new Class({
this
.
subCategorys
.
push
(
category
);
}
}.
bind
(
this
));
loadUnitSuccess
();
}.
bind
(
this
),
loadUnitFailure
);
// this.unitLoaded = true;
// if( this.includeLoaded ){
afterLoadSelectItemFun
();
// }
}.
bind
(
this
));
}
},
...
...
@@ -419,6 +431,7 @@ MWF.xApplication.Selector.Identity.ItemCategory = new Class({
this
.
actionNode
.
setStyles
(
this
.
selector
.
css
.
selectorItemCategoryActionNode_expand
);
this
.
isExpand
=
true
;
}
// this.checkSelectAll();
}
else
{
var
display
=
this
.
children
.
getStyle
(
"
display
"
);
if
(
display
===
"
none
"
){
...
...
o2web/source/x_component_Selector/IdentityWidthDuty.js
浏览文件 @
ab5960ac
...
...
@@ -19,6 +19,9 @@ MWF.xApplication.Selector.IdentityWidthDuty = new Class({
"
exclude
"
:
[]
},
loadSelectItems
:
function
(
addToNext
){
var
afterLoadSelectItemFun
=
this
.
afterLoadSelectItem
.
bind
(
this
);
if
(
this
.
options
.
resultType
===
"
person
"
){
if
(
this
.
titleTextNode
){
this
.
titleTextNode
.
set
(
"
text
"
,
MWF
.
xApplication
.
Selector
.
LP
.
selectPerson
);
...
...
@@ -27,7 +30,27 @@ MWF.xApplication.Selector.IdentityWidthDuty = new Class({
}
}
if
(
this
.
options
.
dutys
.
length
){
this
.
loadInclude
();
var
dutyLoaded
=
0
;
var
loadDutySuccess
=
function
()
{
dutyLoaded
++
;
if
(
dutyLoaded
===
this
.
options
.
dutys
.
length
){
this
.
dutyLoaded
=
true
;
if
(
this
.
includeLoaded
){
afterLoadSelectItemFun
();
}
}
}.
bind
(
this
);
this
.
loadInclude
(
function
()
{
this
.
includeLoaded
=
true
;
if
(
this
.
dutyLoaded
){
afterLoadSelectItemFun
();
}
}.
bind
(
this
));
// this.loadInclude();
this
.
options
.
dutys
.
each
(
function
(
duty
){
var
data
=
{
"
name
"
:
duty
,
"
id
"
:
duty
};
var
category
=
this
.
_newItemCategory
(
"
ItemCategory
"
,
data
,
this
,
this
.
itemAreaNode
);
...
...
@@ -37,6 +60,7 @@ MWF.xApplication.Selector.IdentityWidthDuty = new Class({
// this.action.getUnitduty(function(dutyData){
// var category = this._newItemCategory("ItemCategory", dutyData.data, this, this.itemAreaNode);
// }.bind(this), null, duty);
loadDutySuccess
();
}.
bind
(
this
));
}
},
...
...
o2web/source/x_component_Selector/IdentityWidthDutyCategoryByUnit.js
浏览文件 @
ab5960ac
...
...
@@ -30,7 +30,12 @@ MWF.xApplication.Selector.IdentityWidthDutyCategoryByUnit = new Class({
}
if
(
this
.
options
.
dutys
.
length
){
this
.
loadInclude
();
this
.
loadInclude
(
function
()
{
this
.
includeLoaded
=
true
;
if
(
this
.
dutyLoaded
){
this
.
afterLoadSelectItem
();
}
}.
bind
(
this
));
if
(
this
.
options
.
units
.
length
){
var
units
=
[];
...
...
@@ -91,6 +96,11 @@ MWF.xApplication.Selector.IdentityWidthDutyCategoryByUnit = new Class({
}
else
{
this
.
_loadSelectItemsByIdentityUnit
(
unitTree
);
}
this
.
dutyLoaded
=
true
;
if
(
this
.
includeLoaded
){
this
.
afterLoadSelectItem
();
}
},
_loadSelectItemsByIdentityUnit
:
function
(
unitTree
){
if
(
!
unitTree
.
unitList
)
return
;
...
...
o2web/source/x_component_Selector/Person.js
浏览文件 @
ab5960ac
...
...
@@ -1362,9 +1362,10 @@ MWF.xApplication.Selector.Person = new Class({
}
},
afterLoadSelectItem
:
function
(){
if
(
this
.
items
.
length
===
0
){
//&& this.subCategorys.length === 0
if
(
this
.
subItems
.
length
===
0
&&
this
.
subCategorys
.
length
===
0
){
this
.
noSelectableItemTextDiv
=
new
Element
(
"
div
"
,
{
text
:
this
.
lp
.
noSelectableItemText
text
:
MWF
.
SelectorLP
.
noSelectableItemText
,
styles
:
this
.
css
.
noSelectableItemText
}).
inject
(
this
.
itemAreaNode
);
}
this
.
fireEvent
(
"
afterLoadSelectItem
"
,
[
this
]);
...
...
@@ -1748,9 +1749,9 @@ MWF.xApplication.Selector.Person.Item = new Class({
if
(
(
this
.
selector
.
options
.
count
.
toInt
()
===
1
||
this
.
selector
.
options
.
noSelectedContainer
)
&&
this
.
selector
.
css
.
selectorItemActionNode_single_selected
){
this
.
actionNode
.
setStyles
(
this
.
selector
.
css
.
selectorItemActionNode_single_selected
);
}
//
if( this.category ){
//
this.category.checkSelectAll();
//
}
if
(
this
.
category
){
this
.
category
.
checkSelectAll
();
}
},
setEvent
:
function
(){
this
.
node
.
addEvents
({
...
...
@@ -1875,9 +1876,9 @@ MWF.xApplication.Selector.Person.Item = new Class({
this
.
selectedItem
.
check
();
this
.
selector
.
selectedItems
.
push
(
this
.
selectedItem
);
if
(
this
.
category
){
this
.
category
.
checkSelectAll
();
}
//
if( this.category ){
//
this.category.checkSelectAll();
//
}
this
.
selector
.
fireEvent
(
"
selectItem
"
,[
this
])
}
else
{
...
...
@@ -2256,21 +2257,27 @@ MWF.xApplication.Selector.Person.ItemCategory = new Class({
}).
inject
(
this
.
node
,
"
after
"
);
if
(
!
this
.
selector
.
options
.
expand
)
this
.
children
.
setStyle
(
"
display
"
,
"
none
"
);
var
subIdList
=
this
.
selector
.
_getChildrenItemIds
(
this
.
data
);
if
(
subIdList
){
var
count
=
subIdList
.
length
;
this
.
childrenHeight
=
count
*
this
.
selector
.
options
.
itemHeight
;
this
.
children
.
setStyle
(
"
height
"
,
""
+
this
.
childrenHeight
+
"
px
"
);
}
if
(
this
.
selector
.
options
.
expandEmptyCategory
&&
!
this
.
_hasChildItem
()
){
//点击允许展开空分类
this
.
children
.
hide
();
this
.
actionNode
.
setStyles
(
this
.
selector
.
css
.
selectorItemCategoryActionNode_collapse
);
this
.
isExpand
=
false
;
}
else
{
var
subIdList
=
this
.
selector
.
_getChildrenItemIds
(
this
.
data
);
if
(
subIdList
){
var
count
=
subIdList
.
length
;
this
.
childrenHeight
=
count
*
this
.
selector
.
options
.
itemHeight
;
this
.
children
.
setStyle
(
"
height
"
,
""
+
this
.
childrenHeight
+
"
px
"
);
}
if
(
!
this
.
_hasChild
()){
this
.
actionNode
.
setStyle
(
"
background
"
,
"
transparent
"
);
this
.
textNode
.
setStyle
(
"
color
"
,
"
#777
"
);
}
if
(
!
this
.
_hasChild
()){
this
.
actionNode
.
setStyle
(
"
background
"
,
"
transparent
"
);
this
.
textNode
.
setStyle
(
"
color
"
,
"
#777
"
);
}
if
(
this
.
selectAllNode
){
if
(
this
.
selector
.
options
.
selectAllRange
===
"
direct
"
&&
!
this
.
_hasChildItem
()
){
this
.
selectAllNode
.
setStyle
(
"
display
"
,
"
none
"
);
if
(
this
.
selectAllNode
){
if
(
this
.
selector
.
options
.
selectAllRange
===
"
direct
"
&&
!
this
.
_hasChildItem
()
){
this
.
selectAllNode
.
setStyle
(
"
display
"
,
"
none
"
);
}
}
}
...
...
@@ -2433,7 +2440,7 @@ MWF.xApplication.Selector.Person.ItemCategory = new Class({
}
},
clickItem
:
function
(
callback
){
if
(
this
.
_hasChild
()){
if
(
this
.
_hasChild
()
||
this
.
selector
.
options
.
expandEmptyCategory
){
if
(
!
this
.
fx
){
this
.
fx
=
new
Fx
.
Tween
(
this
.
children
,
{
"
duration
"
:
200
...
...
o2web/source/x_component_Selector/Unit.js
浏览文件 @
ab5960ac
...
...
@@ -17,7 +17,19 @@ MWF.xApplication.Selector.Unit = new Class({
},
loadSelectItems
:
function
(
addToNext
){
var
afterLoadSelectItemFun
=
this
.
afterLoadSelectItem
.
bind
(
this
);
if
(
this
.
options
.
units
.
length
){
var
unitLoaded
=
0
;
var
loadUnitSuccess
=
function
()
{
unitLoaded
++
;
if
(
unitLoaded
===
this
.
options
.
units
.
length
){
afterLoadSelectItemFun
();
}
}.
bind
(
this
);
var
loadUnitFailure
=
loadUnitSuccess
;
this
.
options
.
units
.
each
(
function
(
unit
){
var
container
=
new
Element
(
"
div
"
).
inject
(
this
.
itemAreaNode
);
...
...
@@ -49,11 +61,13 @@ MWF.xApplication.Selector.Unit = new Class({
}
}
else
{
var
item
=
this
.
_newItem
(
data
,
this
,
container
);
this
.
items
.
push
(
item
);
this
.
subItems
.
push
(
item
);
}
}.
bind
(
this
));
}
}.
bind
(
this
),
null
,
unit
);
loadUnitSuccess
();
}.
bind
(
this
),
loadUnitFailure
,
unit
);
}
else
{
...
...
@@ -68,11 +82,13 @@ MWF.xApplication.Selector.Unit = new Class({
}
}
else
{
var
item
=
this
.
_newItem
(
data
,
this
,
container
);
this
.
items
.
push
(
item
);
this
.
subItems
.
push
(
item
);
}
}.
bind
(
this
));
}
}.
bind
(
this
),
null
,
unit
.
id
);
loadUnitSuccess
();
}.
bind
(
this
),
loadUnitFailure
,
unit
.
id
);
//if (unit.subDirectUnitCount) var category = this._newItemCategory("ItemCategory", unit, this, this.itemAreaNode);
}
...
...
@@ -89,6 +105,7 @@ MWF.xApplication.Selector.Unit = new Class({
// if (flag){
if
(
!
this
.
isExcluded
(
data
)
)
{
var
unit
=
this
.
_newItem
(
data
,
this
,
this
.
itemAreaNode
,
1
);
this
.
items
.
push
(
unit
);
this
.
subItems
.
push
(
unit
);
}
//unit.loadSubItem();
...
...
@@ -97,6 +114,7 @@ MWF.xApplication.Selector.Unit = new Class({
// }
}.
bind
(
this
));
afterLoadSelectItemFun
();
}.
bind
(
this
));
}
},
...
...
@@ -234,7 +252,6 @@ MWF.xApplication.Selector.Unit.Item = new Class({
this
.
iconNode
.
setStyle
(
"
background-image
"
,
"
url(
"
+
"
../x_component_Selector/$Selector/
"
+
style
+
"
/icon/departmenticon.png)
"
);
},
loadSubItem
:
function
(){
debugger
;
if
(
!
this
.
selector
.
options
.
expandSubEnable
)
return
;
this
.
isExpand
=
(
this
.
selector
.
options
.
expand
);
if
(
this
.
_hasChild
()
||
this
.
selector
.
options
.
expandEmptyCategory
){
...
...
@@ -243,6 +260,9 @@ MWF.xApplication.Selector.Unit.Item = new Class({
if
(
this
.
level
<=
this
.
selector
.
options
.
defaultExpandLevel
&&
this
.
_hasChild
()
){
this
.
levelNode
.
setStyles
(
this
.
selector
.
css
.
selectorItemLevelNode_expand
);
this
.
loadSubItems
();
}
else
{
this
.
isExpand
=
false
;
this
.
levelNode
.
setStyles
(
this
.
selector
.
css
.
selectorItemLevelNode_collapse
);
}
}
else
if
(
this
.
level
===
1
&&
this
.
_hasChild
()
){
this
.
levelNode
.
setStyles
(
this
.
selector
.
css
.
selectorItemLevelNode_expand
);
...
...
@@ -455,6 +475,7 @@ MWF.xApplication.Selector.Unit.Item = new Class({
subJson
.
data
.
each
(
function
(
subData
){
if
(
!
this
.
selector
.
isExcluded
(
subData
)
)
{
var
category
=
this
.
selector
.
_newItem
(
subData
,
this
.
selector
,
this
.
children
,
this
.
level
+
1
,
this
);
this
.
selector
.
items
.
push
(
category
);
if
(
!
this
.
subItems
)
this
.
subItems
=
[];
this
.
subItems
.
push
(
category
);
}
...
...
@@ -637,6 +658,7 @@ MWF.xApplication.Selector.Unit.Item = new Class({
var
category
=
this
.
selector
.
_newItem
(
subData
,
this
.
selector
,
this
.
children
,
this
.
level
+
1
,
this
,
true
);
category
.
justItem
=
true
;
category
.
load
();
this
.
selector
.
items
.
push
(
category
);
if
(
!
this
.
subItems
)
this
.
subItems
=
[];
this
.
subItems
.
push
(
category
);
//}
...
...
@@ -684,6 +706,7 @@ MWF.xApplication.Selector.Unit.SearchItem = new Class({
}
else
{
category
=
this
.
selector
.
_newItem
(
subData
,
this
.
selector
,
this
.
children
,
this
.
level
+
1
,
this
);
}
this
.
selector
.
items
.
push
(
category
);
if
(
!
this
.
subItems
)
this
.
subItems
=
[];
this
.
subItems
.
push
(
category
);
}
...
...
@@ -723,6 +746,7 @@ MWF.xApplication.Selector.Unit.ItemCategory = new Class({
subJson
.
data
.
each
(
function
(
subData
){
if
(
!
this
.
selector
.
isExcluded
(
subData
)
)
{
var
category
=
this
.
selector
.
_newItem
(
subData
,
this
.
selector
,
this
.
children
,
this
.
level
+
1
,
this
);
this
.
selector
.
items
.
push
(
category
);
if
(
this
.
subItems
)
this
.
subItems
.
push
(
category
);
this
.
subCategorys
.
push
(
category
);
}
...
...
@@ -783,6 +807,7 @@ MWF.xApplication.Selector.Unit.ItemCategory = new Class({
var
category
=
this
.
selector
.
_newItem
(
subData
,
this
.
selector
,
this
.
children
,
this
.
level
+
1
,
this
,
true
);
category
.
justItem
=
true
;
category
.
load
();
this
.
selector
.
items
.
push
(
category
);
if
(
this
.
subItems
)
this
.
subItems
.
push
(
category
);
//this.subCategorys.push( category );
}
...
...
o2web/source/x_component_Selector/UnitWithType.js
浏览文件 @
ab5960ac
...
...
@@ -17,6 +17,8 @@ MWF.xApplication.Selector.UnitWithType = new Class({
},
loadSelectItems
:
function
(
addToNext
){
var
afterLoadSelectItemFun
=
this
.
afterLoadSelectItem
.
bind
(
this
);
var
data
=
{};
data
.
type
=
this
.
options
.
unitType
;
data
.
unitList
=
[];
...
...
@@ -35,6 +37,7 @@ MWF.xApplication.Selector.UnitWithType = new Class({
if
(
!
this
.
isExcluded
(
data
)
)
{
if
(
!
this
.
options
.
expandSubEnable
||
(
!
this
.
options
.
unitType
)
||
data
.
typeList
.
indexOf
(
this
.
options
.
unitType
)
!==-
1
){
var
unit
=
this
.
_newItem
(
data
,
this
,
this
.
itemAreaNode
,
1
);
this
.
items
.
push
(
unit
);
this
.
subItems
.
push
(
unit
);
}
else
{
if
(
data
.
woSubDirectUnitList
.
length
){
...
...
@@ -45,7 +48,8 @@ MWF.xApplication.Selector.UnitWithType = new Class({
}
}.
bind
(
this
));
}
}.
bind
(
this
),
null
,
data
);
afterLoadSelectItemFun
();
}.
bind
(
this
),
afterLoadSelectItemFun
,
data
);
},
_scrollEvent
:
function
(
y
){
...
...
@@ -190,6 +194,7 @@ MWF.xApplication.Selector.UnitWithType.Item = new Class({
if
(
!
this
.
selector
.
isExcluded
(
subData
)
)
{
if
((
!
this
.
selector
.
options
.
unitType
)
||
subData
.
typeList
.
indexOf
(
this
.
selector
.
options
.
unitType
)
!==
-
1
)
{
var
unit
=
this
.
selector
.
_newItem
(
subData
,
this
.
selector
,
this
.
children
,
this
.
level
+
1
,
this
);
this
.
selector
.
items
.
push
(
unit
);
if
(
!
this
.
subItems
)
this
.
subItems
=
[];
this
.
subItems
.
push
(
unit
);
}
else
{
...
...
@@ -241,8 +246,9 @@ MWF.xApplication.Selector.UnitWithType.Item = new Class({
if
(
!
this
.
selector
.
isExcluded
(
subData
)
)
{
if
((
!
this
.
selector
.
options
.
unitType
)
||
subData
.
typeList
.
indexOf
(
this
.
selector
.
options
.
unitType
)
!==
-
1
)
{
var
unit
=
this
.
selector
.
_newItem
(
subData
,
this
.
selector
,
this
.
children
,
this
.
level
+
1
,
this
,
true
);
category
.
justItem
=
true
;
category
.
load
();
unit
.
justItem
=
true
;
unit
.
load
();
this
.
selector
.
items
.
push
(
unit
);
if
(
!
this
.
subItems
)
this
.
subItems
=
[];
this
.
subItems
.
push
(
unit
);
}
...
...
o2web/source/x_component_Selector/lp/zh-cn.js
浏览文件 @
ab5960ac
...
...
@@ -15,7 +15,7 @@ MWF.xApplication.Selector.LP = MWF.SelectorLP = {
"
selectTable
"
:
"
选择数据表
"
,
"
selectCMSApplication
"
:
"
选择内容管理应用
"
,
"
selectCMSCategory
"
:
"
选择内容管理栏目
"
,
"
noSelectableItemText
"
:
"
无
可选项,请联系管理员
"
,
"
noSelectableItemText
"
:
"
无
待选项
"
,
"
searchDescription
"
:
"
搜索内容
"
,
...
...
o2web/source/x_component_Template/Selector/Custom.js
浏览文件 @
ab5960ac
...
...
@@ -68,31 +68,36 @@ MWF.xApplication.Template.Selector.Custom = new Class({
this
.
container
=
$
(
container
);
this
.
selectedItems
=
[];
this
.
items
=
[];
this
.
categorys
=
[];
// this.categorys = [];
this
.
subCategorys
=
[];
//直接的分类
this
.
subItems
=
[];
//直接的选择项
},
loadSelectItems
:
function
(
addToNext
)
{
debugger
;
if
(
!
this
.
options
.
category
)
{
this
.
options
.
selectableItems
.
each
(
function
(
it
)
{
var
name
=
typeOf
(
it
)
===
"
string
"
?
it
:
it
.
name
;
var
id
=
typeOf
(
it
)
===
"
string
"
?
it
:
it
.
id
;
var
item
=
this
.
_newItem
({
name
:
name
,
id
:
id
},
this
,
this
.
itemAreaNode
);
this
.
items
.
push
(
item
);
this
.
subItems
.
push
(
item
);
}.
bind
(
this
))
}
else
{
this
.
options
.
selectableItems
.
each
(
function
(
item
,
index
)
{
if
(
item
.
isItem
)
{
var
item
=
this
.
_newItem
(
item
,
this
,
this
.
itemAreaNode
);
this
.
items
.
push
(
item
);
this
.
subItems
.
push
(
item
);
}
else
{
// if ( (item.subItemList && item.subItemList.length > 0) || item.subCategoryList && item.subCategoryList.length > 0 ) {
if
(
this
.
options
.
categorySelectable
){
var
category
=
this
.
_newItemCategorySelectable
(
item
,
this
,
this
.
itemAreaNode
);
this
.
items
.
push
(
category
);
this
.
categorys
.
push
(
category
);
this
.
subItems
.
push
(
category
);
this
.
subCategorys
.
push
(
category
);
}
else
{
var
category
=
this
.
_newItemCategory
(
item
,
this
,
this
.
itemAreaNode
);
this
.
c
ategorys
.
push
(
category
);
this
.
subC
ategorys
.
push
(
category
);
}
// item.subItemList.each(function (subItem, index) {
// var item = this._newItem(subItem, this, category.children, 2, category);
...
...
@@ -103,6 +108,7 @@ MWF.xApplication.Template.Selector.Custom = new Class({
}
}.
bind
(
this
));
}
if
(
this
.
afterLoadSelectItem
)
this
.
afterLoadSelectItem
();
},
_scrollEvent
:
function
(
y
)
{
return
true
;
...
...
@@ -310,22 +316,32 @@ MWF.xApplication.Template.Selector.Custom.ItemCategory = new Class({
return
this
.
data
.
name
;
},
clickItem
:
function
(
callback
)
{
if
(
this
.
_hasChild
())
{
if
(
this
.
_hasChild
()
||
this
.
selector
.
options
.
expandEmptyCategory
)
{
var
firstLoaded
=
!
this
.
loaded
;
if
(
!
firstLoaded
||
this
.
selector
.
options
.
expandEmptyCategory
){
if
(
this
.
isExpand
){
this
.
selector
.
fireEvent
(
"
collapse
"
,
[
this
]
);
}
else
{
this
.
selector
.
fireEvent
(
"
expand
"
,
[
this
]
);
}
}
this
.
loadSub
(
function
()
{
if
(
firstLoaded
)
{
if
(
firstLoaded
&&
this
.
_hasChild
()
)
{
if
(
!
this
.
selector
.
isFlatCategory
)
{
this
.
children
.
setStyles
({
"
display
"
:
"
block
"
,
"
height
"
:
"
auto
"
});
this
.
actionNode
.
setStyles
(
this
.
selector
.
css
.
selectorItemCategoryActionNode_expand
);
this
.
isExpand
=
true
;
}
// this.checkSelectAll();
}
else
{
var
display
=
this
.
children
.
getStyle
(
"
display
"
);
if
(
display
===
"
none
"
)
{
// this.selector.fireEvent("expand", [this] );
this
.
children
.
setStyles
({
"
display
"
:
"
block
"
,
"
height
"
:
"
auto
"
});
this
.
actionNode
.
setStyles
(
this
.
selector
.
css
.
selectorItemCategoryActionNode_expand
);
this
.
isExpand
=
true
;
}
else
{
// this.selector.fireEvent("collapse", [this] );
this
.
children
.
setStyles
({
"
display
"
:
"
none
"
,
"
height
"
:
"
0px
"
});
this
.
actionNode
.
setStyles
(
this
.
selector
.
css
.
selectorItemCategoryActionNode_collapse
);
this
.
isExpand
=
false
;
...
...
@@ -390,7 +406,13 @@ MWF.xApplication.Template.Selector.Custom.ItemCategory = new Class({
check
:
function
()
{
},
afterLoad
:
function
(){
if
(
this
.
level
<=
this
.
selector
.
options
.
defaultExpandLevel
)
this
.
clickItem
();
if
(
this
.
level
<=
this
.
selector
.
options
.
defaultExpandLevel
&&
(
this
.
_hasChild
())
){
this
.
clickItem
();
}
else
{
this
.
children
.
hide
();
this
.
actionNode
.
setStyles
(
this
.
selector
.
css
.
selectorItemCategoryActionNode_collapse
);
this
.
isExpand
=
false
;
}
}
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录