From 15e715dce4e8777b45cb632993a64dc2a0b1d1a1 Mon Sep 17 00:00:00 2001 From: David Huynh Date: Fri, 15 Oct 2010 04:23:46 +0000 Subject: [PATCH] When "change" is clicked in a facet, and the expression bar is opened, then it should automatically open the dialog box to edit the expression. git-svn-id: http://google-refine.googlecode.com/svn/trunk@1553 7d457c2a-affb-35e4-300a-418c747d4874 --- main/webapp/modules/core/scripts/facets/list-facet.js | 6 +++++- main/webapp/modules/core/scripts/facets/range-facet.js | 6 +++++- main/webapp/modules/core/scripts/facets/timerange-facet.js | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/main/webapp/modules/core/scripts/facets/list-facet.js b/main/webapp/modules/core/scripts/facets/list-facet.js index b4f01f49c..41e5b9342 100644 --- a/main/webapp/modules/core/scripts/facets/list-facet.js +++ b/main/webapp/modules/core/scripts/facets/list-facet.js @@ -142,7 +142,11 @@ ListFacet.prototype._initializeUI = function() { this._elmts.titleSpan.text(this._config.name); this._elmts.changeButton.attr("title","Current Expression: " + this._config.expression).click(function() { - self._elmts.expressionDiv.slideToggle(100); + self._elmts.expressionDiv.slideToggle(100, function() { + if (self._elmts.expressionDiv.css("display") != "none") { + self._editExpression(); + } + }); }); this._elmts.expressionDiv.text(this._config.expression).hide().click(function() { self._editExpression(); }); this._elmts.removeButton.click(function() { self._remove(); }); diff --git a/main/webapp/modules/core/scripts/facets/range-facet.js b/main/webapp/modules/core/scripts/facets/range-facet.js index 44712853c..419005c1a 100644 --- a/main/webapp/modules/core/scripts/facets/range-facet.js +++ b/main/webapp/modules/core/scripts/facets/range-facet.js @@ -121,7 +121,11 @@ RangeFacet.prototype._initializeUI = function() { this._elmts.facetTitle.text(this._config.name); this._elmts.changeButton.attr("title","Current Expression: " + this._config.expression).click(function() { - self._elmts.expressionDiv.slideToggle(100); + self._elmts.expressionDiv.slideToggle(100, function() { + if (self._elmts.expressionDiv.css("display") != "none") { + self._editExpression(); + } + }); }); this._elmts.expressionDiv.text(this._config.expression).click(function() { self._editExpression(); diff --git a/main/webapp/modules/core/scripts/facets/timerange-facet.js b/main/webapp/modules/core/scripts/facets/timerange-facet.js index 2ef1ba1e4..4daecd47e 100644 --- a/main/webapp/modules/core/scripts/facets/timerange-facet.js +++ b/main/webapp/modules/core/scripts/facets/timerange-facet.js @@ -122,7 +122,11 @@ TimeRangeFacet.prototype._initializeUI = function() { this._elmts.facetTitle.text(this._config.name); this._elmts.changeButton.attr("title","Current Expression: " + this._config.expression).click(function() { - self._elmts.expressionDiv.slideToggle(100); + self._elmts.expressionDiv.slideToggle(100, function() { + if (self._elmts.expressionDiv.css("display") != "none") { + self._editExpression(); + } + }); }); this._elmts.expressionDiv.text(this._config.expression).click(function() { self._editExpression();