@@ -85,7 +85,7 @@ WOQLTable.prototype.getColumnsToRender = function(){
85
85
var cols = this . getColumnOrder ( ) ;
86
86
}
87
87
else {
88
- var cols = this . result . getVariableList ( ) ;
88
+ var cols = this . result . getVariableList ( ) ;
89
89
}
90
90
var self = this ;
91
91
return ( cols ? cols . filter ( col => ! self . hidden ( col ) ) : [ ] ) ;
@@ -119,7 +119,7 @@ WOQLTable.prototype.getColumnHeaderContents = function(colid){
119
119
120
120
121
121
WOQLTable . prototype . hidden = function ( col ) {
122
- colid = UTILS . addNamespaceToVariable ( col ) ;
122
+ colid = UTILS . removeNamespaceFromVariable ( col ) ;
123
123
let matched_rules = new WOQLRule ( ) . matchColumn ( this . config . rules , colid , "hidden" ) ;
124
124
if ( matched_rules . length ) {
125
125
return matched_rules [ matched_rules . length - 1 ] . rule . hidden ;
@@ -141,21 +141,21 @@ WOQLTable.prototype.update = function(nquery){
141
141
142
142
WOQLTable . prototype . hasDefinedEvent = function ( row , key , scope , action , rownum ) {
143
143
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 ) ;
145
145
}
146
146
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 ) ;
148
148
}
149
149
if ( matched_rules && matched_rules . length ) return true ;
150
150
return false ;
151
151
}
152
152
153
153
WOQLTable . prototype . getDefinedEvent = function ( row , key , scope , action , rownum ) {
154
154
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 ) ;
156
156
}
157
157
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 ) ;
159
159
}
160
160
if ( matched_rules && matched_rules . length ) {
161
161
var l = ( matched_rules . length - 1 ) ;
@@ -185,6 +185,19 @@ WOQLTable.prototype.getColumnOrder = function(){
185
185
return this . config . column_order ( ) ;
186
186
}
187
187
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
+
188
201
WOQLTable . prototype . hasColumnOrder = WOQLTable . prototype . getColumnOrder ;
189
202
WOQLTable . prototype . hasCellClick = WOQLTable . prototype . getCellClick ;
190
203
WOQLTable . prototype . hasRowClick = WOQLTable . prototype . getRowClick ;
0 commit comments