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

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

Issue 6150003: DOMUI: Implement the i18n-options attribute that allows the client to load (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nit fix. Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 cr.define('options', function() { 5 cr.define('options', function() {
6 6
7 ///////////////////////////////////////////////////////////////////////////// 7 /////////////////////////////////////////////////////////////////////////////
8 // MinimumFontSizeSelect class: 8 // MinimumFontSizeSelect class:
9 9
10 // Define a constructor that uses a select element as its underlying element. 10 // Define a constructor that uses a select element as its underlying element.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 self.options[self.selectedIndex].value, ''); 51 self.options[self.selectedIndex].value, '');
52 } else { 52 } else {
53 Preferences.clearPref( 53 Preferences.clearPref(
54 'webkit.webprefs.minimum_font_size', 54 'webkit.webprefs.minimum_font_size',
55 'Options_ChangeMinimumFontSize'); 55 'Options_ChangeMinimumFontSize');
56 Preferences.clearPref( 56 Preferences.clearPref(
57 'webkit.webprefs.minimum_logical_font_size', ''); 57 'webkit.webprefs.minimum_logical_font_size', '');
58 } 58 }
59 }); 59 });
60 }, 60 },
61
62 /**
63 * Sets up options in select element.
64 * @param {Array} options List of option and their display text.
65 * Each element in the array is an array of length 2 which contains options
66 * value in the first element and display text in the second element.
67 *
68 * TODO(zelidrag): move this to that i18n template classes.
69 */
70 initializeValues: function(options) {
71 options.forEach(function(values) {
72 this.appendChild(new Option(values[1], values[0]));
73 }, this);
74 }
75 }; 61 };
76 62
77 // Export 63 // Export
78 return { 64 return {
79 MinimumFontSizeSelect: MinimumFontSizeSelect 65 MinimumFontSizeSelect: MinimumFontSizeSelect
80 }; 66 };
81 67
82 }); 68 });
83 69
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/font_settings.js ('k') | chrome/browser/resources/options/personal_options.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698