Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14399838
D8960.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D8960.diff
View Options
diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -8,7 +8,7 @@
'names' =>
array(
'core.pkg.css' => 'afe6e16d',
- 'core.pkg.js' => '417722ff',
+ 'core.pkg.js' => 'c415c382',
'darkconsole.pkg.js' => 'ca8671ce',
'differential.pkg.css' => '4b8686e3',
'differential.pkg.js' => '11a5b750',
@@ -472,7 +472,7 @@
'rsrc/js/core/behavior-refresh-csrf.js' => 'c4b31646',
'rsrc/js/core/behavior-remarkup-preview.js' => 'f7379f45',
'rsrc/js/core/behavior-reveal-content.js' => '8f24abfc',
- 'rsrc/js/core/behavior-search-typeahead.js' => 'f6b56f7a',
+ 'rsrc/js/core/behavior-search-typeahead.js' => 'd8469741',
'rsrc/js/core/behavior-select-on-click.js' => '0e34ca02',
'rsrc/js/core/behavior-toggle-class.js' => 'a82a7769',
'rsrc/js/core/behavior-tokenizer.js' => 'b3a4b884',
@@ -605,7 +605,7 @@
'javelin-behavior-phabricator-oncopy' => 'c3e218fe',
'javelin-behavior-phabricator-remarkup-assist' => 'c021950a',
'javelin-behavior-phabricator-reveal-content' => '8f24abfc',
- 'javelin-behavior-phabricator-search-typeahead' => 'f6b56f7a',
+ 'javelin-behavior-phabricator-search-typeahead' => 'd8469741',
'javelin-behavior-phabricator-show-all-transactions' => '7c273581',
'javelin-behavior-phabricator-tooltips' => '48db4145',
'javelin-behavior-phabricator-transaction-comment-form' => '9084a36f',
@@ -1768,6 +1768,16 @@
3 => 'javelin-dom',
4 => 'phabricator-keyboard-shortcut',
),
+ 'd8469741' =>
+ array(
+ 0 => 'javelin-behavior',
+ 1 => 'javelin-typeahead-ondemand-source',
+ 2 => 'javelin-typeahead',
+ 3 => 'javelin-dom',
+ 4 => 'javelin-uri',
+ 5 => 'javelin-util',
+ 6 => 'javelin-stratcom',
+ ),
'd8e135db' =>
array(
0 => 'javelin-behavior',
@@ -1898,16 +1908,6 @@
2 => 'javelin-util',
3 => 'javelin-reactor',
),
- 'f6b56f7a' =>
- array(
- 0 => 'javelin-behavior',
- 1 => 'javelin-typeahead-ondemand-source',
- 2 => 'javelin-typeahead',
- 3 => 'javelin-dom',
- 4 => 'javelin-uri',
- 5 => 'javelin-util',
- 6 => 'javelin-stratcom',
- ),
'f7379f45' =>
array(
0 => 'javelin-behavior',
diff --git a/src/view/page/menu/PhabricatorMainMenuSearchView.php b/src/view/page/menu/PhabricatorMainMenuSearchView.php
--- a/src/view/page/menu/PhabricatorMainMenuSearchView.php
+++ b/src/view/page/menu/PhabricatorMainMenuSearchView.php
@@ -14,8 +14,9 @@
public function render() {
$user = $this->user;
- $target_id = celerity_generate_unique_node_id();
+ $target_id = celerity_generate_unique_node_id();
$search_id = $this->getID();
+ $button_id = celerity_generate_unique_node_id();
$input = phutil_tag(
'input',
@@ -39,6 +40,7 @@
array(
'id' => $target_id,
'input' => $search_id,
+ 'button' => $button_id,
'src' => '/typeahead/common/mainsearch/',
'limit' => 10,
'placeholder' => pht('Search'),
@@ -60,7 +62,10 @@
),
phutil_tag_div('phabricator-main-menu-search-container', array(
$input,
- phutil_tag('button', array(), pht('Search')),
+ phutil_tag(
+ 'button',
+ array('id' => $button_id),
+ pht('Search')),
$primary_input,
$target,
)));
diff --git a/webroot/rsrc/js/core/behavior-search-typeahead.js b/webroot/rsrc/js/core/behavior-search-typeahead.js
--- a/webroot/rsrc/js/core/behavior-search-typeahead.js
+++ b/webroot/rsrc/js/core/behavior-search-typeahead.js
@@ -130,4 +130,9 @@
});
typeahead.start();
+
+ JX.DOM.listen(JX.$(config.button), 'click', null, function (e) {
+ typeahead.setPlaceholder('');
+ typeahead.updatePlaceHolder();
+ });
});
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 23, 5:57 PM (18 h, 13 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6921738
Default Alt Text
D8960.diff (3 KB)
Attached To
Mode
D8960: Search - making clicking the search button not submit placeholder text
Attached
Detach File
Event Timeline
Log In to Comment