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 cr.define('cr.ui.login', function() { | 5 cr.define('cr.ui.login', function() { |
| 6 /** | 6 /** |
| 7 * Constructs a slide manager for the user manager tutorial. | 7 * Constructs a slide manager for the user manager tutorial. |
| 8 * | 8 * |
| 9 * @constructor | 9 * @constructor |
| 10 */ | 10 */ |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 97 this.handleAddUserClick_.bind(this)); | 97 this.handleAddUserClick_.bind(this)); |
| 98 } | 98 } |
| 99 }; | 99 }; |
| 100 | 100 |
| 101 /** | 101 /** |
| 102 * Initializes the tutorial manager. | 102 * Initializes the tutorial manager. |
| 103 */ | 103 */ |
| 104 UserManagerTutorial.startTutorial = function() { | 104 UserManagerTutorial.startTutorial = function() { |
| 105 $('user-manager-tutorial').hidden = false; | 105 $('user-manager-tutorial').hidden = false; |
| 106 | 106 |
| 107 // Disable interacting with the pods while the tutorial is showing. | 107 // If there's only one pod, show the slides to the side of the pod. |
| 108 $('pod-row').focusPod(); // No focused pods. | 108 // Otherwise, center the slides and disable interacting with the pods |
| 109 $('inner-container').style.opacity = '0.4'; | 109 // while the tutorial is showing. |
| 110 $('inner-container').style.pointerEvents = 'none'; | 110 if ($('pod-row').pods.length == 1) { |
| 111 $('slide-welcome').classList.add('single-pod'); | |
| 112 $('slide-your-chrome').classList.add('single-pod'); | |
| 113 $('slide-complete').classList.add('single-pod'); | |
| 114 } else { | |
| 115 $('pod-row').focusPod(); // No focused pods. | |
| 116 $('inner-container').style.opacity = '0.4'; | |
|
Nikita (slow)
2014/03/14 17:30:35
nit: Please define a separate CSS class rule and j
noms (inactive)
2014/03/14 18:24:36
Done. Added a style to screen-container.css
On 201
| |
| 117 $('inner-container').style.pointerEvents = 'none'; | |
| 118 } | |
| 111 }; | 119 }; |
| 112 | 120 |
| 113 /** | 121 /** |
| 114 * Initializes the tutorial manager. | 122 * Initializes the tutorial manager. |
| 115 */ | 123 */ |
| 116 UserManagerTutorial.initialize = function() { | 124 UserManagerTutorial.initialize = function() { |
| 117 UserManagerTutorial.getInstance().decorate(); | 125 UserManagerTutorial.getInstance().decorate(); |
| 118 }; | 126 }; |
| 119 | 127 |
| 120 // Export. | 128 // Export. |
| 121 return { | 129 return { |
| 122 UserManagerTutorial: UserManagerTutorial | 130 UserManagerTutorial: UserManagerTutorial |
| 123 }; | 131 }; |
| 124 }); | 132 }); |
| OLD | NEW |