File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments