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; | ||||
| $keyboard_config['searchID'] = $search->getID(); | |||||
| } | } | ||||
| Javelin::initBehavior('phabricator-keyboard-shortcuts', $keyboard_config); | $keyboard_config['pht'] = array( | ||||
| '/' => pht('Give keyboard focus to the search box.'), | |||||
| '?' => pht('Show keyboard shortcut help for the current page.'), | |||||
| ); | |||||
| 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); | ||||
| } | } | ||||
| return $result; | return $result; | ||||
| ▲ Show 20 Lines • Show All 340 Lines • Show Last 20 Lines | |||||