| Index: chrome/browser/resources/print_preview/search/destination_list.js
|
| diff --git a/chrome/browser/resources/print_preview/search/destination_list.js b/chrome/browser/resources/print_preview/search/destination_list.js
|
| index 351d31184980cbe76ca4808d869d0e1ec89238c0..e50e0ec77d0865d20bfac75c2ab1b677fba8b85e 100644
|
| --- a/chrome/browser/resources/print_preview/search/destination_list.js
|
| +++ b/chrome/browser/resources/print_preview/search/destination_list.js
|
| @@ -145,10 +145,10 @@ cr.define('print_preview', function() {
|
| numItems = Math.min(numItems, this.destinations_.length);
|
| var headerHeight =
|
| this.getChildElement('.destination-list > header').offsetHeight;
|
| - return headerHeight + (numItems > 0 ?
|
| - numItems * DestinationList.HEIGHT_OF_ITEM_ :
|
| - // To account for "No destinations found" message.
|
| - DestinationList.HEIGHT_OF_ITEM_);
|
| + return headerHeight +
|
| + (numItems > 0 ? numItems * DestinationList.HEIGHT_OF_ITEM_ :
|
| + // To account for "No destinations found" message.
|
| + DestinationList.HEIGHT_OF_ITEM_);
|
| },
|
|
|
| /**
|
| @@ -181,8 +181,8 @@ cr.define('print_preview', function() {
|
|
|
| /** @override */
|
| createDom: function() {
|
| - this.setElementInternal(this.cloneTemplateInternal(
|
| - 'destination-list-template'));
|
| + this.setElementInternal(
|
| + this.cloneTemplateInternal('destination-list-template'));
|
| this.getChildElement('.title').textContent = this.title_;
|
| if (this.actionLinkLabel_) {
|
| var actionLinkEl = this.getChildElement('.action-link');
|
| @@ -195,12 +195,10 @@ cr.define('print_preview', function() {
|
| enterDocument: function() {
|
| print_preview.Component.prototype.enterDocument.call(this);
|
| this.tracker.add(
|
| - this.getChildElement('.action-link'),
|
| - 'click',
|
| + this.getChildElement('.action-link'), 'click',
|
| this.onActionLinkClick_.bind(this));
|
| this.tracker.add(
|
| - this.getChildElement('.show-all-button'),
|
| - 'click',
|
| + this.getChildElement('.show-all-button'), 'click',
|
| this.setIsShowAll.bind(this, true));
|
| },
|
|
|
| @@ -265,8 +263,9 @@ cr.define('print_preview', function() {
|
| */
|
| renderDestinationsList_: function(destinations) {
|
| // Update item counters, footers and other misc controls.
|
| - setIsVisible(this.getChildElement('.no-destinations-message'),
|
| - destinations.length == 0);
|
| + setIsVisible(
|
| + this.getChildElement('.no-destinations-message'),
|
| + destinations.length == 0);
|
| setIsVisible(this.getChildElement('.destination-list > footer'), false);
|
| var numItems = destinations.length;
|
| if (destinations.length > this.shortListSize_ && !this.isShowAll_) {
|
| @@ -352,13 +351,11 @@ cr.define('print_preview', function() {
|
| * @private
|
| */
|
| onActionLinkClick_: function() {
|
| - cr.dispatchSimpleEvent(this,
|
| - DestinationList.EventType.ACTION_LINK_ACTIVATED);
|
| + cr.dispatchSimpleEvent(
|
| + this, DestinationList.EventType.ACTION_LINK_ACTIVATED);
|
| }
|
| };
|
|
|
| // Export
|
| - return {
|
| - DestinationList: DestinationList
|
| - };
|
| + return {DestinationList: DestinationList};
|
| });
|
|
|