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

Side by Side Diff: ui/login/account_picker/user_pod_row.js

Issue 1150173003: Fix some JS style nits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 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
« no previous file with comments | « ui/accessibility/extensions/caretbrowsing/traverse_util.js ('k') | ui/login/display_manager.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 User pod row implementation. 6 * @fileoverview User pod row implementation.
7 */ 7 */
8 8
9 cr.define('login', function() { 9 cr.define('login', function() {
10 /** 10 /**
11 * Number of displayed columns depending on user pod count. 11 * Number of displayed columns depending on user pod count.
12 * @type {Array.<number>} 12 * @type {Array<number>}
13 * @const 13 * @const
14 */ 14 */
15 var COLUMNS = [0, 1, 2, 3, 4, 5, 4, 4, 4, 5, 5, 6, 6, 5, 5, 6, 6, 6, 6]; 15 var COLUMNS = [0, 1, 2, 3, 4, 5, 4, 4, 4, 5, 5, 6, 6, 5, 5, 6, 6, 6, 6];
16 16
17 /** 17 /**
18 * Mapping between number of columns in pod-row and margin between user pods 18 * Mapping between number of columns in pod-row and margin between user pods
19 * for such layout. 19 * for such layout.
20 * @type {Array.<number>} 20 * @type {Array<number>}
21 * @const 21 * @const
22 */ 22 */
23 var MARGIN_BY_COLUMNS = [undefined, 40, 40, 40, 40, 40, 12]; 23 var MARGIN_BY_COLUMNS = [undefined, 40, 40, 40, 40, 40, 12];
24 24
25 /** 25 /**
26 * Mapping between number of columns in the desktop pod-row and margin 26 * Mapping between number of columns in the desktop pod-row and margin
27 * between user pods for such layout. 27 * between user pods for such layout.
28 * @type {Array.<number>} 28 * @type {Array<number>}
29 * @const 29 * @const
30 */ 30 */
31 var DESKTOP_MARGIN_BY_COLUMNS = [undefined, 15, 15, 15, 15, 15, 15]; 31 var DESKTOP_MARGIN_BY_COLUMNS = [undefined, 15, 15, 15, 15, 15, 15];
32 32
33 /** 33 /**
34 * Maximal number of columns currently supported by pod-row. 34 * Maximal number of columns currently supported by pod-row.
35 * @type {number} 35 * @type {number}
36 * @const 36 * @const
37 */ 37 */
38 var MAX_NUMBER_OF_COLUMNS = 6; 38 var MAX_NUMBER_OF_COLUMNS = 6;
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 var iconNode = document.createElement('div'); 180 var iconNode = document.createElement('div');
181 iconNode.classList.add('custom-icon'); 181 iconNode.classList.add('custom-icon');
182 node.appendChild(iconNode); 182 node.appendChild(iconNode);
183 return node; 183 return node;
184 }); 184 });
185 185
186 /** 186 /**
187 * The supported user pod custom icons. 187 * The supported user pod custom icons.
188 * {@code id} properties should be in sync with values set by C++ side. 188 * {@code id} properties should be in sync with values set by C++ side.
189 * {@code class} properties are CSS classes used to set the icons' background. 189 * {@code class} properties are CSS classes used to set the icons' background.
190 * @const {Array.<{id: !string, class: !string}>} 190 * @const {Array<{id: !string, class: !string}>}
191 */ 191 */
192 UserPodCustomIcon.ICONS = [ 192 UserPodCustomIcon.ICONS = [
193 {id: 'locked', class: 'custom-icon-locked'}, 193 {id: 'locked', class: 'custom-icon-locked'},
194 {id: 'locked-to-be-activated', 194 {id: 'locked-to-be-activated',
195 class: 'custom-icon-locked-to-be-activated'}, 195 class: 'custom-icon-locked-to-be-activated'},
196 {id: 'locked-with-proximity-hint', 196 {id: 'locked-with-proximity-hint',
197 class: 'custom-icon-locked-with-proximity-hint'}, 197 class: 'custom-icon-locked-with-proximity-hint'},
198 {id: 'unlocked', class: 'custom-icon-unlocked'}, 198 {id: 'unlocked', class: 'custom-icon-unlocked'},
199 {id: 'hardlocked', class: 'custom-icon-hardlocked'}, 199 {id: 'hardlocked', class: 'custom-icon-hardlocked'},
200 {id: 'spinner', class: 'custom-icon-spinner'} 200 {id: 'spinner', class: 'custom-icon-spinner'}
(...skipping 2948 matching lines...) Expand 10 before | Expand all | Expand 10 after
3149 if (pod && pod.multiProfilesPolicyApplied) { 3149 if (pod && pod.multiProfilesPolicyApplied) {
3150 pod.userTypeBubbleElement.classList.remove('bubble-shown'); 3150 pod.userTypeBubbleElement.classList.remove('bubble-shown');
3151 } 3151 }
3152 } 3152 }
3153 }; 3153 };
3154 3154
3155 return { 3155 return {
3156 PodRow: PodRow 3156 PodRow: PodRow
3157 }; 3157 };
3158 }); 3158 });
OLDNEW
« no previous file with comments | « ui/accessibility/extensions/caretbrowsing/traverse_util.js ('k') | ui/login/display_manager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698