Trouble after puting publish button in toolbar
Permalink
I am trying to put publish in the toolbar instead of inside the edit drop down menu, I have edited page_controls_menu_js
on line 95 I have written
I have two issue
1. When I click edit the publish button pulls up immediately before I even edit anything, I want to figure out how to have it come up only after I have edited
2. In order to publish I need to hover my mouse over edit and wait for the drop down menu to appear. I assume it is reference something, I was thinking $valt but even by moving those lines up I cant get it right. How do I publish without hovering over edit
I dont have a problem monkeying with the code so even just a general direction would be helpful
-Sam
on line 95 I have written
<?php if ($c->isEditMode()) { ?> <?php if ($cp->canApprovePageVersions()) { ?> <?php $publishTitle = t('Publish My Edits'); $pk = PermissionKey::getByHandle('approve_page_versions'); $pk->setPermissionObject($c); $pa = $pk->getPermissionAccessObject(); if (is_object($pa) && count($pa->getWorkflows()) > 0) { $publishTitle = t('Submit to Workflow'); } ?> menuHTML += '<li><a href="javascript:void(0)" id="ccm-check-in-publish"><span><?php echo $publishTitle?></span></a></li>'; <?php } ?> <?php } ?>
I have two issue
1. When I click edit the publish button pulls up immediately before I even edit anything, I want to figure out how to have it come up only after I have edited
2. In order to publish I need to hover my mouse over edit and wait for the drop down menu to appear. I assume it is reference something, I was thinking $valt but even by moving those lines up I cant get it right. How do I publish without hovering over edit
I dont have a problem monkeying with the code so even just a general direction would be helpful
-Sam