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

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

Issue 1115993002: ChromeOS Gaia: SAML password confirmation dialog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update after review 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
(Empty)
1 /* Copyright 2015 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file.
4 */
5
6 Polymer('saml-confirm-password', {
7 onClose: function() {
8 this.disabled = true;
9 this.$.cancelConfirmDlg.toggle();
10 },
11
12 onConfirmCancel: function() {
13 this.fire('cancel');
14 },
15
16 reset: function() {
17 this.$.cancelConfirmDlg.close();
18 this.disabled = false;
19 this.$.closeButton.hidden = false;
20 this.$.animatedPages.selected = 0;
21 this.$.passwordInput.inputValue = '';
22 },
23
24 invalidate: function() {
25 this.$.passwordInput.setValid(false);
26 },
27
28 focus: function() {
29 if (this.$.animatedPages.selected == 0)
30 this.$.passwordInput.focus();
31 },
32
33 set disabled(value) {
34 this.$.confirmPasswordCard.classList.toggle('full-disabled', value);
35 this.$.passwordInput.disabled = value;
36 this.$.closeButton.disabled = value;
37 },
38
39 ready: function() {
40 this.$.cancelConfirmDlg.addEventListener('core-overlay-close-completed',
41 function() {
42 this.disabled = false;
43 }.bind(this));
44 this.$.passwordInput.addEventListener('buttonClick', function() {
45 var inputPassword = this.$.passwordInput.inputValue;
46 this.$.passwordInput.inputValue = '';
47 if (!inputPassword) {
48 this.invalidate();
49 } else {
50 this.$.animatedPages.selected += 1;
51 this.$.closeButton.hidden = true;
52 this.fire('passwordEnter', {password: inputPassword});
53 }
54 }.bind(this))}
55 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698