| OLD | NEW |
| 1 // Copyright (c) 2011 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 const DeletableItem = options.DeletableItem; | 6 const DeletableItem = options.DeletableItem; |
| 7 const DeletableItemList = options.DeletableItemList; | 7 const DeletableItemList = options.DeletableItemList; |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * Creates a new list item with support for inline editing. | 10 * Creates a new list item with support for inline editing. |
| 11 * @constructor | 11 * @constructor |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 if (leadItem) { | 392 if (leadItem) { |
| 393 if (e.newValue) | 393 if (e.newValue) |
| 394 leadItem.updateEditState(); | 394 leadItem.updateEditState(); |
| 395 else | 395 else |
| 396 leadItem.editing = false; | 396 leadItem.editing = false; |
| 397 } | 397 } |
| 398 }, | 398 }, |
| 399 | 399 |
| 400 /** | 400 /** |
| 401 * May be overridden by subclasses to disable focusing the placeholder. | 401 * May be overridden by subclasses to disable focusing the placeholder. |
| 402 * @return true if the placeholder element should be focused on edit commit. | 402 * @return {boolean} True if the placeholder element should be focused on |
| 403 * edit commit. |
| 403 */ | 404 */ |
| 404 shouldFocusPlaceholder: function() { | 405 shouldFocusPlaceholder: function() { |
| 405 return true; | 406 return true; |
| 406 }, | 407 }, |
| 407 }; | 408 }; |
| 408 | 409 |
| 409 // Export | 410 // Export |
| 410 return { | 411 return { |
| 411 InlineEditableItem: InlineEditableItem, | 412 InlineEditableItem: InlineEditableItem, |
| 412 InlineEditableItemList: InlineEditableItemList, | 413 InlineEditableItemList: InlineEditableItemList, |
| 413 }; | 414 }; |
| 414 }); | 415 }); |
| OLD | NEW |