Changeset View
Changeset View
Standalone View
Standalone View
src/view/page/menu/PhabricatorMainMenuView.php
| Show First 20 Lines • Show All 180 Lines • ▼ Show 20 Lines | if ($show_search) { | ||||
| if ($controller) { | if ($controller) { | ||||
| $application = $controller->getCurrentApplication(); | $application = $controller->getCurrentApplication(); | ||||
| } | } | ||||
| if ($application) { | if ($application) { | ||||
| $search->setApplication($application); | $search->setApplication($application); | ||||
| } | } | ||||
| $result = $search; | $result = $search; | ||||
| $pref_shortcut = PhabricatorUserPreferences::PREFERENCE_SEARCH_SHORTCUT; | |||||
| if ($viewer->loadPreferences()->getPreference($pref_shortcut, true)) { | |||||
| $keyboard_config['searchID'] = $search->getID(); | |||||
| } | |||||
| } | } | ||||
| Javelin::initBehavior('phabricator-keyboard-shortcuts', $keyboard_config); | Javelin::initBehavior('phabricator-keyboard-shortcuts', $keyboard_config); | ||||
| if ($result) { | if ($result) { | ||||
| $result = id(new PHUIListItemView()) | $result = id(new PHUIListItemView()) | ||||
| ->addClass('phabricator-main-menu-search') | ->addClass('phabricator-main-menu-search') | ||||
| ->appendChild($result); | ->appendChild($result); | ||||
| ▲ Show 20 Lines • Show All 343 Lines • Show Last 20 Lines | |||||