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

Side by Side Diff: ui/login/account_picker/screen_account_picker.js

Issue 399613002: Anti-shelf-overlapping fixes for several menus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Css fixes intersecting with another CL removed. Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 !activatedPod.user.supervisedUser) { 150 !activatedPod.user.supervisedUser) {
151 activatedPod.showSigninUI(); 151 activatedPod.showSigninUI();
152 } else { 152 } else {
153 // We want bubble's arrow to point to the first letter of input. 153 // We want bubble's arrow to point to the first letter of input.
154 /** @const */ var BUBBLE_OFFSET = 7; 154 /** @const */ var BUBBLE_OFFSET = 7;
155 /** @const */ var BUBBLE_PADDING = 4; 155 /** @const */ var BUBBLE_PADDING = 4;
156 $('bubble').showContentForElement(activatedPod.mainInput, 156 $('bubble').showContentForElement(activatedPod.mainInput,
157 cr.ui.Bubble.Attachment.BOTTOM, 157 cr.ui.Bubble.Attachment.BOTTOM,
158 error, 158 error,
159 BUBBLE_OFFSET, BUBBLE_PADDING); 159 BUBBLE_OFFSET, BUBBLE_PADDING);
160 // Move error bubble up if it overlaps the shelf.
161 var maxHeight =
162 cr.ui.LoginUITools.getMaxHeightBeforeShelfOverlapping($('bubble'));
163 if (maxHeight < $('bubble').offsetHeight) {
164 $('bubble').showContentForElement(activatedPod.mainInput,
165 cr.ui.Bubble.Attachment.TOP,
166 error,
167 BUBBLE_OFFSET, BUBBLE_PADDING);
168 }
160 } 169 }
161 }, 170 },
162 171
163 /** 172 /**
164 * Loads given users in pod row. 173 * Loads given users in pod row.
165 * @param {array} users Array of user. 174 * @param {array} users Array of user.
166 * @param {boolean} showGuest Whether to show guest session button. 175 * @param {boolean} showGuest Whether to show guest session button.
167 */ 176 */
168 loadUsers: function(users, showGuest) { 177 loadUsers: function(users, showGuest) {
169 $('pod-row').loadPods(users); 178 $('pod-row').loadPods(users);
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 * Updates the list of available keyboard layouts for a public session pod. 326 * Updates the list of available keyboard layouts for a public session pod.
318 * @param {string} userID The user ID of the public session 327 * @param {string} userID The user ID of the public session
319 * @param {!Object} list List of available keyboard layouts 328 * @param {!Object} list List of available keyboard layouts
320 */ 329 */
321 setPublicSessionKeyboardLayouts: function(userID, list) { 330 setPublicSessionKeyboardLayouts: function(userID, list) {
322 $('pod-row').setPublicSessionKeyboardLayouts(userID, list); 331 $('pod-row').setPublicSessionKeyboardLayouts(userID, list);
323 } 332 }
324 }; 333 };
325 }); 334 });
326 335
OLDNEW
« no previous file with comments | « chrome/browser/resources/user_manager/user_manager.js ('k') | ui/login/account_picker/user_pod_row.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698