mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Apply loading indicators to all forms, not just .cms-edit-form (which means it includes the "pages list view"). Move to correct place in LeftAndMain.js (not specific to '.cms-content')
This commit is contained in:
parent
19bfd01a60
commit
0eac6ea5c3
@ -77,17 +77,6 @@
|
|||||||
this._super();
|
this._super();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.cms-content.loading,.cms-edit-form.loading,.cms-content-fields.loading,.cms-content-view.loading').entwine({
|
|
||||||
onmatch: function() {
|
|
||||||
this.append('<div class="cms-content-loading-overlay ui-widget-overlay-light"></div><div class="cms-content-loading-spinner"></div>');
|
|
||||||
this._super();
|
|
||||||
},
|
|
||||||
onunmatch: function() {
|
|
||||||
this.find('.cms-content-loading-overlay,.cms-content-loading-spinner').remove();
|
|
||||||
this._super();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
|
@ -436,6 +436,22 @@ jQuery.noConflict();
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add loading overlay to selected regions in the CMS automatically.
|
||||||
|
* Not applied to all "*.loading" elements to avoid secondary regions
|
||||||
|
* like the breadcrumbs showing unnecessary loading status.
|
||||||
|
*/
|
||||||
|
$('form.loading,.cms-content.loading,.cms-content-fields.loading,.cms-content-view.loading').entwine({
|
||||||
|
onmatch: function() {
|
||||||
|
this.append('<div class="cms-content-loading-overlay ui-widget-overlay-light"></div><div class="cms-content-loading-spinner"></div>');
|
||||||
|
this._super();
|
||||||
|
},
|
||||||
|
onunmatch: function() {
|
||||||
|
this.find('.cms-content-loading-overlay,.cms-content-loading-spinner').remove();
|
||||||
|
this._super();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Make all buttons "hoverable" with jQuery theming.
|
* Make all buttons "hoverable" with jQuery theming.
|
||||||
* Also sets the clicked button on a form submission, making it available through
|
* Also sets the clicked button on a form submission, making it available through
|
||||||
|
Loading…
Reference in New Issue
Block a user