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.contentSettings', function() { | 5 cr.define('options.contentSettings', function() { |
6 /** @const */ var ControlledSettingIndicator = | 6 /** @const */ var ControlledSettingIndicator = |
7 options.ControlledSettingIndicator; | 7 options.ControlledSettingIndicator; |
8 /** @const */ var InlineEditableItemList = options.InlineEditableItemList; | 8 /** @const */ var InlineEditableItemList = options.InlineEditableItemList; |
9 /** @const */ var InlineEditableItem = options.InlineEditableItem; | 9 /** @const */ var InlineEditableItem = options.InlineEditableItem; |
10 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; | 10 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; |
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
623 $('content-settings-exceptions-overlay-confirm').onclick = | 623 $('content-settings-exceptions-overlay-confirm').onclick = |
624 OptionsPage.closeOverlay.bind(OptionsPage); | 624 OptionsPage.closeOverlay.bind(OptionsPage); |
625 }, | 625 }, |
626 | 626 |
627 /** | 627 /** |
628 * Shows one list and hides all others. | 628 * Shows one list and hides all others. |
629 * | 629 * |
630 * @param {string} type The content type. | 630 * @param {string} type The content type. |
631 */ | 631 */ |
632 showList: function(type) { | 632 showList: function(type) { |
| 633 // Update the title for the type that was shown. |
| 634 this.title = loadTimeData.getString(type + 'TabTitle'); |
| 635 |
633 var header = this.pageDiv.querySelector('h1'); | 636 var header = this.pageDiv.querySelector('h1'); |
634 header.textContent = loadTimeData.getString(type + '_header'); | 637 header.textContent = loadTimeData.getString(type + '_header'); |
635 | 638 |
636 var divs = this.pageDiv.querySelectorAll('div[contentType]'); | 639 var divs = this.pageDiv.querySelectorAll('div[contentType]'); |
637 for (var i = 0; i < divs.length; i++) { | 640 for (var i = 0; i < divs.length; i++) { |
638 if (divs[i].getAttribute('contentType') == type) | 641 if (divs[i].getAttribute('contentType') == type) |
639 divs[i].hidden = false; | 642 divs[i].hidden = false; |
640 else | 643 else |
641 divs[i].hidden = true; | 644 divs[i].hidden = true; |
642 } | 645 } |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
680 } | 683 } |
681 }; | 684 }; |
682 | 685 |
683 return { | 686 return { |
684 ExceptionsListItem: ExceptionsListItem, | 687 ExceptionsListItem: ExceptionsListItem, |
685 ExceptionsAddRowListItem: ExceptionsAddRowListItem, | 688 ExceptionsAddRowListItem: ExceptionsAddRowListItem, |
686 ExceptionsList: ExceptionsList, | 689 ExceptionsList: ExceptionsList, |
687 ContentSettingsExceptionsArea: ContentSettingsExceptionsArea, | 690 ContentSettingsExceptionsArea: ContentSettingsExceptionsArea, |
688 }; | 691 }; |
689 }); | 692 }); |
OLD | NEW |