Commit f54b8097 authored by achuith's avatar achuith Committed by Commit bot

Add close button to the supervised user pages.

BUG=487351
TEST=manual

Review URL: https://codereview.chromium.org/1131683004

Cr-Commit-Position: refs/heads/master@{#330231}
parent 564d8183
......@@ -352,7 +352,8 @@ cr.define('login', function() {
accountPickerIsActive ||
!this.allowCancel_ ||
wrongHWIDWarningIsActive ||
isMultiProfilesUI;
isMultiProfilesUI ||
supervisedUserCreationDialogIsActive;
$('guest-user-header-bar-item').hidden =
(gaiaIsActive && !this.isNewGaiaFlow_) ||
supervisedUserCreationDialogIsActiveAndNotIntro ||
......
......@@ -549,3 +549,16 @@ html[dir=rtl] #supervised-user-creation-flip-photo {
.camera.live:not(.online) .supervised-user-creation-image-stream-area .spinner {
display: block;
}
#supervised-user-creation-close-button-item {
color: rgba(0, 0, 0, .54);
position: absolute;
right: 10px;
top: 10px;
z-index: 1;
}
html[dir=rtl] #supervised-user-creation-close-button-item {
left: 10px;
right: auto;
}
<link rel="import" href="chrome://oobe/custom_elements.html">
<div class="step hidden" id="supervised-user-creation" hidden>
<div class="step-contents">
<div id="supervised-user-creation-intro" class="step-no-logo">
......@@ -157,4 +158,7 @@
<img class="import-pod-image"></img>
<div class="import-pod-name"></div>
</div>
<button id="supervised-user-creation-close-button-item" is="gaia-icon-button"
icon="close" i18n-values="aria-label:closeButton" tabindex="0">
</button>
</div>
......@@ -616,6 +616,12 @@ login.createScreen('SupervisedUserCreationScreen',
'webkitTransitionEnd', function(e) {
previewElement.classList.remove('animation');
});
$('supervised-user-creation-close-button-item').addEventListener(
'click', function(e) {
this.cancel();
e.preventDefault();
}.bind(this));
},
buttonIds: [],
......@@ -1193,6 +1199,9 @@ login.createScreen('SupervisedUserCreationScreen',
!this.importList_.selectedPod_ ||
this.importList_.selectedPod_.user.exists;
}
$('supervised-user-creation-close-button-item').hidden =
(visiblePage == 'created');
chrome.send('currentSupervisedUserPage', [this.currentPage_]);
},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment