Changeset 162931 in webkit
- Timestamp:
- Jan 28, 2014, 7:40:29 AM (12 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r162874 r162931 1 2014-01-28 Diego Pino Garcia <dpino@igalia.com> 2 3 Web Inspector: In a DataGrid, store value of columnIdentifier to DOM node representing a cell 4 https://bugs.webkit.org/show_bug.cgi?id=127613 5 6 Reviewed by Timothy Hatcher. 7 8 * UserInterface/DOMStorageContentView.js: 9 (WebInspector.DOMStorageContentView.prototype._editingCallback): 10 * UserInterface/DataGrid.js: 11 (WebInspector.DataGrid): 12 (WebInspector.DataGrid.prototype._keyDown): 13 (WebInspector.DataGrid.prototype._contextMenuInDataTable): 14 (WebInspector.DataGridNode.prototype.createCell): 15 1 16 2014-01-27 Joseph Pecoraro <pecoraro@apple.com> 2 17 -
trunk/Source/WebInspectorUI/UserInterface/DOMStorageContentView.js
r157269 r162931 216 216 { 217 217 var domStorage = this.representedObject; 218 if (columnIdentifier === 0) {218 if (columnIdentifier === "0") { 219 219 if (oldText) 220 220 domStorage.removeItem(oldText); -
trunk/Source/WebInspectorUI/UserInterface/DataGrid.js
r162416 r162931 154 154 var td = document.createElement("td"); 155 155 td.className = columnIdentifier + "-column"; 156 td.__columnIdentifier = columnIdentifier; 156 157 var group = this.groups[columnIdentifier]; 157 158 if (group) … … 344 345 // Not needed yet since only editable DataGrid is DOM Storage, which is Key - Value. 345 346 346 // FIXME: Better way to do this than regular expressions? 347 var columnIdentifier = parseInt(element.className.match(/\b(\d+)-column\b/)[1], 10); 347 var columnIdentifier = element.__columnIdentifier; 348 348 349 349 var textBeforeEditing = this._editingNode.data[columnIdentifier] || ""; … … 902 902 if (this._editCallback) { 903 903 handled = true; 904 // The first child of the selected element is the <td class="0-column">,905 // and that's what we want to edit.906 904 this._startEditing(this.selectedNode._element.children[0]); 907 905 } … … 1138 1136 else { 1139 1137 var element = event.target.enclosingNodeOrSelfWithNodeName("td"); 1140 var columnIdentifier = parseInt(element.className.match(/\b(\d+)-column\b/)[1], 10);1138 var columnIdentifier = element.__columnIdentifier; 1141 1139 var columnTitle = this.dataGrid.columns[columnIdentifier].title; 1142 1140 contextMenu.appendItem(WebInspector.UIString("Edit ā%sā").format(columnTitle), this._startEditing.bind(this, event.target)); … … 1519 1517 var cell = document.createElement("td"); 1520 1518 cell.className = columnIdentifier + "-column"; 1519 cell.__columnIdentifier = columnIdentifier; 1521 1520 1522 1521 var alignment = this.dataGrid.aligned[columnIdentifier];
Note:
See TracChangeset
for help on using the changeset viewer.