OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 | 6 * @fileoverview |
7 * 'settings-users-page' is the settings page for managing user accounts on | 7 * 'settings-users-page' is the settings page for managing user accounts on |
8 * the device. | 8 * the device. |
9 */ | 9 */ |
10 Polymer({ | 10 Polymer({ |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 * @param {!Event} e | 47 * @param {!Event} e |
48 * @private | 48 * @private |
49 */ | 49 */ |
50 openAddUserDialog_: function(e) { | 50 openAddUserDialog_: function(e) { |
51 e.preventDefault(); | 51 e.preventDefault(); |
52 this.$.addUserDialog.open(); | 52 this.$.addUserDialog.open(); |
53 }, | 53 }, |
54 | 54 |
55 /** @private */ | 55 /** @private */ |
56 onAddUserDialogClose_: function() { | 56 onAddUserDialogClose_: function() { |
57 this.$$('#add-user-button a').focus(); | 57 cr.ui.focusWithoutInk(this.$$('#add-user-button a')); |
58 }, | 58 }, |
59 | 59 |
60 /** | 60 /** |
61 * @param {boolean} isOwner | 61 * @param {boolean} isOwner |
62 * @param {boolean} isWhitelistManaged | 62 * @param {boolean} isWhitelistManaged |
63 * @private | 63 * @private |
64 * @return {boolean} | 64 * @return {boolean} |
65 */ | 65 */ |
66 isEditingDisabled_: function(isOwner, isWhitelistManaged) { | 66 isEditingDisabled_: function(isOwner, isWhitelistManaged) { |
67 return !isOwner || isWhitelistManaged; | 67 return !isOwner || isWhitelistManaged; |
68 }, | 68 }, |
69 | 69 |
70 /** | 70 /** |
71 * @param {boolean} isOwner | 71 * @param {boolean} isOwner |
72 * @param {boolean} isWhitelistManaged | 72 * @param {boolean} isWhitelistManaged |
73 * @param {boolean} allowGuest | 73 * @param {boolean} allowGuest |
74 * @private | 74 * @private |
75 * @return {boolean} | 75 * @return {boolean} |
76 */ | 76 */ |
77 isEditingUsersDisabled_: function(isOwner, isWhitelistManaged, allowGuest) { | 77 isEditingUsersDisabled_: function(isOwner, isWhitelistManaged, allowGuest) { |
78 return !isOwner || isWhitelistManaged || allowGuest; | 78 return !isOwner || isWhitelistManaged || allowGuest; |
79 } | 79 } |
80 }); | 80 }); |
OLD | NEW |