Explorar o código

移动端不显示人员组件的弹出信息\

unknown %!s(int64=5) %!d(string=hai) anos
pai
achega
050d883b8f

+ 13 - 1
o2web/source/x_component_Selector/Identity.js

@@ -31,13 +31,25 @@ MWF.xApplication.Selector.Identity = new Class({
             this.loadInclude(afterLoadSelectItemFun);
         }else if (this.options.units.length){
             var unitLoaded = 0;
+
             var loadUnitSuccess = function () {
                 unitLoaded++;
                 if( unitLoaded === this.options.units.length ){
-                    this.loadInclude( afterLoadSelectItemFun );
+                    this.unitLoaded = true;
+                    if( this.includeLoaded ){
+                        if(afterLoadSelectItemFun)afterLoadSelectItemFun();
+                    }
                 }
             }.bind(this);
             var loadUnitFailure = loadUnitSuccess;
+
+            this.loadInclude( function () {
+                this.includeLoaded = true;
+                if( this.unitLoaded ){
+                    if(afterLoadSelectItemFun)afterLoadSelectItemFun();
+                }
+            }.bind(this));
+
             this.options.units.each(function(unit){
                 if (typeOf(unit)==="string"){
                     this.orgAction.getUnit(unit, function(json){

+ 6 - 1
o2web/source/x_component_Selector/Person.js

@@ -1362,7 +1362,12 @@ MWF.xApplication.Selector.Person = new Class({
         }
     },
     afterLoadSelectItem : function(){
-
+        if( this.items.length === 0 && this.subCategorys.length === 0 ){
+           this.noSelectableItemTextDiv = new Element("div", {
+               text : this.lp.noSelectableItemText
+           }).inject( this.itemAreaNode );
+        }
+        this.fireEvent("afterLoadSelectItem", [this]);
     },
     setSize : function(){
 

+ 1 - 0
o2web/source/x_component_Selector/lp/zh-cn.js

@@ -15,6 +15,7 @@ MWF.xApplication.Selector.LP = MWF.SelectorLP = {
     "selectTable": "选择数据表",
     "selectCMSApplication": "选择内容管理应用",
     "selectCMSCategory": "选择内容管理栏目",
+    "noSelectableItemText" : "无可选项,请联系管理员",
 
     "searchDescription" : "搜索内容",