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 * Creates a PageSettings object. This object encapsulates all settings and | 9 * Creates a PageSettings object. This object encapsulates all settings and |
10 * logic related to page selection. | 10 * logic related to page selection. |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
159 | 159 |
160 /** | 160 /** |
161 * Called when the custom radio button is clicked. Updates the print ticket. | 161 * Called when the custom radio button is clicked. Updates the print ticket. |
162 * @private | 162 * @private |
163 */ | 163 */ |
164 onCustomRadioClick_: function() { | 164 onCustomRadioClick_: function() { |
165 this.customInput_.focus(); | 165 this.customInput_.focus(); |
166 }, | 166 }, |
167 | 167 |
168 /** | 168 /** |
169 * Called when the custom input is blurred. Enables the all radio button if | 169 * Called when the custom input is blurred. |
170 * the custom input is empty. | |
171 * @private | 170 * @private |
172 */ | 171 */ |
173 onCustomInputBlur_: function() { | 172 onCustomInputBlur_: function() { |
Nikhil
2014/08/05 14:39:40
Do we need to keep this empty function?
Aleksey Shlyapnikov
2014/08/07 22:49:14
It should not be empty, see my other comment.
Nikhil
2014/08/08 11:34:36
Acknowledged.
| |
174 if (this.customInput_.value == '') { | |
Aleksey Shlyapnikov
2014/08/07 22:49:14
You're breaking the existing functionality, changi
Nikhil
2014/08/08 11:34:36
Thanks for reviewing and catching this! I didn't k
| |
175 this.allRadio_.checked = true; | |
176 } | |
177 }, | 173 }, |
178 | 174 |
179 /** | 175 /** |
180 * Called when the custom input is focused. | 176 * Called when the custom input is focused. |
181 * @private | 177 * @private |
182 */ | 178 */ |
183 onCustomInputFocus_: function() { | 179 onCustomInputFocus_: function() { |
184 this.customRadio_.checked = true; | 180 this.customRadio_.checked = true; |
185 this.pageRangeTicketItem_.updateValue(this.customInput_.value); | 181 this.pageRangeTicketItem_.updateValue(this.customInput_.value); |
186 }, | 182 }, |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
252 fadeOutOption(this.getElement()); | 248 fadeOutOption(this.getElement()); |
253 } | 249 } |
254 } | 250 } |
255 }; | 251 }; |
256 | 252 |
257 // Export | 253 // Export |
258 return { | 254 return { |
259 PageSettings: PageSettings | 255 PageSettings: PageSettings |
260 }; | 256 }; |
261 }); | 257 }); |
OLD | NEW |