Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(451)

Side by Side Diff: chrome/browser/resources/chromeos/login/screen_supervised_user_creation.js

Issue 1131683004: Add close button to the supervised user pages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Pavel feedback, and rebase Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 /** 5 /**
6 * @fileoverview Legacy supervised user creation flow screen. 6 * @fileoverview Legacy supervised user creation flow screen.
7 */ 7 */
8 8
9 login.createScreen('SupervisedUserCreationScreen', 9 login.createScreen('SupervisedUserCreationScreen',
10 'supervised-user-creation', function() { 10 'supervised-user-creation', function() {
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 this.getScreenElement('flip-photo').addEventListener( 609 this.getScreenElement('flip-photo').addEventListener(
610 'click', this.handleFlipPhoto_.bind(this)); 610 'click', this.handleFlipPhoto_.bind(this));
611 this.getScreenElement('image-stream-crop').addEventListener( 611 this.getScreenElement('image-stream-crop').addEventListener(
612 'webkitTransitionEnd', function(e) { 612 'webkitTransitionEnd', function(e) {
613 previewElement.classList.remove('animation'); 613 previewElement.classList.remove('animation');
614 }); 614 });
615 this.getScreenElement('image-preview-img').addEventListener( 615 this.getScreenElement('image-preview-img').addEventListener(
616 'webkitTransitionEnd', function(e) { 616 'webkitTransitionEnd', function(e) {
617 previewElement.classList.remove('animation'); 617 previewElement.classList.remove('animation');
618 }); 618 });
619
620 $('supervised-user-creation-close-button-item').addEventListener(
621 'click', function(e) {
622 this.cancel();
623 e.preventDefault();
624 }.bind(this));
619 }, 625 },
620 626
621 buttonIds: [], 627 buttonIds: [],
622 628
623 /** 629 /**
624 * Creates button for adding to controls. 630 * Creates button for adding to controls.
625 * @param {string} buttonId -- id for button, have to be unique within 631 * @param {string} buttonId -- id for button, have to be unique within
626 * screen. Actual id will be prefixed with screen name and appended with 632 * screen. Actual id will be prefixed with screen name and appended with
627 * '-button'. Use getScreenButton(buttonId) to find it later. 633 * '-button'. Use getScreenButton(buttonId) to find it later.
628 * @param {string} i18nPrefix -- screen prefix for i18n values. 634 * @param {string} i18nPrefix -- screen prefix for i18n values.
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
1186 this.getScreenElement('import-link').hidden = true; 1192 this.getScreenElement('import-link').hidden = true;
1187 } else { 1193 } else {
1188 this.getScreenElement('image-grid').stopCamera(); 1194 this.getScreenElement('image-grid').stopCamera();
1189 } 1195 }
1190 if (visiblePage == 'import') { 1196 if (visiblePage == 'import') {
1191 this.getScreenElement('create-link').hidden = false; 1197 this.getScreenElement('create-link').hidden = false;
1192 this.getScreenButton('import').disabled = 1198 this.getScreenButton('import').disabled =
1193 !this.importList_.selectedPod_ || 1199 !this.importList_.selectedPod_ ||
1194 this.importList_.selectedPod_.user.exists; 1200 this.importList_.selectedPod_.user.exists;
1195 } 1201 }
1202 $('supervised-user-creation-close-button-item').hidden =
1203 (visiblePage == 'created');
1204
1196 chrome.send('currentSupervisedUserPage', [this.currentPage_]); 1205 chrome.send('currentSupervisedUserPage', [this.currentPage_]);
1197 }, 1206 },
1198 1207
1199 setButtonDisabledStatus: function(buttonName, status) { 1208 setButtonDisabledStatus: function(buttonName, status) {
1200 var button = $('supervised-user-creation-' + buttonName + '-button'); 1209 var button = $('supervised-user-creation-' + buttonName + '-button');
1201 button.disabled = status; 1210 button.disabled = status;
1202 }, 1211 },
1203 1212
1204 gotItButtonPressed_: function() { 1213 gotItButtonPressed_: function() {
1205 chrome.send('finishLocalSupervisedUserCreation'); 1214 chrome.send('finishLocalSupervisedUserCreation');
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
1586 1595
1587 if (selectedIndex >= 0) 1596 if (selectedIndex >= 0)
1588 this.importList_.selectPod(this.importList_.pods[selectedIndex]); 1597 this.importList_.selectPod(this.importList_.pods[selectedIndex]);
1589 1598
1590 if (this.currentPage_ == 'username') 1599 if (this.currentPage_ == 'username')
1591 this.getScreenElement('import-link').hidden = (userList.length == 0); 1600 this.getScreenElement('import-link').hidden = (userList.length == 0);
1592 }, 1601 },
1593 }; 1602 };
1594 }); 1603 });
1595 1604
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698