yi_peppe
(Peppedantini)
May 26, 2013, 2:57pm
1
Hi all
Thanks to quickdlgs extension, I have buttons and links opening dialogs for view/create/update action.
Now I need to insert these links (specifically [font=“Courier New”]EQuickDlgs::iframeLink[/font]) inside the operation menu (CMenu) on the right panel, but I can’t and didn’t find anything about it.
Does someone help me?
Thanks…
yi_peppe
(Peppedantini)
May 28, 2013, 5:31pm
2
Hi all
Thanks to quickdlgs extension, I have buttons and links opening dialogs for view/create/update action.
Now I need to insert these links (specifically [font=“Courier New”]EQuickDlgs::iframeLink[/font]) inside the operation menu (CMenu) on the right panel, but I can’t and didn’t find anything about it.
Does someone help me?
Thanks…
Well, I found a workaround.
I defined the variable "alternativeMenu" in "components\controller.php" and insert this code in the "views\layouts\column2.php":
if ($this->alternativeMenu) {
$this->renderPartial('//layouts/_altmenu');
} else {
$this->widget('zii.widgets.CMenu', array(
'items' => $this->menu,
'htmlOptions' => array('class' => 'operations'),
));
}
Then the file "_altmenu.php" is something like this:
<ul class="operations">
<?php
echo '<li>';
EQuickDlgs::iframeLink(
array(
'controllerRoute' => 'create',
'dialogWidth' => 600,
'dialogHeight' => 400,
'openButtonText' => 'New record',
'closeButtonText' => 'Cancel',
'closeOnAction' => true,
'refreshGridId' => 'scadenza-grid',
'contentWrapperHtmlOptions' => array('style' => 'height: 100%;'),
)
);
echo '</li>';
.............
?>
</ul>
Now setting the "alternativeMenu" variable in each controller I can decide to show the standard menu or the alternative one.