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 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
452 handleWindowMessage_: function(e) { | 452 handleWindowMessage_: function(e) { |
453 if (e.data.method == 'frameSelected') | 453 if (e.data.method == 'frameSelected') |
454 $('search-field').focus(); | 454 $('search-field').focus(); |
455 }, | 455 }, |
456 | 456 |
457 /** | 457 /** |
458 * Toggle the visibility state of the Advanced section. | 458 * Toggle the visibility state of the Advanced section. |
459 * @private | 459 * @private |
460 */ | 460 */ |
461 toggleAdvancedSettings_: function() { | 461 toggleAdvancedSettings_: function() { |
462 if ($('advanced-settings').style.height == '0px') | 462 if ($('advanced-settings').style.height == '') |
463 this.showAdvancedSettings_(); | 463 this.showAdvancedSettings_(); |
464 else | 464 else |
465 this.hideAdvancedSettings_(); | 465 this.hideAdvancedSettings_(); |
466 }, | 466 }, |
467 | 467 |
468 /** | 468 /** |
469 * Show advanced settings. | 469 * Show advanced settings. |
470 * @private | 470 * @private |
471 */ | 471 */ |
472 showAdvancedSettings_: function() { | 472 showAdvancedSettings_: function() { |
473 $('advanced-settings').style.height = | 473 $('advanced-settings').style.height = |
474 $('advanced-settings-container').offsetHeight + 20 + 'px'; | 474 $('advanced-settings-container').offsetHeight + 20 + 'px'; |
475 $('advanced-settings-expander').innerHTML = | 475 $('advanced-settings-expander').innerHTML = |
Evan Stade
2012/03/02 17:09:27
should this be textContent?
csilv
2012/03/02 19:29:41
Done.
| |
476 localStrings.getString('hideAdvancedSettings'); | 476 localStrings.getString('hideAdvancedSettings'); |
477 }, | 477 }, |
478 | 478 |
479 /** | 479 /** |
480 * Hide advanced settings. | 480 * Hide advanced settings. |
481 * @private | 481 * @private |
482 */ | 482 */ |
483 hideAdvancedSettings_: function() { | 483 hideAdvancedSettings_: function() { |
484 $('advanced-settings').style.height = '0px'; | 484 $('advanced-settings').style.height = ''; |
485 $('advanced-settings-expander').innerHTML = | 485 $('advanced-settings-expander').innerHTML = |
Evan Stade
2012/03/02 17:09:27
should this be textContent?
csilv
2012/03/02 19:29:41
Done.
| |
486 localStrings.getString('showAdvancedSettings'); | 486 localStrings.getString('showAdvancedSettings'); |
487 }, | 487 }, |
488 | 488 |
489 /** | 489 /** |
490 * Initializes a button for controlling screen brightness. | 490 * Initializes a button for controlling screen brightness. |
491 * @param {string} id Button ID. | 491 * @param {string} id Button ID. |
492 * @param {string} callback Name of the callback function. | 492 * @param {string} callback Name of the callback function. |
493 */ | 493 */ |
494 initBrightnessButton_: function(id, callback) { | 494 initBrightnessButton_: function(id, callback) { |
495 var button = $(id); | 495 var button = $(id); |
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1219 BrowserOptions.getLoggedInUsername = function() { | 1219 BrowserOptions.getLoggedInUsername = function() { |
1220 return BrowserOptions.getInstance().username_; | 1220 return BrowserOptions.getInstance().username_; |
1221 }; | 1221 }; |
1222 } | 1222 } |
1223 | 1223 |
1224 // Export | 1224 // Export |
1225 return { | 1225 return { |
1226 BrowserOptions: BrowserOptions | 1226 BrowserOptions: BrowserOptions |
1227 }; | 1227 }; |
1228 }); | 1228 }); |
OLD | NEW |