mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +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) {
|
function ajaxActionsAtTop(formName, actionHolderName, tabName) {
|
||||||
var actions = document.getElementsBySelector('#' + formName + ' .Actions')[0];
|
var actions = document.getElementsBySelector('#' + formName + ' .Actions')[0];
|
||||||
var holder;
|
var holder = $(actionHolderName);
|
||||||
|
|
||||||
if((holder = $(actionHolderName)) && holder != actions) {
|
if(actions) {
|
||||||
|
if ( holder ) {
|
||||||
holder.parentNode.removeChild(holder);
|
holder.parentNode.removeChild(holder);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(actions) {
|
|
||||||
actions.id = actionHolderName;
|
actions.id = actionHolderName;
|
||||||
actions.className = 'ajaxActions';
|
actions.className = 'ajaxActions';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user