OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 Display manager for WebUI OOBE and login. | 6 * @fileoverview Display manager for WebUI OOBE and login. |
7 */ | 7 */ |
8 | 8 |
9 // TODO(xiyuan): Find a better to share those constants. | 9 // TODO(xiyuan): Find a better to share those constants. |
10 const SCREEN_SIGNIN = 'signin'; | 10 const SCREEN_SIGNIN = 'signin'; |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 newStep.classList.remove('faded'); | 144 newStep.classList.remove('faded'); |
145 } | 145 } |
146 | 146 |
147 // Adjust inner container height based on new step's height. | 147 // Adjust inner container height based on new step's height. |
148 $('inner-container').style.height = newStep.offsetHeight + 'px'; | 148 $('inner-container').style.height = newStep.offsetHeight + 'px'; |
149 | 149 |
150 if (this.currentStep_ != nextStepIndex && | 150 if (this.currentStep_ != nextStepIndex && |
151 !oldStep.classList.contains('hidden')) { | 151 !oldStep.classList.contains('hidden')) { |
152 oldStep.addEventListener('webkitTransitionEnd', function f(e) { | 152 oldStep.addEventListener('webkitTransitionEnd', function f(e) { |
153 oldStep.removeEventListener('webkitTransitionEnd', f); | 153 oldStep.removeEventListener('webkitTransitionEnd', f); |
154 oldStep.classList.add('hidden'); | 154 if (oldStep.classList.contains('faded') || |
| 155 oldStep.classList.contains('left') || |
| 156 oldStep.classList.contains('right')) { |
| 157 oldStep.classList.add('hidden'); |
| 158 } |
155 }); | 159 }); |
156 } else { | 160 } else { |
157 // First screen on OOBE launch. | 161 // First screen on OOBE launch. |
158 newHeader.classList.remove('right'); | 162 newHeader.classList.remove('right'); |
159 } | 163 } |
160 this.currentStep_ = nextStepIndex; | 164 this.currentStep_ = nextStepIndex; |
161 $('oobe').className = nextStepId; | 165 $('oobe').className = nextStepId; |
162 }, | 166 }, |
163 | 167 |
164 /** | 168 /** |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 */ | 391 */ |
388 DisplayManager.setLabelText = function(labelId, labelText) { | 392 DisplayManager.setLabelText = function(labelId, labelText) { |
389 $(labelId).textContent = labelText; | 393 $(labelId).textContent = labelText; |
390 }; | 394 }; |
391 | 395 |
392 // Export | 396 // Export |
393 return { | 397 return { |
394 DisplayManager: DisplayManager | 398 DisplayManager: DisplayManager |
395 }; | 399 }; |
396 }); | 400 }); |
OLD | NEW |