Commit 31bc2723 authored by Steven Bennetts's avatar Steven Bennetts Committed by Commit Bot

OOBE: Eliminate setMDMode and md-mode

Also eliminates references to progress-dots which were removed
with the old UI.

Bug: 647411
Cq-Include-Trybots: luci.chromium.try:closure_compilation
Change-Id: Ie7bc4ec3c5b506c637dbffa103e74ac8f133742d
Reviewed-on: https://chromium-review.googlesource.com/1080227
Commit-Queue: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: default avatarAlexander Alekseev <alemate@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567833}
parent c50826d3
......@@ -1775,7 +1775,6 @@ IN_PROC_BROWSER_TEST_F(WizardControllerBrokenLocalStateTest,
ASSERT_FALSE(JSExecuteBooleanExpression("$('error-message').hidden"));
ASSERT_TRUE(JSExecuteBooleanExpression(
"$('error-message').classList.contains('ui-state-local-state-error')"));
ASSERT_TRUE(JSExecuteBooleanExpression("$('progress-dots').hidden"));
ASSERT_TRUE(JSExecuteBooleanExpression("$('login-header-bar').hidden"));
// Emulates user click on the "Restart and Powerwash" button.
......
......@@ -11,7 +11,6 @@
</div>
<include src="[OOBE]_screens.html">
</div>
<div id="progress-dots" class="down"></div>
</div>
</div>
</div>
......
......@@ -25,7 +25,6 @@ cr.define('cr.ui.Oobe', function() {
* be invoked to do final setup.
*/
initialize: function() {
this.setMDMode_();
cr.ui.login.DisplayManager.initialize();
login.HIDDetectionScreen.register();
login.WrongHWIDScreen.register();
......@@ -242,8 +241,6 @@ cr.define('cr.ui.Oobe', function() {
loadTimeData.overrideValues(data);
i18nTemplate.process(document, loadTimeData);
this.setMDMode_();
// Update localized content of the screens.
Oobe.updateLocalizedContent();
},
......@@ -273,14 +270,5 @@ cr.define('cr.ui.Oobe', function() {
// Buttons, headers and links.
Oobe.getInstance().updateLocalizedContent_();
},
/**
* This method takes care of switching to material-design OOBE.
* @private
*/
setMDMode_: function() {
$('oobe').setAttribute('md-mode', 'true');
$('popup-overlay').setAttribute('md-mode', 'true');
},
};
});
......@@ -4,7 +4,7 @@
.popup-overlay {
align-items: center;
background: rgba(255, 255, 255, .75);
background: rgba(0, 0, 0, .5);
bottom: 0;
display: flex;
justify-content: center;
......@@ -17,10 +17,6 @@
z-index: 5;
}
#popup-overlay[md-mode] {
background: rgba(0, 0, 0, .5);
}
.oobe-popup {
background: white;
border: 1px solid rgb(188, 193, 208);
......
......@@ -196,12 +196,6 @@ login.createScreen('EulaScreen', 'eula', function() {
enableKeyboardFlow: function() {},
/**
* This method takes care of switching to material-design OOBE.
* @private
*/
setMDMode_: function() {},
/**
* Updates localized content of the screen that is not updated via template.
*/
......
......@@ -116,17 +116,8 @@ login.createScreen('HIDDetectionScreen', 'hid-detection', function() {
* @param {Object} data Screen init payload.
*/
onBeforeShow: function(data) {
this.setMDMode_();
$('oobe-hid-detection-md').setMouseState(this.CONNECTION.SEARCHING);
$('oobe-hid-detection-md').setKeyboardState(this.CONNECTION.SEARCHING);
},
/**
* This method takes care of switching to material-design OOBE.
* @private
*/
setMDMode_: function() {
$('oobe-hid-detection-md').hidden = false;
},
};
});
......@@ -113,11 +113,5 @@ login.createScreen('NetworkScreen', 'connect', function() {
onWindowResize: function() {
$('oobe-welcome-md').onWindowResize();
},
/**
* This method takes care of switching to material-design OOBE.
* @private
*/
setMDMode_: function() {}
};
});
......@@ -260,7 +260,6 @@ login.createScreen('OAuthEnrollmentScreen', 'oauth-enrollment', function() {
$('oauth-enroll-auth-view').partition = data.webviewPartitionName;
$('login-header-bar').signinUIState = SIGNIN_UI_STATE.ENROLLMENT;
$('progress-dots').hidden = true;
this.classList.remove('saml');
var gaiaParams = {};
......
......@@ -133,12 +133,6 @@ login.createScreen('ResetScreen', 'reset', function() {
this.send(login.Screen.CALLBACK_USER_ACTED, USER_ACTION_CANCEL_RESET);
},
/**
* This method takes care of switching to material-design OOBE.
* @private
*/
setMDMode_: function() {},
/**
* Event handler that is invoked just before the screen in shown.
* @param {Object} data Screen init payload.
......
......@@ -148,11 +148,5 @@ login.createScreen('UpdateScreen', 'update', function() {
showUpdateCurtain: function(visible) {
$('oobe-update-md').checkingForUpdate = visible;
},
/**
* This method takes care of switching to material-design OOBE.
* @private
*/
setMDMode_: function() {},
};
});
......@@ -63,7 +63,6 @@ login.createScreen('ConfirmPasswordScreen', 'confirm-password', function() {
if (attemptCount > 0)
this.confirmPasswordForm_.invalidate();
Oobe.showScreen({id: SCREEN_CONFIRM_PASSWORD});
$('progress-dots').hidden = true;
}
};
});
......@@ -11,7 +11,6 @@
</div>
<include src="[OOBE]_screens.html">
</div>
<div id="progress-dots" class="down"></div>
</div>
</div>
</div>
......
......@@ -34,7 +34,6 @@ login.createScreen('DeviceDisabledScreen', 'device-disabled', function() {
* Event handler that is invoked just before the screen in shown.
*/
onBeforeShow: function() {
$('progress-dots').hidden = true;
var headerBar = $('login-header-bar');
headerBar.allowCancel = false;
headerBar.showGuestButton = false;
......
......@@ -47,7 +47,6 @@ login.createScreen(
* Event handler that is invoked just before the screen in shown.
*/
onBeforeShow: function() {
$('progress-dots').hidden = true;
var headerBar = $('login-header-bar');
headerBar.allowCancel = false;
headerBar.showGuestButton = false;
......
......@@ -280,7 +280,6 @@ login.createScreen('ErrorMessageScreen', 'error-message', function() {
// Hide header bar and progress dots, because there are no way
// from the error screen about broken local state.
Oobe.getInstance().headerHidden = true;
$('progress-dots').hidden = true;
}
this.onContentChange_();
},
......
......@@ -35,16 +35,12 @@ login.createScreen('FatalErrorScreen', 'fatal-error', function() {
/** @override */
onBeforeShow: function() {
this.savedUIStates_.progressDotHidden = $('progress-dots').hidden;
$('progress-dots').hidden = true;
this.savedUIStates_.headerHidden = Oobe.getInstance().headerHidden;
Oobe.getInstance().headerHidden = true;
},
/** @override */
onBeforeHide: function() {
$('progress-dots').hidden = this.savedUIStates_.progressDotHidden;
Oobe.getInstance().headerHidden = this.savedUIStates_.headerHidden;
},
......
......@@ -561,7 +561,6 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() {
this.screenMode = ScreenMode.DEFAULT;
this.loading = true;
chrome.send('loginUIStateChanged', ['gaia-signin', true]);
$('progress-dots').hidden = true;
$('login-header-bar').signinUIState = SIGNIN_UI_STATE.GAIA_SIGNIN;
// Ensure that GAIA signin (or loading UI) is actually visible.
......
......@@ -645,7 +645,6 @@ cr.define('cr.ui.login', function() {
'transitionend', function f(e) {
innerContainer.removeEventListener('transitionend', f);
outerContainer.classList.remove('down');
$('progress-dots').classList.remove('down');
chrome.send('loginVisible', ['oobe']);
// Refresh defaultControl. It could have changed.
var defaultControl = newStep.defaultControl;
......@@ -747,13 +746,6 @@ cr.define('cr.ui.login', function() {
header.className = 'header-section';
$('header-sections').appendChild(header);
var dot = document.createElement('div');
dot.id = screenId + '-dot';
dot.className = 'progdot';
var progressDots = $('progress-dots');
if (progressDots)
progressDots.appendChild(dot);
this.appendButtons_(el.buttons, screenId);
},
......
......@@ -59,18 +59,12 @@
position: absolute;
}
#oobe[md-mode] #progress-dots {
display: none;
}
/* Screens that have a border and background. */
#oobe.auto-enrollment-check #inner-container,
#oobe.autolaunch #inner-container,
#oobe.confirm-password #inner-container,
#oobe:not([md-mode]).connect #inner-container,
#oobe.debugging #inner-container,
#oobe.enrollment #inner-container,
#oobe:not([md-mode]).eula #inner-container,
#oobe.fatal-error #inner-container,
#oobe.gaia-signin #inner-container,
#oobe.hid-detection #inner-container,
......@@ -78,7 +72,6 @@
#oobe.oauth-enrollment #inner-container,
#oobe.password-changed #inner-container,
#oobe.ad-password-change #inner-container,
#oobe:not([md-mode]).reset #inner-container,
#oobe.supervised-user-creation #inner-container,
#oobe.supervised-user-creation-dialog #inner-container,
#oobe.terms-of-service #inner-container,
......@@ -111,45 +104,10 @@
transform: translateY(50px) rotateX(-2.5deg);
}
#oobe:not([md-mode]) #step-logo {
-webkit-margin-start: 17px;
display: flex;
position: absolute;
top: 15px;
}
#oobe[md-mode] #step-logo {
display: none;
}
#progress-dots {
-webkit-box-pack: center;
display: -webkit-box;
margin-top: 15px;
transition: opacity 200ms ease-in-out, visibility 200ms ease-in-out;
}
#oobe[md-mode] #progress-dots {
#oobe #step-logo {
display: none;
}
/* Hidden for the duration of initial transition. */
.oobe-display #progress-dots.down {
visibility: hidden;
}
.progdot {
-webkit-margin-end: 12px;
background: white;
height: 10px;
opacity: 0.4;
width: 10px;
}
.progdot-active {
opacity: 0.5;
}
#account-picker-dot,
#app-launch-splash-dot,
#arc-kiosk-splash-dot,
......@@ -192,23 +150,12 @@
opacity: 1;
}
#oobe.debugging #progress-dots,
#oobe.reset #progress-dots,
#oobe.host-pairing #progress-dots,
#oobe.controller-pairing #progress-dots {
visibility: hidden;
}
body:not(.oobe-display) #inner-container {
height: 262px;
padding: 0;
width: 1100px;
}
body:not(.oobe-display) #progress-dots {
display: none;
}
#outer-container.fullscreen,
#outer-container.fullscreen #oobe,
#outer-container.fullscreen #oobe #inner-container {
......
......@@ -63,18 +63,12 @@
pointer-events: none;
}
#oobe[md-mode] #progress-dots {
display: none;
}
/* Screens that have a border and background. */
#oobe.auto-enrollment-check #inner-container,
#oobe.autolaunch #inner-container,
#oobe.confirm-password #inner-container,
#oobe:not([md-mode]).connect #inner-container,
#oobe.debugging #inner-container,
#oobe.enrollment #inner-container,
#oobe:not([md-mode]).eula #inner-container,
#oobe.fatal-error #inner-container,
#oobe.gaia-signin #inner-container,
#oobe.hid-detection #inner-container,
......@@ -82,7 +76,6 @@
#oobe.oauth-enrollment #inner-container,
#oobe.password-changed #inner-container,
#oobe.ad-password-change #inner-container,
#oobe:not([md-mode]).reset #inner-container,
#oobe.supervised-user-creation #inner-container,
#oobe.supervised-user-creation-dialog #inner-container,
#oobe.terms-of-service #inner-container,
......@@ -115,45 +108,10 @@
transform: translateY(50px) rotateX(-2.5deg);
}
#oobe:not([md-mode]) #step-logo {
-webkit-margin-start: 17px;
display: -webkit-box;
position: absolute;
top: 15px;
}
#oobe[md-mode] #step-logo {
display: none;
}
#progress-dots {
-webkit-box-pack: center;
display: -webkit-box;
margin-top: 15px;
transition: opacity 200ms ease-in-out, visibility 200ms ease-in-out;
}
#oobe[md-mode] #progress-dots {
#oobe #step-logo {
display: none;
}
/* Hidden for the duration of initial transition. */
.oobe-display #progress-dots.down {
visibility: hidden;
}
.progdot {
-webkit-margin-end: 12px;
background: white;
height: 10px;
opacity: 0.4;
width: 10px;
}
.progdot-active {
opacity: 0.5;
}
#account-picker-dot,
#app-launch-splash-dot,
#arc-kiosk-splash-dot,
......@@ -196,23 +154,12 @@
opacity: 1;
}
#oobe.debugging #progress-dots,
#oobe.reset #progress-dots,
#oobe.host-pairing #progress-dots,
#oobe.controller-pairing #progress-dots {
visibility: hidden;
}
body:not(.oobe-display) #inner-container {
height: 262px;
padding: 0;
width: 1100px;
}
body:not(.oobe-display) #progress-dots {
display: none;
}
#outer-container.fullscreen,
#outer-container.fullscreen #oobe,
#outer-container.fullscreen #oobe #inner-container {
......
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