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

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

Issue 2948093002: ChromeOS OOBE: rename and add new attributes to oobe-dialog (Closed)
Patch Set: Rebased. Created 3 years, 6 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 2016 The Chromium Authors. All rights reserved. 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 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 Polymer({ 5 Polymer({
6 is: 'oobe-dialog', 6 is: 'oobe-dialog',
7 7
8 properties: { 8 properties: {
9 /** 9 /**
10 * Controls visibility of the bottom-buttons element. 10 * Controls visibility of the bottom-buttons element.
11 */ 11 */
12 hasButtons: { 12 hasButtons: {
13 type: Boolean, 13 type: Boolean,
14 value: false, 14 value: false,
15 }, 15 },
16 16
17 /** 17 /**
18 * Hide the box shadow on the top of oobe-bottom 18 * Hide the box shadow on the top of oobe-bottom
19 */ 19 */
20 hideShadow: { 20 hideShadow: {
21 type: Boolean, 21 type: Boolean,
22 value: false, 22 value: false,
23 }, 23 },
24 24
25 /** 25 /**
26 * Control visibility of the footer container. 26 * Control visibility of the header container.
27 */ 27 */
28 noFooter: { 28 noHeader: {
29 type: Boolean, 29 type: Boolean,
30 value: false, 30 value: false,
31 }, 31 },
32
33 /**
34 * Removes footer padding.
35 */
36 noFooterPadding: {
37 type: Boolean,
38 value: false,
39 },
32 40
33 /** 41 /**
34 * Switches styles to "Welcome screen". 42 * Switches styles to "Welcome screen".
35 */ 43 */
36 welcomeScreen: { 44 welcomeScreen: {
37 type: Boolean, 45 type: Boolean,
38 value: false, 46 value: false,
39 reflectToAttribute: true, 47 reflectToAttribute: true,
40 }, 48 },
41 }, 49 },
42 50
43 focus: function() { 51 focus: function() {
44 /* When Network Selection Dialog is shown because user pressed "Back" 52 /* When Network Selection Dialog is shown because user pressed "Back"
45 button on EULA screen, display_manager does not inform this dialog that 53 button on EULA screen, display_manager does not inform this dialog that
46 it is shown. It ouly focuses this dialog. 54 it is shown. It ouly focuses this dialog.
47 So this emulates show(). 55 So this emulates show().
48 TODO (alemate): fix this once event flow is updated. 56 TODO (alemate): fix this once event flow is updated.
49 */ 57 */
50 this.show(); 58 this.show();
51 }, 59 },
52 60
53 /** 61 /**
54 * This is called from oobe_welcome when this dialog is shown. 62 * This is called from oobe_welcome when this dialog is shown.
55 */ 63 */
56 show: function() { 64 show: function() {
57 var focusedElements = this.getElementsByClassName('focus-on-show'); 65 var focusedElements = this.getElementsByClassName('focus-on-show');
58 if (focusedElements.length > 0) 66 if (focusedElements.length > 0)
59 focusedElements[0].focus(); 67 focusedElements[0].focus();
60 68
61 this.fire('show-dialog'); 69 this.fire('show-dialog');
62 }, 70 },
63 }); 71 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698