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:
Ingo Schommer 2012-05-30 15:38:08 +02:00
parent 19bfd01a60
commit 0eac6ea5c3
2 changed files with 16 additions and 11 deletions

View File

@ -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('<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);

View File

@ -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.
* Also sets the clicked button on a form submission, making it available through