| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 Offline message screen implementation. | 6 * @fileoverview Offline message screen implementation. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 cr.define('login', function() { | 9 cr.define('login', function() { |
| 10 // Link which starts guest session for captive portal fixing. | 10 // Link which starts guest session for captive portal fixing. |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 onContentChange_: function() { | 189 onContentChange_: function() { |
| 190 if (Oobe.getInstance().currentScreen === this) | 190 if (Oobe.getInstance().currentScreen === this) |
| 191 Oobe.getInstance().updateScreenSize(this); | 191 Oobe.getInstance().updateScreenSize(this); |
| 192 }, | 192 }, |
| 193 | 193 |
| 194 /** | 194 /** |
| 195 * Prepares error screen to show guest signin link. | 195 * Prepares error screen to show guest signin link. |
| 196 * @private | 196 * @private |
| 197 */ | 197 */ |
| 198 allowGuestSignin_: function(allowed) { | 198 allowGuestSignin_: function(allowed) { |
| 199 this.classList[allowed ? 'add' : 'remove']('allow-guest-signin'); | 199 this.classList.toggle('allow-guest-signin', allowed); |
| 200 this.onContentChange_(); | 200 this.onContentChange_(); |
| 201 }, | 201 }, |
| 202 | 202 |
| 203 /** | 203 /** |
| 204 * Prepares error screen to show offline login link. | 204 * Prepares error screen to show offline login link. |
| 205 * @private | 205 * @private |
| 206 */ | 206 */ |
| 207 allowOfflineLogin_: function(allowed) { | 207 allowOfflineLogin_: function(allowed) { |
| 208 this.classList[allowed ? 'add' : 'remove']('allow-offline-login'); | 208 this.classList.toggle('allow-offline-login', allowed); |
| 209 this.onContentChange_(); | 209 this.onContentChange_(); |
| 210 }, | 210 }, |
| 211 }; | 211 }; |
| 212 | 212 |
| 213 /** | 213 /** |
| 214 * Sets current UI state of the screen. | 214 * Sets current UI state of the screen. |
| 215 * @param {number} ui_state New UI state of the screen. | 215 * @param {number} ui_state New UI state of the screen. |
| 216 * @private | 216 * @private |
| 217 */ | 217 */ |
| 218 ErrorMessageScreen.setUIState = function(ui_state) { | 218 ErrorMessageScreen.setUIState = function(ui_state) { |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 * via template. | 258 * via template. |
| 259 */ | 259 */ |
| 260 ErrorMessageScreen.updateLocalizedContent = function() { | 260 ErrorMessageScreen.updateLocalizedContent = function() { |
| 261 $('error-message').updateLocalizedContent_(); | 261 $('error-message').updateLocalizedContent_(); |
| 262 }; | 262 }; |
| 263 | 263 |
| 264 return { | 264 return { |
| 265 ErrorMessageScreen: ErrorMessageScreen | 265 ErrorMessageScreen: ErrorMessageScreen |
| 266 }; | 266 }; |
| 267 }); | 267 }); |
| OLD | NEW |