Skip to content

Commit b598371

Browse files
committed
back to normal error messages
1 parent 0bfc695 commit b598371

1 file changed

Lines changed: 3 additions & 11 deletions

File tree

src/main/webapp/res/js/models.js

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2046,19 +2046,11 @@ var StatsView = Backbone.View.extend({
20462046
},
20472047
error: function(model, response, options) {
20482048
self.$el.fadeOut();
2049-
var msg = "";
2050-
if( response.responseJSON !== undefined && response.responseJSON.status == "error" ) {
2051-
msg = "<b>Error while fetching stats:</b> <ul>";
2052-
_.each(response.responseJSON.errors, function (text) {
2053-
msg += "<li>" + text + "</li>";
2054-
});
2055-
msg += "</ul>";
2056-
}
2049+
if( response.responseJSON !== undefined && response.responseJSON.status == "error" )
2050+
messageView.error("Error while fetching stats", response.responseJSON.errors);
20572051
else
2058-
msg = "Error while fetching stats!";
2052+
messageView.error("Error while fetching stats!");
20592053

2060-
console.log(msg);
2061-
self.$el.html(msg).fadeIn();
20622054
}
20632055
});
20642056

0 commit comments

Comments
 (0)