Title: [152979] trunk/Source/WebInspectorUI
Revision
152979
Author
[email protected]
Date
2013-07-22 10:05:51 -0700 (Mon, 22 Jul 2013)

Log Message

Web Inspector: When right-clicking on a DataGrid column, show editing
menu option as "Edit <columnName>" instead of just "Edit"
https://bugs.webkit.org/show_bug.cgi?id=118970

Patch by Diego Pino Garcia <[email protected]> on 2013-07-22
Reviewed by Timothy Hatcher.

* Localizations/en.lproj/localizedStrings.js: Add literal "Edit '%s'"
* UserInterface/DataGrid.js: Change "Edit" for "Edit <columnTitle>"
(WebInspector.DataGrid.prototype._contextMenuInDataTable):

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (152978 => 152979)


--- trunk/Source/WebInspectorUI/ChangeLog	2013-07-22 17:04:50 UTC (rev 152978)
+++ trunk/Source/WebInspectorUI/ChangeLog	2013-07-22 17:05:51 UTC (rev 152979)
@@ -1,3 +1,15 @@
+2013-07-22  Diego Pino Garcia  <[email protected]>
+
+        Web Inspector: When right-clicking on a DataGrid column, show editing 
+        menu option as "Edit <columnName>" instead of just "Edit"
+        https://bugs.webkit.org/show_bug.cgi?id=118970
+
+        Reviewed by Timothy Hatcher.
+
+        * Localizations/en.lproj/localizedStrings.js: Add literal "Edit '%s'"
+        * UserInterface/DataGrid.js: Change "Edit" for "Edit <columnTitle>"
+        (WebInspector.DataGrid.prototype._contextMenuInDataTable):
+
 2013-07-21  Seokju Kwon  <[email protected]>
 
         Web Inspector: Cleanup InspectorFrontendHostStub.js

Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (152978 => 152979)


--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2013-07-22 17:04:50 UTC (rev 152978)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2013-07-22 17:05:51 UTC (rev 152979)
@@ -115,11 +115,11 @@
 localizedStrings["Domain"] = "Domain";
 localizedStrings["Done"] = "Done";
 localizedStrings["Duration"] = "Duration";
-localizedStrings["Edit"] = "Edit";
 localizedStrings["Edit Attribute"] = "Edit Attribute";
 localizedStrings["Edit Breakpoint &"] = "Edit Breakpoint &";
 localizedStrings["Edit Text"] = "Edit Text";
 localizedStrings["Edit as HTML"] = "Edit as HTML";
+localizedStrings["Edit  %s "] = "Edit  %s ";
 localizedStrings["Element"] = "Element";
 localizedStrings["Element clips compositing descendants"] = "Element clips compositing descendants";
 localizedStrings["Element establishes a stacking context"] = "Element establishes a stacking context";

Modified: trunk/Source/WebInspectorUI/UserInterface/DataGrid.js (152978 => 152979)


--- trunk/Source/WebInspectorUI/UserInterface/DataGrid.js	2013-07-22 17:04:50 UTC (rev 152978)
+++ trunk/Source/WebInspectorUI/UserInterface/DataGrid.js	2013-07-22 17:05:51 UTC (rev 152979)
@@ -1114,12 +1114,15 @@
         if (gridNode && gridNode.selectable && !gridNode.isEventWithinDisclosureTriangle(event)) {
             contextMenu.appendItem(WebInspector.UIString("Copy Row"), this._copyRow.bind(this, event.target));
 
-            // FIXME: Use the column names for Editing, instead of just "Edit".
             if (this.dataGrid._editCallback) {
                 if (gridNode === this.creationNode)
                     contextMenu.appendItem(WebInspector.UIString("Add New"), this._startEditing.bind(this, event.target));
-                else
-                    contextMenu.appendItem(WebInspector.UIString("Edit"), this._startEditing.bind(this, event.target));
+                else {
+                    var element = event.target.enclosingNodeOrSelfWithNodeName("td");
+                    var columnIdentifier = parseInt(element.className.match(/\b(\d+)-column\b/)[1], 10);
+                    var columnTitle = this.dataGrid.columns[columnIdentifier].title;
+                    contextMenu.appendItem(WebInspector.UIString("Edit ā€œ%sā€").format(columnTitle), this._startEditing.bind(this, event.target));
+                }
             }
             if (this.dataGrid._deleteCallback && gridNode !== this.creationNode)
                 contextMenu.appendItem(WebInspector.UIString("Delete"), this._deleteCallback.bind(this, gridNode));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to