| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 !activatedPod.user.locallyManagedUser) { | 155 !activatedPod.user.locallyManagedUser) { |
| 156 activatedPod.showSigninUI(); | 156 activatedPod.showSigninUI(); |
| 157 } else { | 157 } else { |
| 158 // We want bubble's arrow to point to the first letter of input. | 158 // We want bubble's arrow to point to the first letter of input. |
| 159 /** @const */ var BUBBLE_OFFSET = 7; | 159 /** @const */ var BUBBLE_OFFSET = 7; |
| 160 /** @const */ var BUBBLE_PADDING = 4; | 160 /** @const */ var BUBBLE_PADDING = 4; |
| 161 $('bubble').showContentForElement(activatedPod.mainInput, | 161 $('bubble').showContentForElement(activatedPod.mainInput, |
| 162 cr.ui.Bubble.Attachment.BOTTOM, | 162 cr.ui.Bubble.Attachment.BOTTOM, |
| 163 error, | 163 error, |
| 164 BUBBLE_OFFSET, BUBBLE_PADDING); | 164 BUBBLE_OFFSET, BUBBLE_PADDING); |
| 165 // Move error bubble up if it overlaps the shelf. |
| 166 var maxHeight = Oobe.getMaxHeightBeforeShelfOverlapping($('bubble')); |
| 167 if (maxHeight < $('bubble').offsetHeight) { |
| 168 $('bubble').showContentForElement(activatedPod.mainInput, |
| 169 cr.ui.Bubble.Attachment.TOP, |
| 170 error, |
| 171 BUBBLE_OFFSET, BUBBLE_PADDING); |
| 172 } |
| 165 } | 173 } |
| 166 }, | 174 }, |
| 167 | 175 |
| 168 /** | 176 /** |
| 169 * Loads given users in pod row. | 177 * Loads given users in pod row. |
| 170 * @param {array} users Array of user. | 178 * @param {array} users Array of user. |
| 171 * @param {boolean} showGuest Whether to show guest session button. | 179 * @param {boolean} showGuest Whether to show guest session button. |
| 172 */ | 180 */ |
| 173 loadUsers: function(users, showGuest) { | 181 loadUsers: function(users, showGuest) { |
| 174 $('pod-row').loadPods(users); | 182 $('pod-row').loadPods(users); |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 * Updates the list of available keyboard layouts for a public session pod. | 321 * Updates the list of available keyboard layouts for a public session pod. |
| 314 * @param {string} userID The user ID of the public session | 322 * @param {string} userID The user ID of the public session |
| 315 * @param {!Object} list List of available keyboard layouts | 323 * @param {!Object} list List of available keyboard layouts |
| 316 */ | 324 */ |
| 317 setPublicSessionKeyboardLayouts: function(userID, list) { | 325 setPublicSessionKeyboardLayouts: function(userID, list) { |
| 318 $('pod-row').setPublicSessionKeyboardLayouts(userID, list); | 326 $('pod-row').setPublicSessionKeyboardLayouts(userID, list); |
| 319 } | 327 } |
| 320 }; | 328 }; |
| 321 }); | 329 }); |
| 322 | 330 |
| OLD | NEW |