Merge pull request #4 from OpenRefine/master
Range check column move. Delete dead code. Fixes #602
This commit is contained in:
commit
e0f16dede9
@ -70,15 +70,6 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
var o = DataTableView.sampleVisibleRows(column);
|
|
||||||
var previewWidget = new ExpressionPreviewDialog.Widget(
|
|
||||||
elmts,
|
|
||||||
column.cellIndex,
|
|
||||||
o.rowIndices,
|
|
||||||
o.values,
|
|
||||||
null
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var doAddColumnByFetchingURLs = function() {
|
var doAddColumnByFetchingURLs = function() {
|
||||||
@ -115,15 +106,6 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
|
|||||||
);
|
);
|
||||||
dismiss();
|
dismiss();
|
||||||
});
|
});
|
||||||
|
|
||||||
var o = DataTableView.sampleVisibleRows(column);
|
|
||||||
var previewWidget = new ExpressionPreviewDialog.Widget(
|
|
||||||
elmts,
|
|
||||||
column.cellIndex,
|
|
||||||
o.rowIndices,
|
|
||||||
o.values,
|
|
||||||
null
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var doRemoveColumn = function() {
|
var doRemoveColumn = function() {
|
||||||
@ -165,15 +147,18 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
var doMoveColumnBy = function(change) {
|
var doMoveColumnBy = function(change) {
|
||||||
|
var newidx = Refine.columnNameToColumnIndex(column.name) + change;
|
||||||
|
if (newidx > 0 && newidx < Refine.columnNameToColumnIndex(column.name)) {
|
||||||
Refine.postCoreProcess(
|
Refine.postCoreProcess(
|
||||||
"move-column",
|
"move-column",
|
||||||
{
|
{
|
||||||
columnName: column.name,
|
columnName: column.name,
|
||||||
index: Refine.columnNameToColumnIndex(column.name) + change
|
index: newidx
|
||||||
},
|
},
|
||||||
null,
|
null,
|
||||||
{ modelsChanged: true }
|
{ modelsChanged: true }
|
||||||
);
|
);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var doSplitColumn = function() {
|
var doSplitColumn = function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user