OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 Desktop User Chooser UI control bar implementation. | 6 * @fileoverview Desktop User Chooser UI control bar implementation. |
7 */ | 7 */ |
8 | 8 |
9 cr.define('login', function() { | 9 cr.define('login', function() { |
10 /** | 10 /** |
(...skipping 12 matching lines...) Expand all Loading... | |
23 // Current UI state of the sign-in screen. | 23 // Current UI state of the sign-in screen. |
24 signinUIState_: SIGNIN_UI_STATE.HIDDEN, | 24 signinUIState_: SIGNIN_UI_STATE.HIDDEN, |
25 | 25 |
26 // Whether to show kiosk apps menu. | 26 // Whether to show kiosk apps menu. |
27 hasApps_: false, | 27 hasApps_: false, |
28 | 28 |
29 /** @override */ | 29 /** @override */ |
30 decorate: function() { | 30 decorate: function() { |
31 $('add-user-button').addEventListener('click', | 31 $('add-user-button').addEventListener('click', |
32 this.handleAddUserClick_); | 32 this.handleAddUserClick_); |
33 $('cancel-add-user-button').addEventListener('click', | |
34 this.handleCancelAddUserClick_); | |
35 $('guest-user-header-bar-item').addEventListener('click', | 33 $('guest-user-header-bar-item').addEventListener('click', |
36 this.handleGuestClick_); | 34 this.handleGuestClick_); |
37 $('guest-user-button').addEventListener('click', | 35 $('guest-user-button').addEventListener('click', |
38 this.handleGuestClick_); | 36 this.handleGuestClick_); |
39 this.updateUI_(); | 37 this.updateUI_(); |
40 }, | 38 }, |
41 | 39 |
42 /** | 40 /** |
43 * Tab index value for all button elements. | 41 * Tab index value for all button elements. |
44 * @type {number} | 42 * @type {number} |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
128 set allowCancel(value) { | 126 set allowCancel(value) { |
129 this.allowCancel_ = value; | 127 this.allowCancel_ = value; |
130 this.updateUI_(); | 128 this.updateUI_(); |
131 }, | 129 }, |
132 | 130 |
133 /** | 131 /** |
134 * Updates visibility state of action buttons. | 132 * Updates visibility state of action buttons. |
135 * @private | 133 * @private |
136 */ | 134 */ |
137 updateUI_: function() { | 135 updateUI_: function() { |
138 $('add-user-button').hidden = false; | |
Nikita (slow)
2014/09/11 20:56:16
Where would add user button be hidden then?
Mike Lerman
2014/09/11 21:05:21
In showUserManagerScreen of user_manager.js as per
| |
139 $('cancel-add-user-button').hidden = !this.allowCancel_; | |
140 $('guest-user-header-bar-item').hidden = false; | 136 $('guest-user-header-bar-item').hidden = false; |
141 $('add-user-header-bar-item').hidden = false; | 137 $('add-user-header-bar-item').hidden = false; |
142 }, | 138 }, |
143 | 139 |
144 /** | 140 /** |
145 * Animates Header bar to hide from the screen. | 141 * Animates Header bar to hide from the screen. |
146 * @param {function()} callback will be called once animation is finished. | 142 * @param {function()} callback will be called once animation is finished. |
147 */ | 143 */ |
148 animateOut: function(callback) { | 144 animateOut: function(callback) { |
149 var launcher = this; | 145 var launcher = this; |
(...skipping 28 matching lines...) Expand all Loading... | |
178 * Convenience wrapper of animateIn. | 174 * Convenience wrapper of animateIn. |
179 */ | 175 */ |
180 HeaderBar.animateIn = function() { | 176 HeaderBar.animateIn = function() { |
181 $('login-header-bar').animateIn(); | 177 $('login-header-bar').animateIn(); |
182 }; | 178 }; |
183 | 179 |
184 return { | 180 return { |
185 HeaderBar: HeaderBar | 181 HeaderBar: HeaderBar |
186 }; | 182 }; |
187 }); | 183 }); |
OLD | NEW |