| OLD | NEW |
| 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 * Modal dialog for print destination's advanced settings. | 9 * Modal dialog for print destination's advanced settings. |
| 10 * @param {!print_preview.PrintTicketStore} printTicketStore Contains the | 10 * @param {!print_preview.PrintTicketStore} printTicketStore Contains the |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 return !doneButton.disabled; | 116 return !doneButton.disabled; |
| 117 }, | 117 }, |
| 118 | 118 |
| 119 /** | 119 /** |
| 120 * @return {number} Height available for settings, in pixels. | 120 * @return {number} Height available for settings, in pixels. |
| 121 * @private | 121 * @private |
| 122 */ | 122 */ |
| 123 getAvailableContentHeight_: function() { | 123 getAvailableContentHeight_: function() { |
| 124 var elStyle = window.getComputedStyle(this.getElement()); | 124 var elStyle = window.getComputedStyle(this.getElement()); |
| 125 return this.getElement().offsetHeight - | 125 return this.getElement().offsetHeight - |
| 126 parseInt(elStyle.getPropertyValue('padding-top')) - | 126 parseInt(elStyle.getPropertyValue('padding-top'), 10) - |
| 127 parseInt(elStyle.getPropertyValue('padding-bottom')) - | 127 parseInt(elStyle.getPropertyValue('padding-bottom'), 10) - |
| 128 this.getChildElement('.settings-area').offsetTop - | 128 this.getChildElement('.settings-area').offsetTop - |
| 129 this.getChildElement('.action-area').offsetHeight; | 129 this.getChildElement('.action-area').offsetHeight; |
| 130 }, | 130 }, |
| 131 | 131 |
| 132 /** | 132 /** |
| 133 * Filters displayed settings with the given query. | 133 * Filters displayed settings with the given query. |
| 134 * @param {?string} query Query to filter settings by. | 134 * @param {?string} query Query to filter settings by. |
| 135 * @private | 135 * @private |
| 136 */ | 136 */ |
| 137 filterLists_: function(query) { | 137 filterLists_: function(query) { |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 | 224 |
| 225 this.printTicketStore_.vendorItems.updateValue(values); | 225 this.printTicketStore_.vendorItems.updateValue(values); |
| 226 } | 226 } |
| 227 }; | 227 }; |
| 228 | 228 |
| 229 // Export | 229 // Export |
| 230 return { | 230 return { |
| 231 AdvancedSettings: AdvancedSettings | 231 AdvancedSettings: AdvancedSettings |
| 232 }; | 232 }; |
| 233 }); | 233 }); |
| OLD | NEW |