mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-24 12:13:33 +08:00
Merge pull request #6124 from martenson/fix-upload-colorstate
[18.05] fix upload status colors to work with bs4
This commit is contained in:
@@ -128,11 +128,11 @@ export default Backbone.View.extend({
|
||||
var enabled = this.model.get("enabled");
|
||||
this.$text_content.attr("disabled", !enabled);
|
||||
if (status == "success") {
|
||||
this.$el.addClass("success");
|
||||
this.$el.addClass("table-success");
|
||||
this.$percentage.html("100%");
|
||||
}
|
||||
if (status == "error") {
|
||||
this.$el.addClass("danger");
|
||||
this.$el.addClass("table-danger");
|
||||
this.$info_progress.hide();
|
||||
}
|
||||
},
|
||||
|
||||
@@ -223,18 +223,18 @@ export default Backbone.View.extend({
|
||||
this.$status.removeClass().addClass(this.status_classes[status]);
|
||||
this.model.set("enabled", status != "running");
|
||||
this.$text_content.attr("disabled", !this.model.get("enabled"));
|
||||
this.$el.removeClass("success danger warning");
|
||||
this.$el.removeClass("table-success table-danger table-warning");
|
||||
if (status == "running" || status == "ready") {
|
||||
this.model.set("percentage", 0);
|
||||
}
|
||||
this.$source.find(".button")[status == "running" ? "addClass" : "removeClass"]("disabled");
|
||||
if (status == "success") {
|
||||
this.$el.addClass("success");
|
||||
this.$el.addClass("table-success");
|
||||
this.model.set("percentage", 100);
|
||||
this.$percentage.html("100%");
|
||||
}
|
||||
if (status == "error") {
|
||||
this.$el.addClass("danger");
|
||||
this.$el.addClass("table-danger");
|
||||
this.model.set("percentage", 0);
|
||||
this.$info_progress.hide();
|
||||
this.$info_text.show();
|
||||
|
||||
@@ -225,13 +225,13 @@ export default Backbone.View.extend({
|
||||
this.$info_progress.show();
|
||||
this.$el.removeClass().addClass("upload-row");
|
||||
if (status == "success") {
|
||||
this.$el.addClass("success");
|
||||
this.$el.addClass("table-success");
|
||||
this.$percentage.html("100%");
|
||||
} else if (status == "error") {
|
||||
this.$el.addClass("danger");
|
||||
this.$el.addClass("table-danger");
|
||||
this.$info_progress.hide();
|
||||
} else if (status == "warning") {
|
||||
this.$el.addClass("warning");
|
||||
this.$el.addClass("table-warning");
|
||||
this.$info_progress.hide();
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user