Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: chrome/browser/resources/print_preview/settings/more_settings.js

Issue 590643002: Move Print Preview onto newer i18nTemplate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update new invitations code Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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('print_preview', function() { 5 cr.define('print_preview', function() {
6 'use strict'; 6 'use strict';
7 7
8 /** 8 /**
9 * Toggles visibility of the specified printing options sections. 9 * Toggles visibility of the specified printing options sections.
10 * @param {!print_preview.DestinationStore} destinationStore To listen for 10 * @param {!print_preview.DestinationStore} destinationStore To listen for
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 * @private 108 * @private
109 */ 109 */
110 updateState_: function(noAnimation) { 110 updateState_: function(noAnimation) {
111 if (!this.firstDestinationReady_) { 111 if (!this.firstDestinationReady_) {
112 fadeOutElement(this.getElement(), noAnimation); 112 fadeOutElement(this.getElement(), noAnimation);
113 return; 113 return;
114 } 114 }
115 115
116 var all = this.settingsToShow_ == MoreSettings.SettingsToShow.ALL; 116 var all = this.settingsToShow_ == MoreSettings.SettingsToShow.ALL;
117 this.getChildElement('.more-settings-label').textContent = 117 this.getChildElement('.more-settings-label').textContent =
118 localStrings.getString(all ? 'lessOptionsLabel' : 'moreOptionsLabel'); 118 loadTimeData.getString(all ? 'lessOptionsLabel' : 'moreOptionsLabel');
119 var iconEl = this.getChildElement('.more-settings-icon'); 119 var iconEl = this.getChildElement('.more-settings-icon');
120 iconEl.classList.toggle('more-settings-icon-plus', !all); 120 iconEl.classList.toggle('more-settings-icon-plus', !all);
121 iconEl.classList.toggle('more-settings-icon-minus', all); 121 iconEl.classList.toggle('more-settings-icon-minus', all);
122 122
123 var availableSections = this.settingsSections_.reduce( 123 var availableSections = this.settingsSections_.reduce(
124 function(count, section) { 124 function(count, section) {
125 return count + (section.isAvailable() ? 1 : 0); 125 return count + (section.isAvailable() ? 1 : 0);
126 }, 0); 126 }, 0);
127 127
128 // Magic 6 is chosen as the number of sections when it still feels like 128 // Magic 6 is chosen as the number of sections when it still feels like
(...skipping 17 matching lines...) Expand all
146 section.setCollapseContent(collapseContent, noAnimation); 146 section.setCollapseContent(collapseContent, noAnimation);
147 }); 147 });
148 } 148 }
149 }; 149 };
150 150
151 // Export 151 // Export
152 return { 152 return {
153 MoreSettings: MoreSettings 153 MoreSettings: MoreSettings
154 }; 154 };
155 }); 155 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698