Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(282)

Side by Side Diff: ui/login/display_manager.js

Issue 2247723002: ChromeOS: Implement EULA screen of material design OOBE. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 Display manager for WebUI OOBE and login. 6 * @fileoverview Display manager for WebUI OOBE and login.
7 */ 7 */
8 8
9 // TODO(xiyuan): Find a better to share those constants. 9 // TODO(xiyuan): Find a better to share those constants.
10 /** @const */ var SCREEN_OOBE_NETWORK = 'connect'; 10 /** @const */ var SCREEN_OOBE_NETWORK = 'connect';
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 var screen = $(screenId); 705 var screen = $(screenId);
706 var buttonStrip = $(screenId + '-controls'); 706 var buttonStrip = $(screenId + '-controls');
707 if (buttonStrip) 707 if (buttonStrip)
708 buttonStrip.innerHTML = ''; 708 buttonStrip.innerHTML = '';
709 // TODO(nkostylev): Update screen headers for new OOBE design. 709 // TODO(nkostylev): Update screen headers for new OOBE design.
710 this.appendButtons_(screen.buttons, screenId); 710 this.appendButtons_(screen.buttons, screenId);
711 if (screen.updateLocalizedContent) 711 if (screen.updateLocalizedContent)
712 screen.updateLocalizedContent(); 712 screen.updateLocalizedContent();
713 } 713 }
714 714
715 /* Recalculate all MD containers */
michaelpg 2016/08/15 16:16:50 why? and AFAICT there's only 1
Alexander Alekseev 2016/08/15 19:36:43 This code was needed because MD elements had 'posi
716 var nodes = document.getElementsByClassName("md-container");
717 for (var i = 0; i < nodes.length; ++i) {
718 var children = nodes[i].children;
719 var width = 0;
720 var height = 0;
721 for (var j = 0; j < children.length; ++j) {
722 width = Math.max(width, children[j].offsetWidth);
michaelpg 2016/08/15 16:16:50 offsetWidth or clientWidth?
723 height = Math.max(height, children[j].offsetHeight);
724 }
725 nodes[i].style.width = width + 'px';
726 nodes[i].style.height = height + 'px';
727 }
728
715 var currentScreenId = this.screens_[this.currentStep_]; 729 var currentScreenId = this.screens_[this.currentStep_];
716 var currentScreen = $(currentScreenId); 730 var currentScreen = $(currentScreenId);
717 this.updateScreenSize(currentScreen); 731 this.updateScreenSize(currentScreen);
718 732
719 // Trigger network drop-down to reload its state 733 // Trigger network drop-down to reload its state
720 // so that strings are reloaded. 734 // so that strings are reloaded.
721 // Will be reloaded if drowdown is actually shown. 735 // Will be reloaded if drowdown is actually shown.
722 cr.ui.DropDown.refresh(); 736 cr.ui.DropDown.refresh();
723 }, 737 },
724 738
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
1046 */ 1060 */
1047 DisplayManager.refocusCurrentPod = function() { 1061 DisplayManager.refocusCurrentPod = function() {
1048 $('pod-row').refocusCurrentPod(); 1062 $('pod-row').refocusCurrentPod();
1049 }; 1063 };
1050 1064
1051 // Export 1065 // Export
1052 return { 1066 return {
1053 DisplayManager: DisplayManager 1067 DisplayManager: DisplayManager
1054 }; 1068 };
1055 }); 1069 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698