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,10 +2046,19 @@ var StatsView = Backbone.View.extend({
20462046 } ,
20472047 error : function ( model , response , options ) {
20482048 self . $el . fadeOut ( ) ;
2049- if ( response . responseJSON !== undefined && response . responseJSON . status == "error" )
2050- console . log ( "Error while fetching stats: " + response . responseJSON . errors ) ;
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+ }
20512057 else
2052- console . log ( "Error while fetching stats!" ) ;
2058+ msg = "Error while fetching stats!" ;
2059+
2060+ console . log ( msg ) ;
2061+ self . $el . html ( msg ) . fadeIn ( ) ;
20532062 }
20542063 } ) ;
20552064
You can’t perform that action at this time.
0 commit comments