Make sure proper entry is activated when menu is posted
14300
def postcmd(self):
        """"""
        value = self.choice.get()
        try:
            index = self.paramInfo.choice.index(value)
            self.entry.menu.activate(index)
        except ValueError:
            # initial null value may not be in list
            pass
1339365
async def _deferred_init(self):
        

        await self._check_subscriptions()
        await self._set_whitelist()
        await self._set_get_started()
        await self._set_greeting_text()
        await self._set_persistent_menu()
1104463
def contextMenuEvent(self, event):
        """"""
        if self.model.showndata:
            self.refresh_menu()
            self.menu.popup(event.globalPos())
            event.accept()
        else:
            self.empty_ws_menu.popup(event.globalPos())
            event.accept()
192416
function navigateToMenuPage() {

    console.log('navigating to menu...');

    return new Promise((resolve, reject) => {
        if (!menuDoc) {
            initMenu();
        }
        if (!menuDoc) {
            console.warn('No menu configuration exists, cannot navigate to the menu page.');
            reject();
        } else {
            cleanNavigate(menuDoc);
            resolve(menuDoc);
        }
    });
}
211619
def _onMenuButton(self, evt):
        """"""
        x, y = self.GetPositionTuple()
        w, h = self.GetSizeTuple()
        self.PopupMenuXY(self._menu, x, y+h-4)
                # When menu returned, indicate selection in button
        evt.Skip()
154310
def refresh_menu(self):
        """"""
        index = self.currentIndex()
        condition = index.isValid()
        self.edit_action.setEnabled( condition )
        self.remove_action.setEnabled( condition )
        self.refresh_plot_entries(index)
129910
function onActivateEvent() {
         // register pointer events
         me.input.registerPointerEvent("pointerdown", this, this.clicked.bind(this));
         me.input.registerPointerEvent("pointerup", this, this.release.bind(this));
         me.input.registerPointerEvent("pointercancel", this, this.release.bind(this));
         me.input.registerPointerEvent("pointerenter", this, this.enter.bind(this));
         me.input.registerPointerEvent("pointerleave", this, this.leave.bind(this));
       }
35958
public function actionEdit ()
		{
			$id = Yii::$app->request->get('id');
			$menu = Menu::findOne($id);
			if ($menu == null)
			{
				Yii::$app->notification->messageToSession(Yii::tr('Menu item not found.', [], 'menu'));
				$this->redirect(Yii::$app->request->referrer);
			}
			if (Yii::$app->request->isPost)
			{
				$post = Yii::$app->request->post('Menu');

				$menu->updateAttributes([
					'title' => $post[ 'title' ],
					'url'   => $post[ 'url' ],
					'path'  => $post[ 'path' ]
				]);

				$menu->save();
				Yii::$app->notification->messageToSession(Yii::tr('Menu item was saved.', [], 'menu'));
				$this->redirect(Url::toRoute([ '/menu/index', 'type' => $menu->typeID ]));
			}
			$this->data('model', $menu);
			$this->setTitle(Yii::tr('Edit menu item', [], 'menu'));
			$this->_tpl = '@menuViews/add';
		}
745838
def on_menu(self, event):
        ''''''
        state = self.state
        if self.popup_menu is not None:
            ret = self.popup_menu.find_selected(event)
            if ret is not None:
                ret.popup_pos = self.popup_pos
                if ret.returnkey == 'fitWindow':
                    self.fit_to_window()
                elif ret.returnkey == 'fullSize':
                    self.full_size()
                else:
                    state.out_queue.put(ret)
                return
        if self.menu is not None:
            ret = self.menu.find_selected(event)
            if ret is not None:
                state.out_queue.put(ret)
                return
584085
def on_click(self, handler):
        ''' 

        '''
        self.on_event(ButtonClick, handler)
        self.on_event(MenuItemClick, handler)
1110355
function setMenu() {
  var url = document.location.href;
  // strip extension
  url = stripExtension(url);
  
  var ulElement = document.getElementById("menu");
  var links = ulElement.getElementsByTagName("A");
  var i;
  for(i = 0; i < links.length; i++) {
    if(url.indexOf(stripExtension(links[i].href)) == 0) {
      links[i].className = "active_menu";
      return;
    }
  }
}
569277
function handleStatusChange(response) {
  if (response.authResponse) {
    logResponse(response);
    window.location.hash = '#menu';
    updateUserInfo(response);
  } else {
    window.location.hash = '#login';
  }
}
1079275
private void onClickAdd() {

        if (m_currentLocation.isPresent()) {
            CmsFavoriteEntry entry = m_currentLocation.get();
            List<CmsFavoriteEntry> entries = getEntries();
            entries.add(entry);
            try {
                m_favDao.saveFavorites(entries);
            } catch (Exception e) {
                CmsErrorDialog.showErrorDialog(e);
            }
            m_context.close();
        }
    }
1152235
@Override
    public void register(CareWebShell shell, ElementBase owner, boolean register) {
        if (register) {
            ElementPlugin plugin = (ElementPlugin) owner;
            BaseMenuComponent menu = plugin.getShell().addMenu(getPath(), getAction());
            plugin.registerComponent(menu);
            plugin.registerId(getId(), menu);
        }
    }
281377
def update_warning_menu(self):
        """"""
        editor = self.get_current_editor()
        check_results = editor.get_current_warnings()
        self.warning_menu.clear()
        filename = self.get_current_filename()
        for message, line_number in check_results:
            error = 'syntax' in message
            text = message[:1].upper() + message[1:]
            icon = ima.icon('error') if error else ima.icon('warning')
            slot = lambda _checked, _l=line_number: self.load(filename, goto=_l)
            action = create_action(self, text=text, icon=icon, triggered=slot)
            self.warning_menu.addAction(action)
1327154
protected function postActions()
    {
        if ($this->option('createaction') != null) {
            $this->createAction();
        }
        if ($this->option('menu') != null) {
            $this->createMenu();
        }
        if ($this->option('model') != null) {
            $this->createModel($this->argument('link'));
        }
    }
1115395
public function initMenuItems()
    {
        $this->Menu->area('headerLeft');

        $this->Menu->add('ca.user', [
            'title' => $this->authUser[Configure::read('CA.fields.username')],
            'url' => '#'
        ]);

        $this->Menu->add('ca.logout', [
            'parent' => 'ca.user',
            'title' => __d('CakeAdmin', 'Logout'),
            'url' => [
                'prefix' => 'admin',
                'plugin' => 'CakeAdmin',
                'controller' => 'Users',
                'action' => 'logout',
            ]
        ]);

        $this->Menu->area('main');

        $this->Menu->add('ca.dashboard', [
            'title' => __d('CakeAdmin', 'Dashboard'),
            'url' => [
                'prefix' => 'admin',
                'plugin' => 'CakeAdmin',
                'controller' => 'Dashboard',
                'action' => 'index',
            ],
            'weight' => 0,
        ]);

        $this->Menu->add('ca.settings', [
            'title' => __d('CakeAdmin', 'Settings'),
            'url' => [
                'prefix' => 'admin',
                'plugin' => 'CakeAdmin',
                'controller' => 'Settings',
                'action' => 'index',
            ],
            'weight' => 50
        ]);

        foreach (Configure::read('CA.Menu.main') as $key => $value) {
            $this->Menu->add($key, $value);
        }
    }