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

Side by Side Diff: chrome/browser/resources/options/options.js

Issue 8480037: Controlled settings indicator and bubble for chrome://preferences. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address James' feedback. Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var AddLanguageOverlay = options.AddLanguageOverlay; 5 var AddLanguageOverlay = options.AddLanguageOverlay;
6 var AdvancedOptions = options.AdvancedOptions; 6 var AdvancedOptions = options.AdvancedOptions;
7 var AlertOverlay = options.AlertOverlay; 7 var AlertOverlay = options.AlertOverlay;
8 var AutofillEditAddressOverlay = options.AutofillEditAddressOverlay; 8 var AutofillEditAddressOverlay = options.AutofillEditAddressOverlay;
9 var AutofillEditCreditCardOverlay = options.AutofillEditCreditCardOverlay; 9 var AutofillEditCreditCardOverlay = options.AutofillEditCreditCardOverlay;
10 var AutofillOptions = options.AutofillOptions; 10 var AutofillOptions = options.AutofillOptions;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 cr.ui.decorate('input[pref][type=radio]', options.PrefRadio); 43 cr.ui.decorate('input[pref][type=radio]', options.PrefRadio);
44 cr.ui.decorate('input[pref][type=range]', options.PrefRange); 44 cr.ui.decorate('input[pref][type=range]', options.PrefRange);
45 cr.ui.decorate('select[pref]', options.PrefSelect); 45 cr.ui.decorate('select[pref]', options.PrefSelect);
46 cr.ui.decorate('input[pref][type=text]', options.PrefTextField); 46 cr.ui.decorate('input[pref][type=text]', options.PrefTextField);
47 cr.ui.decorate('input[pref][type=url]', options.PrefTextField); 47 cr.ui.decorate('input[pref][type=url]', options.PrefTextField);
48 cr.ui.decorate('button[pref]', options.PrefButton); 48 cr.ui.decorate('button[pref]', options.PrefButton);
49 cr.ui.decorate('#content-settings-page input[type=radio]:not(.handler-radio)', 49 cr.ui.decorate('#content-settings-page input[type=radio]:not(.handler-radio)',
50 options.ContentSettingsRadio); 50 options.ContentSettingsRadio);
51 cr.ui.decorate('#content-settings-page input[type=radio].handler-radio', 51 cr.ui.decorate('#content-settings-page input[type=radio].handler-radio',
52 options.HandlersEnabledRadio); 52 options.HandlersEnabledRadio);
53 cr.ui.decorate('span.controlled-setting-indicator',
54 options.ControlledSettingIndicator);
53 55
54 var menuOffPattern = /(^\?|&)menu=off($|&)/; 56 var menuOffPattern = /(^\?|&)menu=off($|&)/;
55 var menuDisabled = menuOffPattern.test(window.location.search); 57 var menuDisabled = menuOffPattern.test(window.location.search);
56 // document.documentElement.setAttribute('hide-menu', menuDisabled); 58 // document.documentElement.setAttribute('hide-menu', menuDisabled);
57 // We can't use an attribute on the html element because of webkit bug 59 // We can't use an attribute on the html element because of webkit bug
58 // 12519. Instead, we add a class. 60 // 12519. Instead, we add a class.
59 if (menuDisabled) 61 if (menuDisabled)
60 document.documentElement.classList.add('hide-menu'); 62 document.documentElement.classList.add('hide-menu');
61 63
62 localStrings = new LocalStrings(); 64 localStrings = new LocalStrings();
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 235
234 document.addEventListener('DOMContentLoaded', load); 236 document.addEventListener('DOMContentLoaded', load);
235 237
236 window.onpopstate = function(e) { 238 window.onpopstate = function(e) {
237 options.OptionsPage.setState(e.state); 239 options.OptionsPage.setState(e.state);
238 }; 240 };
239 241
240 window.onbeforeunload = function() { 242 window.onbeforeunload = function() {
241 options.OptionsPage.willClose(); 243 options.OptionsPage.willClose();
242 }; 244 };
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/controlled_setting.js ('k') | chrome/browser/resources/options/options_bundle.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698