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 login.createScreen('ErrorMessageScreen', 'error-message', function() { | 9 login.createScreen('ErrorMessageScreen', 'error-message', function() { |
10 var CONTEXT_KEY_ERROR_STATE_CODE = 'error-state-code'; | 10 var CONTEXT_KEY_ERROR_STATE_CODE = 'error-state-code'; |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 'offlineLogin', | 197 'offlineLogin', |
198 '<a id="error-offline-login-link" class="signin-link" href="#">', | 198 '<a id="error-offline-login-link" class="signin-link" href="#">', |
199 '</a>'); | 199 '</a>'); |
200 $('error-offline-login-link').onclick = function() { | 200 $('error-offline-login-link').onclick = function() { |
201 chrome.send('offlineLogin'); | 201 chrome.send('offlineLogin'); |
202 }; | 202 }; |
203 | 203 |
204 var ellipsis = ''; | 204 var ellipsis = ''; |
205 for (var i = 1; i <= 3; ++i) { | 205 for (var i = 1; i <= 3; ++i) { |
206 ellipsis += | 206 ellipsis += |
207 '<span id="connecting-indicator-ellipsis-' + i + '">.</span>'; | 207 '<span id="connecting-indicator-ellipsis-' + i + '"></span>'; |
208 } | 208 } |
209 $('connecting-indicator').innerHTML = | 209 $('connecting-indicator').innerHTML = |
210 loadTimeData.getStringF('connectingIndicatorText', ellipsis); | 210 loadTimeData.getStringF('connectingIndicatorText', ellipsis); |
211 | 211 |
212 this.onContentChange_(); | 212 this.onContentChange_(); |
213 }, | 213 }, |
214 | 214 |
215 /** | 215 /** |
216 * Event handler that is invoked just before the screen in shown. | 216 * Event handler that is invoked just before the screen in shown. |
217 * @param {Object} data Screen init payload. | 217 * @param {Object} data Screen init payload. |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 /** | 408 /** |
409 * Updates visibility of the label indicating we're reconnecting. | 409 * Updates visibility of the label indicating we're reconnecting. |
410 * @param {boolean} show Whether the label should be shown. | 410 * @param {boolean} show Whether the label should be shown. |
411 */ | 411 */ |
412 showConnectingIndicator: function(show) { | 412 showConnectingIndicator: function(show) { |
413 this.classList.toggle('show-connecting-indicator', show); | 413 this.classList.toggle('show-connecting-indicator', show); |
414 this.onContentChange_(); | 414 this.onContentChange_(); |
415 } | 415 } |
416 }; | 416 }; |
417 }); | 417 }); |
OLD | NEW |