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 // TODO(kochi): Generalize the notification as a component and put it | 5 // TODO(kochi): Generalize the notification as a component and put it |
6 // in js/cr/ui/notification.js . | 6 // in js/cr/ui/notification.js . |
7 | 7 |
8 cr.define('options', function() { | 8 cr.define('options', function() { |
9 /** @const */ var OptionsPage = options.OptionsPage; | 9 /** @const */ var OptionsPage = options.OptionsPage; |
10 /** @const */ var LanguageList = options.LanguageList; | 10 /** @const */ var LanguageList = options.LanguageList; |
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
575 $('language-options-list').addLanguage(String(selection.value)); | 575 $('language-options-list').addLanguage(String(selection.value)); |
576 OptionsPage.closeOverlay(); | 576 OptionsPage.closeOverlay(); |
577 } | 577 } |
578 }, | 578 }, |
579 | 579 |
580 /** | 580 /** |
581 * Checks if languageCode is deletable or not. | 581 * Checks if languageCode is deletable or not. |
582 * @param {String} languageCode the languageCode to check for deletability. | 582 * @param {String} languageCode the languageCode to check for deletability. |
583 */ | 583 */ |
584 languageIsDeletable: function(languageCode) { | 584 languageIsDeletable: function(languageCode) { |
585 // Don't allow removing the language if it's as UI language. | 585 // Don't allow removing the language if it's an UI language. |
James Hawkins
2012/03/30 18:52:07
s/an/a/
| |
586 if (languageCode == templateData.currentUiLanguageCode) | 586 if (languageCode == templateData.currentUiLanguageCode) |
587 return false; | 587 return false; |
588 return (!cr.isChromeOS || | 588 return (!cr.isChromeOS || |
589 this.canDeleteLanguage_(languageCode)); | 589 this.canDeleteLanguage_(languageCode)); |
590 }, | 590 }, |
591 | 591 |
592 /** | 592 /** |
593 * Handles browse.enable_spellchecking change. | 593 * Handles browse.enable_spellchecking change. |
594 * @param {Event} e Change event. | 594 * @param {Event} e Change event. |
595 * @private | 595 * @private |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
814 LanguageOptions.uiLanguageSaved = function() { | 814 LanguageOptions.uiLanguageSaved = function() { |
815 $('language-options-ui-language-button').style.display = 'none'; | 815 $('language-options-ui-language-button').style.display = 'none'; |
816 $('language-options-ui-notification-bar').style.display = 'block'; | 816 $('language-options-ui-notification-bar').style.display = 'block'; |
817 }; | 817 }; |
818 | 818 |
819 // Export | 819 // Export |
820 return { | 820 return { |
821 LanguageOptions: LanguageOptions | 821 LanguageOptions: LanguageOptions |
822 }; | 822 }; |
823 }); | 823 }); |
OLD | NEW |