Skip to content
Snippets Groups Projects
Commit e101016c authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

dialogs: show appropriate error message when request fails, fixes #966

Closes #966
parent d0a835f4
No related branches found
No related tags found
No related merge requests found
import { $gettext } from '../lib/gettext.js'; import { $gettext } from '../lib/gettext.js';
import parseOptions from './parse_options.js';
import extractCallback from './extract_callback.js';
import Overlay from './overlay.js';
import PageLayout from './page_layout.js';
import Report from './report.js';
/*jslint esversion: 6*/ /*jslint esversion: 6*/
...@@ -13,10 +18,6 @@ import { $gettext } from '../lib/gettext.js'; ...@@ -13,10 +18,6 @@ import { $gettext } from '../lib/gettext.js';
* @todo Handle file uploads <http://goo.gl/PnSra8> * @todo Handle file uploads <http://goo.gl/PnSra8>
*/ */
import parseOptions from './parse_options.js';
import extractCallback from './extract_callback.js';
import Overlay from './overlay.js';
import PageLayout from './page_layout.js';
var dialog_margin = 0; var dialog_margin = 0;
...@@ -309,8 +310,10 @@ Dialog.fromURL = function(url, options) { ...@@ -309,8 +310,10 @@ Dialog.fromURL = function(url, options) {
Dialog.show(response, options); Dialog.show(response, options);
} }
}) })
.fail(() => { .fail((jqXHR, textStatus, errorThrown) => {
Report.error($gettext('Es ist ein Fehler aufgetreten'), errorThrown);
Overlay.hide(); Overlay.hide();
}); });
return true; return true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment