1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/49d651198b3a/ Changeset: 49d651198b3a User: dannon Date: 2015-01-23 20:30:28+00:00 Summary: Remove more trailing space from upload.js's. Affected #: 4 files diff -r 443f25d4608260ee699cf125166d76df003d2ef9 -r 49d651198b3a7756936c4b578ccdd824b2c55e4e client/galaxy/scripts/mvc/upload/upload-row.js --- a/client/galaxy/scripts/mvc/upload/upload-row.js +++ b/client/galaxy/scripts/mvc/upload/upload-row.js @@ -4,7 +4,7 @@ 'mvc/upload/upload-settings', 'mvc/ui/ui-popover', 'mvc/ui/ui-select'], - + function( Utils, UploadModel, UploadSettings, @@ -18,7 +18,7 @@ options: { padding : 8 }, - + // states status_classes : { init : 'upload-icon-button fa fa-trash-o', @@ -27,36 +27,36 @@ success : 'upload-icon-button fa fa-check', error : 'upload-icon-button fa fa-exclamation-triangle' }, - + // handle for settings popover settings: null, - + // genome selector select_genome : null, - + // extension selector select_extension : null, - + // render initialize: function(app, options) { // link app this.app = app; - + // default value for extension of files var default_ext = 'Auto-detect'; // link this var self = this; - + // create model this.model = new UploadModel.Model(options); - + // add upload item this.setElement(this._template(options)); // link item var it = this.$el; - + // append popup to settings icon this.settings = new Popover.View({ title : 'Upload configuration', @@ -74,11 +74,11 @@ container: it.find('#genome'), value: self.model.get('genome') }); - + // initialize genome this.model.set('genome', self.select_genome.value()); - // ensure files added after an individual row has changed + // ensure files added after an individual row has changed // default to Auto-detect instead of --- if(!(this.app.select_extension.value() === '---')){ this.default_ext = this.app.select_extension.value(); @@ -89,7 +89,7 @@ css: 'extension', onchange : function() { self.model.set('extension', self.select_extension.value()); - // if user has changed individual row type, then change "set all" + // if user has changed individual row type, then change "set all" // type to '---' if(!(self.select_extension.value() === app.select_extension.value())) { @@ -101,17 +101,17 @@ container: it.find('#extension'), value: self.default_ext }); - + // initialize extension this.model.set('extension', self.select_extension.value()); - + // // ui events // - + // handle click event it.find('#symbol').on('click', function() { self._removeRow(); }); - + // handle extension info popover it.find('#extension-info').on('click' , function(e) { self._showExtensionInfo(); }) .on('mousedown', function(e) { e.preventDefault(); }); @@ -125,12 +125,12 @@ self.model.set('url_paste', $(e.target).val()); self.model.set('file_size', $(e.target).val().length); }); - + // handle space to tabs button it.find('#space_to_tabs').on('change', function(e) { self.model.set('space_to_tabs', $(e.target).prop('checked')); }); - + // // model events // @@ -157,57 +157,57 @@ }); self.model.set('row', self); }, - + // render render: function() { // read model var file_name = this.model.get('file_name'); var file_size = this.model.get('file_size'); var file_mode = this.model.get('file_mode'); - + // link item var it = this.$el; - + // update title it.find('#title').html(file_name); - + // update info it.find('#size').html(Utils.bytesToString (file_size)); - + // remove mode class it.find('#mode').removeClass() .addClass('mode'); - + // activate text field if file is new if (file_mode == 'new') { // get text component var text = it.find('#text'); - + // get padding var padding = this.options.padding; - + // get dimensions var width = it.width() - 2 * padding; var height = it.height() - padding; - + // set dimensions text.css('width', width + 'px'); text.css('top', height + 'px'); it.height(height + text.height() + 2 * padding); - + // show text field text.show(); - + // update icon it.find('#mode').addClass('fa fa-pencil'); } - + // file from local disk if (file_mode == 'local') { // update icon it.find('#mode').addClass('fa fa-laptop'); } - + // file from ftp if (file_mode == 'ftp') { // update icon @@ -220,7 +220,7 @@ // trigger remove event this.select_genome.remove(); this.select_extension.remove(); - + // call the base class remove method Backbone.View.prototype.remove.apply(this); }, @@ -228,14 +228,14 @@ // // handle model events // - + // genome _refreshGenome: function() { // update genome info on screen var genome = this.model.get('genome'); this.select_genome.value(genome); }, - + // progress _refreshInfo: function() { // write error message @@ -246,7 +246,7 @@ this.$el.find('#info').hide(); } }, - + // progress _refreshPercentage : function() { var percentage = parseInt(this.model.get('percentage')); @@ -256,29 +256,29 @@ else this.$el.find('#percentage').html('Adding to history...'); }, - + // status _refreshStatus : function() { // get element var it = this.$el; - + // identify new status var status = this.model.get('status'); var status_class = this.status_classes[status]; - + // identify symbol and reset classes var sy = this.$el.find('#symbol'); sy.removeClass(); - + // set new status class sy.addClass(status_class); - + // enable form fields if (status == 'init') { // select fields this.select_genome.enable(); this.select_extension.enable(); - + // default fields it.find('#text-content').attr('disabled', false); it.find('#space_to_tabs').attr('disabled', false); @@ -286,18 +286,18 @@ // select fields this.select_genome.disable(); this.select_extension.disable(); - + // default fields it.find('#text-content').attr('disabled', true); it.find('#space_to_tabs').attr('disabled', true); } - + // success if (status == 'success') { it.addClass('success'); it.find('#percentage').html('100%'); } - + // error if (status == 'error') { it.addClass('danger'); @@ -314,18 +314,18 @@ // // handle ui events // - + // remove row _removeRow: function() { // get current status var status = this.model.get('status'); - + // only remove from queue if not in processing line if (status == 'init' || status == 'success' || status == 'error') { this.app.collection.remove(this.model); } }, - + // attach file info popup _showExtensionInfo : function() { // initialize @@ -333,7 +333,7 @@ var extension = this.model.get('extension'); var title = this.select_extension.text(); var description = _.findWhere(this.app.list_extensions, {'id': extension}); - + // create popup if (!this.extension_popup) { this.extension_popup = new Popover.View({ @@ -341,7 +341,7 @@ container: $el }); } - + // show / hide popup if (!this.extension_popup.visible) { this.extension_popup.title(title); @@ -366,7 +366,7 @@ this.settings.hide(); } }, - + // template _templateDescription: function(options) { if (options.description) { @@ -379,7 +379,7 @@ return 'There is no description available for this file extension.'; } }, - + // template _template: function(options) { return '<tr id="upload-item-' + options.id + '" class="upload-item">' + @@ -417,7 +417,7 @@ '</td>' + '</tr>'; } - + }); }); diff -r 443f25d4608260ee699cf125166d76df003d2ef9 -r 49d651198b3a7756936c4b578ccdd824b2c55e4e client/galaxy/scripts/mvc/upload/upload-settings.js --- a/client/galaxy/scripts/mvc/upload/upload-settings.js +++ b/client/galaxy/scripts/mvc/upload/upload-settings.js @@ -8,35 +8,35 @@ class_check : 'upload-icon-button fa fa-check-square-o', class_uncheck : 'upload-icon-button fa fa-square-o' }, - + // render initialize: function(app) { // link app this.app = app; - + // link this var self = this; - + // set template this.setElement(this._template()); - + // link model this.model = this.app.model; - + // ui event: space to tabs this.$el.find('#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() { self._switchState('#upload-to-posix-lines', 'to_posix_lines'); }); - + // render this.render(); }, - + // events events: { 'mousedown' : function(e) { e.preventDefault(); } @@ -47,7 +47,7 @@ // render states this._renderState('#upload-space-to-tabs', this.model.get('space_to_tabs')); this._renderState('#upload-to-posix-lines', this.model.get('to_posix_lines')); - + // disable options var $cover = this.$el.find('#upload-settings-cover'); if (this.model.get('status') != 'init') { @@ -56,7 +56,7 @@ $cover.hide(); } }, - + // switch state _switchState: function (element_id, parameter_id) { if (this.model.get('status') == 'init') { @@ -65,7 +65,7 @@ this._renderState(element_id, checked); } }, - + // render state _renderState: function (element_id, checked) { // swith icon class @@ -77,7 +77,7 @@ $it.addClass(this.options.class_uncheck); } }, - + // load template _template: function() { return '<div class="upload-settings" style="position: relative;">' + diff -r 443f25d4608260ee699cf125166d76df003d2ef9 -r 49d651198b3a7756936c4b578ccdd824b2c55e4e static/scripts/mvc/upload/upload-row.js --- a/static/scripts/mvc/upload/upload-row.js +++ b/static/scripts/mvc/upload/upload-row.js @@ -4,7 +4,7 @@ 'mvc/upload/upload-settings', 'mvc/ui/ui-popover', 'mvc/ui/ui-select'], - + function( Utils, UploadModel, UploadSettings, @@ -18,7 +18,7 @@ options: { padding : 8 }, - + // states status_classes : { init : 'upload-icon-button fa fa-trash-o', @@ -27,36 +27,36 @@ success : 'upload-icon-button fa fa-check', error : 'upload-icon-button fa fa-exclamation-triangle' }, - + // handle for settings popover settings: null, - + // genome selector select_genome : null, - + // extension selector select_extension : null, - + // render initialize: function(app, options) { // link app this.app = app; - + // default value for extension of files var default_ext = 'Auto-detect'; // link this var self = this; - + // create model this.model = new UploadModel.Model(options); - + // add upload item this.setElement(this._template(options)); // link item var it = this.$el; - + // append popup to settings icon this.settings = new Popover.View({ title : 'Upload configuration', @@ -74,11 +74,11 @@ container: it.find('#genome'), value: self.model.get('genome') }); - + // initialize genome this.model.set('genome', self.select_genome.value()); - // ensure files added after an individual row has changed + // ensure files added after an individual row has changed // default to Auto-detect instead of --- if(!(this.app.select_extension.value() === '---')){ this.default_ext = this.app.select_extension.value(); @@ -89,7 +89,7 @@ css: 'extension', onchange : function() { self.model.set('extension', self.select_extension.value()); - // if user has changed individual row type, then change "set all" + // if user has changed individual row type, then change "set all" // type to '---' if(!(self.select_extension.value() === app.select_extension.value())) { @@ -101,17 +101,17 @@ container: it.find('#extension'), value: self.default_ext }); - + // initialize extension this.model.set('extension', self.select_extension.value()); - + // // ui events // - + // handle click event it.find('#symbol').on('click', function() { self._removeRow(); }); - + // handle extension info popover it.find('#extension-info').on('click' , function(e) { self._showExtensionInfo(); }) .on('mousedown', function(e) { e.preventDefault(); }); @@ -125,12 +125,12 @@ self.model.set('url_paste', $(e.target).val()); self.model.set('file_size', $(e.target).val().length); }); - + // handle space to tabs button it.find('#space_to_tabs').on('change', function(e) { self.model.set('space_to_tabs', $(e.target).prop('checked')); }); - + // // model events // @@ -157,57 +157,57 @@ }); self.model.set('row', self); }, - + // render render: function() { // read model var file_name = this.model.get('file_name'); var file_size = this.model.get('file_size'); var file_mode = this.model.get('file_mode'); - + // link item var it = this.$el; - + // update title it.find('#title').html(file_name); - + // update info it.find('#size').html(Utils.bytesToString (file_size)); - + // remove mode class it.find('#mode').removeClass() .addClass('mode'); - + // activate text field if file is new if (file_mode == 'new') { // get text component var text = it.find('#text'); - + // get padding var padding = this.options.padding; - + // get dimensions var width = it.width() - 2 * padding; var height = it.height() - padding; - + // set dimensions text.css('width', width + 'px'); text.css('top', height + 'px'); it.height(height + text.height() + 2 * padding); - + // show text field text.show(); - + // update icon it.find('#mode').addClass('fa fa-pencil'); } - + // file from local disk if (file_mode == 'local') { // update icon it.find('#mode').addClass('fa fa-laptop'); } - + // file from ftp if (file_mode == 'ftp') { // update icon @@ -220,7 +220,7 @@ // trigger remove event this.select_genome.remove(); this.select_extension.remove(); - + // call the base class remove method Backbone.View.prototype.remove.apply(this); }, @@ -228,14 +228,14 @@ // // handle model events // - + // genome _refreshGenome: function() { // update genome info on screen var genome = this.model.get('genome'); this.select_genome.value(genome); }, - + // progress _refreshInfo: function() { // write error message @@ -246,7 +246,7 @@ this.$el.find('#info').hide(); } }, - + // progress _refreshPercentage : function() { var percentage = parseInt(this.model.get('percentage')); @@ -256,29 +256,29 @@ else this.$el.find('#percentage').html('Adding to history...'); }, - + // status _refreshStatus : function() { // get element var it = this.$el; - + // identify new status var status = this.model.get('status'); var status_class = this.status_classes[status]; - + // identify symbol and reset classes var sy = this.$el.find('#symbol'); sy.removeClass(); - + // set new status class sy.addClass(status_class); - + // enable form fields if (status == 'init') { // select fields this.select_genome.enable(); this.select_extension.enable(); - + // default fields it.find('#text-content').attr('disabled', false); it.find('#space_to_tabs').attr('disabled', false); @@ -286,18 +286,18 @@ // select fields this.select_genome.disable(); this.select_extension.disable(); - + // default fields it.find('#text-content').attr('disabled', true); it.find('#space_to_tabs').attr('disabled', true); } - + // success if (status == 'success') { it.addClass('success'); it.find('#percentage').html('100%'); } - + // error if (status == 'error') { it.addClass('danger'); @@ -314,18 +314,18 @@ // // handle ui events // - + // remove row _removeRow: function() { // get current status var status = this.model.get('status'); - + // only remove from queue if not in processing line if (status == 'init' || status == 'success' || status == 'error') { this.app.collection.remove(this.model); } }, - + // attach file info popup _showExtensionInfo : function() { // initialize @@ -333,7 +333,7 @@ var extension = this.model.get('extension'); var title = this.select_extension.text(); var description = _.findWhere(this.app.list_extensions, {'id': extension}); - + // create popup if (!this.extension_popup) { this.extension_popup = new Popover.View({ @@ -341,7 +341,7 @@ container: $el }); } - + // show / hide popup if (!this.extension_popup.visible) { this.extension_popup.title(title); @@ -366,7 +366,7 @@ this.settings.hide(); } }, - + // template _templateDescription: function(options) { if (options.description) { @@ -379,7 +379,7 @@ return 'There is no description available for this file extension.'; } }, - + // template _template: function(options) { return '<tr id="upload-item-' + options.id + '" class="upload-item">' + @@ -417,7 +417,7 @@ '</td>' + '</tr>'; } - + }); }); diff -r 443f25d4608260ee699cf125166d76df003d2ef9 -r 49d651198b3a7756936c4b578ccdd824b2c55e4e static/scripts/mvc/upload/upload-settings.js --- a/static/scripts/mvc/upload/upload-settings.js +++ b/static/scripts/mvc/upload/upload-settings.js @@ -8,35 +8,35 @@ class_check : 'upload-icon-button fa fa-check-square-o', class_uncheck : 'upload-icon-button fa fa-square-o' }, - + // render initialize: function(app) { // link app this.app = app; - + // link this var self = this; - + // set template this.setElement(this._template()); - + // link model this.model = this.app.model; - + // ui event: space to tabs this.$el.find('#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() { self._switchState('#upload-to-posix-lines', 'to_posix_lines'); }); - + // render this.render(); }, - + // events events: { 'mousedown' : function(e) { e.preventDefault(); } @@ -47,7 +47,7 @@ // render states this._renderState('#upload-space-to-tabs', this.model.get('space_to_tabs')); this._renderState('#upload-to-posix-lines', this.model.get('to_posix_lines')); - + // disable options var $cover = this.$el.find('#upload-settings-cover'); if (this.model.get('status') != 'init') { @@ -56,7 +56,7 @@ $cover.hide(); } }, - + // switch state _switchState: function (element_id, parameter_id) { if (this.model.get('status') == 'init') { @@ -65,7 +65,7 @@ this._renderState(element_id, checked); } }, - + // render state _renderState: function (element_id, checked) { // swith icon class @@ -77,7 +77,7 @@ $it.addClass(this.options.class_uncheck); } }, - + // load template _template: function() { return '<div class="upload-settings" style="position: relative;">' + Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.