| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 | 6 * @fileoverview |
| 7 * 'create-profile' is a page that contains controls for creating a (optionally | 7 * 'create-profile' is a page that contains controls for creating a (optionally |
| 8 * supervised) profile, including choosing a name, and an avatar. | 8 * supervised) profile, including choosing a name, and an avatar. |
| 9 * | 9 * |
| 10 * @element create-profile | 10 * @element create-profile |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 this.signedInUsers_ = signedInUsers; | 166 this.signedInUsers_ = signedInUsers; |
| 167 this.signedIn_ = signedInUsers.length > 0; | 167 this.signedIn_ = signedInUsers.length > 0; |
| 168 }, | 168 }, |
| 169 | 169 |
| 170 /** | 170 /** |
| 171 * Handler for the |Learn More| button click event. | 171 * Handler for the |Learn More| button click event. |
| 172 * @param {!Event} event | 172 * @param {!Event} event |
| 173 * @private | 173 * @private |
| 174 */ | 174 */ |
| 175 onLearnMore_: function(event) { | 175 onLearnMore_: function(event) { |
| 176 // TODO(mahmadi): fire the event to show the 'learn-more-page' | 176 this.fire('change-page', {page: 'supervised-learn-more-page'}); |
| 177 }, | 177 }, |
| 178 | 178 |
| 179 /** | 179 /** |
| 180 * Handler for the |Ok| button click event. | 180 * Handler for the |Ok| button click event. |
| 181 * @param {!Event} event | 181 * @param {!Event} event |
| 182 * @private | 182 * @private |
| 183 */ | 183 */ |
| 184 onOk_: function(event) { | 184 onOk_: function(event) { |
| 185 this.createInProgress_ = true; | 185 this.createInProgress_ = true; |
| 186 signin.ProfileApi.createProfile( | 186 signin.ProfileApi.createProfile( |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 * Computed binding determining whether supervised user checkbox is disabled. | 270 * Computed binding determining whether supervised user checkbox is disabled. |
| 271 * @param {boolean} createInProgress Is create in progress? | 271 * @param {boolean} createInProgress Is create in progress? |
| 272 * @param {boolean} signedIn Are there any signed-in users? | 272 * @param {boolean} signedIn Are there any signed-in users? |
| 273 * @return {boolean} | 273 * @return {boolean} |
| 274 * @private | 274 * @private |
| 275 */ | 275 */ |
| 276 isSupervisedUserCheckboxDisabled_: function(createInProgress, signedIn) { | 276 isSupervisedUserCheckboxDisabled_: function(createInProgress, signedIn) { |
| 277 return createInProgress || !signedIn; | 277 return createInProgress || !signedIn; |
| 278 } | 278 } |
| 279 }); | 279 }); |
| OLD | NEW |