Commit 8732ac40 authored by Mike Greiling's avatar Mike Greiling

display error when a tab cannot be loaded

parent c1ea41e2
/* eslint-disable no-new, no-param-reassign, class-methods-use-this */ /* eslint-disable no-new, no-param-reassign, class-methods-use-this */
/* global Breakpoints, Cookies, DiffNotesApp */ /* global Breakpoints */
/* global Cookies */
/* global DiffNotesApp */
/* global Flash */
/*= require js.cookie */ /*= require js.cookie */
/*= require breakpoints */ /*= require breakpoints */
...@@ -294,6 +297,7 @@ ...@@ -294,6 +297,7 @@
ajaxGet(options) { ajaxGet(options) {
const defaults = { const defaults = {
beforeSend: () => this.toggleLoading(true), beforeSend: () => this.toggleLoading(true),
error: () => new Flash('An error occurred while fetching this tab.', 'alert'),
complete: () => this.toggleLoading(false), complete: () => this.toggleLoading(false),
dataType: 'json', dataType: 'json',
type: 'GET', type: 'GET',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment