lib/suricate/generator/assets/javascript/widget-view.js in suricate-0.0.3 vs lib/suricate/generator/assets/javascript/widget-view.js in suricate-0.0.4

- old
+ new

@@ -8,11 +8,11 @@ warning: "warning" }; Suricate.WidgetView = function(content) { this.content = $(content); - this.currentStatus = statuses.ok; + this.currentStatus = undefined; }; /* * Public */ @@ -66,10 +66,11 @@ Suricate.WidgetView.prototype.setStatus = function(status) { if(this.currentStatus !== status) { var statuses = ["ok", "danger", "warning"]; var statusIndex = statuses.indexOf(status); - var classesToRemove = statuses.splice(statusIndex, 1); + statuses.splice(statusIndex, 1); + var classesToRemove = statuses.join(" "); this.content.removeClass(classesToRemove); this.content.addClass(status); this.currentStatus = status; } };