mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-25 00:12:08 +08:00
Allow upload if all non-optional files are selected
Fixes https://github.com/galaxyproject/galaxy/issues/5326
This commit is contained in:
@@ -50,7 +50,8 @@ export default Backbone.View.extend({
|
||||
_.each(details.composite_files, item => {
|
||||
self.collection.add({
|
||||
id: self.collection.size(),
|
||||
file_desc: item.description || item.name
|
||||
file_desc: item.description || item.name,
|
||||
optional: item.optional,
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -100,7 +101,7 @@ export default Backbone.View.extend({
|
||||
this.select_genome.enable();
|
||||
this.select_extension.enable();
|
||||
}
|
||||
if (this.collection.where({ status: "ready" }).length == this.collection.length && this.collection.length > 0) {
|
||||
if (this.collection.where({ status: "ready" }).length + this.collection.where({ optional: true }).length == this.collection.length && this.collection.length > 0) {
|
||||
this.btnStart.enable();
|
||||
this.btnStart.$el.addClass("btn-primary");
|
||||
} else {
|
||||
|
||||
@@ -4,6 +4,7 @@ var Model = Backbone.Model.extend({
|
||||
genome: "?",
|
||||
url_paste: "",
|
||||
status: "init",
|
||||
optional: false,
|
||||
info: null,
|
||||
file_name: "",
|
||||
file_mode: "",
|
||||
|
||||
@@ -172,6 +172,8 @@ export default Backbone.View.extend({
|
||||
file: it.get("file_data")
|
||||
});
|
||||
}
|
||||
} else if (it.get("optional")) {
|
||||
continue;
|
||||
} else {
|
||||
data.error_message = "Upload content incomplete.";
|
||||
it.set("status", "error");
|
||||
|
||||
Reference in New Issue
Block a user