diff --git a/code/NewsletterAdmin.php b/code/NewsletterAdmin.php index d1c3d8b6..611e41aa 100755 --- a/code/NewsletterAdmin.php +++ b/code/NewsletterAdmin.php @@ -457,7 +457,7 @@ class NewsletterAdmin extends LeftAndMain { FormResponse::set_node_title("mailtype_$id", $record->Title); FormResponse::status_message('Saved', 'good'); - + $result = $this->getActionUpdateJS($record); return FormResponse::respond(); } @@ -479,7 +479,12 @@ class NewsletterAdmin extends LeftAndMain { FormResponse::set_node_title($id, $record->Title); FormResponse::status_message('Saved', 'good'); - + // Get the new action buttons + $actionList = ''; + foreach($form->Actions() as $action) { + $actionList .= $action->Field() . ' '; + } + FormResponse::add("$('Form_EditForm').loadActionsFromString('" . Convert::raw2js($actionList) . "');"); return FormResponse::respond(); } diff --git a/javascript/NewsletterAdmin_right.js b/javascript/NewsletterAdmin_right.js index b6ef9bb9..b0e19df0 100755 --- a/javascript/NewsletterAdmin_right.js +++ b/javascript/NewsletterAdmin_right.js @@ -27,7 +27,7 @@ Behaviour.register({ * Processing called whenever a page is loaded in the right - including the initial one */ prepareForm : function() { - ajaxActionsAtTop('Form_EditForm', 'form_actions', 'right'); + ajaxActionsAtTop('Form_EditForm', 'form_actions_right', 'right'); }, /** @@ -392,19 +392,6 @@ NewsletterList.prototype = { } } -/** - * Add page action - * @todo Remove duplication between this and the CMSMain Add page action - */ -Behaviour.register( { - '#Form_EditForm_action_save': { - onclick : function() { - $('Form_EditForm').save(); - return false; - } - } -}); - /** * 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.