| OLD | NEW |
| 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 /** | 5 /** |
| 6 * @fileoverview Account picker screen implementation. | 6 * @fileoverview Account picker screen implementation. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 login.createScreen('AccountPickerScreen', 'account-picker', function() { | 9 login.createScreen('AccountPickerScreen', 'account-picker', function() { |
| 10 /** | 10 /** |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 chrome.send('loginUIStateChanged', ['account-picker', true]); | 67 chrome.send('loginUIStateChanged', ['account-picker', true]); |
| 68 $('login-header-bar').signinUIState = SIGNIN_UI_STATE.ACCOUNT_PICKER; | 68 $('login-header-bar').signinUIState = SIGNIN_UI_STATE.ACCOUNT_PICKER; |
| 69 chrome.send('hideCaptivePortal'); | 69 chrome.send('hideCaptivePortal'); |
| 70 var podRow = $('pod-row'); | 70 var podRow = $('pod-row'); |
| 71 podRow.handleBeforeShow(); | 71 podRow.handleBeforeShow(); |
| 72 | 72 |
| 73 // If this is showing for the lock screen display the sign out button, | 73 // If this is showing for the lock screen display the sign out button, |
| 74 // hide the add user button and activate the locked user's pod. | 74 // hide the add user button and activate the locked user's pod. |
| 75 var lockedPod = podRow.lockedPod; | 75 var lockedPod = podRow.lockedPod; |
| 76 $('add-user-header-bar-item').hidden = !!lockedPod; | 76 $('add-user-header-bar-item').hidden = !!lockedPod; |
| 77 $('sign-out-user-item').hidden = !lockedPod; | 77 var signOutUserItem = $('sign-out-user-item'); |
| 78 if (signOutUserItem) |
| 79 signOutUserItem.hidden = !lockedPod; |
| 78 // In case of the preselected pod onShow will be called once pod | 80 // In case of the preselected pod onShow will be called once pod |
| 79 // receives focus. | 81 // receives focus. |
| 80 if (!podRow.preselectedPod) | 82 if (!podRow.preselectedPod) |
| 81 this.onShow(); | 83 this.onShow(); |
| 82 }, | 84 }, |
| 83 | 85 |
| 84 /** | 86 /** |
| 85 * Event handler invoked when the page is shown and ready. | 87 * Event handler invoked when the page is shown and ready. |
| 86 */ | 88 */ |
| 87 onShow: function() { | 89 onShow: function() { |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 * Enforces focus on user pod of locked user. | 176 * Enforces focus on user pod of locked user. |
| 175 */ | 177 */ |
| 176 forceLockedUserPodFocus: function() { | 178 forceLockedUserPodFocus: function() { |
| 177 var row = $('pod-row'); | 179 var row = $('pod-row'); |
| 178 if (row.lockedPod) | 180 if (row.lockedPod) |
| 179 row.focusPod(row.lockedPod, true); | 181 row.focusPod(row.lockedPod, true); |
| 180 } | 182 } |
| 181 }; | 183 }; |
| 182 }); | 184 }); |
| 183 | 185 |
| OLD | NEW |