Просмотр исходного кода

Merge branch 'wrdp' into 'develop'

Wrdp

See merge request o2oa/o2oa!2595
蔡祥熠 5 лет назад
Родитель
Сommit
a2d7c5c3f0

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

@@ -922,12 +922,12 @@ MWF.xApplication.Selector.Identity.ItemCategory = new Class({
             this.loadSub(function(){
             this.loadSub(function(){
                 this.loading = false;
                 this.loading = false;
                 if( firstLoaded ){
                 if( firstLoaded ){
-                    this.selector.fireEvent("expand", [this] );
                     if( !this.selector.isFlatCategory ){
                     if( !this.selector.isFlatCategory ){
                         this.children.setStyles({"display": "block", "height": "auto"});
                         this.children.setStyles({"display": "block", "height": "auto"});
                         this.actionNode.setStyles(this.selector.css.selectorItemCategoryActionNode_expand);
                         this.actionNode.setStyles(this.selector.css.selectorItemCategoryActionNode_expand);
                         this.isExpand = true;
                         this.isExpand = true;
                     }
                     }
+                    this.selector.fireEvent("expand", [this] );
                     // this.checkSelectAll();
                     // this.checkSelectAll();
                 }else{
                 }else{
                     var display = this.children.getStyle("display");
                     var display = this.children.getStyle("display");
@@ -936,11 +936,13 @@ MWF.xApplication.Selector.Identity.ItemCategory = new Class({
                         this.children.setStyles({"display": "block", "height": "auto"});
                         this.children.setStyles({"display": "block", "height": "auto"});
                         this.actionNode.setStyles(this.selector.css.selectorItemCategoryActionNode_expand);
                         this.actionNode.setStyles(this.selector.css.selectorItemCategoryActionNode_expand);
                         this.isExpand = true;
                         this.isExpand = true;
+                        this.selector.fireEvent("expand", [this] );
                     }else{
                     }else{
                         this.selector.fireEvent("collapse", [this] );
                         this.selector.fireEvent("collapse", [this] );
                         this.children.setStyles({"display": "none", "height": "0px"});
                         this.children.setStyles({"display": "none", "height": "0px"});
                         this.actionNode.setStyles(this.selector.css.selectorItemCategoryActionNode_collapse);
                         this.actionNode.setStyles(this.selector.css.selectorItemCategoryActionNode_collapse);
                         this.isExpand = false;
                         this.isExpand = false;
+                        this.selector.fireEvent("expand", [this] );
                     }
                     }
                 }
                 }
                 if(callback)callback();
                 if(callback)callback();

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

@@ -2737,7 +2737,6 @@ MWF.xApplication.Selector.Person.ItemCategory = new Class({
             if (!this.fx.isRunning()){
             if (!this.fx.isRunning()){
                 var display = this.children.getStyle("display");
                 var display = this.children.getStyle("display");
                 if (display === "none"){
                 if (display === "none"){
-                    this.selector.fireEvent("expand", [this] );
                     this.children.setStyles({
                     this.children.setStyles({
                         "display": "block",
                         "display": "block",
                         "height": "0px"
                         "height": "0px"
@@ -2745,8 +2744,8 @@ MWF.xApplication.Selector.Person.ItemCategory = new Class({
                     this.fx.start("height", "0px", ""+this.childrenHeight+"px");
                     this.fx.start("height", "0px", ""+this.childrenHeight+"px");
                     this.actionNode.setStyles(this.selector.css.selectorItemCategoryActionNode_expand);
                     this.actionNode.setStyles(this.selector.css.selectorItemCategoryActionNode_expand);
                     this.isExpand = true;
                     this.isExpand = true;
+                    this.selector.fireEvent("expand", [this] );
                 }else{
                 }else{
-                    this.selector.fireEvent("collapse", [this] );
                     if (!this.childrenHeight) this.childrenHeight = this.children.getStyle("height").toFloat();
                     if (!this.childrenHeight) this.childrenHeight = this.children.getStyle("height").toFloat();
                     this.fx.start("height", ""+this.childrenHeight+"px", "0px").chain(function(){
                     this.fx.start("height", ""+this.childrenHeight+"px", "0px").chain(function(){
                         this.children.setStyles({
                         this.children.setStyles({
@@ -2756,6 +2755,7 @@ MWF.xApplication.Selector.Person.ItemCategory = new Class({
                     }.bind(this));
                     }.bind(this));
                     this.actionNode.setStyles(this.selector.css.selectorItemCategoryActionNode_collapse);
                     this.actionNode.setStyles(this.selector.css.selectorItemCategoryActionNode_collapse);
                     this.isExpand = false;
                     this.isExpand = false;
+                    this.selector.fireEvent("collapse", [this] );
                 }
                 }
             }
             }
             if(callback)callback()
             if(callback)callback()

+ 3 - 0
o2web/source/x_component_process_Xform/$Module.js

@@ -13,6 +13,7 @@ MWF.xApplication.process.Xform.$Module = MWF.APP$Module =  new Class(
          * 组件加载前事件。<br/>
          * 组件加载前事件。<br/>
          * 平台执行queryLoad事件的时候,组件还没有开始加载,这个时候可以根据条件修改组件的配置信息以改变加载细节。
          * 平台执行queryLoad事件的时候,组件还没有开始加载,这个时候可以根据条件修改组件的配置信息以改变加载细节。
          * @event MWF.xApplication.process.Xform.$Module#queryLoad
          * @event MWF.xApplication.process.Xform.$Module#queryLoad
+         * {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|事件的使用}
          * @example
          * @example
          * var field = this.form.get("fieldName");
          * var field = this.form.get("fieldName");
          * field.addEvent("queryLoad", function(){
          * field.addEvent("queryLoad", function(){
@@ -22,10 +23,12 @@ MWF.xApplication.process.Xform.$Module = MWF.APP$Module =  new Class(
         /**
         /**
          * 组件加载事件.
          * 组件加载事件.
          * @event MWF.xApplication.process.Xform.$Module#load
          * @event MWF.xApplication.process.Xform.$Module#load
+         * {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|事件的使用}
          */
          */
         /**
         /**
          * 组件加载后事件.
          * 组件加载后事件.
          * @event MWF.xApplication.process.Xform.$Module#postLoad
          * @event MWF.xApplication.process.Xform.$Module#postLoad
+         * {@link https://www.yuque.com/o2oa/ixsnyt/hm5uft#i0zTS|事件的使用}
          */
          */
         "moduleEvents": ["load", "queryLoad", "postLoad"]
         "moduleEvents": ["load", "queryLoad", "postLoad"]
     },
     },