OLD | NEW |
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 var OptionsPage = options.OptionsPage; | 7 var OptionsPage = options.OptionsPage; |
8 ///////////////////////////////////////////////////////////////////////////// | 8 ///////////////////////////////////////////////////////////////////////////// |
9 // SystemOptions class: | 9 // SystemOptions class: |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 __proto__: options.OptionsPage.prototype, | 24 __proto__: options.OptionsPage.prototype, |
25 | 25 |
26 /** | 26 /** |
27 * Initializes SystemOptions page. | 27 * Initializes SystemOptions page. |
28 * Calls base class implementation to starts preference initialization. | 28 * Calls base class implementation to starts preference initialization. |
29 */ | 29 */ |
30 initializePage: function() { | 30 initializePage: function() { |
31 OptionsPage.prototype.initializePage.call(this); | 31 OptionsPage.prototype.initializePage.call(this); |
32 var timezone = $('timezone-select'); | 32 var timezone = $('timezone-select'); |
33 if (timezone) { | 33 if (timezone) { |
34 timezone.initializeValues(templateData.timezoneList); | |
35 | |
36 // Disable the timezone setting for non-owners, as this is a | 34 // Disable the timezone setting for non-owners, as this is a |
37 // system wide setting. | 35 // system wide setting. |
38 if (!AccountsOptions.currentUserIsOwner()) | 36 if (!AccountsOptions.currentUserIsOwner()) |
39 timezone.disabled = true; | 37 timezone.disabled = true; |
40 } | 38 } |
41 | 39 |
42 $('language-button').onclick = function(event) { | 40 $('language-button').onclick = function(event) { |
43 OptionsPage.showPageByName('language'); | 41 OptionsPage.showPageByName('language'); |
44 }; | 42 }; |
45 $('modifier-keys-button').onclick = function(event) { | 43 $('modifier-keys-button').onclick = function(event) { |
46 OptionsPage.showOverlay('languageCustomizeModifierKeysOverlay'); | 44 OptionsPage.showOverlay('languageCustomizeModifierKeysOverlay'); |
47 }; | 45 }; |
48 } | 46 } |
49 }; | 47 }; |
50 | 48 |
51 // Export | 49 // Export |
52 return { | 50 return { |
53 SystemOptions: SystemOptions | 51 SystemOptions: SystemOptions |
54 }; | 52 }; |
55 | 53 |
56 }); | 54 }); |
OLD | NEW |