From 1866f9691d633b0d62022b38f4c7fd4d009f6cd5 Mon Sep 17 00:00:00 2001 From: Jacky Date: Fri, 2 Mar 2018 17:09:33 -0500 Subject: [PATCH 01/11] pass the limit as int from javascript --- .../core/scripts/reconciliation/standard-service-panel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/webapp/modules/core/scripts/reconciliation/standard-service-panel.js b/main/webapp/modules/core/scripts/reconciliation/standard-service-panel.js index 72236edf2..ae5ca3d7a 100644 --- a/main/webapp/modules/core/scripts/reconciliation/standard-service-panel.js +++ b/main/webapp/modules/core/scripts/reconciliation/standard-service-panel.js @@ -316,7 +316,7 @@ ReconStandardServicePanel.prototype.start = function() { type: (type) ? { id: type.id, name: type.name } : null, autoMatch: this._elmts.automatchCheck[0].checked, columnDetails: columnDetails, - limit: this._elmts.maxCandidates[0].value + limit: parseInt(this._elmts.maxCandidates[0].value) || 0 }) }, { cellsChanged: true, columnStatsChanged: true } From 8c8b091adce2ec60cb3c61f4c78e426015eca1a3 Mon Sep 17 00:00:00 2001 From: Antonin Delpeuch Date: Sun, 4 Mar 2018 00:47:06 +0000 Subject: [PATCH 02/11] Accept empty string for the limit in a reconciliation config --- .../model/recon/StandardReconConfig.java | 9 +++-- .../google/refine/tests/model/ReconTests.java | 33 ++++++++++++++++++- 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/main/src/com/google/refine/model/recon/StandardReconConfig.java b/main/src/com/google/refine/model/recon/StandardReconConfig.java index f1cb97d3b..07506002f 100644 --- a/main/src/com/google/refine/model/recon/StandardReconConfig.java +++ b/main/src/com/google/refine/model/recon/StandardReconConfig.java @@ -111,8 +111,13 @@ public class StandardReconConfig extends ReconConfig { } JSONObject t = obj.has("type") && !obj.isNull("type") ? obj.getJSONObject("type") : null; - - int limit = obj.has("limit") && !obj.isNull("limit") ? obj.getInt("limit") : 0; + + int limit; + try { + limit = obj.has("limit") && !obj.isNull("limit") ? obj.getInt("limit") : 0; + } catch(JSONException e) { + limit = 0; + } return new StandardReconConfig( obj.getString("service"), diff --git a/main/tests/server/src/com/google/refine/tests/model/ReconTests.java b/main/tests/server/src/com/google/refine/tests/model/ReconTests.java index 5d6466c99..f9a92607c 100644 --- a/main/tests/server/src/com/google/refine/tests/model/ReconTests.java +++ b/main/tests/server/src/com/google/refine/tests/model/ReconTests.java @@ -53,7 +53,7 @@ public class ReconTests extends RefineTest { * @throws Exception */ @Test - public void limitJSONKeyTest() throws Exception { + public void limitJSONKeyAsIntTest() throws Exception { JSONObject obj = new JSONObject( " {\n" + " \"mode\": \"standard-service\",\n" + @@ -74,4 +74,35 @@ public class ReconTests extends RefineTest { // Assert the object is created Assert.assertTrue(config != null); } + + /** + * Regression for issue #1526: + * the UI used to send an empty limit as an empty string, which + * failed to be parsed by the backend. + * @throws Exception + */ + @Test + public void limitJSONKeyAsEmptyStringTest() throws Exception { + JSONObject obj = new JSONObject( + " {\n" + + " \"mode\": \"standard-service\",\n" + + " \"service\": \"https://tools.wmflabs.org/openrefine-wikidata/en/api\",\n" + + " \"identifierSpace\": \"http://www.wikidata.org/entity/\",\n" + + " \"schemaSpace\": \"http://www.wikidata.org/prop/direct/\",\n" + + " \"type\": {\n" + + " \"id\": \"Q13442814\",\n" + + " \"name\": \"scientific article\"\n" + + " },\n" + + " \"autoMatch\": true,\n" + + " \"columnDetails\": [],\n" + + " \"limit\": \"\"\n" + + " }"); + + ReconConfig config = StandardReconConfig.reconstruct(obj); + + // Assert the object is created + Assert.assertTrue(config != null); + } + + } From 75900138dd700dff8d7d3160c633d7f8c6262b3b Mon Sep 17 00:00:00 2001 From: Antonin Delpeuch Date: Sun, 4 Mar 2018 22:41:44 +0000 Subject: [PATCH 03/11] Revert "Accept empty string for the limit in a reconciliation config" This reverts commit 8c8b091adce2ec60cb3c61f4c78e426015eca1a3. --- .../model/recon/StandardReconConfig.java | 9 ++--- .../google/refine/tests/model/ReconTests.java | 33 +------------------ 2 files changed, 3 insertions(+), 39 deletions(-) diff --git a/main/src/com/google/refine/model/recon/StandardReconConfig.java b/main/src/com/google/refine/model/recon/StandardReconConfig.java index 07506002f..f1cb97d3b 100644 --- a/main/src/com/google/refine/model/recon/StandardReconConfig.java +++ b/main/src/com/google/refine/model/recon/StandardReconConfig.java @@ -111,13 +111,8 @@ public class StandardReconConfig extends ReconConfig { } JSONObject t = obj.has("type") && !obj.isNull("type") ? obj.getJSONObject("type") : null; - - int limit; - try { - limit = obj.has("limit") && !obj.isNull("limit") ? obj.getInt("limit") : 0; - } catch(JSONException e) { - limit = 0; - } + + int limit = obj.has("limit") && !obj.isNull("limit") ? obj.getInt("limit") : 0; return new StandardReconConfig( obj.getString("service"), diff --git a/main/tests/server/src/com/google/refine/tests/model/ReconTests.java b/main/tests/server/src/com/google/refine/tests/model/ReconTests.java index f9a92607c..5d6466c99 100644 --- a/main/tests/server/src/com/google/refine/tests/model/ReconTests.java +++ b/main/tests/server/src/com/google/refine/tests/model/ReconTests.java @@ -53,7 +53,7 @@ public class ReconTests extends RefineTest { * @throws Exception */ @Test - public void limitJSONKeyAsIntTest() throws Exception { + public void limitJSONKeyTest() throws Exception { JSONObject obj = new JSONObject( " {\n" + " \"mode\": \"standard-service\",\n" + @@ -74,35 +74,4 @@ public class ReconTests extends RefineTest { // Assert the object is created Assert.assertTrue(config != null); } - - /** - * Regression for issue #1526: - * the UI used to send an empty limit as an empty string, which - * failed to be parsed by the backend. - * @throws Exception - */ - @Test - public void limitJSONKeyAsEmptyStringTest() throws Exception { - JSONObject obj = new JSONObject( - " {\n" + - " \"mode\": \"standard-service\",\n" + - " \"service\": \"https://tools.wmflabs.org/openrefine-wikidata/en/api\",\n" + - " \"identifierSpace\": \"http://www.wikidata.org/entity/\",\n" + - " \"schemaSpace\": \"http://www.wikidata.org/prop/direct/\",\n" + - " \"type\": {\n" + - " \"id\": \"Q13442814\",\n" + - " \"name\": \"scientific article\"\n" + - " },\n" + - " \"autoMatch\": true,\n" + - " \"columnDetails\": [],\n" + - " \"limit\": \"\"\n" + - " }"); - - ReconConfig config = StandardReconConfig.reconstruct(obj); - - // Assert the object is created - Assert.assertTrue(config != null); - } - - } From 01b96a015597567e02234a9028632633eed9e9ae Mon Sep 17 00:00:00 2001 From: Owen Stephens Date: Wed, 7 Mar 2018 09:10:11 +0000 Subject: [PATCH 04/11] Add coalesce function --- .../refine/expr/functions/Coalesce.java | 72 ++++++++++++ .../refine/grel/ControlFunctionRegistry.java | 2 + .../tests/expr/functions/CoalesceTests.java | 104 ++++++++++++++++++ 3 files changed, 178 insertions(+) create mode 100644 main/src/com/google/refine/expr/functions/Coalesce.java create mode 100644 main/tests/server/src/com/google/refine/tests/expr/functions/CoalesceTests.java diff --git a/main/src/com/google/refine/expr/functions/Coalesce.java b/main/src/com/google/refine/expr/functions/Coalesce.java new file mode 100644 index 000000000..ffdcc9b1c --- /dev/null +++ b/main/src/com/google/refine/expr/functions/Coalesce.java @@ -0,0 +1,72 @@ +/* + +Copyright 2018, Owen Stephens +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of the copyright holder nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +package com.google.refine.expr.functions; + +import java.util.Properties; + +import org.json.JSONException; +import org.json.JSONWriter; + +import com.google.refine.expr.EvalError; +import com.google.refine.grel.ControlFunctionRegistry; +import com.google.refine.grel.Function; + +public class Coalesce implements Function { + + @Override + public Object call(Properties bindings, Object[] args) { + if (args.length> 0) { + for (int i = 0; i < args.length; i++){ + if (args[i] == null) { + continue; + } else { + return args[i]; + } + } + return null; + } + return new EvalError(ControlFunctionRegistry.getFunctionName(this) + " expects at least one argument"); + } + + @Override + public void write(JSONWriter writer, Properties options) + throws JSONException { + + writer.object(); + writer.key("description"); writer.value("Returns the first non-null from a series of values"); + writer.key("params"); writer.value("one or more objects"); + writer.key("returns"); writer.value("object"); + writer.endObject(); + } +} diff --git a/main/src/com/google/refine/grel/ControlFunctionRegistry.java b/main/src/com/google/refine/grel/ControlFunctionRegistry.java index abc343a74..083f5e697 100644 --- a/main/src/com/google/refine/grel/ControlFunctionRegistry.java +++ b/main/src/com/google/refine/grel/ControlFunctionRegistry.java @@ -38,6 +38,7 @@ import java.util.Map; import java.util.Map.Entry; import java.util.Set; +import com.google.refine.expr.functions.Coalesce; import com.google.refine.expr.functions.Cross; import com.google.refine.expr.functions.FacetCount; import com.google.refine.expr.functions.Get; @@ -186,6 +187,7 @@ public class ControlFunctionRegistry { } static { + registerFunction("coalesce", new Coalesce()); registerFunction("type", new Type()); registerFunction("toString", new ToString()); diff --git a/main/tests/server/src/com/google/refine/tests/expr/functions/CoalesceTests.java b/main/tests/server/src/com/google/refine/tests/expr/functions/CoalesceTests.java new file mode 100644 index 000000000..667fd73b7 --- /dev/null +++ b/main/tests/server/src/com/google/refine/tests/expr/functions/CoalesceTests.java @@ -0,0 +1,104 @@ +/* + +Copyright 2011, Owen Stephens +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of the copyright holder nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + */ + +package com.google.refine.tests.expr.functions.strings; + +import java.util.Properties; + +import org.slf4j.LoggerFactory; +import org.testng.Assert; +import org.testng.annotations.AfterMethod; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.BeforeTest; +import org.testng.annotations.Test; + +import com.google.refine.expr.EvalError; +import com.google.refine.grel.ControlFunctionRegistry; +import com.google.refine.grel.Function; +import com.google.refine.tests.RefineTest; + + +public class CoalesceTests extends RefineTest { + + static Properties bindings; + private static final Integer[] ZERO_TO_TWO = new Integer[] {0, 1, 2}; + + @Override + @BeforeTest + public void init() { + logger = LoggerFactory.getLogger(this.getClass()); + } + + @BeforeMethod + public void SetUp() { + bindings = new Properties(); + } + + @AfterMethod + public void TearDown() { + bindings = null; + } + + /** + * Lookup a control function by name and invoke it with a variable number of args + */ + private static Object invoke(String name,Object... args) { + // registry uses static initializer, so no need to set it up + Function function = ControlFunctionRegistry.getFunction(name); + if (function == null) { + throw new IllegalArgumentException("Unknown function "+name); + } + if (args == null) { + return function.call(bindings,new Object[0]); + } else { + return function.call(bindings,args); + } + } + + @Test + public void testCoalesceInvalidParams() { + Assert.assertTrue(invoke("coalesce") instanceof EvalError); + } + + @Test + public void testCoalesce() { + Assert.assertNull(invoke("coalesce", (Object) null)); + Assert.assertEquals(invoke("coalesce", "string"),"string"); + Assert.assertEquals(invoke("coalesce", 1),1); + Assert.assertEquals(invoke("coalesce", (Object) null, "string"),"string"); + Assert.assertEquals(invoke("coalesce", (Object) null, (Object) null, "string"),"string"); + Assert.assertEquals(invoke("coalesce", (Object) null, 1),1); + Assert.assertEquals(invoke("coalesce", (Object) null, ZERO_TO_TWO),ZERO_TO_TWO); + } + +} From 6b34af5042cb2af368e80a3c7a92ebb9ac951940 Mon Sep 17 00:00:00 2001 From: Antonin Delpeuch Date: Mon, 12 Mar 2018 15:30:01 +0000 Subject: [PATCH 05/11] Tweak the suggest dialog to display suggestions --- .../modules/core/externals/suggest/css/suggest-4_3.css | 8 ++++++-- .../core/externals/suggest/css/suggest-4_3.min.css | 2 +- .../webapp/modules/core/externals/suggest/suggest-4_3.js | 9 ++++++++- main/webapp/modules/core/scripts/util/custom-suggest.js | 9 +++++++++ 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/main/webapp/modules/core/externals/suggest/css/suggest-4_3.css b/main/webapp/modules/core/externals/suggest/css/suggest-4_3.css index 9a1d2c905..c63fd608f 100644 --- a/main/webapp/modules/core/externals/suggest/css/suggest-4_3.css +++ b/main/webapp/modules/core/externals/suggest/css/suggest-4_3.css @@ -302,13 +302,17 @@ a.fbs-more-link { margin: 2px 2px -2px 2px; } -.fbs-item-name label { +.fbs-item-name label, .fbs-item-name span { font-size: 0.9em; } +.fbs-item-name label { + color: black; +} .fbs-item-type, -.fbs-item-name label { +.fbs-item-name label, +.fbs-item-name span { display: block; overflow: hidden; white-space: nowrap; diff --git a/main/webapp/modules/core/externals/suggest/css/suggest-4_3.min.css b/main/webapp/modules/core/externals/suggest/css/suggest-4_3.min.css index e034f5b54..56f1cdca1 100644 --- a/main/webapp/modules/core/externals/suggest/css/suggest-4_3.min.css +++ b/main/webapp/modules/core/externals/suggest/css/suggest-4_3.min.css @@ -33,4 +33,4 @@ * http://wiki.freebase.com/wiki/Freebase_Site_License * */ -.fbs-reset,.fbs-reset h1,.fbs-reset h2,.fbs-reset h3,.fbs-reset h4,.fbs-reset h5,.fbs-reset h6,.fbs-reset p,.fbs-reset img,.fbs-reset dl,.fbs-reset dt,.fbs-reset dd,.fbs-reset ol,.fbs-reset ul,.fbs-reset li{margin:0;padding:0;border:0;outline:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline}.fbs-pane,.fbs-flyout-pane,li.fbs-nomatch,a.fbs-more-link,li.fbs-selected,.fbs-flyout-images,#fbs-topic-image{background:#fff}.fbs-suggestnew{color:#444}.fbs-pane,.fbs-flyout-pane,.fbs-flyout-subtitle,.fbs-topic-properties strong{color:#666}h3.fbs-topic-properties,.fbs-flyout-pane p{color:#444}.fbs-item-name,li.fbs-help-on-focus,li.fbs-nomatch,.fbs-nomatch-text,.fbs-flyout-pane h3,.fbs-properties-header{color:#333}.fbs-pane,.fbs-flyout-pane{border:1px solid #bbb;padding:2px}.fbs-flyout-pane{border-color:#ccc}.fbs-list,.fbs-list-icons,.fbs-flyout-content,.fbs-attribution,.fbs-header{background-color:#f5f5f5}.fbs-header{background:#fefefe}li.fbs-help-on-focus,li.fbs-nomatch{border-bottom:1px solid #dae3e9}.fbs-item-name{border:1px solid #f5f5f5}h1#fbs-flyout-title,li.fbs-selected .fbs-item-name{color:#f60}li.fbs-selected .fbs-item-name{border-color:#f60;background:#fff}.fbs-nomatch-text{border-bottom:1px solid #dae3e9;background:#f8f8f8}.fbs-suggestnew{background:#eee;border-top:1px solid #dae3e9}#fbs-flyout-title .fbs-flyout-label{color:#aaa}.fbs-citation{white-space:nowrap;color:#999;font-size:11px}#fbs-topic-image,.fbs-flyout-images{border:1px solid #a9a9a9}.fbs-suggestnew-button,.fbs-flyout-pane{border:1px solid #9a9a9a;color:#999}.fbs-suggestnew-button{color:#444}ul.fbs-list,.fbs-flyout-content,.fbs-attribution,.fbs-header{border:1px solid #dae3e9}.fbs-header{border-bottom:0}li.fbs-item{border-bottom:1px solid #dae3e9;list-style-type:none}.fbs-attribution{border-top:0}.fbs-pane,.fbs-flyout-pane{font-size:16px;font-family:Helvetica Neue,Arial,Helvetica,sans-serif}ul.fbs-list,.fbs-flyout-content,.fbs-attribution,div.fbs-header{font-size:62.5%}.fbs-pane strong,.fbs-flyout-pane strong{font-weight:bold}.fbs-flyout-content,.fbs-attribution{margin:2px}.fbs-flyout-content{margin-bottom:0}.fbs-attribution{margin-top:0}.fbs-pane{width:325px}.fbs-flyout-pane{width:319px;margin-left:3px}ul.fbs-list{max-height:320px;overflow:auto;overflow-x:hidden;border-bottom:0;border-top:0}.fbs-flyout-content,.fbs-attribution{padding:5px}.fbs-flyout-content:after{content:".";display:block;height:0;clear:both;visibility:hidden}li.fbs-help-on-focus,li.fbs-nomatch{padding:6px 8px 7px 6px;font-size:1.4em;line-height:1}li.fbs-more{padding:0;background:transparent}a.fbs-more-link{display:block;padding:4px;font-weight:bold;font-size:12px}.fbs-more .fbs-help{display:none}.fbs-header{font-weight:bold;padding:4px 6px;margin:2px 2px -2px 2px}.fbs-item-name label{font-size:.9em}.fbs-item-type,.fbs-item-name label{display:block;overflow:hidden;white-space:nowrap}.fbs-item-name{padding:2px 8px 1px 6px;font-size:1.4em;line-height:1.4em;background:#f4f8fb}.fbs-item-name strong{font-weight:bold}.fbs-item-type{color:#777;float:right;font-size:.7em;max-width:40%;padding-left:.25em}li.fbs-selected{cursor:pointer}.fbs-status{border:1px solid #dae3e9;padding:4px 5px;color:#000;font-size:.7em}li.fbs-nomatch{padding:0}.fbs-nomatch-text{display:block;font-weight:bold;line-height:1;font-size:.9em}.fbs-nomatch-text,.fbs-nomatch h3,ul.fbs-search-tips{padding:6px 8px 7px 6px}.fbs-nomatch h3{font-weight:bold;font-size:.9em}ul.fbs-search-tips li{list-style:disc;margin-left:1.6em;margin-bottom:.3em;font-size:.9em}.fbs-suggestnew{padding:.4em .3em .5em 8px}.fbs-suggestnew-button{cursor:pointer;padding:.2em .3em;margin-left:0!important;max-width:17em;font-size:.8em}.fbs-suggestnew-description{margin-bottom:.6em;font-size:.7em}.fbs-more-shortcut,.fbs-suggestnew-shortcut{margin-left:.4em;font-size:70%;color:#999}.fbs-placeholder{color:#99a;font-style:italic}.fbs-flyout-id{color:#999!important}h1#fbs-flyout-title{font-size:1.2em;font-weight:bold;margin-bottom:.5em;margin-top:.3em}h1#fbs-flyout-title .fbs-flyout-template-label{color:#999;font-size:.8em}#fbs-flyout-title .fbs-flyout-label{font-weight:normal}#fbs-topic-image{float:left;padding:1px;margin-right:5px;margin-bottom:5px}.fbs-flyout-images{float:left;margin:0 10px 0 0;padding:1px 0 1px 1px}.fbs-flyout-images img{float:left;margin-right:1px}.fbs-flyout-subtitle{font-size:1.1em;margin-bottom:.5em}.fbs-flyout-pane h3{font-size:1em;line-height:1.4;margin-bottom:.25em}.fbs-properties-header{font-size:1em;font-weight:bold;margin:.5em 0}h3.fbs-topic-properties{font-size:1.2em;font-weight:bold}.fbs-topic-properties strong{display:inline;font-size:.8em}.fbs-flyout-pane p{font-size:1.2em;line-height:1.4;max-height:10em;overflow:auto}p.fbs-flyout-image-true,h3.fbs-flyout-image-true,h1.fbs-flyout-image-true{margin-left:85px}.fbs-meta-info{margin-left:110px}#fbs-user-flyout li{margin-left:100px}#fbs-domain-flyout .fbs-meta-info{margin-left:145px}.fbs-flyout-list li{font-size:1em;margin-left:15px}#fbs-domain-flyout #fbs-flyout-title{margin-bottom:.5em}.fbs-attribution{padding-right:72px;background-image:url("//www.gstatic.com/freebase/img/freebase-cc-by-61x23.png");background-repeat:no-repeat;background-position:center right;min-height:15px}.fbs-flyout-types{font-style:italic;line-height:1;font-size:1.2em} \ No newline at end of file +.fbs-reset,.fbs-reset h1,.fbs-reset h2,.fbs-reset h3,.fbs-reset h4,.fbs-reset h5,.fbs-reset h6,.fbs-reset p,.fbs-reset img,.fbs-reset dl,.fbs-reset dt,.fbs-reset dd,.fbs-reset ol,.fbs-reset ul,.fbs-reset li{margin:0;padding:0;border:0;outline:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline}.fbs-pane,.fbs-flyout-pane,li.fbs-nomatch,a.fbs-more-link,li.fbs-selected,.fbs-flyout-images,#fbs-topic-image{background:#fff}.fbs-suggestnew{color:#444}.fbs-pane,.fbs-flyout-pane,.fbs-flyout-subtitle,.fbs-topic-properties strong{color:#666}h3.fbs-topic-properties,.fbs-flyout-pane p{color:#444}.fbs-item-name,li.fbs-help-on-focus,li.fbs-nomatch,.fbs-nomatch-text,.fbs-flyout-pane h3,.fbs-properties-header{color:#333}.fbs-pane,.fbs-flyout-pane{border:1px solid #bbb;padding:2px}.fbs-flyout-pane{border-color:#ccc}.fbs-list,.fbs-list-icons,.fbs-flyout-content,.fbs-attribution,.fbs-header{background-color:#f5f5f5}.fbs-header{background:#fefefe}li.fbs-help-on-focus,li.fbs-nomatch{border-bottom:1px solid #dae3e9}.fbs-item-name{border:1px solid #f5f5f5}h1#fbs-flyout-title,li.fbs-selected .fbs-item-name{color:#f60}li.fbs-selected .fbs-item-name{border-color:#f60;background:#fff}.fbs-nomatch-text{border-bottom:1px solid #dae3e9;background:#f8f8f8}.fbs-suggestnew{background:#eee;border-top:1px solid #dae3e9}#fbs-flyout-title .fbs-flyout-label{color:#aaa}.fbs-citation{white-space:nowrap;color:#999;font-size:11px}#fbs-topic-image,.fbs-flyout-images{border:1px solid #a9a9a9}.fbs-suggestnew-button,.fbs-flyout-pane{border:1px solid #9a9a9a;color:#999}.fbs-suggestnew-button{color:#444}ul.fbs-list,.fbs-flyout-content,.fbs-attribution,.fbs-header{border:1px solid #dae3e9}.fbs-header{border-bottom:0}li.fbs-item{border-bottom:1px solid #dae3e9;list-style-type:none}.fbs-attribution{border-top:0}.fbs-pane,.fbs-flyout-pane{font-size:16px;font-family:Helvetica Neue,Arial,Helvetica,sans-serif}ul.fbs-list,.fbs-flyout-content,.fbs-attribution,div.fbs-header{font-size:62.5%}.fbs-pane strong,.fbs-flyout-pane strong{font-weight:bold}.fbs-flyout-content,.fbs-attribution{margin:2px}.fbs-flyout-content{margin-bottom:0}.fbs-attribution{margin-top:0}.fbs-pane{width:325px}.fbs-flyout-pane{width:319px;margin-left:3px}ul.fbs-list{max-height:320px;overflow:auto;overflow-x:hidden;border-bottom:0;border-top:0}.fbs-flyout-content,.fbs-attribution{padding:5px}.fbs-flyout-content:after{content:".";display:block;height:0;clear:both;visibility:hidden}li.fbs-help-on-focus,li.fbs-nomatch{padding:6px 8px 7px 6px;font-size:1.4em;line-height:1}li.fbs-more{padding:0;background:transparent}a.fbs-more-link{display:block;padding:4px;font-weight:bold;font-size:12px}.fbs-more .fbs-help{display:none}.fbs-header{font-weight:bold;padding:4px 6px;margin:2px 2px -2px 2px}.fbs-item-name label,.fbs-item-name span{font-size:.9em}.fbs-item-name label{color:black}.fbs-item-type,.fbs-item-name label,.fbs-item-name span{display:block;overflow:hidden;white-space:nowrap}.fbs-item-name{padding:2px 8px 1px 6px;font-size:1.4em;line-height:1.4em;background:#f4f8fb}.fbs-item-name strong{font-weight:bold}.fbs-item-type{color:#777;float:right;font-size:.7em;max-width:40%;padding-left:.25em}li.fbs-selected{cursor:pointer}.fbs-status{border:1px solid #dae3e9;padding:4px 5px;color:#000;font-size:.7em}li.fbs-nomatch{padding:0}.fbs-nomatch-text{display:block;font-weight:bold;line-height:1;font-size:.9em}.fbs-nomatch-text,.fbs-nomatch h3,ul.fbs-search-tips{padding:6px 8px 7px 6px}.fbs-nomatch h3{font-weight:bold;font-size:.9em}ul.fbs-search-tips li{list-style:disc;margin-left:1.6em;margin-bottom:.3em;font-size:.9em}.fbs-suggestnew{padding:.4em .3em .5em 8px}.fbs-suggestnew-button{cursor:pointer;padding:.2em .3em;margin-left:0!important;max-width:17em;font-size:.8em}.fbs-suggestnew-description{margin-bottom:.6em;font-size:.7em}.fbs-more-shortcut,.fbs-suggestnew-shortcut{margin-left:.4em;font-size:70%;color:#999}.fbs-placeholder{color:#99a;font-style:italic}.fbs-flyout-id{color:#999!important}h1#fbs-flyout-title{font-size:1.2em;font-weight:bold;margin-bottom:.5em;margin-top:.3em}h1#fbs-flyout-title .fbs-flyout-template-label{color:#999;font-size:.8em}#fbs-flyout-title .fbs-flyout-label{font-weight:normal}#fbs-topic-image{float:left;padding:1px;margin-right:5px;margin-bottom:5px}.fbs-flyout-images{float:left;margin:0 10px 0 0;padding:1px 0 1px 1px}.fbs-flyout-images img{float:left;margin-right:1px}.fbs-flyout-subtitle{font-size:1.1em;margin-bottom:.5em}.fbs-flyout-pane h3{font-size:1em;line-height:1.4;margin-bottom:.25em}.fbs-properties-header{font-size:1em;font-weight:bold;margin:.5em 0}h3.fbs-topic-properties{font-size:1.2em;font-weight:bold}.fbs-topic-properties strong{display:inline;font-size:.8em}.fbs-flyout-pane p{font-size:1.2em;line-height:1.4;max-height:10em;overflow:auto}p.fbs-flyout-image-true,h3.fbs-flyout-image-true,h1.fbs-flyout-image-true{margin-left:85px}.fbs-meta-info{margin-left:110px}#fbs-user-flyout li{margin-left:100px}#fbs-domain-flyout .fbs-meta-info{margin-left:145px}.fbs-flyout-list li{font-size:1em;margin-left:15px}#fbs-domain-flyout #fbs-flyout-title{margin-bottom:.5em}.fbs-attribution{padding-right:72px;background-image:url("//www.gstatic.com/freebase/img/freebase-cc-by-61x23.png");background-repeat:no-repeat;background-position:center right;min-height:15px}.fbs-flyout-types{font-style:italic;line-height:1;font-size:1.2em} diff --git a/main/webapp/modules/core/externals/suggest/suggest-4_3.js b/main/webapp/modules/core/externals/suggest/suggest-4_3.js index b293b812e..bb10c3689 100644 --- a/main/webapp/modules/core/externals/suggest/suggest-4_3.js +++ b/main/webapp/modules/core/externals/suggest/suggest-4_3.js @@ -725,7 +725,11 @@ var css = this.options.css; var li = $("
  • ").addClass(css.item); var label = $("