@@ -85,7 +85,7 @@ WOQLTable.prototype.getColumnsToRender = function(){
8585 var cols = this . getColumnOrder ( ) ;
8686 }
8787 else {
88- var cols = this . result . getVariableList ( ) ;
88+ var cols = this . result . getVariableList ( ) ;
8989 }
9090 var self = this ;
9191 return ( cols ? cols . filter ( col => ! self . hidden ( col ) ) : [ ] ) ;
@@ -119,7 +119,7 @@ WOQLTable.prototype.getColumnHeaderContents = function(colid){
119119
120120
121121WOQLTable . prototype . hidden = function ( col ) {
122- colid = UTILS . addNamespaceToVariable ( col ) ;
122+ colid = UTILS . removeNamespaceFromVariable ( col ) ;
123123 let matched_rules = new WOQLRule ( ) . matchColumn ( this . config . rules , colid , "hidden" ) ;
124124 if ( matched_rules . length ) {
125125 return matched_rules [ matched_rules . length - 1 ] . rule . hidden ;
@@ -141,21 +141,21 @@ WOQLTable.prototype.update = function(nquery){
141141
142142WOQLTable . prototype . hasDefinedEvent = function ( row , key , scope , action , rownum ) {
143143 if ( scope == "row" ) {
144- var matched_rules = new WOQLRule ( ) . matchRow ( this . config . rules , row , this . result . cursor , action ) ;
144+ var matched_rules = new WOQLRule ( ) . matchRow ( this . config . rules , row , rownum , action ) ;
145145 }
146146 else {
147- var matched_rules = new WOQLRule ( ) . matchCell ( this . config . rules , row , key , this . result . cursor , action ) ;
147+ var matched_rules = new WOQLRule ( ) . matchCell ( this . config . rules , row , key , rownum , action ) ;
148148 }
149149 if ( matched_rules && matched_rules . length ) return true ;
150150 return false ;
151151}
152152
153153WOQLTable . prototype . getDefinedEvent = function ( row , key , scope , action , rownum ) {
154154 if ( scope == "row" ) {
155- var matched_rules = new WOQLRule ( ) . matchRow ( this . config . rules , row , this . result . cursor , action ) ;
155+ var matched_rules = new WOQLRule ( ) . matchRow ( this . config . rules , row , rownum , action ) ;
156156 }
157157 else {
158- var matched_rules = new WOQLRule ( ) . matchCell ( this . config . rules , row , key , this . result . cursor , action ) ;
158+ var matched_rules = new WOQLRule ( ) . matchCell ( this . config . rules , row , key , rownum , action ) ;
159159 }
160160 if ( matched_rules && matched_rules . length ) {
161161 var l = ( matched_rules . length - 1 ) ;
@@ -185,6 +185,19 @@ WOQLTable.prototype.getColumnOrder = function(){
185185 return this . config . column_order ( ) ;
186186}
187187
188+ WOQLTable . prototype . getColumnDimensions = function ( key ) {
189+ let cstyle = { }
190+ let w = new WOQLRule ( ) . matchColumn ( this . config . rules , key , "width" ) ;
191+ if ( w && w . length && w [ w . length - 1 ] . rule . width ) {
192+ cstyle . width = w [ w . length - 1 ] . rule . width ;
193+ }
194+ let max = new WOQLRule ( ) . matchColumn ( this . config . rules , key , "maxWidth" ) ;
195+ if ( max && max . length ) cstyle . maxWidth = max [ max . length - 1 ] . rule . maxWidth ;
196+ let min = new WOQLRule ( ) . matchColumn ( this . config . rules , key , "minWidth" ) ;
197+ if ( min && min . length ) cstyle . minWidth = min [ min . length - 1 ] . rule . minWidth ;
198+ return cstyle
199+ }
200+
188201WOQLTable . prototype . hasColumnOrder = WOQLTable . prototype . getColumnOrder ;
189202WOQLTable . prototype . hasCellClick = WOQLTable . prototype . getCellClick ;
190203WOQLTable . prototype . hasRowClick = WOQLTable . prototype . getRowClick ;
0 commit comments