@@ -177,7 +177,7 @@ define([
177
177
var colList = event . dataList ;
178
178
that . state . display = colList ;
179
179
180
- if ( colList && colList . length == 1 ) {
180
+ if ( ( colList && colList . length == 1 ) || that . state . method === 'size' ) {
181
181
$ ( that . wrapSelector ( '#vp_gbToFrame' ) ) . parent ( ) . show ( ) ;
182
182
} else {
183
183
$ ( that . wrapSelector ( '#vp_gbToFrame' ) ) . parent ( ) . hide ( ) ;
@@ -196,6 +196,12 @@ define([
196
196
var method = $ ( this ) . val ( ) ;
197
197
that . state . method = method ;
198
198
$ ( that . wrapSelector ( '#vp_gbMethod' ) ) . val ( method ) ;
199
+
200
+ if ( method === 'size' || ( that . state . display && that . state . display . length == 1 ) ) {
201
+ $ ( that . wrapSelector ( '#vp_gbToFrame' ) ) . parent ( ) . show ( ) ;
202
+ } else {
203
+ $ ( that . wrapSelector ( '#vp_gbToFrame' ) ) . parent ( ) . hide ( ) ;
204
+ }
199
205
} ) ;
200
206
201
207
// advanced checkbox event
@@ -744,7 +750,7 @@ define([
744
750
// Display columns
745
751
//====================================================================
746
752
var colStr = '' ;
747
- if ( display ) {
753
+ if ( display && display . length > 0 ) {
748
754
if ( toFrame || display . length > 1 ) {
749
755
// over 2 columns
750
756
colStr = '[[' + display . join ( ',' ) + ']]' ;
@@ -891,6 +897,10 @@ define([
891
897
methodStr . appendFormat ( '{0}(numeric_only=True)' , method ) ;
892
898
} else {
893
899
methodStr . appendFormat ( '{0}()' , method ) ;
900
+ if ( method === 'size' && toFrame === true ) {
901
+ // if to_Frame on size() method
902
+ methodStr . append ( ".to_frame(name='size')" ) ;
903
+ }
894
904
}
895
905
}
896
906
}
0 commit comments