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

Side by Side Diff: chrome/browser/resources/chromeos/login/oobe_welcome.js

Issue 1965913005: ChromeOS: Implement minumal material design OOBE. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update after review. Created 4 years, 7 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 Polymer({
6 is: 'oobe-welcome-md',
7
8 properties: {
9 disabled: {
10 type: Boolean,
11 value: false,
12 },
13 currentLanguage: {
14 type: String,
15 value: 'English (US)',
16 },
17 },
18
19 ready: function() {
dzhioev_at_google 2016/05/25 01:01:32 nit: indentation here and in the functions below.
Alexander Alekseev 2016/05/25 23:47:30 Done.
20 /**
21 * Workaround for
22 * https://github.com/PolymerElements/neon-animation/issues/32
dzhioev_at_google 2016/05/25 01:01:32 This workaround is not needed anymore.
Alexander Alekseev 2016/05/25 23:47:30 Done.
23 * TODO(dzhioev): Remove when fixed in Polymer.
24 */
25 var pages = this.$.animatedPages;
26 delete pages._squelchNextFinishEvent;
27 Object.defineProperty(
28 pages, '_squelchNextFinishEvent',
29 {get: function() { return false; }});
30 },
31
32 focus: function() {
33 if (this.isWelcomeSectionActive_())
34 this.$.welcomeNextButton.focus();
35 else
36 this.$.oobeNetworkSettings.focus();
37 },
38
39 onAnimationFinish_: function() {
40 this.focus();
41 },
42
43 isRTL_: function() {
44 return !!document.querySelector('html[dir=rtl]');
45 },
46
47 isWelcomeSectionActive_: function() {
48 return this.$.animatedPages.selected == 'welcomeSection';
49 },
50
51 setUpPageTransitions_: function() {
52 var isForward = true;
53 var isRTL = this.isRTL_();
54 this.$.animatedPages.entryAnimation =
55 'slide-from-' + (isRTL ? 'left' : 'right') +
56 '-animation';
57 this.$.animatedPages.exitAnimation =
58 'slide-' + (isRTL ? 'right' : 'left') + '-animation';
59 },
60
61 onWelcomeNextButtonClicked_: function() {
62 $('oobe-connect').hidden = false;
63 $('oobe-welcome-md').hidden = true;
64 },
dzhioev_at_google 2016/05/25 01:01:32 nit: remove ','
Alexander Alekseev 2016/05/25 23:47:30 Done.
65
66 });
dzhioev_at_google 2016/05/25 01:01:32 nit: indentation
Alexander Alekseev 2016/05/25 23:47:30 Done.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698