mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
BUGFIX: getting rid of problem with disappearing buttons on the initial page load (not ajax). The initialization was called twice on the CMSForm, and on the second call the ajaxActionsAtTop was removing the buttons - now the buttons are removed only when there is something to be added.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@96551 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
305cfe9c36
commit
ea20f1101f
@ -255,13 +255,13 @@ function unlockStatusMessage() {
|
||||
*/
|
||||
function ajaxActionsAtTop(formName, actionHolderName, tabName) {
|
||||
var actions = document.getElementsBySelector('#' + formName + ' .Actions')[0];
|
||||
var holder;
|
||||
|
||||
if((holder = $(actionHolderName)) && holder != actions) {
|
||||
holder.parentNode.removeChild(holder);
|
||||
}
|
||||
var holder = $(actionHolderName);
|
||||
|
||||
if(actions) {
|
||||
if ( holder ) {
|
||||
holder.parentNode.removeChild(holder);
|
||||
}
|
||||
|
||||
actions.id = actionHolderName;
|
||||
actions.className = 'ajaxActions';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user