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

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: 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-poly-welcome',
jdufault 2016/05/11 22:07:44 nit: indent
Alexander Alekseev 2016/05/13 20:52:35 Done.
7
8 properties: {
9 disabled: {
10 type: Boolean,
11 value: false,
12 },
13 },
14
15 ready:
16 function() {
17 /**
18 * Workaround for
19 * https://github.com/PolymerElements/neon-animation/issues/32
20 * TODO(dzhioev): Remove when fixed in Polymer.
jdufault 2016/05/11 22:07:44 Is this still broken? The bug is almost a year old
Alexander Alekseev 2016/05/13 20:52:35 THhs is actually copy-paste from offline gaia scre
21 */
22 var pages = this.$.animatedPages;
23 delete pages._squelchNextFinishEvent;
24 Object.defineProperty(
25 pages, '_squelchNextFinishEvent',
26 {get: function() { return false; }});
27 },
28
29 focus:
jdufault 2016/05/11 22:07:44 nit: Place function() on the same line as the prop
Alexander Alekseev 2016/05/13 20:52:35 Done.
30 function() {
31 if (this.isWelcomeSectionActive_())
32 this.$.oobeWelcomeNextButton.focus();
33 else
34 this.$.oobeNetworkSettings.focus();
35 },
36
37 onAnimationFinish_:
jdufault 2016/05/11 22:07:44 nit: as above.
Alexander Alekseev 2016/05/13 20:52:35 Done.
38 function() {
39 this.focus();
40 },
41
42 isRTL_:
jdufault 2016/05/11 22:07:44 nit: as above.
Alexander Alekseev 2016/05/13 20:52:35 Done.
43 function() {
44 return !!document.querySelector('html[dir=rtl]');
45 },
46
47 isWelcomeSectionActive_:
jdufault 2016/05/11 22:07:44 nit: as above.
Alexander Alekseev 2016/05/13 20:52:35 Done.
48 function() {
49 return this.$.animatedPages.selected == 'welcomeSection';
50 },
51
52 setUpPageTransitions_: function() {
53 var isForward = true;
54 var isRTL = this.isRTL_();
55 this.$.animatedPages.entryAnimation =
56 'slide-from-' + (isRTL ? 'left' : 'right') +
57 '-animation';
58 this.$.animatedPages.exitAnimation =
59 'slide-' + (isRTL ? 'right' : 'left') + '-animation';
jdufault 2016/05/11 22:07:44 Add in the trailing }s?
Alexander Alekseev 2016/05/13 20:52:35 Done.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698