File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -950,11 +950,27 @@ define([
950950 $ ( this . wrapSelector ( ) ) . show ( ) ;
951951 }
952952
953+ showInstallButton ( ) {
954+ $ ( this . wrapSelector ( '#popupInstall' ) ) . show ( ) ;
955+ }
956+
957+ showImportButton ( ) {
958+ $ ( this . wrapSelector ( '#popupImport' ) ) . show ( ) ;
959+ }
960+
953961 hide ( ) {
954962 this . taskItem && this . taskItem . blurItem ( ) ;
955963 $ ( this . wrapSelector ( ) ) . hide ( ) ;
956964 }
957965
966+ hideInstallButton ( ) {
967+ $ ( this . wrapSelector ( '#popupInstall' ) ) . hide ( ) ;
968+ }
969+
970+ hideImportButton ( ) {
971+ $ ( this . wrapSelector ( '#popupImport' ) ) . hide ( ) ;
972+ }
973+
958974 isHidden ( ) {
959975 return ! $ ( this . wrapSelector ( ) ) . is ( ':visible' ) ;
960976 }
Original file line number Diff line number Diff line change @@ -209,6 +209,13 @@ define([
209209 // reload
210210 that . renderPage ( pageType ) ;
211211 that . _bindEventByType ( pageType ) ;
212+
213+ if ( value === 'spss' ) {
214+ // show install button
215+ that . showInstallButton ( ) ;
216+ } else {
217+ that . hideInstallButton ( ) ;
218+ }
212219 } ) ;
213220
214221 // open file navigation
@@ -424,6 +431,10 @@ define([
424431
425432 }
426433
434+ generateInstallCode ( ) {
435+ return [ '!pip install pyreadstat' ] ;
436+ }
437+
427438 generateCode ( ) {
428439 var pageType = $ ( this . wrapSelector ( '#vp_fileioType' ) ) . val ( ) ;
429440 var sbCode = new com_String ;
You can’t perform that action at this time.
0 commit comments