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

Side by Side Diff: chrome/browser/resources/md_user_manager/import_supervised_user.js

Issue 1989993002: MD User Manager: Default focused element in add person page and import user dialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « chrome/browser/resources/md_user_manager/create_profile.js ('k') | 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 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 'import-supervised-user' is a popup that allows user to select 6 * @fileoverview 'import-supervised-user' is a popup that allows user to select
7 * a supervised profile from a list of profiles to import on the current device. 7 * a supervised profile from a list of profiles to import on the current device.
8 */ 8 */
9 (function() { 9 (function() {
10 /** 10 /**
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 if (a.onCurrentDevice != b.onCurrentDevice) 70 if (a.onCurrentDevice != b.onCurrentDevice)
71 return a.onCurrentDevice ? 1 : -1; 71 return a.onCurrentDevice ? 1 : -1;
72 return a.name.localeCompare(b.name); 72 return a.name.localeCompare(b.name);
73 }); 73 });
74 74
75 this.supervisedUserIndex_ = NO_USER_SELECTED; 75 this.supervisedUserIndex_ = NO_USER_SELECTED;
76 76
77 this.signedInUser_ = signedInUser || null; 77 this.signedInUser_ = signedInUser || null;
78 if (this.signedInUser_) 78 if (this.signedInUser_)
79 this.popupHidden_ = false; 79 this.popupHidden_ = false;
80
81 this.async(function() {
82 this.$$('paper-listbox').focus();
83 }.bind(this));
80 }, 84 },
81 85
82 /** 86 /**
83 * Computed binding that returns the appropriate import message depending on 87 * Computed binding that returns the appropriate import message depending on
84 * whether or not there are any supervised users to import. 88 * whether or not there are any supervised users to import.
85 * @param {!Array<!SupervisedUser>} supervisedUsers 89 * @param {!Array<!SupervisedUser>} supervisedUsers
86 * @private 90 * @private
87 * @return {string} 91 * @return {string}
88 */ 92 */
89 getMessage_: function(supervisedUsers) { 93 getMessage_: function(supervisedUsers) {
(...skipping 27 matching lines...) Expand all
117 var supervisedUser = this.supervisedUsers_[this.supervisedUserIndex_]; 121 var supervisedUser = this.supervisedUsers_[this.supervisedUserIndex_];
118 if (this.signedInUser_ && supervisedUser) { 122 if (this.signedInUser_ && supervisedUser) {
119 this.popupHidden_ = true; 123 this.popupHidden_ = true;
120 // Event is caught by create-profile. 124 // Event is caught by create-profile.
121 this.fire('import', {supervisedUser: supervisedUser, 125 this.fire('import', {supervisedUser: supervisedUser,
122 signedInUser: this.signedInUser_}); 126 signedInUser: this.signedInUser_});
123 } 127 }
124 } 128 }
125 }); 129 });
126 })(); 130 })();
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_user_manager/create_profile.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698