Yii Framework Forum: Insert Iframelink In Cmenu - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Insert Iframelink In Cmenu Rate Topic: -----

#1 User is offline   Peppe 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 28
  • Joined: 12-January 13
  • Location:Macerata - Italy

Posted 26 May 2013 - 09:57 AM

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 EQuickDlgs::iframeLink) 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...
0

#2 User is offline   Peppe 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 28
  • Joined: 12-January 13
  • Location:Macerata - Italy

Posted 28 May 2013 - 12:31 PM

View PostPeppe, on 26 May 2013 - 09:57 AM, said:

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 EQuickDlgs::iframeLink) 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.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users