File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ define([
39
39
40
40
this . fileExtensions = {
41
41
'csv' : 'csv' ,
42
+ 'tsv' : 'tsv' ,
42
43
'excel' : 'xlsx' ,
43
44
'json' : 'json' ,
44
45
'pickle' : ''
@@ -72,6 +73,7 @@ define([
72
73
'Read' : {
73
74
fileTypeId : {
74
75
'csv' : 'pd004' ,
76
+ 'tsv' : 'pd004' ,
75
77
'excel' : 'pd123' ,
76
78
'json' : 'pd076' ,
77
79
'pickle' : 'pd079'
@@ -86,6 +88,7 @@ define([
86
88
'Write' : {
87
89
fileTypeId : {
88
90
'csv' : 'pd005' ,
91
+ 'tsv' : 'pd005' ,
89
92
'excel' : 'pd124' ,
90
93
'json' : 'pd077' ,
91
94
'pickle' : 'pd078'
@@ -147,7 +150,7 @@ define([
147
150
_bindEventByType ( pageType ) {
148
151
var that = this ;
149
152
var prefix = '#vp_file' + pageType + ' ' ;
150
-
153
+
151
154
// select file type
152
155
$ ( this . wrapSelector ( prefix + '#fileType' ) ) . change ( function ( ) {
153
156
var value = $ ( this ) . val ( ) ;
@@ -244,7 +247,7 @@ define([
244
247
renderPage ( pageType ) {
245
248
var that = this ;
246
249
var prefix = '#vp_file' + pageType + ' ' ;
247
-
250
+
248
251
// clear
249
252
$ ( this . wrapSelector ( prefix + '#vp_inputOutputBox table tbody' ) ) . html ( '' ) ;
250
253
$ ( this . wrapSelector ( prefix + '#vp_optionBox table tbody' ) ) . html ( '' ) ;
@@ -386,6 +389,13 @@ define([
386
389
name : 'fileType' ,
387
390
type : 'var'
388
391
} ) ;
392
+ // if file type is tsv
393
+ var fileSelected = $ ( "#fileType" ) . val ( ) ;
394
+ // $ delimeter = '\t'
395
+ if ( $ ( "#fileType" ) . val ( ) === "tsv" ) {
396
+ $ ( "#delimiter" ) . val ( `\n` ) ;
397
+ }
398
+
389
399
var result = pdGen . vp_codeGenerator ( this . uuid + ' #vp_fileRead' , thisPkg , userOption . toString ( ) ) ;
390
400
sbCode . append ( result ) ;
391
401
} else if ( pageType == 'Write' ) {
You can’t perform that action at this time.
0 commit comments