Re-organized column header popup menu.
git-svn-id: http://google-refine.googlecode.com/svn/trunk@109 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
parent
6c7557eeff
commit
acb0c91306
@ -30,9 +30,8 @@ DataTableColumnHeaderUI.prototype._createMenuForColumnHeader = function(elmt) {
|
|||||||
self = this;
|
self = this;
|
||||||
MenuSystem.createAndShowStandardMenu([
|
MenuSystem.createAndShowStandardMenu([
|
||||||
{
|
{
|
||||||
label: "Edit",
|
label: "Edit Cells",
|
||||||
submenu: [
|
submenu: [
|
||||||
{ "heading" : "Cell Content Transformations" },
|
|
||||||
{
|
{
|
||||||
label: "To Titlecase",
|
label: "To Titlecase",
|
||||||
click: function() { self._doTextTransform("toTitlecase(value)"); }
|
click: function() { self._doTextTransform("toTitlecase(value)"); }
|
||||||
@ -45,12 +44,24 @@ DataTableColumnHeaderUI.prototype._createMenuForColumnHeader = function(elmt) {
|
|||||||
label: "To Lowercase",
|
label: "To Lowercase",
|
||||||
click: function() { self._doTextTransform("toLowercase(value)"); }
|
click: function() { self._doTextTransform("toLowercase(value)"); }
|
||||||
},
|
},
|
||||||
{},
|
|
||||||
{
|
{
|
||||||
label: "Custom Expression ...",
|
label: "Custom Transform ...",
|
||||||
click: function() { self._doTextTransformPrompt(); }
|
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 ...",
|
label: "Add Column Based on This Column ...",
|
||||||
click: function() { self._doAddColumn("value"); }
|
click: function() { self._doAddColumn("value"); }
|
||||||
@ -59,17 +70,9 @@ DataTableColumnHeaderUI.prototype._createMenuForColumnHeader = function(elmt) {
|
|||||||
label: "Remove This Column",
|
label: "Remove This Column",
|
||||||
click: function() { self._doRemoveColumn(); }
|
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",
|
label: "Filter",
|
||||||
tooltip: "Filter rows by this column's cell content or characteristics",
|
tooltip: "Filter rows by this column's cell content or characteristics",
|
||||||
@ -458,7 +461,7 @@ DataTableColumnHeaderUI.prototype._doJoinMultiValueCells = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
DataTableColumnHeaderUI.prototype._doSplitMultiValueCells = 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) {
|
if (separator != null) {
|
||||||
this._dataTableView.doPostThenUpdate(
|
this._dataTableView.doPostThenUpdate(
|
||||||
"split-multi-value-cells",
|
"split-multi-value-cells",
|
||||||
|
Loading…
Reference in New Issue
Block a user