Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 * Variables used for pod placement processing. Width and height should be | 11 * Variables used for pod placement processing. Width and height should be |
| 12 * synced with computed CSS sizes of pods. | 12 * synced with computed CSS sizes of pods. |
| 13 */ | 13 */ |
| 14 var CROS_POD_WIDTH = 306; | 14 var CROS_POD_WIDTH = 306; |
| 15 var CROS_SMALL_POD_WIDTH = 304; | 15 var CROS_SMALL_POD_WIDTH = 304; |
| 16 var CROS_EXTRA_SMALL_POD_WIDTH = 282; | 16 var CROS_EXTRA_SMALL_POD_WIDTH = 282; |
| 17 var DESKTOP_POD_WIDTH = 180; | 17 var DESKTOP_POD_WIDTH = 180; |
| 18 var MD_DESKTOP_POD_WIDTH = 160; | 18 var MD_DESKTOP_POD_WIDTH = 160; |
| 19 var PUBLIC_EXPANDED_BASIC_WIDTH = 500; | 19 var PUBLIC_EXPANDED_WIDTH = 622; |
| 20 var PUBLIC_EXPANDED_ADVANCED_WIDTH = 610; | |
| 21 var CROS_POD_HEIGHT = 346; | 20 var CROS_POD_HEIGHT = 346; |
| 22 var CROS_SMALL_POD_HEIGHT = 74; | 21 var CROS_SMALL_POD_HEIGHT = 74; |
| 23 var CROS_EXTRA_SMALL_POD_HEIGHT = 60; | 22 var CROS_EXTRA_SMALL_POD_HEIGHT = 60; |
| 24 var DESKTOP_POD_HEIGHT = 226; | 23 var DESKTOP_POD_HEIGHT = 226; |
| 25 var MD_DESKTOP_POD_HEIGHT = 200; | 24 var MD_DESKTOP_POD_HEIGHT = 200; |
| 25 var PUBLIC_EXPANDED_HEIGHT = 324; | |
| 26 var POD_ROW_PADDING = 10; | 26 var POD_ROW_PADDING = 10; |
| 27 var DESKTOP_ROW_PADDING = 32; | 27 var DESKTOP_ROW_PADDING = 32; |
| 28 var CUSTOM_ICON_CONTAINER_SIZE = 40; | 28 var CUSTOM_ICON_CONTAINER_SIZE = 40; |
| 29 var CROS_PIN_POD_HEIGHT = 417; | 29 var CROS_PIN_POD_HEIGHT = 417; |
| 30 var SCROLL_MASK_HEIGHT = 112; | 30 var SCROLL_MASK_HEIGHT = 112; |
| 31 var BANNER_MESSAGE_WIDTH = 520; | 31 var BANNER_MESSAGE_WIDTH = 520; |
| 32 var CROS_POD_HEIGHT_WITH_PIN = 618; | 32 var CROS_POD_HEIGHT_WITH_PIN = 618; |
| 33 var PUBLIC_SESSION_ICON_WIDTH = 12; | |
| 33 | 34 |
| 34 /** | 35 /** |
| 35 * The maximum number of users that each pod placement method can handle. | 36 * The maximum number of users that each pod placement method can handle. |
| 36 */ | 37 */ |
| 37 var POD_ROW_LIMIT = 2; | 38 var POD_ROW_LIMIT = 2; |
| 38 var LANDSCAPE_MODE_LIMIT = 6; | 39 var LANDSCAPE_MODE_LIMIT = 6; |
| 39 var PORTRAIT_MODE_LIMIT = 9; | 40 var PORTRAIT_MODE_LIMIT = 9; |
| 40 | 41 |
| 41 /** | 42 /** |
| 42 * Minimal padding between user pod and virtual keyboard. | 43 * Minimal padding between user pod and virtual keyboard. |
| (...skipping 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1145 | 1146 |
| 1146 /** | 1147 /** |
| 1147 * Gets the fingerprint icon area. | 1148 * Gets the fingerprint icon area. |
| 1148 * @type {!HTMLDivElement} | 1149 * @type {!HTMLDivElement} |
| 1149 */ | 1150 */ |
| 1150 get fingerprintIconElement() { | 1151 get fingerprintIconElement() { |
| 1151 return this.querySelector('.fingerprint-icon-container'); | 1152 return this.querySelector('.fingerprint-icon-container'); |
| 1152 }, | 1153 }, |
| 1153 | 1154 |
| 1154 /** | 1155 /** |
| 1156 * Returns true if it's a public session pod. | |
| 1157 * @type {boolean} | |
| 1158 */ | |
| 1159 get isPublicSessionPod() { | |
| 1160 return this.classList.contains('public-account'); | |
| 1161 }, | |
| 1162 | |
| 1163 /** | |
| 1155 * Sets the pod style. | 1164 * Sets the pod style. |
| 1156 * @param {UserPod.Style} style Style set to the pod. | 1165 * @param {UserPod.Style} style Style set to the pod. |
| 1157 */ | 1166 */ |
| 1158 setPodStyle: function(style) { | 1167 setPodStyle: function(style) { |
| 1159 switch (style) { | 1168 switch (style) { |
| 1160 case UserPod.Style.LARGE: | 1169 case UserPod.Style.LARGE: |
| 1161 this.querySelector('.large-pod').hidden = false; | 1170 this.querySelector('.large-pod').hidden = false; |
| 1162 this.querySelector('.small-pod').hidden = true; | 1171 this.querySelector('.small-pod').hidden = true; |
| 1163 break; | 1172 break; |
| 1164 case UserPod.Style.SMALL: | 1173 case UserPod.Style.SMALL: |
| (...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2080 }, | 2089 }, |
| 2081 | 2090 |
| 2082 /** | 2091 /** |
| 2083 * Handles click event on a user pod. | 2092 * Handles click event on a user pod. |
| 2084 * @param {Event} e Click event. | 2093 * @param {Event} e Click event. |
| 2085 */ | 2094 */ |
| 2086 handleClickOnPod_: function(e) { | 2095 handleClickOnPod_: function(e) { |
| 2087 if (this.parentNode.disabled) | 2096 if (this.parentNode.disabled) |
| 2088 return; | 2097 return; |
| 2089 | 2098 |
| 2099 // Click events on public session pods should only be handled by their | |
| 2100 // overriding handler. | |
| 2101 if (this.isPublicSessionPod) | |
| 2102 return; | |
| 2103 | |
| 2090 if (this.getPodStyle() != UserPod.Style.LARGE) { | 2104 if (this.getPodStyle() != UserPod.Style.LARGE) { |
| 2091 $('pod-row').switchMainPod(this); | 2105 $('pod-row').switchMainPod(this); |
| 2092 return; | 2106 return; |
| 2093 } | 2107 } |
| 2094 Oobe.clearErrors(); | 2108 Oobe.clearErrors(); |
| 2095 | 2109 |
| 2096 if (!this.isActionBoxMenuActive) { | 2110 if (!this.isActionBoxMenuActive) { |
| 2097 if (this.isAuthTypeOnlineSignIn) { | 2111 if (this.isAuthTypeOnlineSignIn) { |
| 2098 this.showSigninUI(); | 2112 this.showSigninUI(); |
| 2099 } else if (this.isAuthTypeUserClick && this.userClickAuthAllowed_) { | 2113 } else if (this.isAuthTypeUserClick && this.userClickAuthAllowed_) { |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2166 node.appendChild(el); | 2180 node.appendChild(el); |
| 2167 } | 2181 } |
| 2168 | 2182 |
| 2169 return node; | 2183 return node; |
| 2170 }); | 2184 }); |
| 2171 | 2185 |
| 2172 PublicAccountUserPod.prototype = { | 2186 PublicAccountUserPod.prototype = { |
| 2173 __proto__: UserPod.prototype, | 2187 __proto__: UserPod.prototype, |
| 2174 | 2188 |
| 2175 /** | 2189 /** |
| 2190 * Keeps track of the pod's original position before it's expanded. | |
| 2191 * @type {Object} | |
| 2192 * @private | |
| 2193 */ | |
| 2194 lastPosition_: {left: 'unset', top: 'unset'}, | |
| 2195 get lastPosition() { | |
| 2196 return this.lastPosition_; | |
| 2197 }, | |
| 2198 set lastPosition(value) { | |
| 2199 this.lastPosition_ = value; | |
| 2200 }, | |
| 2201 | |
| 2202 /** | |
| 2176 * "Enter" button in expanded side pane. | 2203 * "Enter" button in expanded side pane. |
| 2177 * @type {!HTMLButtonElement} | 2204 * @type {!HTMLButtonElement} |
| 2178 */ | 2205 */ |
| 2179 get enterButtonElement() { | 2206 get enterButtonElement() { |
| 2180 return this.querySelector('.enter-button'); | 2207 return this.querySelector('.enter-button'); |
| 2181 }, | 2208 }, |
| 2182 | 2209 |
| 2183 /** | 2210 /** |
| 2184 * Boolean flag of whether the pod is showing the side pane. The flag | 2211 * Boolean flag of whether the pod is showing the side pane. The flag |
| 2185 * controls whether 'expanded' class is added to the pod's class list and | 2212 * controls whether 'expanded' class is added to the pod's class list and |
| 2186 * resets tab order because main input element changes when the 'expanded' | 2213 * resets tab order because main input element changes when the 'expanded' |
| 2187 * state changes. | 2214 * state changes. |
| 2188 * @type {boolean} | 2215 * @type {boolean} |
| 2189 */ | 2216 */ |
| 2190 get expanded() { | 2217 get expanded() { |
| 2191 return this.classList.contains('expanded'); | 2218 return this.classList.contains('expanded'); |
| 2192 }, | 2219 }, |
| 2193 | 2220 |
| 2194 set expanded(expanded) { | 2221 set expanded(expanded) { |
| 2222 if (this.getPodStyle() != UserPod.Style.LARGE) { | |
| 2223 console.error( | |
| 2224 'Attempt to expand a public session pod when it is not large.'); | |
| 2225 return; | |
| 2226 } | |
| 2195 if (this.expanded == expanded) | 2227 if (this.expanded == expanded) |
| 2196 return; | 2228 return; |
| 2197 | 2229 |
| 2198 this.resetTabOrder(); | 2230 this.resetTabOrder(); |
| 2199 this.classList.toggle('expanded', expanded); | 2231 this.classList.toggle('expanded', expanded); |
| 2200 if (expanded) { | 2232 if (expanded) { |
| 2201 // Show the advanced expanded pod directly if there are at least two | 2233 // Show the advanced expanded pod directly if there are at least two |
| 2202 // recommended locales. This will be the case in multilingual | 2234 // recommended locales. This will be the case in multilingual |
| 2203 // environments where users are likely to want to choose among locales. | 2235 // environments where users are likely to want to choose among locales. |
| 2204 if (this.querySelector('.language-select').multipleRecommendedLocales) | 2236 if (this.querySelector('.language-select').multipleRecommendedLocales) |
| 2205 this.classList.add('advanced'); | 2237 this.classList.add('advanced'); |
| 2206 this.usualLeft = this.left; | 2238 } else { |
| 2207 this.makeSpaceForExpandedPod_(); | 2239 this.classList.remove('advanced'); |
| 2208 } else if (typeof(this.usualLeft) != 'undefined') { | |
| 2209 this.left = this.usualLeft; | |
| 2210 } | 2240 } |
| 2211 | 2241 this.parentNode.handlePublicPodExpansion(this, expanded); |
| 2212 var self = this; | |
| 2213 this.classList.add('animating'); | |
| 2214 this.addEventListener('transitionend', function f(e) { | |
| 2215 self.removeEventListener('transitionend', f); | |
| 2216 self.classList.remove('animating'); | |
| 2217 | |
| 2218 // Accessibility focus indicator does not move with the focused | |
| 2219 // element. Sends a 'focus' event on the currently focused element | |
| 2220 // so that accessibility focus indicator updates its location. | |
| 2221 if (document.activeElement) | |
| 2222 document.activeElement.dispatchEvent(new Event('focus')); | |
| 2223 }); | |
| 2224 // Guard timer set to animation duration + 20ms. | |
| 2225 ensureTransitionEndEvent(this, 200); | |
| 2226 }, | 2242 }, |
| 2227 | 2243 |
| 2228 get advanced() { | 2244 get advanced() { |
| 2229 return this.classList.contains('advanced'); | 2245 return this.classList.contains('advanced'); |
| 2230 }, | 2246 }, |
| 2231 | 2247 |
| 2232 /** @override */ | 2248 /** @override */ |
| 2233 get mainInput() { | 2249 get mainInput() { |
| 2234 if (this.expanded) | 2250 if (this.expanded) |
| 2235 return this.enterButtonElement; | 2251 return this.enterButtonElement; |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 2252 // newly focused "Enter" button. | 2268 // newly focused "Enter" button. |
| 2253 e.preventDefault(); | 2269 e.preventDefault(); |
| 2254 } | 2270 } |
| 2255 }).bind(this)); | 2271 }).bind(this)); |
| 2256 | 2272 |
| 2257 var learnMore = this.querySelector('.learn-more'); | 2273 var learnMore = this.querySelector('.learn-more'); |
| 2258 learnMore.addEventListener('mousedown', stopEventPropagation); | 2274 learnMore.addEventListener('mousedown', stopEventPropagation); |
| 2259 learnMore.addEventListener('click', this.handleLearnMoreEvent); | 2275 learnMore.addEventListener('click', this.handleLearnMoreEvent); |
| 2260 learnMore.addEventListener('keydown', this.handleLearnMoreEvent); | 2276 learnMore.addEventListener('keydown', this.handleLearnMoreEvent); |
| 2261 | 2277 |
| 2262 learnMore = this.querySelector('.expanded-pane-learn-more'); | |
| 2263 learnMore.addEventListener('click', this.handleLearnMoreEvent); | |
| 2264 learnMore.addEventListener('keydown', this.handleLearnMoreEvent); | |
| 2265 | |
| 2266 var languageSelect = this.querySelector('.language-select'); | 2278 var languageSelect = this.querySelector('.language-select'); |
| 2267 languageSelect.tabIndex = UserPodTabOrder.POD_INPUT; | 2279 languageSelect.tabIndex = UserPodTabOrder.POD_INPUT; |
| 2268 languageSelect.manuallyChanged = false; | 2280 languageSelect.manuallyChanged = false; |
| 2269 languageSelect.addEventListener( | 2281 languageSelect.addEventListener( |
| 2270 'change', | 2282 'change', |
| 2271 function() { | 2283 function() { |
| 2272 languageSelect.manuallyChanged = true; | 2284 languageSelect.manuallyChanged = true; |
| 2273 this.getPublicSessionKeyboardLayouts_(); | 2285 this.getPublicSessionKeyboardLayouts_(); |
| 2274 }.bind(this)); | 2286 }.bind(this)); |
| 2275 | 2287 |
| 2276 var keyboardSelect = this.querySelector('.keyboard-select'); | 2288 var keyboardSelect = this.querySelector('.keyboard-select'); |
| 2277 keyboardSelect.tabIndex = UserPodTabOrder.POD_INPUT; | 2289 keyboardSelect.tabIndex = UserPodTabOrder.POD_INPUT; |
| 2278 keyboardSelect.loadedLocale = null; | 2290 keyboardSelect.loadedLocale = null; |
| 2279 | 2291 |
| 2280 var languageAndInput = this.querySelector('.language-and-input'); | 2292 var languageAndInputLink = this.querySelector('.language-and-input'); |
| 2281 languageAndInput.tabIndex = UserPodTabOrder.POD_INPUT; | 2293 languageAndInputLink.tabIndex = UserPodTabOrder.POD_INPUT; |
| 2282 languageAndInput.addEventListener('click', | 2294 languageAndInputLink.addEventListener( |
| 2283 this.transitionToAdvanced_.bind(this)); | 2295 'click', this.transitionToAdvanced_.bind(this)); |
| 2296 | |
| 2297 var languageAndInputIcon = | |
| 2298 this.querySelector('.language-and-input-dropdown'); | |
| 2299 languageAndInputIcon.tabIndex = UserPodTabOrder.POD_INPUT; | |
| 2300 languageAndInputIcon.addEventListener( | |
| 2301 'click', this.transitionToAdvanced_.bind(this)); | |
| 2284 | 2302 |
| 2285 var monitoringLearnMore = this.querySelector('.monitoring-learn-more'); | 2303 var monitoringLearnMore = this.querySelector('.monitoring-learn-more'); |
| 2286 monitoringLearnMore.tabIndex = UserPodTabOrder.POD_INPUT; | 2304 monitoringLearnMore.tabIndex = UserPodTabOrder.POD_INPUT; |
| 2287 monitoringLearnMore.addEventListener( | 2305 monitoringLearnMore.addEventListener( |
| 2288 'click', this.onMonitoringLearnMoreClicked_.bind(this)); | 2306 'click', this.onMonitoringLearnMoreClicked_.bind(this)); |
| 2289 | 2307 |
| 2290 this.enterButtonElement.addEventListener('click', (function(e) { | 2308 this.enterButtonElement.addEventListener('click', (function(e) { |
| 2291 this.enterButtonElement.disabled = true; | 2309 this.enterButtonElement.disabled = true; |
| 2292 var locale = this.querySelector('.language-select').value; | 2310 var locale = this.querySelector('.language-select').value; |
| 2293 var keyboardSelect = this.querySelector('.keyboard-select'); | 2311 var keyboardSelect = this.querySelector('.keyboard-select'); |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 2316 var languageSelect = this.querySelector('.language-select'); | 2334 var languageSelect = this.querySelector('.language-select'); |
| 2317 languageSelect.setAttribute('id', id); | 2335 languageSelect.setAttribute('id', id); |
| 2318 this.populateLanguageSelect(this.user.initialLocales, | 2336 this.populateLanguageSelect(this.user.initialLocales, |
| 2319 this.user.initialLocale, | 2337 this.user.initialLocale, |
| 2320 this.user.initialMultipleRecommendedLocales); | 2338 this.user.initialMultipleRecommendedLocales); |
| 2321 }, | 2339 }, |
| 2322 | 2340 |
| 2323 /** @override **/ | 2341 /** @override **/ |
| 2324 update: function() { | 2342 update: function() { |
| 2325 UserPod.prototype.update.call(this); | 2343 UserPod.prototype.update.call(this); |
| 2326 this.querySelector('.expanded-pane-name').textContent = | |
| 2327 this.user_.displayName; | |
| 2328 this.querySelector('.info').textContent = | 2344 this.querySelector('.info').textContent = |
| 2329 loadTimeData.getStringF('publicAccountInfoFormat', | 2345 loadTimeData.getStringF('publicAccountInfoFormat', |
| 2330 this.user_.enterpriseDomain); | 2346 this.user_.enterpriseDomain); |
| 2331 }, | 2347 }, |
| 2332 | 2348 |
| 2333 /** @override */ | 2349 /** @override */ |
| 2334 focusInput: function() { | 2350 focusInput: function() { |
| 2335 // Move tabIndex from the whole pod to the main input. | 2351 // Move tabIndex from the whole pod to the main input. |
| 2336 this.tabIndex = -1; | 2352 this.tabIndex = -1; |
| 2337 this.mainInput.tabIndex = UserPodTabOrder.POD_INPUT; | 2353 this.mainInput.tabIndex = UserPodTabOrder.POD_INPUT; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2402 break; | 2418 break; |
| 2403 default: | 2419 default: |
| 2404 return; | 2420 return; |
| 2405 } | 2421 } |
| 2406 break; | 2422 break; |
| 2407 } | 2423 } |
| 2408 chrome.send('launchHelpApp', [HELP_TOPIC_PUBLIC_SESSION]); | 2424 chrome.send('launchHelpApp', [HELP_TOPIC_PUBLIC_SESSION]); |
| 2409 stopEventPropagation(event); | 2425 stopEventPropagation(event); |
| 2410 }, | 2426 }, |
| 2411 | 2427 |
| 2412 makeSpaceForExpandedPod_: function() { | |
| 2413 var width = this.classList.contains('advanced') ? | |
| 2414 PUBLIC_EXPANDED_ADVANCED_WIDTH : PUBLIC_EXPANDED_BASIC_WIDTH; | |
| 2415 var isDesktopUserManager = Oobe.getInstance().displayType == | |
| 2416 DISPLAY_TYPE.DESKTOP_USER_MANAGER; | |
| 2417 var rowPadding = isDesktopUserManager ? DESKTOP_ROW_PADDING : | |
| 2418 POD_ROW_PADDING; | |
| 2419 if (this.left + width > $('pod-row').offsetWidth - rowPadding) | |
| 2420 this.left = $('pod-row').offsetWidth - rowPadding - width; | |
| 2421 }, | |
| 2422 | |
| 2423 /** | 2428 /** |
| 2424 * Transition the expanded pod from the basic to the advanced view. | 2429 * Transition the expanded pod from the basic to the advanced view. |
| 2425 */ | 2430 */ |
| 2426 transitionToAdvanced_: function() { | 2431 transitionToAdvanced_: function() { |
| 2427 var pod = this; | 2432 this.classList.add('advanced'); |
| 2428 var languageAndInputSection = | 2433 // TODO(wzang): Add transition animation when its spec becomes available. |
| 2429 this.querySelector('.language-and-input-section'); | |
| 2430 this.classList.add('transitioning-to-advanced'); | |
| 2431 setTimeout(function() { | |
| 2432 pod.classList.add('advanced'); | |
| 2433 pod.makeSpaceForExpandedPod_(); | |
| 2434 languageAndInputSection.addEventListener('transitionend', | |
| 2435 function observer() { | |
| 2436 languageAndInputSection.removeEventListener('transitionend', | |
| 2437 observer); | |
| 2438 pod.classList.remove('transitioning-to-advanced'); | |
| 2439 pod.querySelector('.language-select').focus(); | |
| 2440 }); | |
| 2441 // Guard timer set to animation duration + 20ms. | |
| 2442 ensureTransitionEndEvent(languageAndInputSection, 380); | |
| 2443 }, 0); | |
| 2444 }, | 2434 }, |
| 2445 | 2435 |
| 2446 /** | 2436 /** |
| 2447 * Show a dialog when user clicks on learn more (monitoring) button. | 2437 * Show a dialog when user clicks on learn more (monitoring) button. |
| 2448 */ | 2438 */ |
| 2449 onMonitoringLearnMoreClicked_: function() { | 2439 onMonitoringLearnMoreClicked_: function() { |
| 2450 if (!this.dialogContainer_) { | 2440 if (!this.dialogContainer_) { |
| 2451 this.dialogContainer_ = document.createElement('div'); | 2441 this.dialogContainer_ = document.createElement('div'); |
| 2452 this.dialogContainer_.classList.add('monitoring-dialog-container'); | 2442 this.dialogContainer_.classList.add('monitoring-dialog-container'); |
| 2453 var topContainer = document.querySelector('#scroll-container'); | 2443 var topContainer = document.querySelector('#scroll-container'); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2489 getPublicSessionKeyboardLayouts_: function() { | 2479 getPublicSessionKeyboardLayouts_: function() { |
| 2490 var selectedLocale = this.querySelector('.language-select').value; | 2480 var selectedLocale = this.querySelector('.language-select').value; |
| 2491 if (selectedLocale == | 2481 if (selectedLocale == |
| 2492 this.querySelector('.keyboard-select').loadedLocale) { | 2482 this.querySelector('.keyboard-select').loadedLocale) { |
| 2493 // If the list of keyboard layouts was loaded for the currently selected | 2483 // If the list of keyboard layouts was loaded for the currently selected |
| 2494 // locale, it is already up to date. | 2484 // locale, it is already up to date. |
| 2495 return; | 2485 return; |
| 2496 } | 2486 } |
| 2497 chrome.send('getPublicSessionKeyboardLayouts', | 2487 chrome.send('getPublicSessionKeyboardLayouts', |
| 2498 [this.user.username, selectedLocale]); | 2488 [this.user.username, selectedLocale]); |
| 2499 }, | 2489 }, |
| 2500 | 2490 |
| 2501 /** | 2491 /** |
| 2502 * Populates the keyboard layout "select" element with a list of layouts. | 2492 * Populates the keyboard layout "select" element with a list of layouts. |
| 2503 * @param {string} locale The locale to which this list of keyboard layouts | 2493 * @param {string} locale The locale to which this list of keyboard layouts |
| 2504 * applies | 2494 * applies |
| 2505 * @param {!Object} list List of available keyboard layouts | 2495 * @param {!Object} list List of available keyboard layouts |
| 2506 */ | 2496 */ |
| 2507 populateKeyboardSelect: function(locale, list) { | 2497 populateKeyboardSelect: function(locale, list) { |
| 2508 if (locale != this.querySelector('.language-select').value) { | 2498 if (locale != this.querySelector('.language-select').value) { |
| 2509 // The selected locale has changed and the list of keyboard layouts is | 2499 // The selected locale has changed and the list of keyboard layouts is |
| (...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3408 }, | 3398 }, |
| 3409 | 3399 |
| 3410 /** | 3400 /** |
| 3411 * Sets the state of touch view mode. | 3401 * Sets the state of touch view mode. |
| 3412 * @param {boolean} isTouchViewEnabled true if the mode is on. | 3402 * @param {boolean} isTouchViewEnabled true if the mode is on. |
| 3413 */ | 3403 */ |
| 3414 setTouchViewState: function(isTouchViewEnabled) { | 3404 setTouchViewState: function(isTouchViewEnabled) { |
| 3415 this.touchViewEnabled_ = isTouchViewEnabled; | 3405 this.touchViewEnabled_ = isTouchViewEnabled; |
| 3416 this.pods.forEach(function(pod, index) { | 3406 this.pods.forEach(function(pod, index) { |
| 3417 pod.actionBoxAreaElement.classList.toggle('forced', isTouchViewEnabled); | 3407 pod.actionBoxAreaElement.classList.toggle('forced', isTouchViewEnabled); |
| 3408 if (pod.isPublicSessionPod) | |
| 3409 pod.querySelector('.button-container') | |
| 3410 .classList.toggle('forced', isTouchViewEnabled); | |
| 3418 }); | 3411 }); |
| 3419 }, | 3412 }, |
| 3420 | 3413 |
| 3421 /** | 3414 /** |
| 3422 * Updates the display name shown on a public session pod. | 3415 * Updates the display name shown on a public session pod. |
| 3423 * @param {string} userID The user ID of the public session | 3416 * @param {string} userID The user ID of the public session |
| 3424 * @param {string} displayName The new display name | 3417 * @param {string} displayName The new display name |
| 3425 */ | 3418 */ |
| 3426 setPublicSessionDisplayName: function(userID, displayName) { | 3419 setPublicSessionDisplayName: function(userID, displayName) { |
| 3427 var pod = this.getPodWithUsername_(userID); | 3420 var pod = this.getPodWithUsername_(userID); |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3574 * Called when there is one user pod. | 3567 * Called when there is one user pod. |
| 3575 * @private | 3568 * @private |
| 3576 */ | 3569 */ |
| 3577 placeSinglePod_: function() { | 3570 placeSinglePod_: function() { |
| 3578 this.mainPod_.setPodStyle(UserPod.Style.LARGE); | 3571 this.mainPod_.setPodStyle(UserPod.Style.LARGE); |
| 3579 this.mainPod_.left = (this.screenSize.width - CROS_POD_WIDTH) / 2; | 3572 this.mainPod_.left = (this.screenSize.width - CROS_POD_WIDTH) / 2; |
| 3580 this.mainPod_.top = (this.screenSize.height - CROS_POD_HEIGHT) / 2; | 3573 this.mainPod_.top = (this.screenSize.height - CROS_POD_HEIGHT) / 2; |
| 3581 }, | 3574 }, |
| 3582 | 3575 |
| 3583 /** | 3576 /** |
| 3584 * Called when there are two users pods. | 3577 * Called when the number of pods is within the POD_ROW_LIMIT. |
| 3585 * @private | 3578 * @private |
| 3586 */ | 3579 */ |
| 3587 placePodsOnPodRow_: function() { | 3580 placePodsOnPodRow_: function() { |
| 3588 // Both pods have large size and are placed adjacently. | 3581 // Both pods have large size and are placed adjacently. |
| 3589 var secondPod = | 3582 var secondPod = |
| 3590 this.pods[0] == this.mainPod_ ? this.pods[1] : this.pods[0]; | 3583 this.pods[0] == this.mainPod_ ? this.pods[1] : this.pods[0]; |
| 3591 this.mainPod_.setPodStyle(UserPod.Style.LARGE); | 3584 this.mainPod_.setPodStyle(UserPod.Style.LARGE); |
| 3592 secondPod.setPodStyle(UserPod.Style.LARGE); | 3585 secondPod.setPodStyle(UserPod.Style.LARGE); |
| 3593 | 3586 |
| 3594 var DOUBLE_PODS_PADDING = this.isPortraitMode_() ? 32 : 118; | 3587 var DOUBLE_PODS_PADDING = this.isPortraitMode_() ? 32 : 118; |
| 3595 var leftPadding = | 3588 var leftPadding = |
| 3596 (this.screenSize.width - (CROS_POD_WIDTH * 2 + DOUBLE_PODS_PADDING)) / | 3589 (this.screenSize.width - (CROS_POD_WIDTH * 2 + DOUBLE_PODS_PADDING)) / |
| 3597 2; | 3590 2; |
| 3598 // Start actual positioning. | 3591 // Start actual positioning. |
| 3599 this.mainPod_.left = leftPadding; | 3592 this.mainPod_.left = leftPadding; |
| 3600 this.mainPod_.top = (this.screenSize.height - CROS_POD_HEIGHT) / 2; | 3593 this.mainPod_.top = (this.screenSize.height - CROS_POD_HEIGHT) / 2; |
| 3601 secondPod.left = leftPadding + CROS_POD_WIDTH + DOUBLE_PODS_PADDING; | 3594 secondPod.left = leftPadding + CROS_POD_WIDTH + DOUBLE_PODS_PADDING; |
| 3602 secondPod.top = (this.screenSize.height - CROS_POD_HEIGHT) / 2; | 3595 secondPod.top = (this.screenSize.height - CROS_POD_HEIGHT) / 2; |
| 3603 }, | 3596 }, |
| 3604 | 3597 |
| 3605 /** | 3598 /** |
| 3606 * Called when there are more than two user pods. | 3599 * Called when the number of pods exceeds the POD_ROW_LIMIT. |
| 3607 * @private | 3600 * @private |
| 3608 */ | 3601 */ |
| 3609 placePodsOnContainer_: function() { | 3602 placePodsOnContainer_: function() { |
| 3610 this.smallPodsContainer.hidden = false; | 3603 this.smallPodsContainer.hidden = false; |
| 3611 var pods = this.pods; | 3604 var pods = this.pods; |
| 3612 if ((pods.length > LANDSCAPE_MODE_LIMIT && !this.isPortraitMode_()) || | 3605 if ((pods.length > LANDSCAPE_MODE_LIMIT && !this.isPortraitMode_()) || |
| 3613 (pods.length > PORTRAIT_MODE_LIMIT && this.isPortraitMode_())) { | 3606 (pods.length > PORTRAIT_MODE_LIMIT && this.isPortraitMode_())) { |
| 3614 // If the pod count exceeds limits, they should be in extra small size | 3607 // If the pod count exceeds limits, they should be in extra small size |
| 3615 // and the container will become scrollable. | 3608 // and the container will become scrollable. |
| 3616 this.placePodsOnScrollableContainer_(); | 3609 this.placePodsOnScrollableContainer_(); |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3678 if (pod == this.mainPod_) { | 3671 if (pod == this.mainPod_) { |
| 3679 continue; | 3672 continue; |
| 3680 } | 3673 } |
| 3681 pod.left = 0; | 3674 pod.left = 0; |
| 3682 pod.top = smallPodsTopPadding; | 3675 pod.top = smallPodsTopPadding; |
| 3683 smallPodsTopPadding += CROS_SMALL_POD_HEIGHT + actualSmallPodPadding; | 3676 smallPodsTopPadding += CROS_SMALL_POD_HEIGHT + actualSmallPodPadding; |
| 3684 } | 3677 } |
| 3685 }, | 3678 }, |
| 3686 | 3679 |
| 3687 /** | 3680 /** |
| 3688 * Called when there are more than 6 user pods in landscape mode, or more | 3681 * Called when the LANDSCAPE_MODE_LIMIT or PORTRAIT_MODE_LIMIT is exceeded |
| 3689 * than 10 user pods in portrait mode. | 3682 * and the scrollable container is shown. |
| 3690 * @private | 3683 * @private |
| 3691 */ | 3684 */ |
| 3692 placePodsOnScrollableContainer_: function() { | 3685 placePodsOnScrollableContainer_: function() { |
| 3693 this.smallPodsContainer.hidden = false; | 3686 this.smallPodsContainer.hidden = false; |
| 3694 // Add a dark overlay. | 3687 // Add a dark overlay. |
| 3695 this.smallPodsContainer.classList.add('scroll'); | 3688 this.smallPodsContainer.classList.add('scroll'); |
| 3696 var pods = this.pods; | 3689 var pods = this.pods; |
| 3697 this.mainPod_.setPodStyle(UserPod.Style.LARGE); | 3690 this.mainPod_.setPodStyle(UserPod.Style.LARGE); |
| 3698 for (var pod of pods) { | 3691 for (var pod of pods) { |
| 3699 if (pod != this.mainPod_) { | 3692 if (pod != this.mainPod_) { |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3784 document.querySelector('.small-pod-container-mask').hidden = true; | 3777 document.querySelector('.small-pod-container-mask').hidden = true; |
| 3785 document.querySelector('.small-pod-container-mask.rotate').hidden = true; | 3778 document.querySelector('.small-pod-container-mask.rotate').hidden = true; |
| 3786 this.smallPodsContainer.classList.remove('scroll'); | 3779 this.smallPodsContainer.classList.remove('scroll'); |
| 3787 var pods = this.pods; | 3780 var pods = this.pods; |
| 3788 for (var pod of pods) { | 3781 for (var pod of pods) { |
| 3789 // There is a chance that one of the pods has a bottom padding, so | 3782 // There is a chance that one of the pods has a bottom padding, so |
| 3790 // reset all of them to be safe. This is because if the pod was at | 3783 // reset all of them to be safe. This is because if the pod was at |
| 3791 // the last position in the scrollable container, a bottom padding | 3784 // the last position in the scrollable container, a bottom padding |
| 3792 // was added to ensure a symmetric layout. | 3785 // was added to ensure a symmetric layout. |
| 3793 pod.style.paddingBottom = cr.ui.toCssPx(0); | 3786 pod.style.paddingBottom = cr.ui.toCssPx(0); |
| 3794 // Remove the switch animation that might be added earlier. | |
| 3795 pod.imageElement.classList.remove('switch-image-animation'); | |
| 3796 pod.smallPodImageElement.classList.remove('switch-image-animation'); | |
| 3797 } | 3787 } |
| 3788 this.clearPodsAnimation_(); | |
| 3798 this.hideEmptyArea_(); | 3789 this.hideEmptyArea_(); |
| 3799 // Clear error bubbles whenever pod placement is happening, i.e., after | 3790 // Clear error bubbles whenever pod placement is happening, i.e., after |
| 3800 // orientation change, showing or hiding virtual keyboard, and user | 3791 // orientation change, showing or hiding virtual keyboard, and user |
| 3801 // removal. | 3792 // removal. |
| 3802 Oobe.clearErrors(); | 3793 Oobe.clearErrors(); |
| 3803 }, | 3794 }, |
| 3804 | 3795 |
| 3805 /** | 3796 /** |
| 3806 * Checks if the screen is in portrait mode. | 3797 * Checks if the screen is in portrait mode. |
| 3807 * @return {boolean} True if in portrait mode. | 3798 * @return {boolean} True if in portrait mode. |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3855 // Make sure that user name on each large pod is centered and extra | 3846 // Make sure that user name on each large pod is centered and extra |
| 3856 // long names don't exceed maximum pod width. | 3847 // long names don't exceed maximum pod width. |
| 3857 var nameArea = pod.querySelector('.name-container'); | 3848 var nameArea = pod.querySelector('.name-container'); |
| 3858 var leftMargin = (CROS_POD_WIDTH - pod.nameElement.offsetWidth) / 2; | 3849 var leftMargin = (CROS_POD_WIDTH - pod.nameElement.offsetWidth) / 2; |
| 3859 if (leftMargin > 0) | 3850 if (leftMargin > 0) |
| 3860 nameArea.style.left = cr.ui.toCssPx(leftMargin); | 3851 nameArea.style.left = cr.ui.toCssPx(leftMargin); |
| 3861 else { | 3852 else { |
| 3862 pod.nameElement.style.width = cr.ui.toCssPx(CROS_POD_WIDTH); | 3853 pod.nameElement.style.width = cr.ui.toCssPx(CROS_POD_WIDTH); |
| 3863 nameArea.style.left = cr.ui.toCssPx(0); | 3854 nameArea.style.left = cr.ui.toCssPx(0); |
| 3864 } | 3855 } |
| 3856 // Update info container area for public session pods. | |
| 3857 if (pod.isPublicSessionPod) { | |
| 3858 var infoElement = pod.querySelector('.info'); | |
| 3859 var infoIcon = pod.querySelector('.learn-more'); | |
| 3860 var totalWidth = PUBLIC_SESSION_ICON_WIDTH + infoElement.offsetWidth; | |
| 3861 var infoLeftMargin = (CROS_POD_WIDTH - totalWidth) / 2; | |
| 3862 if (infoLeftMargin > 0) { | |
| 3863 infoIcon.style.left = cr.ui.toCssPx(infoLeftMargin); | |
| 3864 infoElement.style.left = | |
| 3865 cr.ui.toCssPx(infoLeftMargin + PUBLIC_SESSION_ICON_WIDTH); | |
| 3866 } else { | |
| 3867 infoIcon.style.left = cr.ui.toCssPx(0); | |
| 3868 infoElement.style.left = cr.ui.toCssPx(PUBLIC_SESSION_ICON_WIDTH); | |
| 3869 infoElement.style.width = cr.ui.toCssPx( | |
| 3870 CROS_POD_WIDTH - PUBLIC_SESSION_ICON_WIDTH - | |
| 3871 infoElement.style.paddingLeft); | |
| 3872 } | |
| 3873 // If the public session pod is already expanded, make sure it's | |
| 3874 // still centered. | |
| 3875 if (pod.expanded) | |
| 3876 this.centerPublicSessionPod_(pod); | |
| 3877 } | |
| 3865 // Update action box menu position to ensure it doesn't overlap with | 3878 // Update action box menu position to ensure it doesn't overlap with |
| 3866 // elements outside the pod. | 3879 // elements outside the pod. |
| 3867 var actionBoxMenu = pod.querySelector('.action-box-menu'); | 3880 var actionBoxMenu = pod.querySelector('.action-box-menu'); |
| 3868 var actionBoxButton = pod.querySelector('.action-box-button'); | 3881 var actionBoxButton = pod.querySelector('.action-box-button'); |
| 3869 var MENU_TOP_PADDING = 7; | 3882 var MENU_TOP_PADDING = 7; |
| 3870 actionBoxMenu.style.top = | 3883 actionBoxMenu.style.top = |
| 3871 cr.ui.toCssPx(actionBoxButton.offsetHeight + MENU_TOP_PADDING); | 3884 cr.ui.toCssPx(actionBoxButton.offsetHeight + MENU_TOP_PADDING); |
| 3872 if (this.isPortraitMode_() && pods.length > 1) { | 3885 if (this.isPortraitMode_() && pods.length > 1) { |
| 3873 // Confine the menu inside the pod when it may overlap with outside | 3886 // Confine the menu inside the pod when it may overlap with outside |
| 3874 // elements. | 3887 // elements. |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 3901 } | 3914 } |
| 3902 else { | 3915 else { |
| 3903 var leftPadding = | 3916 var leftPadding = |
| 3904 this.mainPod_.left - (BANNER_MESSAGE_WIDTH - CROS_POD_WIDTH) / 2; | 3917 this.mainPod_.left - (BANNER_MESSAGE_WIDTH - CROS_POD_WIDTH) / 2; |
| 3905 bannerContainer.style.left = cr.ui.toCssPx(Math.max(leftPadding, 0)); | 3918 bannerContainer.style.left = cr.ui.toCssPx(Math.max(leftPadding, 0)); |
| 3906 } | 3919 } |
| 3907 } | 3920 } |
| 3908 }, | 3921 }, |
| 3909 | 3922 |
| 3910 /** | 3923 /** |
| 3924 * Handles required UI changes when a public session pod toggles the | |
| 3925 * expanded state. | |
| 3926 * @param {UserPod} pod Public session pod. | |
| 3927 * @param {boolean} expanded Whether the pod is expanded or not. | |
| 3928 */ | |
| 3929 handlePublicPodExpansion: function(pod, expanded) { | |
| 3930 // Hide all other elements in the account picker if the pod is expanded. | |
| 3931 this.parentNode.classList.toggle('public-account-expanded', expanded); | |
| 3932 if (expanded) { | |
| 3933 this.centerPublicSessionPod_(pod); | |
| 3934 } else { | |
| 3935 // Return the pod to its last position. | |
| 3936 pod.left = pod.lastPosition.left; | |
| 3937 pod.top = pod.lastPosition.top; | |
| 3938 // Pod placement has already finished by this point, but we still need | |
| 3939 // to make sure that the styles of all the elements in the pod row are | |
| 3940 // updated before being shown. | |
| 3941 this.handleAfterPodPlacement_(); | |
| 3942 this.clearPodsAnimation_(); | |
| 3943 } | |
| 3944 }, | |
| 3945 | |
| 3946 /** | |
| 3947 * Called when a public session pod is expanded. | |
| 3948 * @param {UserPod} pod Pod to be centered. | |
| 3949 * @private | |
| 3950 */ | |
| 3951 centerPublicSessionPod_: function(pod) { | |
|
jdufault
2017/06/07 17:29:31
FYI, this can be more general:
centerPod_: func
Wenzhao (Colin) Zang
2017/06/07 21:12:45
I changed it. Thanks.
| |
| 3952 pod.lastPosition = {left: pod.left, top: pod.top}; | |
| 3953 pod.left = (this.screenSize.width - PUBLIC_EXPANDED_WIDTH) / 2; | |
| 3954 pod.top = (this.screenSize.height - PUBLIC_EXPANDED_HEIGHT) / 2; | |
| 3955 }, | |
| 3956 | |
| 3957 /** | |
| 3958 * Clears animation classes that may be added earlier to ensure a clean | |
| 3959 * state. | |
| 3960 * @private | |
| 3961 */ | |
| 3962 clearPodsAnimation_: function() { | |
| 3963 var pods = this.pods; | |
| 3964 for (var pod of pods) { | |
| 3965 pod.imageElement.classList.remove('switch-image-animation'); | |
| 3966 pod.smallPodImageElement.classList.remove('switch-image-animation'); | |
| 3967 } | |
| 3968 }, | |
| 3969 | |
| 3970 /** | |
| 3911 * Called when a small or extra small pod is clicked to trigger the switch | 3971 * Called when a small or extra small pod is clicked to trigger the switch |
| 3912 * with the main pod. | 3972 * with the main pod. |
| 3973 * @param {UserPod} pod Pod to be switched with the main pod. | |
| 3913 */ | 3974 */ |
| 3914 switchMainPod: function(pod) { | 3975 switchMainPod: function(pod) { |
| 3915 if (this.disabled) { | 3976 if (this.disabled) { |
| 3916 console.error('Cannot change main pod while sign-in UI is disabled.'); | 3977 console.error('Cannot switch main pod while sign-in UI is disabled.'); |
| 3917 return; | 3978 return; |
| 3918 } | 3979 } |
| 3919 if (!this.mainPod_) { | 3980 if (!this.mainPod_) { |
| 3920 console.error('Attempt to switch a non-existing main pod.'); | 3981 console.error('Attempt to switch a non-existing main pod.'); |
| 3921 return; | 3982 return; |
| 3922 } | 3983 } |
| 3923 // Find the index of the small pod. | 3984 // Find the index of the small pod. |
| 3924 var insert = 0; | 3985 var insert = 0; |
| 3925 var children = pod.parentNode.children; | 3986 var children = pod.parentNode.children; |
| 3926 while (insert < children.length && children[insert] != pod) | 3987 while (insert < children.length && children[insert] != pod) |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4260 if (this.alwaysFocusSinglePod && !pod) { | 4321 if (this.alwaysFocusSinglePod && !pod) { |
| 4261 if ($('login-header-bar').contains(e.target)) | 4322 if ($('login-header-bar').contains(e.target)) |
| 4262 return; | 4323 return; |
| 4263 // If the click is outside the single pod, still focus on that pod | 4324 // If the click is outside the single pod, still focus on that pod |
| 4264 // but do not focus on input box any more. This makes virtual keyboard | 4325 // but do not focus on input box any more. This makes virtual keyboard |
| 4265 // (if present) disappear. | 4326 // (if present) disappear. |
| 4266 this.focusPod( | 4327 this.focusPod( |
| 4267 this.focusedPod_, true /* force */, true /* opt_skipInputFocus */); | 4328 this.focusedPod_, true /* force */, true /* opt_skipInputFocus */); |
| 4268 this.focusedPod_.userTypeBubbleElement.classList.remove('bubble-shown'); | 4329 this.focusedPod_.userTypeBubbleElement.classList.remove('bubble-shown'); |
| 4269 this.focusedPod_.isActionBoxMenuHovered = false; | 4330 this.focusedPod_.isActionBoxMenuHovered = false; |
| 4331 // If the click is outside the public session pod, still focus on it | |
| 4332 // but do not expand it any more. | |
| 4333 if (this.focusedPod_.isPublicSessionPod) | |
| 4334 this.focusedPod_.expanded = false; | |
| 4270 } | 4335 } |
| 4271 }, | 4336 }, |
| 4272 | 4337 |
| 4273 /** | 4338 /** |
| 4274 * Handler of mouse move event. | 4339 * Handler of mouse move event. |
| 4275 * @param {Event} e Click Event object. | 4340 * @param {Event} e Click Event object. |
| 4276 * @private | 4341 * @private |
| 4277 */ | 4342 */ |
| 4278 handleMouseMove_: function(e) { | 4343 handleMouseMove_: function(e) { |
| 4279 if (this.disabled) | 4344 if (this.disabled) |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4388 if (!editing) { | 4453 if (!editing) { |
| 4389 if (this.focusedPod_ && this.focusedPod_.nextElementSibling) | 4454 if (this.focusedPod_ && this.focusedPod_.nextElementSibling) |
| 4390 this.focusPod(this.focusedPod_.nextElementSibling); | 4455 this.focusPod(this.focusedPod_.nextElementSibling); |
| 4391 else | 4456 else |
| 4392 this.focusPod(this.firstElementChild); | 4457 this.focusPod(this.firstElementChild); |
| 4393 | 4458 |
| 4394 e.stopPropagation(); | 4459 e.stopPropagation(); |
| 4395 } | 4460 } |
| 4396 break; | 4461 break; |
| 4397 case 'Enter': | 4462 case 'Enter': |
| 4398 if (this.focusedPod_) { | 4463 // Click events on public session pods should only be handled by |
| 4464 // their own handler. | |
| 4465 if (this.focusedPod_ && !this.focusedPod_.isPublicSessionPod) { | |
| 4399 var targetTag = e.target.tagName; | 4466 var targetTag = e.target.tagName; |
| 4400 if (e.target == this.focusedPod_.passwordElement || | 4467 if (e.target == this.focusedPod_.passwordElement || |
| 4401 (this.focusedPod_.pinKeyboard && | 4468 (this.focusedPod_.pinKeyboard && |
| 4402 e.target == this.focusedPod_.pinKeyboard.inputElement) || | 4469 e.target == this.focusedPod_.pinKeyboard.inputElement) || |
| 4403 (targetTag != 'INPUT' && | 4470 (targetTag != 'INPUT' && |
| 4404 targetTag != 'BUTTON' && | 4471 targetTag != 'BUTTON' && |
| 4405 targetTag != 'A')) { | 4472 targetTag != 'A')) { |
| 4406 this.setActivatedPod(this.focusedPod_, e); | 4473 this.setActivatedPod(this.focusedPod_, e); |
| 4407 e.stopPropagation(); | 4474 e.stopPropagation(); |
| 4408 } | 4475 } |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4500 if (pod && pod.multiProfilesPolicyApplied) { | 4567 if (pod && pod.multiProfilesPolicyApplied) { |
| 4501 pod.userTypeBubbleElement.classList.remove('bubble-shown'); | 4568 pod.userTypeBubbleElement.classList.remove('bubble-shown'); |
| 4502 } | 4569 } |
| 4503 } | 4570 } |
| 4504 }; | 4571 }; |
| 4505 | 4572 |
| 4506 return { | 4573 return { |
| 4507 PodRow: PodRow | 4574 PodRow: PodRow |
| 4508 }; | 4575 }; |
| 4509 }); | 4576 }); |
| OLD | NEW |