diff options
author | merkulova@chromium.org <merkulova@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-06 17:40:33 +0000 |
---|---|---|
committer | merkulova@chromium.org <merkulova@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-06 17:40:33 +0000 |
commit | 23b7264dae4033868215bcc2138a6ca12c42114c (patch) | |
tree | ea7ee3180cfee4c891dadcb62181f2d663f44218 /ui/login/account_picker/user_pod_row.js | |
parent | e0a9cff0edcd777da009f34a75f50f2afae882d5 (diff) | |
download | chromium_src-23b7264dae4033868215bcc2138a6ca12c42114c.zip chromium_src-23b7264dae4033868215bcc2138a6ca12c42114c.tar.gz chromium_src-23b7264dae4033868215bcc2138a6ca12c42114c.tar.bz2 |
A11y options list and remove supervised user menu are moved up in case of shelf-overlapping. Network list gets scrollbar in that case.
Also remove supervised user button aligned.
BUG=382851
Review URL: https://codereview.chromium.org/399613002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287801 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/login/account_picker/user_pod_row.js')
-rw-r--r-- | ui/login/account_picker/user_pod_row.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/ui/login/account_picker/user_pod_row.js b/ui/login/account_picker/user_pod_row.js index 21f20e9..194a3c6 100644 --- a/ui/login/account_picker/user_pod_row.js +++ b/ui/login/account_picker/user_pod_row.js @@ -367,6 +367,14 @@ cr.define('login', function() { }, /** + * Gets action box menu. + * @type {!HTMLInputElement} + */ + get actionBoxMenu() { + return this.querySelector('.action-box-menu'); + }, + + /** * Gets action box menu title, user name item. * @type {!HTMLInputElement} */ @@ -575,6 +583,8 @@ cr.define('login', function() { this.actionBoxAreaElement.classList.add('active'); } else { this.actionBoxAreaElement.classList.remove('active'); + this.actionBoxAreaElement.classList.remove('menu-moved-up'); + this.actionBoxMenu.classList.remove('menu-moved-up'); } }, @@ -716,6 +726,17 @@ cr.define('login', function() { error, this.signinButtonElement.offsetWidth / 2, 4); + // Move warning bubble up if it overlaps the shelf. + var maxHeight = + cr.ui.LoginUITools.getMaxHeightBeforeShelfOverlapping($('bubble')); + if (maxHeight < $('bubble').offsetHeight) { + $('bubble').showContentForElement( + this.signinButtonElement, + cr.ui.Bubble.Attachment.BOTTOM, + error, + this.signinButtonElement.offsetWidth / 2, + 4); + } }, /** @@ -825,6 +846,16 @@ cr.define('login', function() { this.actionBoxMenuRemoveElement.hidden = true; this.actionBoxRemoveUserWarningElement.hidden = false; this.actionBoxRemoveUserWarningButtonElement.focus(); + + // Move up the menu if it overlaps shelf. + var maxHeight = cr.ui.LoginUITools.getMaxHeightBeforeShelfOverlapping( + this.actionBoxMenu); + var actualHeight = parseInt( + window.getComputedStyle(this.actionBoxMenu).height); + if (maxHeight < actualHeight) { + this.actionBoxMenu.classList.add('menu-moved-up'); + this.actionBoxAreaElement.classList.add('menu-moved-up'); + } }, /** |