BUGFIX: avoid adding loading class to TinyMCE add link, image, flash buttons

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@105505 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Carlos Barberis 2010-05-24 22:23:33 +00:00 committed by Sam Minnee
parent c7fc13c9fe
commit 1b6741e08d

View File

@ -58,9 +58,10 @@ $(document).ready(function() {
/*
* Highlight buttons on click
*/
$('input[type=submit]').live('click', function() {
$('#form_actions_right input[type=submit], #left input[type=submit]').live('click', function() {
$(this).addClass('loading');
});
$('input[name=action_search]').live('click', function() {
$('#contentPanel').fn('closeRightPanel');
@ -134,7 +135,7 @@ $(document).ready(function() {
$('#contentPanel').fn('closeRightPanel');
// @todo TinyMCE coupling
tinymce_removeAll();
$('#ModelAdminPanel').fn('startHistory', $(this).attr('action'), $(this).formToArray());
$('#ModelAdminPanel').load($(this).attr('action'), $(this).formToArray(), standardStatusHandler(function(result) {
if(!this.future || !this.future.length) {
@ -152,6 +153,7 @@ $(document).ready(function() {
$('input[type=submit]', $form).removeClass('loading');
},
// Failure handler - we should still remove loading indicator
function () {
$('input[type=submit]', $form).removeClass('loading');
}));