OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 var OptionsPage = options.OptionsPage; | 6 var OptionsPage = options.OptionsPage; |
7 var ArrayDataModel = cr.ui.ArrayDataModel; | 7 var ArrayDataModel = cr.ui.ArrayDataModel; |
8 var RepeatingButton = cr.ui.RepeatingButton; | 8 var RepeatingButton = cr.ui.RepeatingButton; |
9 | 9 |
10 // | 10 // |
(...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1034 * @private | 1034 * @private |
1035 */ | 1035 */ |
1036 setMetricsReportingSettingVisibility_: function(visible) { | 1036 setMetricsReportingSettingVisibility_: function(visible) { |
1037 if (visible) | 1037 if (visible) |
1038 $('metricsReportingSetting').style.display = 'block'; | 1038 $('metricsReportingSetting').style.display = 'block'; |
1039 else | 1039 else |
1040 $('metricsReportingSetting').style.display = 'none'; | 1040 $('metricsReportingSetting').style.display = 'none'; |
1041 }, | 1041 }, |
1042 | 1042 |
1043 /** | 1043 /** |
1044 * @private | |
Ilya Sherman
2012/05/01 22:27:48
nit: Please include a comment describing the purpo
zysxqn
2012/05/03 00:57:24
Done.
| |
1045 */ | |
1046 setPasswordGenerationSettingVisibility_: function(visible) { | |
1047 if (visible) { | |
1048 $('passwordGenerationEnabled').style.display = 'block'; | |
1049 $('passwordGenerationEnabledDesc').style.display = 'block'; | |
1050 } else { | |
1051 $('passwordGenerationEnabled').style.display = 'none'; | |
1052 $('passwordGenerationEnabledDesc').style.display = 'none'; | |
1053 } | |
Ilya Sherman
2012/05/01 22:27:48
nit: Why not set the visibility of the containing
zysxqn
2012/05/03 00:57:24
Done.
| |
1054 }, | |
1055 | |
1056 /** | |
1044 * Set the font size selected item. | 1057 * Set the font size selected item. |
1045 * @private | 1058 * @private |
1046 */ | 1059 */ |
1047 setFontSize_: function(font_size_value) { | 1060 setFontSize_: function(font_size_value) { |
1048 var selectCtl = $('defaultFontSize'); | 1061 var selectCtl = $('defaultFontSize'); |
1049 for (var i = 0; i < selectCtl.options.length; i++) { | 1062 for (var i = 0; i < selectCtl.options.length; i++) { |
1050 if (selectCtl.options[i].value == font_size_value) { | 1063 if (selectCtl.options[i].value == font_size_value) { |
1051 selectCtl.selectedIndex = i; | 1064 selectCtl.selectedIndex = i; |
1052 if ($('Custom')) | 1065 if ($('Custom')) |
1053 selectCtl.remove($('Custom').index); | 1066 selectCtl.remove($('Custom').index); |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1363 'setBackgroundModeCheckboxState', | 1376 'setBackgroundModeCheckboxState', |
1364 'setBluetoothState', | 1377 'setBluetoothState', |
1365 'setCheckRevocationCheckboxState', | 1378 'setCheckRevocationCheckboxState', |
1366 'setContentFilterSettingsValue', | 1379 'setContentFilterSettingsValue', |
1367 'setFontSize', | 1380 'setFontSize', |
1368 'setGtkThemeButtonEnabled', | 1381 'setGtkThemeButtonEnabled', |
1369 'setHighContrastCheckboxState', | 1382 'setHighContrastCheckboxState', |
1370 'setInstantFieldTrialStatus', | 1383 'setInstantFieldTrialStatus', |
1371 'setMetricsReportingCheckboxState', | 1384 'setMetricsReportingCheckboxState', |
1372 'setMetricsReportingSettingVisibility', | 1385 'setMetricsReportingSettingVisibility', |
1386 'setPasswordGenerationSettingVisibility', | |
1373 'setProfilesInfo', | 1387 'setProfilesInfo', |
1374 'setScreenMagnifierCheckboxState', | 1388 'setScreenMagnifierCheckboxState', |
1375 'setSpokenFeedbackCheckboxState', | 1389 'setSpokenFeedbackCheckboxState', |
1376 'setThemesResetButtonEnabled', | 1390 'setThemesResetButtonEnabled', |
1377 'setupCloudPrintConnectorSection', | 1391 'setupCloudPrintConnectorSection', |
1378 'setupPageZoomSelector', | 1392 'setupPageZoomSelector', |
1379 'setupProxySettingsSection', | 1393 'setupProxySettingsSection', |
1380 'setVirtualKeyboardCheckboxState', | 1394 'setVirtualKeyboardCheckboxState', |
1381 'showBluetoothSettings', | 1395 'showBluetoothSettings', |
1382 'showMouseControls', | 1396 'showMouseControls', |
(...skipping 21 matching lines...) Expand all Loading... | |
1404 BrowserOptions.getLoggedInUsername = function() { | 1418 BrowserOptions.getLoggedInUsername = function() { |
1405 return BrowserOptions.getInstance().username_; | 1419 return BrowserOptions.getInstance().username_; |
1406 }; | 1420 }; |
1407 } | 1421 } |
1408 | 1422 |
1409 // Export | 1423 // Export |
1410 return { | 1424 return { |
1411 BrowserOptions: BrowserOptions | 1425 BrowserOptions: BrowserOptions |
1412 }; | 1426 }; |
1413 }); | 1427 }); |
OLD | NEW |