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

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

Issue 2617663002: WIP: run clang-format-js on lots of things (Closed)
Patch Set: merge Created 3 years, 11 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 (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('print_preview', function() { 5 cr.define('print_preview', function() {
6 'use strict'; 6 'use strict';
7 7
8 /** 8 /**
9 * Creates a PageSettings object. This object encapsulates all settings and 9 * Creates a PageSettings object. This object encapsulates all settings and
10 * logic related to page selection. 10 * logic related to page selection.
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 */ 146 */
147 setInvalidStateVisible_: function(validity) { 147 setInvalidStateVisible_: function(validity) {
148 if (validity !== PageRangeStatus.NO_ERROR) { 148 if (validity !== PageRangeStatus.NO_ERROR) {
149 var message; 149 var message;
150 if (validity === PageRangeStatus.LIMIT_ERROR) { 150 if (validity === PageRangeStatus.LIMIT_ERROR) {
151 if (this.pageRangeTicketItem_.getDocumentNumPages()) { 151 if (this.pageRangeTicketItem_.getDocumentNumPages()) {
152 message = loadTimeData.getStringF( 152 message = loadTimeData.getStringF(
153 'pageRangeLimitInstructionWithValue', 153 'pageRangeLimitInstructionWithValue',
154 this.pageRangeTicketItem_.getDocumentNumPages()); 154 this.pageRangeTicketItem_.getDocumentNumPages());
155 } else { 155 } else {
156 message = loadTimeData.getString( 156 message = loadTimeData.getString('pageRangeLimitInstruction');
157 'pageRangeLimitInstruction');
158 } 157 }
159 } else { 158 } else {
160 message = loadTimeData.getStringF( 159 message = loadTimeData.getStringF(
161 'pageRangeSyntaxInstruction', 160 'pageRangeSyntaxInstruction',
162 loadTimeData.getString('examplePageRangeText')); 161 loadTimeData.getString('examplePageRangeText'));
163 } 162 }
164 this.customHintEl_.textContent = message; 163 this.customHintEl_.textContent = message;
165 this.customInput_.classList.add('invalid'); 164 this.customInput_.classList.add('invalid');
166 fadeInElement(this.customHintEl_); 165 fadeInElement(this.customHintEl_);
167 } else { 166 } else {
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 } else { 264 } else {
266 this.allRadio_.checked = true; 265 this.allRadio_.checked = true;
267 this.setInvalidStateVisible_(PageRangeStatus.NO_ERROR); 266 this.setInvalidStateVisible_(PageRangeStatus.NO_ERROR);
268 } 267 }
269 } 268 }
270 this.updateUiStateInternal(); 269 this.updateUiStateInternal();
271 } 270 }
272 }; 271 };
273 272
274 // Export 273 // Export
275 return { 274 return {PageSettings: PageSettings};
276 PageSettings: PageSettings
277 };
278 }); 275 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698