@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Search - making clicking the search button not submit placeholder text

Summary: Need to wire up the button to have a click handler that clears out the placeholder text. Fixes T4847.

Test Plan: Clicked the search button and got results for nothing as opposed to "Search." Typed a search and clicked button and got expected results.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T4847

Differential Revision: https://secure.phabricator.com/D8960

+25 -15
+13 -13
resources/celerity/map.php
··· 8 8 'names' => 9 9 array( 10 10 'core.pkg.css' => 'afe6e16d', 11 - 'core.pkg.js' => '417722ff', 11 + 'core.pkg.js' => 'c415c382', 12 12 'darkconsole.pkg.js' => 'ca8671ce', 13 13 'differential.pkg.css' => '4b8686e3', 14 14 'differential.pkg.js' => '11a5b750', ··· 472 472 'rsrc/js/core/behavior-refresh-csrf.js' => 'c4b31646', 473 473 'rsrc/js/core/behavior-remarkup-preview.js' => 'f7379f45', 474 474 'rsrc/js/core/behavior-reveal-content.js' => '8f24abfc', 475 - 'rsrc/js/core/behavior-search-typeahead.js' => 'f6b56f7a', 475 + 'rsrc/js/core/behavior-search-typeahead.js' => 'd8469741', 476 476 'rsrc/js/core/behavior-select-on-click.js' => '0e34ca02', 477 477 'rsrc/js/core/behavior-toggle-class.js' => 'a82a7769', 478 478 'rsrc/js/core/behavior-tokenizer.js' => 'b3a4b884', ··· 605 605 'javelin-behavior-phabricator-oncopy' => 'c3e218fe', 606 606 'javelin-behavior-phabricator-remarkup-assist' => 'c021950a', 607 607 'javelin-behavior-phabricator-reveal-content' => '8f24abfc', 608 - 'javelin-behavior-phabricator-search-typeahead' => 'f6b56f7a', 608 + 'javelin-behavior-phabricator-search-typeahead' => 'd8469741', 609 609 'javelin-behavior-phabricator-show-all-transactions' => '7c273581', 610 610 'javelin-behavior-phabricator-tooltips' => '48db4145', 611 611 'javelin-behavior-phabricator-transaction-comment-form' => '9084a36f', ··· 1768 1768 3 => 'javelin-dom', 1769 1769 4 => 'phabricator-keyboard-shortcut', 1770 1770 ), 1771 + 'd8469741' => 1772 + array( 1773 + 0 => 'javelin-behavior', 1774 + 1 => 'javelin-typeahead-ondemand-source', 1775 + 2 => 'javelin-typeahead', 1776 + 3 => 'javelin-dom', 1777 + 4 => 'javelin-uri', 1778 + 5 => 'javelin-util', 1779 + 6 => 'javelin-stratcom', 1780 + ), 1771 1781 'd8e135db' => 1772 1782 array( 1773 1783 0 => 'javelin-behavior', ··· 1897 1907 1 => 'javelin-reactornode', 1898 1908 2 => 'javelin-util', 1899 1909 3 => 'javelin-reactor', 1900 - ), 1901 - 'f6b56f7a' => 1902 - array( 1903 - 0 => 'javelin-behavior', 1904 - 1 => 'javelin-typeahead-ondemand-source', 1905 - 2 => 'javelin-typeahead', 1906 - 3 => 'javelin-dom', 1907 - 4 => 'javelin-uri', 1908 - 5 => 'javelin-util', 1909 - 6 => 'javelin-stratcom', 1910 1910 ), 1911 1911 'f7379f45' => 1912 1912 array(
+7 -2
src/view/page/menu/PhabricatorMainMenuSearchView.php
··· 14 14 public function render() { 15 15 $user = $this->user; 16 16 17 - $target_id = celerity_generate_unique_node_id(); 17 + $target_id = celerity_generate_unique_node_id(); 18 18 $search_id = $this->getID(); 19 + $button_id = celerity_generate_unique_node_id(); 19 20 20 21 $input = phutil_tag( 21 22 'input', ··· 39 40 array( 40 41 'id' => $target_id, 41 42 'input' => $search_id, 43 + 'button' => $button_id, 42 44 'src' => '/typeahead/common/mainsearch/', 43 45 'limit' => 10, 44 46 'placeholder' => pht('Search'), ··· 60 62 ), 61 63 phutil_tag_div('phabricator-main-menu-search-container', array( 62 64 $input, 63 - phutil_tag('button', array(), pht('Search')), 65 + phutil_tag( 66 + 'button', 67 + array('id' => $button_id), 68 + pht('Search')), 64 69 $primary_input, 65 70 $target, 66 71 )));
+5
webroot/rsrc/js/core/behavior-search-typeahead.js
··· 130 130 }); 131 131 132 132 typeahead.start(); 133 + 134 + JX.DOM.listen(JX.$(config.button), 'click', null, function (e) { 135 + typeahead.setPlaceholder(''); 136 + typeahead.updatePlaceHolder(); 137 + }); 133 138 });