[WIP] Reinserting button panel

This commit is contained in:
guerler
2015-07-17 15:18:34 -04:00
parent a0cd5b7410
commit 85fc57696f
13 changed files with 120 additions and 128 deletions
@@ -1,7 +1,5 @@
// dependencies
/** This renders the content of the ftp popup **/
define(['utils/utils'], function(Utils) {
// item view
return Backbone.View.extend({
// options
options: {
@@ -1,7 +1,5 @@
// dependencies
/** This renders the content of the settings popup, allowing users to specify flags i.e. for space-to-tabs conversion **/
define(['utils/utils'], function(Utils) {
// item view
return Backbone.View.extend({
// options
options: {
@@ -9,7 +7,7 @@ return Backbone.View.extend({
class_uncheck : 'upload-icon-button fa fa-square-o'
},
// render
// initialize
initialize: function(app) {
// link app
this.app = app;
@@ -24,12 +22,12 @@ return Backbone.View.extend({
this.model = this.app.model;
// ui event: space to tabs
this.$el.find('#upload-space-to-tabs').on('click', function() {
this.$('#upload-space-to-tabs').on('click', function() {
self._switchState('#upload-space-to-tabs', 'space_to_tabs');
});
// ui event: to posix
this.$el.find('#upload-to-posix-lines').on('click', function() {
this.$('#upload-to-posix-lines').on('click', function() {
self._switchState('#upload-to-posix-lines', 'to_posix_lines');
});
@@ -49,7 +47,7 @@ return Backbone.View.extend({
this._renderState('#upload-to-posix-lines', this.model.get('to_posix_lines'));
// disable options
var $cover = this.$el.find('#upload-settings-cover');
var $cover = this.$('#upload-settings-cover');
if (this.model.get('status') != 'init') {
$cover.show();
} else {
@@ -69,7 +67,7 @@ return Backbone.View.extend({
// render state
_renderState: function (element_id, checked) {
// swith icon class
var $it = this.$el.find(element_id);
var $it = this.$(element_id);
$it.removeClass();
if (checked) {
$it.addClass(this.options.class_check);
@@ -1,10 +1,11 @@
// dependencies
/** Renders contents of the default upload viewer */
define(['utils/utils',
'mvc/upload/upload-model',
'mvc/upload/upload-row',
'mvc/upload/upload-ftp',
'mvc/ui/ui-popover',
'mvc/ui/ui-select',
'mvc/ui/ui-misc',
'utils/uploadbox'],
function( Utils,
@@ -12,24 +13,11 @@ define(['utils/utils',
UploadItem,
UploadFtp,
Popover,
Select
Select,
Ui
) {
// galaxy upload
return Backbone.View.extend({
// default extension
default_extension : 'auto',
// default genome
default_genome : '?',
// datatype placeholder for auto-detection
auto: {
id : 'auto',
text : 'Auto-detect',
description : 'This system will try to detect the file type automatically. If your file is not detected properly as one of the known formats, it most likely means that it has some format problems (e.g., different number of columns on different rows). You can still coerce the system to set your data to the format you think it should be. You can also upload compressed files, which will automatically be decompressed.'
},
// extension selector
select_extension : null,
@@ -63,36 +51,34 @@ return Backbone.View.extend({
},
// initialize
initialize : function(app, options) {
initialize : function(app) {
// link app
this.app = app;
this.options = app.options;
this.list_extensions = app.list_extensions;
this.list_genomes = app.list_genomes;
this.ui_button = app.ui_button;
// link this
var self = this;
this.app = app;
// set element
this.setElement(this._template('upload-box', 'upload-info'));
/*this.modal = new Modal.View({
title : 'Download data directly from web or upload files from your disk',
body : ,
buttons : {
'Choose local file' : function() {self.uploadbox.select()},
'Choose FTP file' : function() {self._eventFtp()},
'Paste/Fetch data' : function() {self._eventCreate()},
'Start' : function() {self._eventStart()},
'Pause' : function() {self._eventStop()},
'Reset' : function() {self._eventReset()},
'Close' : function() {self.modal.hide()},
},
height : '400',
width : '900',
closing_events : true
});*/
this.setElement(this._template());
// create button section
this.btnLocal = new Ui.Button({ title: 'Choose local file', onclick: function() { self.uploadbox.select(); } });
this.btnFtp = new Ui.Button({ title: 'Choose FTP file', onclick: function() { self._eventFtp(); } });
this.btnCreate = new Ui.Button({ title: 'Paste/Fetch data', onclick: function() { self._eventCreate(); } });
this.btnStart = new Ui.Button({ title: 'Start', onclick: function() { self._eventStart(); } });
this.btnStop = new Ui.Button({ title: 'Pause', onclick: function() { self._eventStop(); } });
this.btnReset = new Ui.Button({ title: 'Reset', onclick: function() { self._eventReset(); } });
this.btnClose = new Ui.Button({ title: 'Close', onclick: function() { self.app.modal.hide(); } });
// set element
//this.setElement('#upload-box');
// append buttons to dom
var buttons = [this.btnLocal, this.btnFtp, this.btnCreate, this.btnStart, this.btnStop, this.btnReset, this.btnClose];
for (var i in buttons) {
this.$('#upload-buttons').prepend(buttons[i].$el);
}
// file upload
var self = this;
@@ -105,40 +91,39 @@ return Backbone.View.extend({
complete : function() { self._eventComplete() }
});
/*/ add ftp file viewer
var button = this.modal.getButton('Choose FTP file');
// add ftp file viewer
this.ftp = new Popover.View({
title : 'FTP files',
container : button
});*/
container : this.btnFtp.$el
});
// select extension
this.select_extension = new Select.View({
css : 'header-selection',
data : this.app.list_extensions,
container : this.$el.find('#header-extension'),
value : this.default_extension,
css : 'footer-selection',
container : this.$('#footer-extension'),
data : this.list_extensions,
value : this.options.default_extension,
onchange : function(extension) {
self.updateExtension(extension);
}
});
// handle extension info popover
self.$el.parent().find('#header-extension-info').on('click' , function(e) {
self._showExtensionInfo({
self.$('#footer-extension-info').on('click' , function(e) {
self.showExtensionInfo({
$el : $(e.target),
title : self.select_extension.text(),
extension : self.select_extension.value(),
placement : 'top'
});
}).on('mousedown', function(e) { e.preventDefault(); });
// genome extension
this.select_genome = new Select.View({
css : 'header-selection',
data : this.app.list_genomes,
container : this.$el.find('#header-genome'),
value : this.default_genome,
css : 'footer-selection',
container : this.$('#footer-genome'),
data : this.list_genomes,
value : this.options.default_genome,
onchange : function(genome) {
self.updateGenome(genome);
}
@@ -203,7 +188,7 @@ return Backbone.View.extend({
this.collection.add(upload_item.model);
// add upload item element to table
$(this.el).find('tbody:first').append(upload_item.$el);
this.$('#upload-table > tbody:first').append(upload_item.$el);
// render
upload_item.render();
@@ -351,8 +336,8 @@ return Backbone.View.extend({
// events triggered by this view
//
// display extension info popup
_showExtensionInfo : function(options) {
// [public] display extension info popup
showExtensionInfo : function(options) {
// initialize
var self = this;
var $el = options.$el;
@@ -462,8 +447,8 @@ return Backbone.View.extend({
this.uploadbox.reset();
// reset value for universal type drop-down
this.select_extension.value(this.default_extension);
this.select_genome.value(this.default_genome);
this.select_extension.value(this.options.default_extension);
this.select_genome.value(this.options.default_genome);
// reset button
this.ui_button.set('percentage', 0);
@@ -474,7 +459,7 @@ return Backbone.View.extend({
updateExtension: function(extension, defaults_only) {
var self = this;
this.collection.each(function(item) {
if (item.get('status') == 'init' && (item.get('extension') == self.default_extension || !defaults_only)) {
if (item.get('status') == 'init' && (item.get('extension') == self.options.default_extension || !defaults_only)) {
item.set('extension', extension);
}
});
@@ -484,7 +469,7 @@ return Backbone.View.extend({
updateGenome: function(genome, defaults_only) {
var self = this;
this.collection.each(function(item) {
if (item.get('status') == 'init' && (item.get('genome') == self.default_genome || !defaults_only)) {
if (item.get('status') == 'init' && (item.get('genome') == self.options.default_genome || !defaults_only)) {
item.set('genome', genome);
}
});
@@ -510,7 +495,7 @@ return Backbone.View.extend({
}
// set html content
$('#upload-info').html(message);
this.$('#upload-info').html(message);
/*
update button status
@@ -550,14 +535,14 @@ return Backbone.View.extend({
this.modal.showButton('Choose FTP file');
} else {
this.modal.hideButton('Choose FTP file');
}
}*/
// table visibility
if (this.counter.announce + this.counter.success + this.counter.error > 0) {
$(this.el).find('#upload-table').show();
this.$('#upload-table').show();
} else {
$(this.el).find('#upload-table').hide();
}*/
this.$('#upload-table').hide();
}
},
// calculate percentage of all queued uploads
@@ -579,32 +564,35 @@ return Backbone.View.extend({
},
// load html template
_template: function(id, idInfo) {
return '<div class="upload-top">' +
'<h6 id="' + idInfo + '" class="upload-info"></h6>' +
'</div>' +
'<div id="' + id + '" class="upload-box">' +
'<table id="upload-table" class="table table-striped" style="display: none;">' +
'<thead>' +
'<tr>' +
'<th>Name</th>' +
'<th>Size</th>' +
'<th>Type</th>' +
'<th>Genome</th>' +
'<th>Settings</th>' +
'<th>Status</th>' +
'<th></th>' +
'</tr>' +
'</thead>' +
'<tbody></tbody>' +
'</table>' +
'</div>' +
'<div id="upload-header" class="upload-header">' +
'<span class="header-title">Type (set all):</span>' +
'<span id="header-extension"/>' +
'<span id="header-extension-info" class="upload-icon-button fa fa-search"/> ' +
'<span class="header-title">Genome (set all):</span>' +
'<span id="header-genome"/>' +
_template: function() {
return '<div class="upload-view-default">' +
'<div class="upload-top">' +
'<h6 id="upload-info" class="upload-info"></h6>' +
'</div>' +
'<div id="upload-box" class="upload-box">' +
'<table id="upload-table" class="table table-striped" style="display: none;">' +
'<thead>' +
'<tr>' +
'<th>Name</th>' +
'<th>Size</th>' +
'<th>Type</th>' +
'<th>Genome</th>' +
'<th>Settings</th>' +
'<th>Status</th>' +
'<th></th>' +
'</tr>' +
'</thead>' +
'<tbody></tbody>' +
'</table>' +
'</div>' +
'<div id="upload-footer" class="upload-footer">' +
'<span class="footer-title">Type (set all):</span>' +
'<span id="footer-extension"/>' +
'<span id="footer-extension-info" class="upload-icon-button fa fa-search"/> ' +
'<span class="footer-title">Genome (set all):</span>' +
'<span id="footer-genome"/>' +
'</div>' +
'<div id="upload-buttons" class="upload-buttons"/>' +
'</div>';
}
});
+19 -11
View File
@@ -13,26 +13,35 @@ return Backbone.View.extend({
// default options
options : {
nginx_upload_path : '',
default_genome : '?'
ftp_upload_site : 'n/a',
default_genome : '?',
default_extension : 'auto',
height : 400,
width : 900,
auto : {
id : 'auto',
text : 'Auto-detect',
description : 'This system will try to detect the file type automatically. If your file is not detected properly as one of the known formats, it most likely means that it has some format problems (e.g., different number of columns on different rows). You can still coerce the system to set your data to the format you think it should be. You can also upload compressed files, which will automatically be decompressed.'
}
},
// upload modal container
modal : null,
modal: null,
// progress button in panel
ui_button : null,
ui_button: null,
// current history identifier
current_history: null,
// contains all available dataset extensions/types
list_extensions : [],
list_extensions: [],
// contains all available genomes
list_genomes : [],
list_genomes: [],
// initialize
initialize : function(options) {
initialize: function(options) {
// link this
var self = this;
@@ -80,7 +89,7 @@ return Backbone.View.extend({
// add auto field
if (!self.options.datatypes_disable_auto) {
self.list_extensions.unshift(self.auto);
self.list_extensions.unshift(self.options.auto);
}
}
});
@@ -123,7 +132,7 @@ return Backbone.View.extend({
if (!this.modal) {
// build tabs
this.tabs = new Tabs.View();
// add tab
this.default_view = new UploadViewDefault(this);
this.tabs.add({
@@ -133,12 +142,11 @@ return Backbone.View.extend({
});
// make modal
var self = this;
this.modal = new Modal.View({
title : 'Download data directly from web or upload files from your disk',
body : this.tabs.$el,
height : '400',
width : '900',
height : this.options.height,
width : this.options.width,
closing_events : true
});
+3 -3
View File
@@ -228,18 +228,18 @@
}
}
.upload-header {
.upload-footer {
height:5%;
text-align:left;
max-height:20px;
line-height:18px;
margin-top: 10px;
.header-title {
.footer-title {
font-weight: bold;
padding-left: 60px;
padding-right: 20px;
}
.header-selection{
.footer-selection{
width:200px;
min-width:200px;
font-size:11px;
+1 -1
View File
@@ -1 +1 @@
{"version":3,"file":"upload-ftp.js","sources":["../../../src/mvc/upload/upload-ftp.js"],"names":["define","Utils","Backbone","View","extend","options","class_add","class_remove","class_partial","initialize","app","this","self","setElement","_template","rows","get","url","galaxy_config","root","success","ftp_files","_fill","error","events","mousedown","e","preventDefault","length","$el","find","html","$","_templateTable","size","key","push","_add","bytesToString","$select_all","addClass","on","add","hasClass","ftp_file","model_index","_find","trigger","_refresh","_templateInfo","hide","$it","_templateRow","$icon","el","append","icon_class","removeClass","collection","remove","uploadbox","mode","name","path","filtered","where","file_mode","item","findWhere","file_path","status","ctime","ftp_upload_site"],"mappings":"AACAA,QAAQ,eAAgB,SAASC,GAGjC,MAAOC,UAASC,KAAKC,QAEjBC,SACIC,UAAkB,oCAClBC,aAAkB,0CAClBC,cAAkB,2CAItBC,WAAY,SAASC,GAEjBC,KAAKD,IAAMA,CAGX,IAAIE,GAAOD,IAGXA,MAAKE,WAAWF,KAAKG,aAGrBH,KAAKI,QAGLd,EAAMe,KACFC,IAAUC,cAAcC,KAAO,mBAC/BC,QAAU,SAASC,GAAaT,EAAKU,MAAMD,IAC3CE,MAAU,WAAaX,EAAKU,YAKpCE,QACIC,UAAc,SAASC,GAAKA,EAAEC,mBAIlCL,MAAO,SAASD,GACZ,GAAIA,GAAaA,EAAUO,OAAS,EAAG,CAEnCjB,KAAKkB,IAAIC,KAAK,uBAAuBC,KAAKC,EAAErB,KAAKsB,k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Ac,MACdC,KAAclB,EAASmB,KACvB7B,KAAcU,EAASV,KACvB6B,KAAcnB,EAASmB,QAI3BV,EAAMb,SAAS5B,EAAKP,QAAQE,eAUhCK,EAAKoC,aAIFG,GAIXH,SAAU,WACN,GAAIgB,GAAWrD,KAAKD,IAAIgD,WAAWO,OAAOC,UAAY,OACtDvD,MAAK4B,YAAYkB,cAEb9C,KAAK4B,YAAYC,SADE,GAAnBwB,EAASpC,OACiBjB,KAAKN,QAAQC,UAEnC0D,EAASpC,QAAUjB,KAAKI,KAAKa,OACHjB,KAAKN,QAAQE,aAEbI,KAAKN,QAAQG,gBAMnDsC,MAAO,SAASF,GACZ,GAAIuB,GAAOxD,KAAKD,IAAIgD,WAAWU,WAC3BC,UAAczB,EAASmB,KACvBO,OAAc,OACdJ,UAAc,OAElB,OAAIC,GACOA,EAAKnD,IAAI,MAEb,MAIXoC,aAAc,SAAS/C,GACnB,MAAQ,+EAE8BA,EAAQ0D,KAAO,iCACf9D,EAAMqC,cAAcjC,EAAQ6B,MAAQ,6BACpC7B,EAAQkE,MAAQ,cAK1DtC,eAAgB,WACZ,MAAQ,kcAqBZgB,cAAe,WACX,MAAQ,uGAMZnC,UAAW,WACP,MAAQ,kPAEuJH,KAAKD,IAAIL,QAAQmE,gBAAkB"}
{"version":3,"file":"upload-ftp.js","sources":["../../../src/mvc/upload/upload-ftp.js"],"names":["define","Utils","Backbone","View","extend","options","class_add","class_remove","class_partial","initialize","app","this","self","setElement","_template","rows","get","url","galaxy_config","root","success","ftp_files","_fill","error","events","mousedown","e","preventDefault","length","$el","find","html","$","_templateTable","size","key","push","_add","bytesToString","$select_all","addClass","on","add","hasClass","ftp_file","model_index","_find","trigger","_refresh","_templateInfo","hide","$it","_templateRow","$icon","el","append","icon_class","removeClass","collection","remove","uploadbox","mode","name","path","filtered","where","file_mode","item","findWhere","file_path","status","ctime","ftp_upload_site"],"mappings":"AACAA,QAAQ,eAAgB,SAASC,GACjC,MAAOC,UAASC,KAAKC,QAE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}
@@ -1 +1 @@
{"version":3,"file":"upload-settings.js","sources":["../../../src/mvc/upload/upload-settings.js"],"names":["define","Backbone","View","extend","options","class_check","class_uncheck","initialize","app","this","self","setElement","_template","model","$el","find","on","_switchState","render","events","mousedown","e","preventDefault","_renderState","get","$cover","show","hide","element_id","parameter_id","checked","set","$it","removeClass","addClass"],"mappings":"AACAA,QAAQ,eAAgB,WAGxB,MAAOC,UAASC,KAAKC,QAEjBC,SACIC,YAAkB,0CAClBC,cAAkB,qCAItBC,WAAY,SAASC,GAEjBC,KAAKD,IAAMA,CAGX,IAAIE,GAAOD,IAGXA,MAAKE,WAAWF,KAAKG,aAGrBH,KAAKI,MAAQJ,KAAKD,IAAIK,MAGtBJ,KAAKK,IAAIC,KAAK,yBAAyBC,GAAG,QAAS,WAC/CN,EAAKO,aAAa,wBAAyB,mBAI/CR,KAAKK,IAAIC,KAAK,0BAA0BC,GAAG,QAAS,WAChDN,EAAKO,aAAa,yBAA0B,oBAIhDR,KAAKS,UAITC,QACIC,UAAc,SAASC,GAAKA,EAAEC,mBAIlCJ,OAAQ,WAEJT,KAAKc,aAAa,wBAAyBd,KAAKI,MAAMW,IAAI,kBAC1Df,KAAKc,aAAa,yBAA0Bd,KAAKI,MAAMW,IAAI,kBAG3D,IAAIC,GAAShB,KAAKK,IAAIC,KAAK,yBACK,SAA5BN,KAAKI,MAAMW,IAAI,UACfC,EAAOC,OAEPD,EAAOE,QAKfV,aAAc,SAAUW,EAAYC,GAChC,GAAgC,QAA5BpB,KAAKI,MAAMW,IAAI,UAAqB,CACpC,GAAIM,IAAWrB,KAAKI,MAAMW,IAAIK,EAC9BpB,MAAKI,MAAMkB,IAAIF,EAAcC,GAC7BrB,KAAKc,aAAaK,EAAYE,KAKtCP,aAAc,SAAUK,EAAYE,GAEhC,GAAIE,GAAMvB,KAAKK,IAAIC,KAAKa,EACxBI,GAAIC,cAEAD,EAAIE,SADJJ,EACarB,KAAKL,QAAQC,YAEbI,KAAKL,QAAQE,gBAKlCM,UAAW,WACP,MAAQ"}
{"version":3,"file":"upload-settings.js","sources":["../../../src/mvc/upload/upload-settings.js"],"names":["define","Backbone","View","extend","options","class_check","class_uncheck","initialize","app","this","self","setElement","_template","model","$","on","_switchState","render","events","mousedown","e","preventDefault","_renderState","get","$cover","show","hide","element_id","parameter_id","checked","set","$it","removeClass","addClass"],"mappings":"AACAA,QAAQ,eAAgB,WACxB,MAAOC,UAASC,KAAKC,QAEjBC,SACIC,YAAkB,0CAClBC,cAAkB,qCAItBC,WAAY,SAASC,GAEjBC,KAAKD,IAAMA,CAGX,IAAIE,GAAOD,IAGXA,MAAKE,WAAWF,KAAKG,aAGrBH,KAAKI,MAAQJ,KAAKD,IAAIK,MAGtBJ,KAAKK,EAAE,yBAAyBC,GAAG,QAAS,WACxCL,EAAKM,aAAa,wBAAyB,mBAI/CP,KAAKK,EAAE,0BAA0BC,GAAG,QAAS,WACzCL,EAAKM,aAAa,yBAA0B,oBAIhDP,KAAKQ,UAITC,QACIC,UAAc,SAASC,GAAKA,EAAEC,mBAIlCJ,OAAQ,WAEJR,KAAKa,aAAa,wBAAyBb,KAAKI,MAAMU,IAAI,kBAC1Dd,KAAKa,aAAa,yBAA0Bb,KAAKI,MAAMU,IAAI,kBAG3D,IAAIC,GAASf,KAAKK,EAAE,yBACY,SAA5BL,KAAKI,MAAMU,IAAI,UACfC,EAAOC,OAEPD,EAAOE,QAKfV,aAAc,SAAUW,EAAYC,GAChC,GAAgC,QAA5BnB,KAAKI,MAAMU,IAAI,UAAqB,CACpC,GAAIM,IAAWpB,KAAKI,MAAMU,IAAIK,EAC9BnB,MAAKI,MAAMiB,IAAIF,EAAcC,GAC7BpB,KAAKa,aAAaK,EAAYE,KAKtCP,aAAc,SAAUK,EAAYE,GAEhC,GAAIE,GAAMtB,KAAKK,EAAEa,EACjBI,GAAIC,cAEAD,EAAIE,SADJJ,EACapB,KAAKL,QAAQC,YAEbI,KAAKL,QAAQE,gBAKlCM,UAAW,WACP,MAAQ"}
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
{"version":3,"file":"upload-view.js","sources":["../../../src/mvc/upload/upload-view.js"],"names":["define","Utils","Modal","Tabs","UploadButton","UploadViewDefault","Backbone","View","extend","options","nginx_upload_path","default_genome","modal","ui_button","current_history","list_extensions","list_genomes","initialize","self","this","merge","Model","ui_button_view","model","onclick","e","preventDefault","show","onunload","$","append","$el","get","url","galaxy_config","root","success","datatypes","key","push","id","extension","text","description","description_url","sort","a","b","datatypes_disable_auto","unshift","auto","genomes","Galaxy","currHistoryPanel","window","setTimeout","tabs","default_view","add","title","body","height","width","closing_events","refresh","current_user","currUser"],"mappings":"AACAA,QAAQ,cACA,kBACA,iBACA,2BACA,kCACA,SAAYC,EACAC,EACAC,EACAC,EACAC,GACpB,MAAOC,UAASC,KAAKC,QAEjBC,SACIC,kBAAsB,GACtBC,eAAsB,KAI1BC,MAAQ,KAGRC,UAAY,KAGZC,gBAAiB,KAGjBC,mBAGAC,gBAGAC,WAAa,SAASR,GAElB,GAAIS,GAAOC,IAGXA,MAAKV,QAAUR,EAAMmB,MAAMX,EAASU,KAAKV,SAGzCU,KAAKN,UAAY,GAAIT,GAAaiB,MAGlCF,KAAKG,eAAiB,GAAIlB,GAAaG,MACnCgB,MAAcJ,KAAKN,UACnBW,QAAc,SAASC,GACnBA,EAAEC,iBACFR,EAAKS,QAETC,SAAc,eAQlBC,EAAE,uBAAuBC,OAAOX,KAAKG,eAAeS,IAGpD,IAAIb,GAAOC,IACXlB,GAAM+B,KACFC,IAAUC,cAAcC,KAAO,qCAC/BC,QAAU,SAASC,GACf,IAAKC,MAAOD,GACRnB,EAAKH,gBAAgBwB,MACjBC,GAAkBH,EAAUC,KAAKG,UACjCC,KAAkBL,EAAUC,KAAKG,UACjCE,YAAkBN,EAAUC,KAAKK,YACjCC,gBAAkBP,EAAUC,KAAKM,iBAKzC1B,GAAKH,gBAAgB8B,KAAK,SAASC,EAAGC,GAClC,MAAOD,GAAEJ,K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","Utils","Modal","Tabs","UploadButton","UploadViewDefault","Backbone","View","extend","options","nginx_upload_path","ftp_upload_site","default_genome","default_extension","height","width","auto","id","text","description","modal","ui_button","current_history","list_extensions","list_genomes","initialize","self","this","merge","Model","ui_button_view","model","onclick","e","preventDefault","show","onunload","$","append","$el","get","url","galaxy_config","root","success","datatypes","key","push","extension","description_url","sort","a","b","datatypes_disable_auto","unshift","genomes","Galaxy","currHistoryPanel","tabs","default_view","add","title","body","closing_events","refresh","window","setTimeout","current_user","currUser"],"mappings":"AACAA,QAAQ,cACA,kBACA,iBACA,2BACA,kCACA,SAAYC,EACAC,EACAC,EACAC,EACAC,GACpB,MAAOC,UAASC,KAAKC,QAEjBC,SACIC,kBAAsB,GACtBC,gBAAsB,MACtBC,eAAsB,IACtBC,kBAAsB,OACtBC,OAAsB,IACtBC,MAAsB,IACtBC,MACIC,GAAc,OACdC,KAAc,cACdC,YAAc,wZAKtBC,MAAO,KAGPC,UAAW,KAGXC,gBAAiB,KAGjBC,mBAGAC,gBAGAC,WAAY,SAAShB,GAEjB,GAAIiB,GAAOC,IAGXA,MAAKlB,QAAUR,EAAM2B,MAAMnB,EAASkB,KAAKlB,SAGzCkB,KAAKN,UAAY,GAAIjB,GAAayB,MAGlCF,KAAKG,eAAiB,GAAI1B,GAAaG,MACnCwB,MAAcJ,KAAKN,UACnBW,QAAc,SAASC,GACnBA,EAAEC,iBACFR,EAAKS,QAETC,SAAc,eAQlBC,EAAE,uBAAuBC,OAAOX,KAAKG,eAAeS,IAGpD,IAAIb,GAAOC,IACX1B,GAAMuC,KACFC,IAAUC,cAAcC,KAAO,qCAC/BC,QAAU,SAASC,GACf,IAAKC,MAAOD,GACRnB,EAAKH,gBAAgBwB,MACjB9B,GAAkB4B,EAAUC,KAAKE,UACjC9B,KAAkB2B,EAAUC,KAAKE,UACjC7B,YAAkB0B,EAAUC,KAAK3B,YACjC8B,gBAAkBJ,EAAUC,KAAKG,iBAKzCvB,GAAKH,gBAAgB2B,KAAK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MAAMS,IAAI"}
+1 -1
View File
@@ -1,2 +1,2 @@
define(["utils/utils"],function(){return Backbone.View.extend({options:{class_check:"upload-icon-button fa fa-check-square-o",class_uncheck:"upload-icon-button fa fa-square-o"},initialize:function(a){this.app=a;var b=this;this.setElement(this._template()),this.model=this.app.model,this.$el.find("#upload-space-to-tabs").on("click",function(){b._switchState("#upload-space-to-tabs","space_to_tabs")}),this.$el.find("#upload-to-posix-lines").on("click",function(){b._switchState("#upload-to-posix-lines","to_posix_lines")}),this.render()},events:{mousedown:function(a){a.preventDefault()}},render:function(){this._renderState("#upload-space-to-tabs",this.model.get("space_to_tabs")),this._renderState("#upload-to-posix-lines",this.model.get("to_posix_lines"));var a=this.$el.find("#upload-settings-cover");"init"!=this.model.get("status")?a.show():a.hide()},_switchState:function(a,b){if("init"==this.model.get("status")){var c=!this.model.get(b);this.model.set(b,c),this._renderState(a,c)}},_renderState:function(a,b){var c=this.$el.find(a);c.removeClass(),c.addClass(b?this.options.class_check:this.options.class_uncheck)},_template:function(){return'<div class="upload-settings" style="position: relative;"><div id="upload-settings-cover" class="upload-settings-cover"/><table class="table table-striped"><tbody><tr><td><div id="upload-space-to-tabs"/></td><td>Convert spaces to tabs</td></tr><tr><td><div id="upload-to-posix-lines"/></td><td>Use POSIX standard</td></tr></tbody></table></div>'}})});
define(["utils/utils"],function(){return Backbone.View.extend({options:{class_check:"upload-icon-button fa fa-check-square-o",class_uncheck:"upload-icon-button fa fa-square-o"},initialize:function(a){this.app=a;var b=this;this.setElement(this._template()),this.model=this.app.model,this.$("#upload-space-to-tabs").on("click",function(){b._switchState("#upload-space-to-tabs","space_to_tabs")}),this.$("#upload-to-posix-lines").on("click",function(){b._switchState("#upload-to-posix-lines","to_posix_lines")}),this.render()},events:{mousedown:function(a){a.preventDefault()}},render:function(){this._renderState("#upload-space-to-tabs",this.model.get("space_to_tabs")),this._renderState("#upload-to-posix-lines",this.model.get("to_posix_lines"));var a=this.$("#upload-settings-cover");"init"!=this.model.get("status")?a.show():a.hide()},_switchState:function(a,b){if("init"==this.model.get("status")){var c=!this.model.get(b);this.model.set(b,c),this._renderState(a,c)}},_renderState:function(a,b){var c=this.$(a);c.removeClass(),c.addClass(b?this.options.class_check:this.options.class_uncheck)},_template:function(){return'<div class="upload-settings" style="position: relative;"><div id="upload-settings-cover" class="upload-settings-cover"/><table class="table table-striped"><tbody><tr><td><div id="upload-space-to-tabs"/></td><td>Convert spaces to tabs</td></tr><tr><td><div id="upload-to-posix-lines"/></td><td>Use POSIX standard</td></tr></tbody></table></div>'}})});
//# sourceMappingURL=../../../maps/mvc/upload/upload-settings.js.map
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,2 +1,2 @@
define(["utils/utils","mvc/ui/ui-modal","mvc/ui/ui-tabs","mvc/upload/upload-button","mvc/upload/upload-view-default"],function(a,b,c,d,e){return Backbone.View.extend({options:{nginx_upload_path:"",default_genome:"?"},modal:null,ui_button:null,current_history:null,list_extensions:[],list_genomes:[],initialize:function(b){var c=this;this.options=a.merge(b,this.options),this.ui_button=new d.Model,this.ui_button_view=new d.View({model:this.ui_button,onclick:function(a){a.preventDefault(),c.show()},onunload:function(){}}),$(".with-upload-button").append(this.ui_button_view.$el);var c=this;a.get({url:galaxy_config.root+"api/datatypes?extension_only=False",success:function(a){for(key in a)c.list_extensions.push({id:a[key].extension,text:a[key].extension,description:a[key].description,description_url:a[key].description_url});c.list_extensions.sort(function(a,b){return a.text>b.text?1:a.text<b.text?-1:0}),c.options.datatypes_disable_auto||c.list_extensions.unshift(c.auto)}}),a.get({url:galaxy_config.root+"api/genomes",success:function(a){for(key in a)c.list_genomes.push({id:a[key][1],text:a[key][0]});c.list_genomes.sort(function(a,b){return a.id==c.options.default_genome?-1:b.id==c.options.default_genome?1:a.text>b.text?1:a.text<b.text?-1:0})}})},show:function(){var a=this;if(!Galaxy.currHistoryPanel||!Galaxy.currHistoryPanel.model)return void window.setTimeout(function(){a.show()},500);if(!this.modal){this.tabs=new c.View,this.default_view=new e(this),this.tabs.add({id:"default",title:"Default",$el:this.default_view.$el});var a=this;this.modal=new b.View({title:"Download data directly from web or upload files from your disk",body:this.tabs.$el,height:"400",width:"900",closing_events:!0}),this.refresh()}this.modal.show()},refresh:function(){this.current_user=Galaxy.currUser.get("id"),this.current_history=null,this.current_user&&(this.current_history=Galaxy.currHistoryPanel.model.get("id"))}})});
define(["utils/utils","mvc/ui/ui-modal","mvc/ui/ui-tabs","mvc/upload/upload-button","mvc/upload/upload-view-default"],function(a,b,c,d,e){return Backbone.View.extend({options:{nginx_upload_path:"",ftp_upload_site:"n/a",default_genome:"?",default_extension:"auto",height:400,width:900,auto:{id:"auto",text:"Auto-detect",description:"This system will try to detect the file type automatically. If your file is not detected properly as one of the known formats, it most likely means that it has some format problems (e.g., different number of columns on different rows). You can still coerce the system to set your data to the format you think it should be. You can also upload compressed files, which will automatically be decompressed."}},modal:null,ui_button:null,current_history:null,list_extensions:[],list_genomes:[],initialize:function(b){var c=this;this.options=a.merge(b,this.options),this.ui_button=new d.Model,this.ui_button_view=new d.View({model:this.ui_button,onclick:function(a){a.preventDefault(),c.show()},onunload:function(){}}),$(".with-upload-button").append(this.ui_button_view.$el);var c=this;a.get({url:galaxy_config.root+"api/datatypes?extension_only=False",success:function(a){for(key in a)c.list_extensions.push({id:a[key].extension,text:a[key].extension,description:a[key].description,description_url:a[key].description_url});c.list_extensions.sort(function(a,b){return a.text>b.text?1:a.text<b.text?-1:0}),c.options.datatypes_disable_auto||c.list_extensions.unshift(c.options.auto)}}),a.get({url:galaxy_config.root+"api/genomes",success:function(a){for(key in a)c.list_genomes.push({id:a[key][1],text:a[key][0]});c.list_genomes.sort(function(a,b){return a.id==c.options.default_genome?-1:b.id==c.options.default_genome?1:a.text>b.text?1:a.text<b.text?-1:0})}})},show:function(){var a=this;return Galaxy.currHistoryPanel&&Galaxy.currHistoryPanel.model?(this.modal||(this.tabs=new c.View,this.default_view=new e(this),this.tabs.add({id:"default",title:"Default",$el:this.default_view.$el}),this.modal=new b.View({title:"Download data directly from web or upload files from your disk",body:this.tabs.$el,height:this.options.height,width:this.options.width,closing_events:!0}),this.refresh()),void this.modal.show()):void window.setTimeout(function(){a.show()},500)},refresh:function(){this.current_user=Galaxy.currUser.get("id"),this.current_history=null,this.current_user&&(this.current_history=Galaxy.currHistoryPanel.model.get("id"))}})});
//# sourceMappingURL=../../../maps/mvc/upload/upload-view.js.map
+3 -3
View File
@@ -1406,9 +1406,9 @@ html[dir="rtl"] .select2-container-multi .select2-search-choice-close{left:auto;
.upload-ftp .upload-ftp-row{cursor:pointer}.upload-ftp .upload-ftp-row .label{width:240px}.upload-ftp .upload-ftp-row .label p{width:inherit;word-wrap:break-word}
.upload-ftp .upload-ftp-row .nonlabel{white-space:nowrap}
.upload-settings .upload-settings-cover{position:absolute;width:100%;height:100%;top:0px;left:0px;background:#fff;opacity:0.4;cursor:no-drop}
.upload-header{height:5%;text-align:left;max-height:20px;line-height:18px;margin-top:10px}.upload-header .header-title{font-weight:bold;padding-left:60px;padding-right:20px}
.upload-header .header-selection{width:200px;min-width:200px;font-size:11px;padding-right:10px}
.upload-header .select2-choice{max-height:20px;line-height:18px;background:transparent;text-align:center;font-weight:normal}.upload-header .select2-choice .select2-arrow b{background-position:0 -3px}
.upload-footer{height:5%;text-align:left;max-height:20px;line-height:18px;margin-top:10px}.upload-footer .footer-title{font-weight:bold;padding-left:60px;padding-right:20px}
.upload-footer .footer-selection{width:200px;min-width:200px;font-size:11px;padding-right:10px}
.upload-footer .select2-choice{max-height:20px;line-height:18px;background:transparent;text-align:center;font-weight:normal}.upload-footer .select2-choice .select2-arrow b{background-position:0 -3px}
.upload-top{height:5%;text-align:center}.upload-top .upload-info{margin-top:0px;font-weight:normal;text-align:center}
.no-highlight,.ui-button-icon{-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none;}
.no-padding{padding:0px !important}