Changeset 195966 in webkit
- Timestamp:
- Feb 1, 2016 10:22:37 AM (8 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r195953 r195966 1 2016-02-01 Matt Baker <mattbaker@apple.com> 2 3 Web Inspector: DataGridNode should support adding go-to arrow buttons to any cell 4 https://bugs.webkit.org/show_bug.cgi?id=153733 5 <rdar://problem/24431813> 6 7 Reviewed by Brian Burg. 8 9 Provide a way to add go-to arrow buttons to any grid cell from within a 10 DataGridNode subclass's implementation of createCellContent. 11 12 * UserInterface/Views/DataGrid.js: 13 New event type, GoToArrowClicked. 14 (WebInspector.DataGridNode.prototype.createGoToArrowButton.buttonClicked): 15 (WebInspector.DataGridNode.prototype.createGoToArrowButton): 16 Adds a go-to arrow button to the cell's content element. Clicking the button 17 dispatches an event on the DataGrid, with event data containing the 18 DataGridNode and identifier of the cell containing the arrow button. 19 1 20 2016-01-31 Jeremy Jones <jeremyj@apple.com> 2 21 -
trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js
r195522 r195966 1345 1345 SelectedNodeChanged: "datagrid-selected-node-changed", 1346 1346 ExpandedNode: "datagrid-expanded-node", 1347 CollapsedNode: "datagrid-collapsed-node" 1347 CollapsedNode: "datagrid-collapsed-node", 1348 GoToArrowClicked: "datagrid-go-to-arrow-clicked" 1348 1349 }; 1349 1350 … … 1455 1456 } 1456 1457 1458 createGoToArrowButton(cellElement) 1459 { 1460 function buttonClicked(event) 1461 { 1462 if (this.hidden || !this.revealed) 1463 return; 1464 1465 event.stopPropagation(); 1466 1467 let columnIdentifier = cellElement.__columnIdentifier; 1468 this.dataGrid.dispatchEventToListeners(WebInspector.DataGrid.Event.GoToArrowClicked, {dataGridNode: this, columnIdentifier}); 1469 } 1470 1471 let button = WebInspector.createGoToArrowButton(); 1472 button.addEventListener("click", buttonClicked.bind(this)); 1473 1474 let contentElement = cellElement.firstChild; 1475 contentElement.appendChild(button); 1476 } 1477 1457 1478 refreshIfNeeded() 1458 1479 {
Note: See TracChangeset
for help on using the changeset viewer.