Merge pull request #6124 from martenson/fix-upload-colorstate

[18.05] fix upload status colors to work with bs4
This commit is contained in:
Dannon
2018-05-14 06:47:45 -04:00
committed by GitHub
3 changed files with 8 additions and 8 deletions
@@ -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();
}
},