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

Side by Side Diff: chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js

Issue 2868723005: [CUPS] Change manufacturer selection should clear model selection in the dropdown list. (Closed)
Patch Set: Created 3 years, 7 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 | chrome/browser/resources/settings/printing_page/cups_add_printer_dialog_util.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 /** 5 /**
6 * @fileoverview 'settings-cups-add-printer-dialog' includes multiple dialogs to 6 * @fileoverview 'settings-cups-add-printer-dialog' includes multiple dialogs to
7 * set up a new CUPS printer. 7 * set up a new CUPS printer.
8 * Subdialogs include: 8 * Subdialogs include:
9 * - 'add-printer-discovery-dialog' is a dialog showing discovered printers on 9 * - 'add-printer-discovery-dialog' is a dialog showing discovered printers on
10 * the network that are available for setup. 10 * the network that are available for setup.
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 getCupsPrinterManufacturersList().then( 215 getCupsPrinterManufacturersList().then(
216 this.manufacturerListChanged_.bind(this)); 216 this.manufacturerListChanged_.bind(this));
217 }, 217 },
218 218
219 /** 219 /**
220 * @param {string} manufacturer The manufacturer for which we are retrieving 220 * @param {string} manufacturer The manufacturer for which we are retrieving
221 * models. 221 * models.
222 * @private 222 * @private
223 */ 223 */
224 selectedManufacturerChanged_: function(manufacturer) { 224 selectedManufacturerChanged_: function(manufacturer) {
225 // Reset model if manufacturer is changed.
226 this.set('newPrinter.printerModel', '');
225 if (manufacturer) { 227 if (manufacturer) {
226 settings.CupsPrintersBrowserProxyImpl.getInstance() 228 settings.CupsPrintersBrowserProxyImpl.getInstance()
227 .getCupsPrinterModelsList(manufacturer) 229 .getCupsPrinterModelsList(manufacturer)
228 .then(this.modelListChanged_.bind(this)); 230 .then(this.modelListChanged_.bind(this));
229 } 231 }
230 }, 232 },
231 233
232 /** @private */ 234 /** @private */
233 onBrowseFile_: function() { 235 onBrowseFile_: function() {
234 settings.CupsPrintersBrowserProxyImpl.getInstance(). 236 settings.CupsPrintersBrowserProxyImpl.getInstance().
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 onAddPrinter_: function(success, printerName) { 500 onAddPrinter_: function(success, printerName) {
499 this.$$('add-printer-configuring-dialog').close(); 501 this.$$('add-printer-configuring-dialog').close();
500 if (success) 502 if (success)
501 return; 503 return;
502 504
503 if (this.previousDialog_ == AddPrinterDialogs.MANUFACTURER) { 505 if (this.previousDialog_ == AddPrinterDialogs.MANUFACTURER) {
504 this.setupFailed = true; 506 this.setupFailed = true;
505 } 507 }
506 }, 508 },
507 }); 509 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/settings/printing_page/cups_add_printer_dialog_util.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698