| 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('options', function() { | 5 cr.define('options', function() { |
| 6 var OptionsPage = options.OptionsPage; | 6 var OptionsPage = options.OptionsPage; |
| 7 var ArrayDataModel = cr.ui.ArrayDataModel; | 7 var ArrayDataModel = cr.ui.ArrayDataModel; |
| 8 | 8 |
| 9 const localStrings = new LocalStrings(); | 9 const localStrings = new LocalStrings(); |
| 10 | 10 |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 * Hide the error bubble. | 158 * Hide the error bubble. |
| 159 * @private | 159 * @private |
| 160 */ | 160 */ |
| 161 hideErrorBubble_: function() { | 161 hideErrorBubble_: function() { |
| 162 $('manage-profile-error-bubble').hidden = true; | 162 $('manage-profile-error-bubble').hidden = true; |
| 163 $('manage-profile-ok').disabled = false; | 163 $('manage-profile-ok').disabled = false; |
| 164 }, | 164 }, |
| 165 | 165 |
| 166 /** | 166 /** |
| 167 * oninput callback for <input> field. | 167 * oninput callback for <input> field. |
| 168 * @param event The event object | 168 * @param {Event} event The event object. |
| 169 * @private | 169 * @private |
| 170 */ | 170 */ |
| 171 onNameChanged_: function(event) { | 171 onNameChanged_: function(event) { |
| 172 var newName = event.target.value; | 172 var newName = event.target.value; |
| 173 var oldName = this.profileInfo_.name; | 173 var oldName = this.profileInfo_.name; |
| 174 | 174 |
| 175 if (newName == oldName) { | 175 if (newName == oldName) { |
| 176 this.hideErrorBubble_(); | 176 this.hideErrorBubble_(); |
| 177 } else if (this.profileNames_[newName] != undefined) { | 177 } else if (this.profileNames_[newName] != undefined) { |
| 178 this.showErrorBubble_('manageProfilesDuplicateNameError'); | 178 this.showErrorBubble_('manageProfilesDuplicateNameError'); |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 var instance = ManageProfileOverlay.getInstance(); | 257 var instance = ManageProfileOverlay.getInstance(); |
| 258 return instance[name + '_'].apply(instance, arguments); | 258 return instance[name + '_'].apply(instance, arguments); |
| 259 }; | 259 }; |
| 260 }); | 260 }); |
| 261 | 261 |
| 262 // Export | 262 // Export |
| 263 return { | 263 return { |
| 264 ManageProfileOverlay: ManageProfileOverlay | 264 ManageProfileOverlay: ManageProfileOverlay |
| 265 }; | 265 }; |
| 266 }); | 266 }); |
| OLD | NEW |