Skip to content

Commit

Permalink
Show error message if saving fails
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Jun 22, 2016
1 parent ce131d8 commit 39c544c
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,13 @@
this.vis.set( 'title', chart.get( 'title' ) || '' );
this.vis.get( 'config' ).chart_dict = chart_dict;
this.vis.save().fail(function( xhr, status, message ) {
console.error( xhr, status, message );
self.app.modal.show( {
title : 'Saving failed.',
body : 'An attempt to save this chart to the server failed. Please try again and contact the administrator.',
buttons: {
'Cancel' : function() { self.app.modal.hide() }
}
});
})
.then( function( response ) {
if ( response && response.id ) {
Expand Down

0 comments on commit 39c544c

Please sign in to comment.