Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1677e74

Browse files
committed
update File.js for add tsv
1 parentb768ead commit1677e74

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

‎js/m_apps/File.js‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ define([
3939

4040
this.fileExtensions={
4141
'csv':'csv',
42+
'tsv':'tsv',
4243
'excel':'xlsx',
4344
'json':'json',
4445
'pickle':''
@@ -72,6 +73,7 @@ define([
7273
'Read':{
7374
fileTypeId:{
7475
'csv':'pd004',
76+
'tsv':'pd004',
7577
'excel':'pd123',
7678
'json':'pd076',
7779
'pickle':'pd079'
@@ -86,6 +88,7 @@ define([
8688
'Write':{
8789
fileTypeId:{
8890
'csv':'pd005',
91+
'tsv':'pd005',
8992
'excel':'pd124',
9093
'json':'pd077',
9194
'pickle':'pd078'
@@ -147,7 +150,7 @@ define([
147150
_bindEventByType(pageType){
148151
varthat=this;
149152
varprefix='#vp_file'+pageType+' ';
150-
153+
151154
// select file type
152155
$(this.wrapSelector(prefix+'#fileType')).change(function(){
153156
varvalue=$(this).val();
@@ -244,7 +247,7 @@ define([
244247
renderPage(pageType){
245248
varthat=this;
246249
varprefix='#vp_file'+pageType+' ';
247-
250+
248251
// clear
249252
$(this.wrapSelector(prefix+'#vp_inputOutputBox table tbody')).html('');
250253
$(this.wrapSelector(prefix+'#vp_optionBox table tbody')).html('');
@@ -386,6 +389,13 @@ define([
386389
name:'fileType',
387390
type:'var'
388391
});
392+
// if file type is tsv
393+
varfileSelected=$("#fileType").val();
394+
// $ delimeter = '\t'
395+
if($("#fileType").val()==="tsv"){
396+
$("#delimiter").val(`\n`);
397+
}
398+
389399
varresult=pdGen.vp_codeGenerator(this.uuid+' #vp_fileRead',thisPkg,userOption.toString());
390400
sbCode.append(result);
391401
}elseif(pageType=='Write'){

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp