Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(279)

Side by Side Diff: chrome/browser/resources/print_preview/settings/page_settings.js

Issue 435393005: [PrintPreview] Custom input focus toggles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698