| 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. |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 * @param {string} text The text of the cell. | 320 * @param {string} text The text of the cell. |
| 321 * @return {HTMLElement} The HTML element for the cell. | 321 * @return {HTMLElement} The HTML element for the cell. |
| 322 * @private | 322 * @private |
| 323 */ | 323 */ |
| 324 createEditableTextCell: function(text) { | 324 createEditableTextCell: function(text) { |
| 325 var container = /** @type {HTMLElement} */( | 325 var container = /** @type {HTMLElement} */( |
| 326 this.ownerDocument.createElement('div')); | 326 this.ownerDocument.createElement('div')); |
| 327 var textEl = null; | 327 var textEl = null; |
| 328 if (!this.isPlaceholder) { | 328 if (!this.isPlaceholder) { |
| 329 textEl = this.ownerDocument.createElement('div'); | 329 textEl = this.ownerDocument.createElement('div'); |
| 330 textEl.className = 'static-text'; | 330 textEl.className = 'static-text overruleable'; |
| 331 textEl.textContent = text; | 331 textEl.textContent = text; |
| 332 textEl.setAttribute('displaymode', 'static'); | 332 textEl.setAttribute('displaymode', 'static'); |
| 333 container.appendChild(textEl); | 333 container.appendChild(textEl); |
| 334 } | 334 } |
| 335 | 335 |
| 336 var inputEl = this.ownerDocument.createElement('input'); | 336 var inputEl = this.ownerDocument.createElement('input'); |
| 337 inputEl.type = 'text'; | 337 inputEl.type = 'text'; |
| 338 inputEl.value = text; | 338 inputEl.value = text; |
| 339 if (!this.isPlaceholder) | 339 if (!this.isPlaceholder) |
| 340 inputEl.setAttribute('displaymode', 'edit'); | 340 inputEl.setAttribute('displaymode', 'edit'); |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 765 this.getListItemByIndex(0)); | 765 this.getListItemByIndex(0)); |
| 766 }, | 766 }, |
| 767 }; | 767 }; |
| 768 | 768 |
| 769 // Export | 769 // Export |
| 770 return { | 770 return { |
| 771 InlineEditableItem: InlineEditableItem, | 771 InlineEditableItem: InlineEditableItem, |
| 772 InlineEditableItemList: InlineEditableItemList, | 772 InlineEditableItemList: InlineEditableItemList, |
| 773 }; | 773 }; |
| 774 }); | 774 }); |
| OLD | NEW |