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

Unified Diff: chrome/browser/resources/print_preview/print_header.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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/print_preview/print_header.js
diff --git a/chrome/browser/resources/print_preview/print_header.js b/chrome/browser/resources/print_preview/print_header.js
index 7b9b8ded9506c6fb5f94cc9ff09f49ed55021a46..3d4ed775bd6750c3cffa037e4020edf10eab427d 100644
--- a/chrome/browser/resources/print_preview/print_header.js
+++ b/chrome/browser/resources/print_preview/print_header.js
@@ -98,12 +98,10 @@ cr.define('print_preview', function() {
// User events
this.tracker.add(
- this.getChildElement('button.cancel'),
- 'click',
+ this.getChildElement('button.cancel'), 'click',
this.onCancelButtonClick_.bind(this));
this.tracker.add(
- this.getChildElement('button.print'),
- 'click',
+ this.getChildElement('button.print'), 'click',
this.onPrintButtonClick_.bind(this));
// Data events.
@@ -144,8 +142,7 @@ cr.define('print_preview', function() {
updatePrintButtonEnabledState_: function() {
this.getChildElement('button.print').disabled =
this.destinationStore_.selectedDestination == null ||
- !this.isEnabled_ ||
- !this.isPrintButtonEnabled_ ||
+ !this.isEnabled_ || !this.isPrintButtonEnabled_ ||
!this.printTicketStore_.isTicketValid();
},
@@ -165,9 +162,9 @@ cr.define('print_preview', function() {
var saveToPdfOrDrive = this.destinationStore_.selectedDestination &&
(this.destinationStore_.selectedDestination.id ==
- print_preview.Destination.GooglePromotedId.SAVE_AS_PDF ||
+ print_preview.Destination.GooglePromotedId.SAVE_AS_PDF ||
this.destinationStore_.selectedDestination.id ==
- print_preview.Destination.GooglePromotedId.DOCS);
+ print_preview.Destination.GooglePromotedId.DOCS);
if (saveToPdfOrDrive) {
summaryLabel = loadTimeData.getString('printPreviewPageLabelSingular');
}
@@ -183,7 +180,8 @@ cr.define('print_preview', function() {
numPages *= copies;
if (numSheets > 1) {
- summaryLabel = saveToPdfOrDrive ? pagesLabel :
+ summaryLabel = saveToPdfOrDrive ?
+ pagesLabel :
loadTimeData.getString('printPreviewSheetsLabelPlural');
}
@@ -193,22 +191,19 @@ cr.define('print_preview', function() {
html = loadTimeData.getStringF(
'printPreviewSummaryFormatLong',
'<b>' + numSheets.toLocaleString() + '</b>',
- '<b>' + summaryLabel + '</b>',
- numPages.toLocaleString(),
+ '<b>' + summaryLabel + '</b>', numPages.toLocaleString(),
pagesLabel);
- label = loadTimeData.getStringF('printPreviewSummaryFormatLong',
- numSheets.toLocaleString(),
- summaryLabel,
- numPages.toLocaleString(),
- pagesLabel);
+ label = loadTimeData.getStringF(
+ 'printPreviewSummaryFormatLong', numSheets.toLocaleString(),
+ summaryLabel, numPages.toLocaleString(), pagesLabel);
} else {
html = loadTimeData.getStringF(
'printPreviewSummaryFormatShort',
'<b>' + numSheets.toLocaleString() + '</b>',
'<b>' + summaryLabel + '</b>');
- label = loadTimeData.getStringF('printPreviewSummaryFormatShort',
- numSheets.toLocaleString(),
- summaryLabel);
+ label = loadTimeData.getStringF(
+ 'printPreviewSummaryFormatShort', numSheets.toLocaleString(),
+ summaryLabel);
}
// Removing extra spaces from within the string.
@@ -229,7 +224,8 @@ cr.define('print_preview', function() {
print_preview.Destination.GooglePromotedId.SAVE_AS_PDF) {
this.getChildElement('button.print').classList.add('loading');
this.getChildElement('button.cancel').classList.add('loading');
- var isSaveLabel = (this.destinationStore_.selectedDestination.id ==
+ var isSaveLabel =
+ (this.destinationStore_.selectedDestination.id ==
print_preview.Destination.GooglePromotedId.DOCS);
this.getChildElement('.summary').innerHTML =
loadTimeData.getString(isSaveLabel ? 'saving' : 'printing');
@@ -280,7 +276,5 @@ cr.define('print_preview', function() {
};
// Export
- return {
- PrintHeader: PrintHeader
- };
+ return {PrintHeader: PrintHeader};
});

Powered by Google App Engine
This is Rietveld 408576698