Skip to content

Commit

Permalink
Fix upload view initialization.
Browse files Browse the repository at this point in the history
  • Loading branch information
dannon authored and jmchilton committed Jan 24, 2018
1 parent e123034 commit eb5c4d4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions client/galaxy/scripts/mvc/upload/upload-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import UploadViewDefault from "mvc/upload/default/default-view";
import UploadViewComposite from "mvc/upload/composite/composite-view";
import UploadViewCollection from "mvc/upload/collection/collection-view";
import UploadViewRuleBased from "mvc/upload/collection/rules-input-view";

export default Backbone.View.extend({
options: {
nginx_upload_path: "",
Expand All @@ -27,17 +28,16 @@ export default Backbone.View.extend({
list_genomes: [],

initialize: function(options) {
var self = this;
this.options = Utils.merge(options, this.options);

// create view for upload/progress button
this.ui_button = new UploadButton.View({
onclick: function(e) {
onclick: e => {
e.preventDefault();
self.show();
this.show();
},
onunload: function() {
var percentage = self.ui_button.model.get("percentage", 0);
onunload: () => {
var percentage = this.ui_button.model.get("percentage", 0);
if (percentage > 0 && percentage < 100) {
return "Several uploads are queued.";
}
Expand All @@ -52,8 +52,8 @@ export default Backbone.View.extend({
list_extensions => {
this.list_extensions = list_extensions;
},
options.datatypes_disable_auto,
options.auto
this.options.datatypes_disable_auto,
this.options.auto
);

// load genomes
Expand Down

0 comments on commit eb5c4d4

Please sign in to comment.