| 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 'user-manager-dialog' is a modal dialog for the user manager. | 6 * @fileoverview 'user-manager-dialog' is a modal dialog for the user manager. |
| 7 */ | 7 */ |
| 8 Polymer({ | 8 Polymer({ |
| 9 is: 'user-manager-dialog', | 9 is: 'user-manager-dialog', |
| 10 | 10 |
| 11 behaviors: [Polymer.PaperDialogBehavior], | 11 behaviors: [Polymer.PaperDialogBehavior], |
| 12 | 12 |
| 13 properties: { | 13 properties: { |
| 14 /** @override */ | 14 /** @override */ |
| 15 noCancelOnOutsideClick: { | 15 noCancelOnOutsideClick: {type: Boolean, value: true}, |
| 16 type: Boolean, | |
| 17 value: true | |
| 18 }, | |
| 19 | 16 |
| 20 /** @override */ | 17 /** @override */ |
| 21 withBackdrop: { | 18 withBackdrop: {type: Boolean, value: true}, |
| 22 type: Boolean, | |
| 23 value: true | |
| 24 }, | |
| 25 | 19 |
| 26 /** | 20 /** |
| 27 * The first node that can receive focus. | 21 * The first node that can receive focus. |
| 28 * @type {!Node} | 22 * @type {!Node} |
| 29 */ | 23 */ |
| 30 firstFocusableNode: { | 24 firstFocusableNode: { |
| 31 type: Object, | 25 type: Object, |
| 32 value: function() { return this.$.close; }, | 26 value: function() { |
| 27 return this.$.close; |
| 28 }, |
| 33 observer: 'firstFocusableNodeChanged_' | 29 observer: 'firstFocusableNodeChanged_' |
| 34 }, | 30 }, |
| 35 | 31 |
| 36 /** | 32 /** |
| 37 * The last node that can receive focus. | 33 * The last node that can receive focus. |
| 38 * @type {!Node} | 34 * @type {!Node} |
| 39 */ | 35 */ |
| 40 lastFocusableNode: { | 36 lastFocusableNode: { |
| 41 type: Object, | 37 type: Object, |
| 42 value: function() { return this.$.close; }, | 38 value: function() { |
| 39 return this.$.close; |
| 40 }, |
| 43 observer: 'lastFocusableNodeChanged_' | 41 observer: 'lastFocusableNodeChanged_' |
| 44 } | 42 } |
| 45 }, | 43 }, |
| 46 | 44 |
| 47 /** | 45 /** |
| 48 * Returns the first and the last focusable elements in order to wrap the | 46 * Returns the first and the last focusable elements in order to wrap the |
| 49 * focus for the dialog in Polymer.PaperDialogBehavior. | 47 * focus for the dialog in Polymer.PaperDialogBehavior. |
| 50 * @override | 48 * @override |
| 51 * @type {!Array<!Node>} | 49 * @type {!Array<!Node>} |
| 52 */ | 50 */ |
| (...skipping 10 matching lines...) Expand all Loading... |
| 63 }, | 61 }, |
| 64 | 62 |
| 65 /** | 63 /** |
| 66 * Observer for lastFocusableNodeChanged_. Updates __lastFocusableNode in | 64 * Observer for lastFocusableNodeChanged_. Updates __lastFocusableNode in |
| 67 * Polymer.PaperDialogBehavior. | 65 * Polymer.PaperDialogBehavior. |
| 68 */ | 66 */ |
| 69 lastFocusableNodeChanged_: function(newValue) { | 67 lastFocusableNodeChanged_: function(newValue) { |
| 70 this.__lastFocusableNode = newValue; | 68 this.__lastFocusableNode = newValue; |
| 71 } | 69 } |
| 72 }); | 70 }); |
| OLD | NEW |