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 User pod row implementation. | 6 * @fileoverview User pod row implementation. |
7 */ | 7 */ |
8 | 8 |
9 cr.define('login', function() { | 9 cr.define('login', function() { |
10 /** | 10 /** |
(...skipping 1397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1408 | 1408 |
1409 // Move up the menu if it overlaps shelf. | 1409 // Move up the menu if it overlaps shelf. |
1410 var maxHeight = cr.ui.LoginUITools.getMaxHeightBeforeShelfOverlapping( | 1410 var maxHeight = cr.ui.LoginUITools.getMaxHeightBeforeShelfOverlapping( |
1411 this.actionBoxMenu); | 1411 this.actionBoxMenu); |
1412 var actualHeight = parseInt( | 1412 var actualHeight = parseInt( |
1413 window.getComputedStyle(this.actionBoxMenu).height); | 1413 window.getComputedStyle(this.actionBoxMenu).height); |
1414 if (maxHeight < actualHeight) { | 1414 if (maxHeight < actualHeight) { |
1415 this.actionBoxMenu.classList.add('menu-moved-up'); | 1415 this.actionBoxMenu.classList.add('menu-moved-up'); |
1416 this.actionBoxAreaElement.classList.add('menu-moved-up'); | 1416 this.actionBoxAreaElement.classList.add('menu-moved-up'); |
1417 } | 1417 } |
1418 chrome.send('showRemoveUserWarning'); | |
1418 }, | 1419 }, |
1419 | 1420 |
1420 /** | 1421 /** |
1421 * Handles a click event on remove user confirmation button. | 1422 * Handles a click event on remove user confirmation button. |
1422 * @param {Event} e Click event. | 1423 * @param {Event} e Click event. |
1423 */ | 1424 */ |
1424 handleRemoveUserConfirmationClick_: function(e) { | 1425 handleRemoveUserConfirmationClick_: function(e) { |
1425 if (this.isActionBoxMenuActive) { | 1426 if (this.isActionBoxMenuActive) { |
1426 this.isActionBoxMenuActive = false; | 1427 this.isActionBoxMenuActive = false; |
1427 this.removeUser(this.user); | 1428 this.removeUser(this.user); |
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2394 } | 2395 } |
2395 }, | 2396 }, |
2396 | 2397 |
2397 /** | 2398 /** |
2398 * Adds given apps to the pod row. | 2399 * Adds given apps to the pod row. |
2399 * @param {array} apps Array of apps. | 2400 * @param {array} apps Array of apps. |
2400 */ | 2401 */ |
2401 setApps: function(apps) { | 2402 setApps: function(apps) { |
2402 this.apps_ = apps; | 2403 this.apps_ = apps; |
2403 this.rebuildPods(); | 2404 this.rebuildPods(); |
2404 chrome.send('kioskAppsLoaded'); | 2405 chrome.send('kioskAppsLoaded', []); |
Dan Beam
2015/03/18 22:36:33
why extra []?
anthonyvd
2015/03/19 15:22:35
No idea how that slipped in here, reverted.
| |
2405 | 2406 |
2406 // Check whether there's a pending kiosk app error. | 2407 // Check whether there's a pending kiosk app error. |
2407 window.setTimeout(function() { | 2408 window.setTimeout(function() { |
2408 chrome.send('checkKioskAppLaunchError'); | 2409 chrome.send('checkKioskAppLaunchError'); |
2409 }, 500); | 2410 }, 500); |
2410 }, | 2411 }, |
2411 | 2412 |
2412 /** | 2413 /** |
2413 * Sets whether should show app pods. | 2414 * Sets whether should show app pods. |
2414 * @param {boolean} shouldShowApps Whether app pods should be shown. | 2415 * @param {boolean} shouldShowApps Whether app pods should be shown. |
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3151 if (pod && pod.multiProfilesPolicyApplied) { | 3152 if (pod && pod.multiProfilesPolicyApplied) { |
3152 pod.userTypeBubbleElement.classList.remove('bubble-shown'); | 3153 pod.userTypeBubbleElement.classList.remove('bubble-shown'); |
3153 } | 3154 } |
3154 } | 3155 } |
3155 }; | 3156 }; |
3156 | 3157 |
3157 return { | 3158 return { |
3158 PodRow: PodRow | 3159 PodRow: PodRow |
3159 }; | 3160 }; |
3160 }); | 3161 }); |
OLD | NEW |