diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..b49d8dae4 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,6 @@ +language: java +jdk: + - oraclejdk7 + - openjdk6 + +script: ./refine test diff --git a/extensions/freebase/module/scripts/dialogs/schema-alignment/dialog.js b/extensions/freebase/module/scripts/dialogs/schema-alignment/dialog.js index 26c8ef98f..8dfeced1e 100644 --- a/extensions/freebase/module/scripts/dialogs/schema-alignment/dialog.js +++ b/extensions/freebase/module/scripts/dialogs/schema-alignment/dialog.js @@ -101,7 +101,7 @@ SchemaAlignment._batchSearch = function(queries, onDone) { // TODO: New API doesn't accept multiple queries // args.push("https://www.googleapis.com/freebase/v1/search?key=" + Freebase.API_KEY + "&" + - args.push("http://api.freebase.com/api/service/search?" + + args.push("http://api.freebase.com/api/service/search?" + // FIXME: $.param({ "queries" : JSON.stringify(batch) }) + "&callback=?"); args.push(null); // no data diff --git a/main/src/com/google/refine/model/recon/StandardReconConfig.java b/main/src/com/google/refine/model/recon/StandardReconConfig.java index 3e7dad8eb..296a1a546 100644 --- a/main/src/com/google/refine/model/recon/StandardReconConfig.java +++ b/main/src/com/google/refine/model/recon/StandardReconConfig.java @@ -40,6 +40,8 @@ import java.io.StringWriter; import java.net.HttpURLConnection; import java.net.URL; import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; import java.util.HashSet; import java.util.List; import java.util.Properties; @@ -250,6 +252,10 @@ public class StandardReconConfig extends ReconConfig { jsonWriter.key("id"); jsonWriter.value(cell2.recon.match.id); jsonWriter.key("name"); jsonWriter.value(cell2.recon.match.name); jsonWriter.endObject(); + } else if (cell2.value instanceof Calendar) { + jsonWriter.value(ParsingUtilities.dateToString(((Calendar) cell2.value).getTime())); + } else if (cell2.value instanceof Date) { + jsonWriter.value(ParsingUtilities.dateToString((Date) cell2.value)); } else { jsonWriter.value(cell2.value.toString()); } diff --git a/main/src/com/google/refine/operations/cell/KeyValueColumnizeOperation.java b/main/src/com/google/refine/operations/cell/KeyValueColumnizeOperation.java index 95754ec1f..f1cac9a63 100644 --- a/main/src/com/google/refine/operations/cell/KeyValueColumnizeOperation.java +++ b/main/src/com/google/refine/operations/cell/KeyValueColumnizeOperation.java @@ -160,7 +160,8 @@ public class KeyValueColumnizeOperation extends AbstractOperation { String keyString = key.toString(); // Start a new row on our beginning of record key - if (keyString.equals(recordKey)) { + // TODO: Add support for processing in record mode instead of just by rows + if (keyString.equals(recordKey) || recordKey == null) { reusableRow = new Row(newColumns.size()); newRows.add(reusableRow); currentRows.clear(); diff --git a/main/src/com/google/refine/operations/column/ColumnAdditionByFetchingURLsOperation.java b/main/src/com/google/refine/operations/column/ColumnAdditionByFetchingURLsOperation.java index e5dd0ca8a..22b715bf8 100644 --- a/main/src/com/google/refine/operations/column/ColumnAdditionByFetchingURLsOperation.java +++ b/main/src/com/google/refine/operations/column/ColumnAdditionByFetchingURLsOperation.java @@ -222,6 +222,7 @@ public class ColumnAdditionByFetchingURLsOperation extends EngineDependentOperat List responseBodies = new ArrayList(urls.size()); for (int i = 0; i < urls.size(); i++) { CellAtRow urlData = urls.get(i); + long start = System.currentTimeMillis(); CellAtRow cellAtRow = fetch(urlData); if (cellAtRow != null) { responseBodies.add(cellAtRow); @@ -229,7 +230,10 @@ public class ColumnAdditionByFetchingURLsOperation extends EngineDependentOperat _progress = i * 100 / urls.size(); try { - Thread.sleep(_delay); + long delay = _delay - (System.currentTimeMillis() - start); + if (delay > 0) { + Thread.sleep(delay); + } } catch (InterruptedException e) { if (_canceled) { break; diff --git a/main/src/com/google/refine/util/ParsingUtilities.java b/main/src/com/google/refine/util/ParsingUtilities.java index 63ae36ecb..1843c12ee 100644 --- a/main/src/com/google/refine/util/ParsingUtilities.java +++ b/main/src/com/google/refine/util/ParsingUtilities.java @@ -54,7 +54,7 @@ import org.json.JSONTokener; public class ParsingUtilities { - static final public SimpleDateFormat s_sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'"); + static final public SimpleDateFormat ISO8601_FORMAT = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'"); static public Properties parseUrlParameters(HttpServletRequest request) { Properties options = new Properties(); @@ -136,6 +136,9 @@ public class ParsingUtilities { } private static final URLCodec codec = new URLCodec(); + /** + * Encode a string as UTF-8. + */ static public String encode(String s) { try { return codec.encode(s, "UTF-8"); @@ -143,6 +146,10 @@ public class ParsingUtilities { return s; // should not happen } } + + /** + * Decode a string from UTF-8 encoding. + */ static public String decode(String s) { try { return codec.decode(s, "UTF-8"); @@ -153,13 +160,25 @@ public class ParsingUtilities { } } + /** + * Convert a date/time to an ISO 8601 string + * + * @param d the date to be written + * @return string with ISO 8601 formatted date & time + */ static public String dateToString(Date d) { - return s_sdf.format(d); + return ISO8601_FORMAT.format(d); } + /** + * Parse an ISO 8601 formatted string into a Java Date. + * + * @param s the string to be parsed + * @return Date or null if the parse failed + */ static public Date stringToDate(String s) { try { - return s_sdf.parse(s); + return ISO8601_FORMAT.parse(s); } catch (ParseException e) { return null; } diff --git a/main/webapp/modules/core/MOD-INF/controller.js b/main/webapp/modules/core/MOD-INF/controller.js index 6d5499697..456214ca6 100644 --- a/main/webapp/modules/core/MOD-INF/controller.js +++ b/main/webapp/modules/core/MOD-INF/controller.js @@ -380,7 +380,7 @@ function init() { "externals/jquery-1.7.2.min.js", "externals/jquery.cookie.js", "externals/jquery.eventstack-0.3.js", - "externals/suggest/suggest-4_1.min.js", + "externals/suggest/suggest-4_2.min.js", "externals/jquery-ui/jquery-ui-1.8.20.custom.min.js", "externals/imgareaselect/jquery.imgareaselect.js", "externals/date.js", @@ -445,7 +445,7 @@ function init() { "project/styles", module, [ - "externals/suggest/css/suggest-4_1.min.css", + "externals/suggest/css/suggest-4_2.min.css", "externals/jquery-ui/css/ui-lightness/jquery-ui-1.8.20.custom.css", "externals/imgareaselect/css/imgareaselect-default.css", @@ -485,7 +485,7 @@ function init() { [ "externals/jquery-1.7.2.min.js", "externals/jquery.cookie.js", - "externals/suggest/suggest-4_1.min.js", + "externals/suggest/suggest-4_2.min.js", "externals/jquery-ui/jquery-ui-1.8.20.custom.min.js", "externals/imgareaselect/jquery.imgareaselect.js", "externals/date.js", @@ -496,7 +496,7 @@ function init() { "preferences/styles", module, [ - "externals/suggest/css/suggest-4_1.min.css", + "externals/suggest/css/suggest-4_2.min.css", "externals/jquery-ui/css/ui-lightness/jquery-ui-1.8.20.custom.css", "styles/jquery-ui-overrides.less", "styles/common.less", diff --git a/main/webapp/modules/core/externals/suggest/css/suggest-4_0.min.css b/main/webapp/modules/core/externals/suggest/css/suggest-4_0.min.css deleted file mode 100644 index c22ca9111..000000000 --- a/main/webapp/modules/core/externals/suggest/css/suggest-4_0.min.css +++ /dev/null @@ -1,36 +0,0 @@ - -/* - * Copyright 2012, Google Inc. - * 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 Google Inc. 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. - * - * Additional Licenses for Third Party components can be found here: - * 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-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}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}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("http://www.freebase.com/resources/images/fbs-attribution.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 diff --git a/main/webapp/modules/core/externals/suggest/css/suggest-4_1.min.css b/main/webapp/modules/core/externals/suggest/css/suggest-4_1.min.css deleted file mode 100644 index b6989280e..000000000 --- a/main/webapp/modules/core/externals/suggest/css/suggest-4_1.min.css +++ /dev/null @@ -1,36 +0,0 @@ - -/* - * Copyright 2012, Google Inc. - * 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 Google Inc. 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. - * - * Additional Licenses for Third Party components can be found here: - * 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-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}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("/static/95a.lib.www.tags.svn.freebase-site.googlecode.dev/template/img/fbs-attribution.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 diff --git a/main/webapp/modules/core/externals/suggest/css/suggest-4_1.css b/main/webapp/modules/core/externals/suggest/css/suggest-4_2.css similarity index 98% rename from main/webapp/modules/core/externals/suggest/css/suggest-4_1.css rename to main/webapp/modules/core/externals/suggest/css/suggest-4_2.css index edd1814b5..dfe473974 100644 --- a/main/webapp/modules/core/externals/suggest/css/suggest-4_1.css +++ b/main/webapp/modules/core/externals/suggest/css/suggest-4_2.css @@ -158,6 +158,12 @@ li.fbs-selected .fbs-item-name { color: #aaa; } +.fbs-citation { + white-space: nowrap; + color: #999; + font-size: 11px; +} + /* topic image */ #fbs-topic-image, .fbs-flyout-images { @@ -499,6 +505,8 @@ h3.fbs-topic-properties { .fbs-flyout-pane p { font-size: 1.2em; line-height: 1.4; + max-height: 10em; + overflow: auto; } /* this class is applied with fbs-topic-flyout when a thumbnail is present diff --git a/main/webapp/modules/core/externals/suggest/css/suggest-4_2.min.css b/main/webapp/modules/core/externals/suggest/css/suggest-4_2.min.css new file mode 100644 index 000000000..7ae7c4169 --- /dev/null +++ b/main/webapp/modules/core/externals/suggest/css/suggest-4_2.min.css @@ -0,0 +1,36 @@ + +/* + * Copyright 2012, Google Inc. + * 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 Google Inc. 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. + * + * Additional Licenses for Third Party components can be found here: + * 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("/static/129a.lib.www.tags.svn.freebase-site.googlecode.dev/template/img/fbs-attribution.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 diff --git a/main/webapp/modules/core/externals/suggest/suggest-4_1.min.js b/main/webapp/modules/core/externals/suggest/suggest-4_1.min.js deleted file mode 100644 index 4ef28c2dd..000000000 --- a/main/webapp/modules/core/externals/suggest/suggest-4_1.min.js +++ /dev/null @@ -1,81 +0,0 @@ - -/* - * Copyright 2012, Google Inc. - * 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 Google Inc. 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. - * - * Additional Licenses for Third Party components can be found here: - * http://wiki.freebase.com/wiki/Freebase_Site_License - * - */ -(function(c,q){if(!("console"in window)){var o=window.console={};o.log=o.warn=o.error=o.debug=function(){}}c(function(){var a=c("
");c(document.body).append(a);var b=setTimeout(function(){if(c.cleanData){var a=c.cleanData;c.cleanData=function(b){for(var e=0,g;null!=(g=b[e]);e++)c(g).triggerHandler("remove");a(b)}}else{var b=c.fn.remove;c.fn.remove=function(a,f){return this.each(function(){f||(!a||c.filter(a,[this]).length)&&c("*",this).add([this]).each(function(){c(this).triggerHandler("remove")}); -return b.call(c(this),a,f)})}}},1);a.bind("remove",function(){clearTimeout(b)});a.remove()});var p={key:1,filter:1,spell:1,exact:1,lang:1,scoring:1,prefixed:1,stemmed:1,format:1,mql_output:1,output:1,type:1};c.suggest=function(a,b){c.fn[a]=function(b){this.length||console.warn("Suggest: invoked on empty element set");return this.each(function(){this.nodeName&&("INPUT"===this.nodeName.toUpperCase()?this.type&&"TEXT"!==this.type.toUpperCase()&&console.warn("Suggest: unsupported INPUT type: "+this.type):console.warn("Suggest: unsupported DOM element: "+ -this.nodeName));var g=c.data(this,a);g&&g._destroy();c.data(this,a,new c.suggest[a](this,b))._init()})};c.suggest[a]=function(b,g){var d=this,e=this.options=c.extend(!0,{},c.suggest.defaults,c.suggest[a].defaults,g),j=e.css_prefix=e.css_prefix||"",h=e.css;this.name=a;c.each(h,function(a){h[a]=j+h[a]});e.ac_param={};c.each(p,function(a){var b=e[a];null===b||""===b||(e.ac_param[a]=b)});e.flyout_lang=null;if(e.ac_param.lang){var i=e.ac_param.lang;"string"===c.type(i)&&(i=i.split(","));if(c.isArray(i)&& -i.length&&(i=c.trim(i[0])))e.flyout_lang=i}this._status={START:"",LOADING:"",SELECT:"",ERROR:""};e.status&&(e.status instanceof Array&&3<=e.status.length)&&(this._status.START=e.status[0]||"",this._status.LOADING=e.status[1]||"",this._status.SELECT=e.status[2]||"",4===e.status.length&&(this._status.ERROR=e.status[3]||""));var i=this.status=c('
').addClass(h.status),k=this.list=c("
    ").addClass(h.list),l=this.pane=c('