File tree 2 files changed +27
-0
lines changed
2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -950,11 +950,27 @@ define([
950
950
$ ( this . wrapSelector ( ) ) . show ( ) ;
951
951
}
952
952
953
+ showInstallButton ( ) {
954
+ $ ( this . wrapSelector ( '#popupInstall' ) ) . show ( ) ;
955
+ }
956
+
957
+ showImportButton ( ) {
958
+ $ ( this . wrapSelector ( '#popupImport' ) ) . show ( ) ;
959
+ }
960
+
953
961
hide ( ) {
954
962
this . taskItem && this . taskItem . blurItem ( ) ;
955
963
$ ( this . wrapSelector ( ) ) . hide ( ) ;
956
964
}
957
965
966
+ hideInstallButton ( ) {
967
+ $ ( this . wrapSelector ( '#popupInstall' ) ) . hide ( ) ;
968
+ }
969
+
970
+ hideImportButton ( ) {
971
+ $ ( this . wrapSelector ( '#popupImport' ) ) . hide ( ) ;
972
+ }
973
+
958
974
isHidden ( ) {
959
975
return ! $ ( this . wrapSelector ( ) ) . is ( ':visible' ) ;
960
976
}
Original file line number Diff line number Diff line change @@ -209,6 +209,13 @@ define([
209
209
// reload
210
210
that . renderPage ( pageType ) ;
211
211
that . _bindEventByType ( pageType ) ;
212
+
213
+ if ( value === 'spss' ) {
214
+ // show install button
215
+ that . showInstallButton ( ) ;
216
+ } else {
217
+ that . hideInstallButton ( ) ;
218
+ }
212
219
} ) ;
213
220
214
221
// open file navigation
@@ -424,6 +431,10 @@ define([
424
431
425
432
}
426
433
434
+ generateInstallCode ( ) {
435
+ return [ '!pip install pyreadstat' ] ;
436
+ }
437
+
427
438
generateCode ( ) {
428
439
var pageType = $ ( this . wrapSelector ( '#vp_fileioType' ) ) . val ( ) ;
429
440
var sbCode = new com_String ;
You can’t perform that action at this time.
0 commit comments