mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-18 11:10:56 +01:00
Better error handling for Feed when unable to connect
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
* Media (Page): Do not extend parent metehod for sending files since Safari and IE API for FormData don’t implement `delete` ([#772](https://github.com/getgrav/grav-plugin-admin/issues/772))
|
||||
* Clean up POST keys containing square brackets, allows for regex ranges in routes ([#776](https://github.com/getgrav/grav-plugin-admin/issues/776))
|
||||
* Fix [#773](https://github.com/getgrav/grav-plugin-admin/issues/773) allow filepicker work inside lists, respond to mutation event
|
||||
* Better error handling for Feed when unable to connect
|
||||
|
||||
# v1.2.2
|
||||
## 09/08/2016
|
||||
|
||||
@@ -44,10 +44,10 @@ class Feed {
|
||||
let loader = feed.find('.widget-loader').hide();
|
||||
let content = feed.find('> ul').empty().show();
|
||||
|
||||
if (this.data.error) {
|
||||
if (this.data.error || this.data.status === 'error') {
|
||||
loader.show().find('div').remove();
|
||||
loader.find('.fa-refresh').removeClass('fa-refresh fa-spin').addClass('fa-warning');
|
||||
loader.append(`<div>${this.data.error.message}</div>`);
|
||||
loader.append(`<div>${this.data.error ? this.data.error.message : this.data.message || 'Unable to download news feed'}</div>`);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
30
themes/grav/js/admin.min.js
vendored
30
themes/grav/js/admin.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user