| 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('print_preview', function() { | 5 cr.define('print_preview', function() { |
| 6 'use strict'; | 6 'use strict'; |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * Component used for searching for a print destination. | 9 * Component used for searching for a print destination. |
| 10 * This is a modal dialog that allows the user to search and select a | 10 * This is a modal dialog that allows the user to search and select a |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 loadTimeData.getString('accountSelectTitle'); | 286 loadTimeData.getString('accountSelectTitle'); |
| 287 }, | 287 }, |
| 288 | 288 |
| 289 /** | 289 /** |
| 290 * @return {number} Height available for destination lists, in pixels. | 290 * @return {number} Height available for destination lists, in pixels. |
| 291 * @private | 291 * @private |
| 292 */ | 292 */ |
| 293 getAvailableListsHeight_: function() { | 293 getAvailableListsHeight_: function() { |
| 294 var elStyle = window.getComputedStyle(this.getElement()); | 294 var elStyle = window.getComputedStyle(this.getElement()); |
| 295 return this.getElement().offsetHeight - | 295 return this.getElement().offsetHeight - |
| 296 parseInt(elStyle.getPropertyValue('padding-top')) - | 296 parseInt(elStyle.getPropertyValue('padding-top'), 10) - |
| 297 parseInt(elStyle.getPropertyValue('padding-bottom')) - | 297 parseInt(elStyle.getPropertyValue('padding-bottom'), 10) - |
| 298 this.getChildElement('.lists').offsetTop - | 298 this.getChildElement('.lists').offsetTop - |
| 299 this.getChildElement('.invitation-container').offsetHeight - | 299 this.getChildElement('.invitation-container').offsetHeight - |
| 300 this.getChildElement('.cloudprint-promo').offsetHeight; | 300 this.getChildElement('.cloudprint-promo').offsetHeight; |
| 301 }, | 301 }, |
| 302 | 302 |
| 303 /** | 303 /** |
| 304 * Filters all destination lists with the given query. | 304 * Filters all destination lists with the given query. |
| 305 * @param {RegExp} query Query to filter destination lists by. | 305 * @param {RegExp} query Query to filter destination lists by. |
| 306 * @private | 306 * @private |
| 307 */ | 307 */ |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 onWindowResize_: function() { | 687 onWindowResize_: function() { |
| 688 this.reflowLists_(); | 688 this.reflowLists_(); |
| 689 } | 689 } |
| 690 }; | 690 }; |
| 691 | 691 |
| 692 // Export | 692 // Export |
| 693 return { | 693 return { |
| 694 DestinationSearch: DestinationSearch | 694 DestinationSearch: DestinationSearch |
| 695 }; | 695 }; |
| 696 }); | 696 }); |
| OLD | NEW |