Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
Add close button to the supervised user pages.
Browse files Browse the repository at this point in the history
BUG=487351
TEST=manual

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

Cr-Commit-Position: refs/heads/master@{#330231}
  • Loading branch information
achuith authored and Commit bot committed May 15, 2015
1 parent 564d818 commit f54b809
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 1 deletion.
3 changes: 2 additions & 1 deletion chrome/browser/resources/chromeos/login/header_bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<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">
Expand Down Expand Up @@ -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>
Original file line number Diff line number Diff line change
Expand Up @@ -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: [],
Expand Down Expand Up @@ -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_]);
},

Expand Down

0 comments on commit f54b809

Please sign in to comment.