| 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 that renders the copies settings UI. | 9 * Component that renders the copies settings UI. |
| 10 * @param {!print_preview.ticket_items.Copies} copiesTicketItem Used to read | 10 * @param {!print_preview.ticket_items.Copies} copiesTicketItem Used to read |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 this.updateUiStateInternal(); | 143 this.updateUiStateInternal(); |
| 144 }, | 144 }, |
| 145 | 145 |
| 146 /** | 146 /** |
| 147 * Called after a timeout after user input into the textfield. | 147 * Called after a timeout after user input into the textfield. |
| 148 * @private | 148 * @private |
| 149 */ | 149 */ |
| 150 onTextfieldTimeout_: function() { | 150 onTextfieldTimeout_: function() { |
| 151 this.textfieldTimeout_ = null; | 151 this.textfieldTimeout_ = null; |
| 152 var copiesVal = this.inputField_.value; | 152 var copiesVal = this.inputField_.value; |
| 153 if (copiesVal != '') { | 153 this.copiesTicketItem_.updateValue(copiesVal); |
| 154 this.copiesTicketItem_.updateValue(copiesVal); | |
| 155 } | |
| 156 }, | 154 }, |
| 157 | 155 |
| 158 /** | 156 /** |
| 159 * Called when a key is pressed on the custom input. | 157 * Called when a key is pressed on the custom input. |
| 160 * @param {Event} event Contains the key that was pressed. | 158 * @param {Event} event Contains the key that was pressed. |
| 161 * @private | 159 * @private |
| 162 */ | 160 */ |
| 163 onTextfieldKeyDown_: function(event) { | 161 onTextfieldKeyDown_: function(event) { |
| 164 if (event.keyCode != 'Enter') | 162 if (event.keyCode != 'Enter') |
| 165 return; | 163 return; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 this.collateTicketItem_.updateValue( | 207 this.collateTicketItem_.updateValue( |
| 210 this.getChildElement('input.collate').checked); | 208 this.getChildElement('input.collate').checked); |
| 211 } | 209 } |
| 212 }; | 210 }; |
| 213 | 211 |
| 214 // Export | 212 // Export |
| 215 return { | 213 return { |
| 216 CopiesSettings: CopiesSettings | 214 CopiesSettings: CopiesSettings |
| 217 }; | 215 }; |
| 218 }); | 216 }); |
| OLD | NEW |