Преглед изворни кода

Merge branch 'fix/selector_hiddenEmptyCategory' into 'wrdp'

Merge of fix/selector_hiddenEmptyCategory 人员选择增加不显示空分类的配置 to wrdp

See merge request o2oa/o2oa!2423
蔡祥熠 пре 5 година
родитељ
комит
37f8524186
1 измењених фајлова са 7 додато и 2 уклоњено
  1. 7 2
      o2web/source/x_component_Selector/Person.js

+ 7 - 2
o2web/source/x_component_Selector/Person.js

@@ -32,6 +32,7 @@ MWF.xApplication.Selector.Person = new Class({
         "contentUrl" : "", //和默认的页面布局不一样的话,可以传入页面布局HTML URL
         "injectToBody" : false, //当传入HTML URL的时候是否插入到document.body, false的时候插入到this.container
         "selectSingleItem" : false, //当只有一个候选项的时候,是否默认选中
+        "hiddenEmptyCategory" : false,
 
         "flatCategory" : false, //扁平化展现分类,
         "selectType" : "person",
@@ -2482,8 +2483,12 @@ MWF.xApplication.Selector.Person.ItemCategory = new Class({
             }
 
             if ( !this._hasChild()){
-                this.actionNode.setStyle("background", "transparent");
-                this.textNode.setStyle("color", "#777");
+                if( this.selector.options.hiddenEmptyCategory ){
+                    this.node.hide()
+                }else{
+                    this.actionNode.setStyle("background", "transparent");
+                    this.textNode.setStyle("color", "#777");
+                }
             }
 
             if( this.selectAllNode ){