From 6b24bcf0a9c1d573b11202ea8cc541ebc506352e Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 26 Jul 2020 12:04:36 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=86=E5=9B=BE=E5=88=97=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E3=80=81=E5=B1=9E=E6=80=A7=E3=80=81=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../source/x_component_query_Query/Viewer.js | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/o2web/source/x_component_query_Query/Viewer.js b/o2web/source/x_component_query_Query/Viewer.js index 44a491034e..af5daa0d72 100644 --- a/o2web/source/x_component_query_Query/Viewer.js +++ b/o2web/source/x_component_query_Query/Viewer.js @@ -251,13 +251,13 @@ MWF.xApplication.query.Query.Viewer = MWF.QViewer = new Class({ if( typeOf(column.titleStyles) === "object" )viewCell.setStyles(column.titleStyles); if( typeOf(column.titleProperties) === "object" )viewCell.setProperties(column.titleProperties); + + if( column.events && column.events.loadTitle && column.events.loadTitle.code ){ + var code = column.events.loadTitle.code; + this.Macro.fire( code, {"node" : viewCell, "json" : column, "data" : column.displayName, "view" : this}); + } }else{ this.hideColumns.push(column.column); - if( typeOf(column.titleProperties) === "object" )viewCell.setProperties(column.titleProperties); - } - if( column.events && column.events.loadTitle && column.events.loadTitle.code ){ - var code = column.events.loadTitle.code; - this.Macro.fire( code, {"node" : viewCell, "json" : column, "data" : column.displayName, "view" : this}); } if (column.allowOpen) this.openColumns.push(column.column); @@ -1321,7 +1321,17 @@ MWF.xApplication.query.Query.Viewer.Item = new Class({ td.set("text", v); } if( typeOf(c.contentProperties) === "object" )td.setProperties(c.contentProperties); + if (this.view.json.itemStyles) td.setStyles(this.view.json.itemStyles); + if( typeOf(c.contentStyles) === "object" )td.setStyles(c.contentStyles); + }else{ + if (this.view.json.itemStyles) td.setStyles(this.view.json.itemStyles); + } + + if (this.view.openColumns.indexOf(k)!==-1){ + this.setOpenWork(td, c) + } + if (k!== this.view.viewJson.group.column){ Object.each( c.events || {}, function (e , key) { if(e.code){ if( key === "loadContent" ){ @@ -1337,15 +1347,8 @@ MWF.xApplication.query.Query.Viewer.Item = new Class({ }.bind(this)); } } - }); - } - - if (this.view.openColumns.indexOf(k)!==-1){ - this.setOpenWork(td, c) + }.bind(this)); } - - if (this.view.json.itemStyles) td.setStyles(this.view.json.itemStyles); - if( typeOf(c.contentStyles) === "object" )td.setStyles(c.contentStyles); } //} }.bind(this)); @@ -1711,7 +1714,7 @@ MWF.xApplication.query.Query.Viewer.ItemCategory = new Class({ }.bind(this)); } } - }); + }.bind(this)); this.view.fireEvent("postLoadCategoryRow", [null, this]); }, -- GitLab