From c56a5781661e2ad72841ef1679c1e01444ddc1d8 Mon Sep 17 00:00:00 2001 From: David Huynh Date: Thu, 29 Apr 2010 00:54:48 +0000 Subject: [PATCH] When editing a facet choice inside a facet, still apply constraints from all the other facets to restrict the effect of the change. git-svn-id: http://google-refine.googlecode.com/svn/trunk@567 7d457c2a-affb-35e4-300a-418c747d4874 --- src/main/webapp/scripts/facets/list-facet.js | 3 ++- src/main/webapp/scripts/project.js | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/scripts/facets/list-facet.js b/src/main/webapp/scripts/facets/list-facet.js index 83bc804c5..f81ab9983 100644 --- a/src/main/webapp/scripts/facets/list-facet.js +++ b/src/main/webapp/scripts/facets/list-facet.js @@ -395,7 +395,8 @@ ListFacet.prototype._editChoice = function(choice, choiceDiv) { }]) }, { - includeEngine: false, // we're really changing all rows, not just the visible ones + // limit edits to rows constrained only by the other facets + engineConfig: ui.browsingEngine.getJSON(false, self), cellsChanged: true }, { diff --git a/src/main/webapp/scripts/project.js b/src/main/webapp/scripts/project.js index 9208bb3b3..4f5b34411 100644 --- a/src/main/webapp/scripts/project.js +++ b/src/main/webapp/scripts/project.js @@ -205,7 +205,11 @@ Gridworks.postProcess = function(command, params, body, updateOptions, callbacks body = body || {}; if (!("includeEngine" in updateOptions) || updateOptions.includeEngine) { - body.engine = JSON.stringify(ui.browsingEngine.getJSON()); + body.engine = JSON.stringify( + "engineConfig" in updateOptions ? + updateOptions.engineConfig : + ui.browsingEngine.getJSON() + ); } var done = false;