Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Unified Diff: chrome/browser/resources/sync_internals/sync_search.js

Issue 137753002: Changed sync-internals search to a submit instead of incremental (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/sync_internals/sync_search.css ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/sync_internals/sync_search.js
diff --git a/chrome/browser/resources/sync_internals/sync_search.js b/chrome/browser/resources/sync_internals/sync_search.js
index 9ed2456700b8a54d182a11c85acabd9781cabe3a..63ec513ce79c01193f1dc3084f9ac12899910497 100644
--- a/chrome/browser/resources/sync_internals/sync_search.js
+++ b/chrome/browser/resources/sync_internals/sync_search.js
@@ -38,6 +38,8 @@ cr.define('chrome.sync', function() {
*
* @param {!HTMLInputElement} queryControl The <input> object of
* type=search where the user types in his query.
+ * @param {!HTMLButtonElement} submitControl The <button> object of
+ * where the user can click to do his query.
* @param {!HTMLElement} statusControl The <span> object display the
* search status.
* @param {!HTMLElement} listControl The <list> object which holds
@@ -45,12 +47,11 @@ cr.define('chrome.sync', function() {
* @param {!HTMLPreElement} detailsControl The <pre> object which
* holds the details of the selected result.
*/
- function decorateSearchControls(queryControl, statusControl,
+ function decorateSearchControls(queryControl, submitControl, statusControl,
resultsControl, detailsControl) {
var resultsDataModel = new cr.ui.ArrayDataModel([]);
- // Decorate search box.
- queryControl.onsearch = function() {
+ var searchFunction = function() {
var query = queryControl.value;
statusControl.textContent = '';
resultsDataModel.splice(0, resultsDataModel.length);
@@ -82,6 +83,10 @@ cr.define('chrome.sync', function() {
}
});
};
+
+ submitControl.addEventListener('click', searchFunction);
+ // Decorate search box.
+ queryControl.onsearch = searchFunction;
queryControl.value = '';
// Decorate results list.
« no previous file with comments | « chrome/browser/resources/sync_internals/sync_search.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698