| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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.dialogs', function() { | 5 cr.define('cr.ui.dialogs', function() { |
| 6 | 6 |
| 7 function BaseDialog(parentNode) { | 7 function BaseDialog(parentNode) { |
| 8 this.parentNode_ = parentNode; | 8 this.parentNode_ = parentNode; |
| 9 this.document_ = parentNode.ownerDocument; | 9 this.document_ = parentNode.ownerDocument; |
| 10 | 10 |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 onShow(); | 194 onShow(); |
| 195 }, BaseDialog.ANIMATE_STABLE_DURATION); | 195 }, BaseDialog.ANIMATE_STABLE_DURATION); |
| 196 }, 0); | 196 }, 0); |
| 197 }; | 197 }; |
| 198 | 198 |
| 199 BaseDialog.prototype.hide = function(onHide) { | 199 BaseDialog.prototype.hide = function(onHide) { |
| 200 // Restore focusability. | 200 // Restore focusability. |
| 201 for (var i = 0; i < this.deactivatedNodes_.length; i++) { | 201 for (var i = 0; i < this.deactivatedNodes_.length; i++) { |
| 202 var node = this.deactivatedNodes_[i]; | 202 var node = this.deactivatedNodes_[i]; |
| 203 if (this.tabIndexes_[i] === null) | 203 if (this.tabIndexes_[i] === null) |
| 204 node.removeAttribute('tabidex'); | 204 node.removeAttribute('tabindex'); |
| 205 else | 205 else |
| 206 node.setAttribute('tabindex', this.tabIndexes_[i]); | 206 node.setAttribute('tabindex', this.tabIndexes_[i]); |
| 207 } | 207 } |
| 208 this.deactivatedNodes_ = null; | 208 this.deactivatedNodes_ = null; |
| 209 this.tabIndexes_ = null; | 209 this.tabIndexes_ = null; |
| 210 | 210 |
| 211 // Note that we control the opacity of the *container*, but the top/left | 211 // Note that we control the opacity of the *container*, but the top/left |
| 212 // of the *frame*. | 212 // of the *frame*. |
| 213 this.container_.classList.remove('shown'); | 213 this.container_.classList.remove('shown'); |
| 214 | 214 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 this.onOk_(this.getValue()); | 293 this.onOk_(this.getValue()); |
| 294 }; | 294 }; |
| 295 | 295 |
| 296 return { | 296 return { |
| 297 BaseDialog: BaseDialog, | 297 BaseDialog: BaseDialog, |
| 298 AlertDialog: AlertDialog, | 298 AlertDialog: AlertDialog, |
| 299 ConfirmDialog: ConfirmDialog, | 299 ConfirmDialog: ConfirmDialog, |
| 300 PromptDialog: PromptDialog | 300 PromptDialog: PromptDialog |
| 301 }; | 301 }; |
| 302 }); | 302 }); |
| OLD | NEW |