BUGFIX allow HTMLEditorFields to save in SiteConfig, fixes #5246

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@102160 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Tom Rix 2010-04-07 04:10:32 +00:00 committed by Sam Minnee
parent 963fd45c91
commit 07ab02b29d

View File

@ -340,6 +340,20 @@ function action_save_right() {
$('Form_EditForm').save(false);
}
function action_save_siteconfig_right() {
_AJAX_LOADING = true;
if(typeof tinyMCE != 'undefined') tinyMCE.triggerSave();
$('Form_EditForm_action_save_siteconfig').value = ss.i18n._t('CMSMAIN.SAVING');
$('Form_EditForm_action_save_siteconfig').className = 'action loading';
$('Form_EditForm').save(null, function() {
if($('Form_EditForm_action_save_siteconfig') && $('Form_EditForm_action_save_siteconfig').className.indexOf('loading') != -1) {
$('Form_EditForm_action_save_siteconfig').value = 'Save';
Element.removeClassName($('Form_EditForm_action_save_siteconfig'), 'loading');
}
}, 'save_siteconfig');
}
/**
* Handle auto-saving. Detects if changes have been made, and if so save everything on the page.
* If confirmation is true it will ask for confirmation.