| 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 /** @const */ var DeletableItem = options.DeletableItem; | 6 /** @const */ var DeletableItem = options.DeletableItem; |
| 7 /** @const */ var DeletableItemList = options.DeletableItemList; | 7 /** @const */ var 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 |
| 12 * @extends {options.DeletableListItem} | 12 * @extends {options.DeletableItem} |
| 13 */ | 13 */ |
| 14 function InlineEditableItem() { | 14 function InlineEditableItem() { |
| 15 var el = cr.doc.createElement('div'); | 15 var el = cr.doc.createElement('div'); |
| 16 InlineEditableItem.decorate(el); | 16 InlineEditableItem.decorate(el); |
| 17 return el; | 17 return el; |
| 18 } | 18 } |
| 19 | 19 |
| 20 /** | 20 /** |
| 21 * Decorates an element as a inline-editable list item. Note that this is | 21 * Decorates an element as a inline-editable list item. Note that this is |
| 22 * a subclass of DeletableItem. | 22 * a subclass of DeletableItem. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 /** | 40 /** |
| 41 * Whether or not this is a placeholder for adding a new item. | 41 * Whether or not this is a placeholder for adding a new item. |
| 42 * @type {boolean} | 42 * @type {boolean} |
| 43 * @private | 43 * @private |
| 44 */ | 44 */ |
| 45 isPlaceholder_: false, | 45 isPlaceholder_: false, |
| 46 | 46 |
| 47 /** | 47 /** |
| 48 * Fields associated with edit mode. | 48 * Fields associated with edit mode. |
| 49 * @type {array} | 49 * @type {Array} |
| 50 * @private | 50 * @private |
| 51 */ | 51 */ |
| 52 editFields_: null, | 52 editFields_: null, |
| 53 | 53 |
| 54 /** | 54 /** |
| 55 * Whether or not the current edit should be considered cancelled, rather | 55 * Whether or not the current edit should be considered cancelled, rather |
| 56 * than committed, when editing ends. | 56 * than committed, when editing ends. |
| 57 * @type {boolean} | 57 * @type {boolean} |
| 58 * @private | 58 * @private |
| 59 */ | 59 */ |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 return true; | 450 return true; |
| 451 }, | 451 }, |
| 452 }; | 452 }; |
| 453 | 453 |
| 454 // Export | 454 // Export |
| 455 return { | 455 return { |
| 456 InlineEditableItem: InlineEditableItem, | 456 InlineEditableItem: InlineEditableItem, |
| 457 InlineEditableItemList: InlineEditableItemList, | 457 InlineEditableItemList: InlineEditableItemList, |
| 458 }; | 458 }; |
| 459 }); | 459 }); |
| OLD | NEW |