mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
elofgren: BUGFIX: Don't save new Newsletter drafts as soon as they are created to prevent TinyMCE Javascript errors in IE. Always save Newsletter drafts before sending to prevent unsaved newsletter drafts from being sent out completely blank because change detection for new newsletter drafts does not work in IE.
(merged from branches/gsoc) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@42053 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
f72e6d9a56
commit
4167ab9108
@ -304,9 +304,6 @@ AddForm.prototype = {
|
||||
} else {
|
||||
$('sitetree').addTypeNode('New newsletter type', $('Form_EditForm_ID').value );
|
||||
}
|
||||
// Save it so that change detection will work
|
||||
$('Form_EditForm').save();
|
||||
|
||||
statusMessage('Added new ' + type);
|
||||
},
|
||||
|
||||
|
@ -284,10 +284,9 @@ Behaviour.register({
|
||||
}
|
||||
this.sendingText.style.display = '';
|
||||
|
||||
var form = $('Form_EditForm');
|
||||
|
||||
if( form.isChanged() )
|
||||
form.save();
|
||||
// Save always because change detection doesn't work for IE on newly created drafts.
|
||||
// Use onclick instead of form.save() to make things work in IE.
|
||||
$('Form_EditForm_action_save').onclick();
|
||||
|
||||
// Send the request
|
||||
ajaxSubmitForm(false, this.onCompleteTest.bind(this), this, '', 'sendnewsletter')
|
||||
@ -327,11 +326,9 @@ Behaviour.register({
|
||||
}
|
||||
this.sendingText.style.display = '';*/
|
||||
|
||||
var form = $('Form_EditForm');
|
||||
|
||||
if( form.isChanged() )
|
||||
form.save();
|
||||
|
||||
// Save always because change detection doesn't work for IE on newly created drafts.
|
||||
// Use onclick instead of form.save() to make things work in IE.
|
||||
$('Form_EditForm_action_save').onclick();
|
||||
|
||||
if( $('SendProgressBar') )
|
||||
$('SendProgressBar').start();
|
||||
|
Loading…
Reference in New Issue
Block a user