display error when a tab cannot be loaded
This commit is contained in:
parent
c1ea41e2f5
commit
8732ac4084
1 changed files with 5 additions and 1 deletions
|
@ -1,5 +1,8 @@
|
||||||
/* 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 @@
|
||||||
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',
|
||||||
|
|
Loading…
Reference in a new issue