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

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

Issue 588713002: Compile print_preview, part 3: reduce down to 185 errors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@I_print_preview_2
Patch Set: fix assert Created 6 years, 2 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
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 * 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 159
160 /** 160 /**
161 * Called whenever the increment/decrement buttons are clicked. 161 * Called whenever the increment/decrement buttons are clicked.
162 * @param {number} delta Must be 1 for an increment button click and -1 for 162 * @param {number} delta Must be 1 for an increment button click and -1 for
163 * a decrement button click. 163 * a decrement button click.
164 * @private 164 * @private
165 */ 165 */
166 onButtonClicked_: function(delta) { 166 onButtonClicked_: function(delta) {
167 // Assumes text field has a valid number. 167 // Assumes text field has a valid number.
168 var newValue = 168 var newValue =
169 parseInt(this.getChildElement('input.copies').value) + delta; 169 parseInt(this.getChildElement('input.copies').value, 10) + delta;
170 this.copiesTicketItem_.updateValue(newValue + ''); 170 this.copiesTicketItem_.updateValue(newValue + '');
171 }, 171 },
172 172
173 /** 173 /**
174 * Called after a timeout after user input into the textfield. 174 * Called after a timeout after user input into the textfield.
175 * @private 175 * @private
176 */ 176 */
177 onTextfieldTimeout_: function() { 177 onTextfieldTimeout_: function() {
178 this.textfieldTimeout_ = null; 178 this.textfieldTimeout_ = null;
179 var copiesVal = this.getChildElement('input.copies').value; 179 var copiesVal = this.getChildElement('input.copies').value;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 this.collateTicketItem_.updateValue( 228 this.collateTicketItem_.updateValue(
229 this.getChildElement('input.collate').checked); 229 this.getChildElement('input.collate').checked);
230 } 230 }
231 }; 231 };
232 232
233 // Export 233 // Export
234 return { 234 return {
235 CopiesSettings: CopiesSettings 235 CopiesSettings: CopiesSettings
236 }; 236 };
237 }); 237 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698