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

Unified Diff: chrome/browser/resources/options2/search_page.js

Issue 9560005: [uber page] Merge advanced options page into browser options. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Rebase again. Created 8 years, 10 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
Index: chrome/browser/resources/options2/search_page.js
===================================================================
--- chrome/browser/resources/options2/search_page.js (revision 124465)
+++ chrome/browser/resources/options2/search_page.js (working copy)
@@ -215,6 +215,15 @@
var hash = location.hash;
if (hash)
this.searchField.value = unescape(hash.slice(1));
+
+ // Move 'advanced' sections into the main settings page to allow
+ // searching.
+ if (!this.advancedSections_) {
+ this.advancedSections_ =
+ $('advanced-settings-container').querySelectorAll('section');
+ for (var i = 0, section; section = this.advancedSections_[i]; i++)
+ $('settings').appendChild(section);
+ }
} else {
// Just wipe out any active search text since it's no longer relevant.
this.searchField.value = '';
@@ -256,6 +265,13 @@
// After hiding all page content, remove any search results.
this.unhighlightMatches_();
this.removeSearchBubbles_();
+
+ // Move 'advanced' sections back into their original container.
+ if (this.advancedSections_) {
+ for (var i = 0, section; section = this.advancedSections_[i]; i++)
+ $('advanced-settings-container').appendChild(section);
+ this.advancedSections_ = null;
+ }
}
},
@@ -272,12 +288,6 @@
// Cleanup the search query string.
text = SearchPage.canonicalizeQuery(text);
- // Notify listeners about the new search query, some pages may wish to
- // show/hide elements based on the query.
- var event = new cr.Event('searchChanged');
- event.searchText = text;
- this.dispatchEvent(event);
-
// Toggle the search page if necessary.
if (text.length) {
if (!this.searchActive_)
« no previous file with comments | « chrome/browser/resources/options2/password_manager.js ('k') | chrome/browser/resources/uber/uber_shared.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698