Various recon commands in the UI were not updated to work with the refactored backend.
git-svn-id: http://google-refine.googlecode.com/svn/trunk@1054 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
parent
2e3984d54a
commit
04d32746d8
@ -207,47 +207,55 @@ DataTableCellUI.prototype._doMatchNewTopicToOneCell = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
DataTableCellUI.prototype._doMatchNewTopicToSimilarCells = function() {
|
DataTableCellUI.prototype._doMatchNewTopicToSimilarCells = function() {
|
||||||
this._doJudgmentForSimilarCells("new", { shareNewTopics: true }, true);
|
this._doJudgmentForSimilarCells("new", {}, { shareNewTopics: true }, true);
|
||||||
};
|
};
|
||||||
|
|
||||||
DataTableCellUI.prototype._doMatchTopicToOneCell = function(candidate) {
|
DataTableCellUI.prototype._doMatchTopicToOneCell = function(candidate) {
|
||||||
this._doJudgment("matched", {
|
this._doJudgment("matched", {}, {
|
||||||
topicID : candidate.id,
|
id : candidate.id,
|
||||||
topicGUID: candidate.guid,
|
name: candidate.name,
|
||||||
topicName: candidate.name,
|
|
||||||
score: candidate.score,
|
score: candidate.score,
|
||||||
types: candidate.types.join(",")
|
types: candidate.types.join(",")
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
DataTableCellUI.prototype._doMatchTopicToSimilarCells = function(candidate) {
|
DataTableCellUI.prototype._doMatchTopicToSimilarCells = function(candidate) {
|
||||||
this._doJudgmentForSimilarCells("matched", {
|
this._doJudgmentForSimilarCells("matched", {}, {
|
||||||
topicID : candidate.id,
|
id : candidate.id,
|
||||||
topicGUID: candidate.guid,
|
name: candidate.name,
|
||||||
topicName: candidate.name,
|
|
||||||
score: candidate.score,
|
score: candidate.score,
|
||||||
types: candidate.types.join(",")
|
types: candidate.types.join(",")
|
||||||
}, true);
|
}, true);
|
||||||
};
|
};
|
||||||
|
|
||||||
DataTableCellUI.prototype._doJudgment = function(judgment, params) {
|
DataTableCellUI.prototype._doJudgment = function(judgment, params, bodyParams) {
|
||||||
params = params || {};
|
this._postProcessOneCell(
|
||||||
params.row = this._rowIndex;
|
"recon-judge-one-cell",
|
||||||
params.cell = this._cellIndex;
|
params || {},
|
||||||
params.judgment = judgment;
|
$.extend(bodyParams || {}, {
|
||||||
params.identifierSpace = (this._cell.r) ? this._cell.r.identifierSpace : null;
|
row: this._rowIndex,
|
||||||
params.schemaSpace = (this._cell.r) ? this._cell.r.schemaSpace : null;
|
cell: this._cellIndex,
|
||||||
this._postProcessOneCell("recon-judge-one-cell", params, true);
|
judgment: judgment,
|
||||||
|
identifierSpace: (this._cell.r) ? this._cell.r.identifierSpace : null,
|
||||||
|
schemaSpace: (this._cell.r) ? this._cell.r.schemaSpace : null
|
||||||
|
}),
|
||||||
|
true
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
DataTableCellUI.prototype._doJudgmentForSimilarCells = function(judgment, params) {
|
DataTableCellUI.prototype._doJudgmentForSimilarCells = function(judgment, params, bodyParams) {
|
||||||
params = params || {};
|
this._postProcessSeveralCells(
|
||||||
params.columnName = Gridworks.cellIndexToColumn(this._cellIndex).name;
|
"recon-judge-similar-cells",
|
||||||
params.similarValue = this._cell.v;
|
params || {},
|
||||||
params.judgment = judgment;
|
$.extend(bodyParams || {}, {
|
||||||
params.identifierSpace = (this._cell.r) ? this._cell.r.identifierSpace : null;
|
columnName: Gridworks.cellIndexToColumn(this._cellIndex).name,
|
||||||
params.schemaSpace = (this._cell.r) ? this._cell.r.schemaSpace : null;
|
similarValue: this._cell.v,
|
||||||
this._postProcessSeveralCells("recon-judge-similar-cells", params, true);
|
judgment: judgment,
|
||||||
|
identifierSpace: (this._cell.r) ? this._cell.r.identifierSpace : null,
|
||||||
|
schemaSpace: (this._cell.r) ? this._cell.r.schemaSpace : null
|
||||||
|
}),
|
||||||
|
true
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
DataTableCellUI.prototype._searchForMatch = function(suggestOptions) {
|
DataTableCellUI.prototype._searchForMatch = function(suggestOptions) {
|
||||||
@ -287,12 +295,12 @@ DataTableCellUI.prototype._searchForMatch = function(suggestOptions) {
|
|||||||
params.similarValue = self._cell.v;
|
params.similarValue = self._cell.v;
|
||||||
params.columnName = Gridworks.cellIndexToColumn(self._cellIndex).name;
|
params.columnName = Gridworks.cellIndexToColumn(self._cellIndex).name;
|
||||||
|
|
||||||
self._postProcessSeveralCells("recon-judge-similar-cells", params, true);
|
self._postProcessSeveralCells("recon-judge-similar-cells", {}, params, true);
|
||||||
} else {
|
} else {
|
||||||
params.row = self._rowIndex;
|
params.row = self._rowIndex;
|
||||||
params.cell = self._cellIndex;
|
params.cell = self._cellIndex;
|
||||||
|
|
||||||
self._postProcessOneCell("recon-judge-one-cell", params, true);
|
self._postProcessOneCell("recon-judge-one-cell", {}, params, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
DialogSystem.dismissUntil(level - 1);
|
DialogSystem.dismissUntil(level - 1);
|
||||||
@ -319,13 +327,13 @@ DataTableCellUI.prototype._searchForMatch = function(suggestOptions) {
|
|||||||
.data("suggest").textchange();
|
.data("suggest").textchange();
|
||||||
};
|
};
|
||||||
|
|
||||||
DataTableCellUI.prototype._postProcessOneCell = function(command, params, columnStatsChanged) {
|
DataTableCellUI.prototype._postProcessOneCell = function(command, params, bodyParams, columnStatsChanged) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
Gridworks.postProcess(
|
Gridworks.postProcess(
|
||||||
command,
|
command,
|
||||||
params,
|
params,
|
||||||
null,
|
bodyParams,
|
||||||
{ columnStatsChanged: columnStatsChanged },
|
{ columnStatsChanged: columnStatsChanged },
|
||||||
{
|
{
|
||||||
onDone: function(o) {
|
onDone: function(o) {
|
||||||
@ -342,11 +350,11 @@ DataTableCellUI.prototype._postProcessOneCell = function(command, params, column
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
DataTableCellUI.prototype._postProcessSeveralCells = function(command, params, columnStatsChanged) {
|
DataTableCellUI.prototype._postProcessSeveralCells = function(command, params, bodyParams, columnStatsChanged) {
|
||||||
Gridworks.postProcess(
|
Gridworks.postProcess(
|
||||||
command,
|
command,
|
||||||
params,
|
params,
|
||||||
null,
|
bodyParams,
|
||||||
{ cellsChanged: true, columnStatsChanged: columnStatsChanged }
|
{ cellsChanged: true, columnStatsChanged: columnStatsChanged }
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user