Commit 0d7a8b54 authored by Roman Sorokin's avatar Roman Sorokin Committed by Commit Bot

OOBE: Enrollment screen polishing

* Don't shrink SAML window - it hosts oobe-dialog anyway (which has
fixed size)
* Remove outdated css rules - it caused buttons be white on white (so
not visible but active)
* Stop showing back button on top at all - the screen has bottom back
butotn now
* Fix glitch with refresh button - it was shown for a second when
isManualEnrollment_ was not yet defined.

Bug: 965392
Change-Id: I680d7471a53a4e8c17aae4c37433633e120c11a3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1640643Reviewed-by: default avatarDenis Kuznetsov <antrim@chromium.org>
Commit-Queue: Roman Sorokin [CET] <rsorokin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#665540}
parent 7f111d87
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#oauth-enrollment.saml { #oauth-enrollment.saml {
padding-top: 44px; padding-top: 44px;
width: 562px;
} }
#oauth-enroll-step-contents { #oauth-enroll-step-contents {
...@@ -65,7 +64,7 @@ ...@@ -65,7 +64,7 @@
.oauth-enroll-step-message { .oauth-enroll-step-message {
display: inline-block; display: inline-block;
padding-top: 20px; padding-top: 20px;
text-align: left; text-align: start;
vertical-align: top; vertical-align: top;
} }
...@@ -117,14 +116,3 @@ ...@@ -117,14 +116,3 @@
top: 0; top: 0;
z-index: 1; z-index: 1;
} }
.oauth-enroll-state-signin #oauth-enroll-navigation,
.oauth-enroll-state-ad-join #oauth-enroll-navigation,
.oauth-enroll-state-working #oauth-enroll-navigation {
color: white;
}
#oauth-enrollment.saml #oauth-enroll-navigation {
color: rgba(0, 0, 0, .54);
}
...@@ -220,11 +220,8 @@ login.createScreen('OAuthEnrollmentScreen', 'oauth-enrollment', function() { ...@@ -220,11 +220,8 @@ login.createScreen('OAuthEnrollmentScreen', 'oauth-enrollment', function() {
this.navigation_.addEventListener('close', this.cancel.bind(this)); this.navigation_.addEventListener('close', this.cancel.bind(this));
this.navigation_.addEventListener('refresh', this.cancel.bind(this)); this.navigation_.addEventListener('refresh', this.cancel.bind(this));
this.navigation_.addEventListener(
'back', this.onBackButtonClicked_.bind(this, false));
$('oobe-signin-back-button') $('oobe-signin-back-button')
.addEventListener('tap', this.onBackButtonClicked_.bind(this, true)); .addEventListener('tap', this.onBackButtonClicked_.bind(this));
$('oauth-enroll-learn-more-link') $('oauth-enroll-learn-more-link')
...@@ -472,13 +469,12 @@ login.createScreen('OAuthEnrollmentScreen', 'oauth-enrollment', function() { ...@@ -472,13 +469,12 @@ login.createScreen('OAuthEnrollmentScreen', 'oauth-enrollment', function() {
* Skips the device attribute update, * Skips the device attribute update,
* shows the successful enrollment step. * shows the successful enrollment step.
*/ */
onBackButtonClicked_: function(cancelOnClick) { onBackButtonClicked_: function() {
this.navigation_.backVisible = false;
if (this.currentStep_ == STEP_SIGNIN) { if (this.currentStep_ == STEP_SIGNIN) {
if (this.lastBackMessageValue_) { if (this.lastBackMessageValue_) {
this.lastBackMessageValue_ = false; this.lastBackMessageValue_ = false;
$('oauth-enroll-auth-view').back(); $('oauth-enroll-auth-view').back();
} else if (cancelOnClick) { } else {
this.cancel(); this.cancel();
} }
} }
...@@ -502,17 +498,15 @@ login.createScreen('OAuthEnrollmentScreen', 'oauth-enrollment', function() { ...@@ -502,17 +498,15 @@ login.createScreen('OAuthEnrollmentScreen', 'oauth-enrollment', function() {
* @type {boolean} * @type {boolean}
*/ */
isAtTheBeginning: function() { isAtTheBeginning: function() {
return !this.navigation_.backVisible && this.currentStep_ == STEP_SIGNIN; return !this.lastBackMessageValue_ && this.currentStep_ == STEP_SIGNIN;
}, },
/** /**
* Updates visibility of navigation buttons. * Updates visibility of navigation buttons.
*/ */
updateControlsState: function() { updateControlsState: function() {
this.navigation_.backVisible =
this.currentStep_ == STEP_SIGNIN && this.lastBackMessageValue_;
this.navigation_.refreshVisible = this.navigation_.refreshVisible =
this.isAtTheBeginning() && !this.isManualEnrollment_; this.isAtTheBeginning() && this.isManualEnrollment_ === false;
this.navigation_.closeVisible = this.navigation_.closeVisible =
(this.currentStep_ == STEP_ERROR && !this.navigation_.refreshVisible) (this.currentStep_ == STEP_ERROR && !this.navigation_.refreshVisible)
|| this.currentStep_ == STEP_LICENSE_TYPE; || this.currentStep_ == STEP_LICENSE_TYPE;
......
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