From 0eac6ea5c33b24d3655de027c84506b1742417b5 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Wed, 30 May 2012 15:38:08 +0200 Subject: [PATCH] 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') --- admin/javascript/LeftAndMain.Content.js | 11 ----------- admin/javascript/LeftAndMain.js | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/admin/javascript/LeftAndMain.Content.js b/admin/javascript/LeftAndMain.Content.js index 819292a0d..e93de9617 100644 --- a/admin/javascript/LeftAndMain.Content.js +++ b/admin/javascript/LeftAndMain.Content.js @@ -77,17 +77,6 @@ this._super(); } }); - - $('.cms-content.loading,.cms-edit-form.loading,.cms-content-fields.loading,.cms-content-view.loading').entwine({ - onmatch: function() { - this.append('
'); - this._super(); - }, - onunmatch: function() { - this.find('.cms-content-loading-overlay,.cms-content-loading-spinner').remove(); - this._super(); - } - }); }); })(jQuery); diff --git a/admin/javascript/LeftAndMain.js b/admin/javascript/LeftAndMain.js index c3c9b3545..66db2931e 100644 --- a/admin/javascript/LeftAndMain.js +++ b/admin/javascript/LeftAndMain.js @@ -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('
'); + this._super(); + }, + onunmatch: function() { + this.find('.cms-content-loading-overlay,.cms-content-loading-spinner').remove(); + this._super(); + } + }); + /** * Make all buttons "hoverable" with jQuery theming. * Also sets the clicked button on a form submission, making it available through