From acb0c91306ee65ed11e201666edf33b38209ed57 Mon Sep 17 00:00:00 2001 From: David Huynh Date: Fri, 19 Feb 2010 17:55:46 +0000 Subject: [PATCH] Re-organized column header popup menu. git-svn-id: http://google-refine.googlecode.com/svn/trunk@109 7d457c2a-affb-35e4-300a-418c747d4874 --- .../project/data-table-column-header-ui.js | 33 ++++++++++--------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/src/main/webapp/scripts/project/data-table-column-header-ui.js b/src/main/webapp/scripts/project/data-table-column-header-ui.js index 5af49e111..efb70d5fc 100644 --- a/src/main/webapp/scripts/project/data-table-column-header-ui.js +++ b/src/main/webapp/scripts/project/data-table-column-header-ui.js @@ -30,9 +30,8 @@ DataTableColumnHeaderUI.prototype._createMenuForColumnHeader = function(elmt) { self = this; MenuSystem.createAndShowStandardMenu([ { - label: "Edit", + label: "Edit Cells", submenu: [ - { "heading" : "Cell Content Transformations" }, { label: "To Titlecase", click: function() { self._doTextTransform("toTitlecase(value)"); } @@ -45,12 +44,24 @@ DataTableColumnHeaderUI.prototype._createMenuForColumnHeader = function(elmt) { label: "To Lowercase", click: function() { self._doTextTransform("toLowercase(value)"); } }, - {}, { - label: "Custom Expression ...", + label: "Custom Transform ...", click: function() { self._doTextTransformPrompt(); } }, - { "heading" : "Column Operations" }, + {}, + { + label: "Split Multi-Valued Cells ...", + click: function() { self._doSplitMultiValueCells(); } + }, + { + label: "Join Multi-Valued Cells ...", + click: function() { self._doJoinMultiValueCells(); } + } + ] + }, + { + label: "Edit Column", + submenu: [ { label: "Add Column Based on This Column ...", click: function() { self._doAddColumn("value"); } @@ -59,17 +70,9 @@ DataTableColumnHeaderUI.prototype._createMenuForColumnHeader = function(elmt) { label: "Remove This Column", click: function() { self._doRemoveColumn(); } }, - { "heading" : "Advanced Transformations" }, - { - label: "Split Multi-Value Cells ...", - click: function() { self._doSplitMultiValueCells(); } - }, - { - label: "Join Multi-Value Cells ...", - click: function() { self._doJoinMultiValueCells(); } - } ] }, + {}, { label: "Filter", tooltip: "Filter rows by this column's cell content or characteristics", @@ -458,7 +461,7 @@ DataTableColumnHeaderUI.prototype._doJoinMultiValueCells = function() { }; DataTableColumnHeaderUI.prototype._doSplitMultiValueCells = function() { - var separator = window.prompt("What separator currently separates the values?", ", "); + var separator = window.prompt("What separator currently separates the values?", ","); if (separator != null) { this._dataTableView.doPostThenUpdate( "split-multi-value-cells",