diff --git a/main/webapp/modules/core/externals/suggest/css/suggest-4_2.css b/main/webapp/modules/core/externals/suggest/css/suggest-4_2.css
deleted file mode 100644
index dfe473974..000000000
--- a/main/webapp/modules/core/externals/suggest/css/suggest-4_2.css
+++ /dev/null
@@ -1,573 +0,0 @@
-/*
-=======================================================
-
-FREEBASE SUGGEST
-
-This file is part of the freebase-suggest jQuery plugin.
-
-It is maintained by Metaweb Technologies, Inc. and
-available for use under a Creative Commons License.
-
-Author: Kai Conragan (kai@metaweb.com)
-
- GLOSSARY
-
- .fbs-pane : Outermost container for result list
- .fbs-subpane : Inner container for result list
- .fbs-list : Contained by .fbs-subpane, this is the actual results list
- .fbs-item : Individual item in results list
- .fbs-flyout-pane : Outermost container for flyout on specific object
-
-=======================================================
-*/
-
-/*
--------------------------------------------------------
-Freebase Suggest Reset
--------------------------------------------------------
-
-reset all Freebase Suggest elements to insure consisten cross-browser rendering
-
-*/
-
-.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;
-}
-
-/*
--------------------------------------------------------
-Freebase Suggest Chrome
--------------------------------------------------------
-
-You can change the colors of Freebase Suggest by overriding
-the following rules. We recommended that you copy/paste the
-below rules into your own stylesheet to customize.
-
-*/
-
-.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: #eeeeee;
- border-top: 1px solid #dae3e9;
-}
-
-
-#fbs-flyout-title .fbs-flyout-label {
- color: #aaa;
-}
-
-.fbs-citation {
- white-space: nowrap;
- color: #999;
- font-size: 11px;
-}
-
-/* topic image */
-#fbs-topic-image,
-.fbs-flyout-images {
- border: 1px solid #a9a9a9;
-}
-
-.fbs-suggestnew-button,
-.fbs-flyout-pane {
- border: 1px solid #9a9a9a;
- color: #999999;
-}
-
-.fbs-suggestnew-button {
- color: #444444;
-}
-
-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;
-}
-
-/*
--------------------------------------------------------
-Freebase Suggest Typography
--------------------------------------------------------
-
- establish base typography size by:
- 1. Setting parent div to font-size 16px;
- 2. Setting inner div to font-size 62.5%, giving us a 10px baseline
- 3. Setting global style rules
-*/
-
-.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%;
-}
-
-
-/* insure displays bold */
-.fbs-pane strong,
-.fbs-flyout-pane strong {
- font-weight: bold;
-}
-
-/*
--------------------------------------------------------
-Freebase Suggest Structure
--------------------------------------------------------
-*/
-
-.fbs-flyout-content,
-.fbs-attribution {
- margin: 2px;
-}
-
-.fbs-flyout-content { margin-bottom: 0; }
-.fbs-attribution { margin-top: 0; }
-
-.fbs-pane { width: 325px; } /* results list container */
-.fbs-flyout-pane { width: 319px; margin-left: 3px; } /* flyout container, 3px narrower on each side to create drawer appearance */
-
-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;
-}
-
-
-/*
--------------------------------------------------------
-Freebase Suggest Results List
--------------------------------------------------------
-*/
-
-/* each .fbs-item is a single returned result */
-li.fbs-help-on-focus,
-li.fbs-nomatch {
- padding: 6px 8px 7px 6px;
- font-size: 1.4em;
- line-height: 1;
-}
-
-/* show more results */
-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: 0.9em;
-}
-
-
-.fbs-item-type,
-.fbs-item-name label {
- display: block;
- overflow: hidden;
- white-space: nowrap;
-/* text-overflow:ellipsis;*/
-}
-
-.fbs-item-name {
- padding: 2px 8px 1px 6px;
- font-size: 1.4em;
- line-height: 1.4em;
- background: #f4f8fb;
-}
-
-/* result name */
-.fbs-item-name strong {
- font-weight: bold;
-}
-
-.fbs-item-type {
- color: #777;
- float: right;
- font-size: 0.7em;
- max-width: 40%;
- padding-left: 0.25em;
-}
-
-/* hover state of .fbs-item */
-li.fbs-selected {
- cursor: pointer;
-}
-
-/*
--------------------------------------------------------
-Freebase Suggest Status
--------------------------------------------------------
-*/
-
-.fbs-status {
- border: 1px solid #dae3e9;
- padding: 4px 5px;
- color: #000;
- font-size: 0.7em;
-}
-
-/*
--------------------------------------------------------
-Freebase Suggest No Results
--------------------------------------------------------
-*/
-
-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: 0.9em;
-}
-
-ul.fbs-search-tips li {
- list-style: disc;
- margin-left: 1.6em;
- margin-bottom: 0.3em;
- font-size: 0.9em;
-}
-
-/*
--------------------------------------------------------
-Freebase Suggest Create New
--------------------------------------------------------
-*/
-
-/* suggest new container */
-.fbs-suggestnew {
- padding: 0.4em 0.3em 0.5em 8px;
-}
-
-.fbs-suggestnew-button {
- cursor: pointer;
- padding: 0.2em 0.3em;
- margin-left: 0px !important;
- max-width: 17em;
- font-size: .8em;
-}
-
-.fbs-suggestnew-description {
- margin-bottom: 0.6em;
- font-size: 0.7em;
- }
-
-/* (Shift + Enter) */
-.fbs-more-shortcut,
-.fbs-suggestnew-shortcut {
- margin-left: 0.4em;
- font-size: 70%;
- color: #999999;
-}
-
-/** placeholder text **/
-.fbs-placeholder {
- color: #99a;
- font-style: italic;
-}
-
-/*
--------------------------------------------------------
-Freebase Suggest Flyout Elements
--------------------------------------------------------
-*/
-
-.fbs-flyout-id {
- color: #999 !important;
-}
-
-/* the object title */
-h1#fbs-flyout-title {
- font-size: 1.2em;
- font-weight: bold;
- margin-bottom: 0.5em;
- margin-top: 0.3em;
-}
-
-h1#fbs-flyout-title .fbs-flyout-template-label {
- color: #999999;
- font-size: 0.8em;
-}
-
-
-/* denotes topic, type, view, base, etc. */
-#fbs-flyout-title .fbs-flyout-label {
- font-weight: normal;
-}
-
-/* Image for single topic result */
-#fbs-topic-image {
- float: left;
- padding: 1px;
- margin-right: 5px;
- margin-bottom: 5px;
-}
-
-/* Image pair for views/base/etc. */
-.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: 0.5em;
-}
-
-.fbs-flyout-pane h3 {
- font-size: 1em;
- line-height: 1.4;
- margin-bottom: 0.25em;
-}
-
-.fbs-properties-header {
- font-size: 1em;
- font-weight: bold;
- margin: 0.5em 0;
-}
-
-h3.fbs-topic-properties {
- font-size: 1.2em;
- font-weight: bold;
-}
-
-.fbs-topic-properties strong {
- display: inline;
- font-size: 0.8em;
-}
-
-.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
- in order to provide a fixed margin on text to prevent poor text wrapping
- around thumbnail
-*/
-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;}
-
-/* generic flyout list */
-.fbs-flyout-list li {
- font-size: 1em;
- margin-left: 15px;
-}
-
-#fbs-domain-flyout #fbs-flyout-title { margin-bottom: 0.5em; }
-
-/*
--------------------------------------------------------
-Freebase Suggest Attribution
--------------------------------------------------------
-*/
-
-.fbs-attribution {
- padding-right: 72px; /* accommodate attribution background image */
- background-image: url(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;
-}
-
-/*
--------------------------------------------------------
-Freebase SuggestIE Hacks
--------------------------------------------------------
-We can't use conditional comments so we have to resort
-to inline Internet Explor fixes
-
-*/
-
-* html .fbs-list,
-* html .fbs-list-icons { height: expression( this.scrollHeight > 410 ? "410" : "auto" ); /* sets max-height for IE */ }
-
-* html .fbs-item-name {
- width : 253px !important;
-}
-
-* html .fbs-item-name{ width: 100%; }
-
-* html .fbs-flyout-content:after { height: 1px; }
-
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
deleted file mode 100644
index 7ae7c4169..000000000
--- a/main/webapp/modules/core/externals/suggest/css/suggest-4_2.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-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_2.js b/main/webapp/modules/core/externals/suggest/suggest-4_2.js
deleted file mode 100644
index 2ef8ec395..000000000
--- a/main/webapp/modules/core/externals/suggest/suggest-4_2.js
+++ /dev/null
@@ -1,1904 +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.
- *
- * @author Dae Park (daepark@google.com)
- */
-(function($, undefined){
-
- if (!("console" in window)) {
- var c = window.console = {};
- c.log = c.warn = c.error = c.debug = function(){};
- }
-
- /**
- * jQuery UI provides a way to be notified when an element is removed from the DOM.
- * suggest would like to use this facility to properly teardown it's elements from the DOM (suggest list, flyout, etc.).
- * The following logic tries to determine if "remove" event is already present, else
- * tries to mimic what jQuery UI does (as of 1.8.5) by adding a hook to $.cleanData or $.fn.remove.
- */
- $(function() {
- var div = $("
");
- $(document.body).append(div);
- var t = setTimeout(function() {
- // copied from jquery-ui
- // for remove event
- if ( $.cleanData ) {
- var _cleanData = $.cleanData;
- $.cleanData = function( elems ) {
- for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
- $( elem ).triggerHandler( "remove" );
- }
- _cleanData( elems );
- };
- }
- else {
- var _remove = $.fn.remove;
- $.fn.remove = function( selector, keepData ) {
- return this.each(function() {
- if ( !keepData ) {
- if ( !selector || $.filter( selector, [ this ] ).length ) {
- $( "*", this ).add( [ this ] ).each(function() {
- $( this ).triggerHandler( "remove" );
- });
- }
- }
- return _remove.call( $(this), selector, keepData );
- });
- };
- }
- }, 1);
- div.bind("remove", function() {
- clearTimeout(t);
- });
- div.remove();
- });
-
- /**
- * These are the search parameters that are transparently passed
- * to the search service as specified by service_url + service_path
- */
- var SEARCH_PARAMS = {
- 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
- };
-
- $.suggest = function(name, prototype) {
-
- $.fn[name] = function(options) {
- if (!this.length) {
- console.warn('Suggest: invoked on empty element set');
- }
- return this
- .each(function() {
- if (this.nodeName) {
- if (this.nodeName.toUpperCase() === 'INPUT') {
- if (this.type && this.type.toUpperCase() !== 'TEXT') {
- console.warn('Suggest: unsupported INPUT type: '+this.type);
- }
- }
- else {
- console.warn('Suggest: unsupported DOM element: '+this.nodeName);
- }
- }
- var instance = $.data(this, name);
- if (instance) {
- instance._destroy();
- }
- $.data(this, name, new $.suggest[name](this, options))._init();
- });
- };
-
- $.suggest[name] = function(input, options) {
- var self = this,
- o = this.options = $.extend(true, {},
- $.suggest.defaults,
- $.suggest[name].defaults,
- options),
- pfx = o.css_prefix = o.css_prefix || "",
- css = o.css;
- this.name = name;
- $.each(css, function(k, v) {
- css[k] = pfx + css[k];
- });
-
- // suggest parameters
- o.ac_param = {};
- $.each(SEARCH_PARAMS, function(k) {
- var v = o[k];
- if (v === null || v === "") {
- return;
- }
- o.ac_param[k] = v;
- });
-
- // flyout service lang is the first specified lang
- o.flyout_lang = null;
- if (o.ac_param.lang) {
- var lang = o.ac_param.lang;
- if ($.isArray(lang) && lang.length) {
- lang = lang.join(',');
- }
- if (lang) {
- o.flyout_lang = lang;
- }
- }
-
- // status texts
- this._status = {
- START: "",
- LOADING: "",
- SELECT: "",
- ERROR: ""
- };
- if (o.status && o.status instanceof Array && o.status.length >= 3) {
- this._status.START = o.status[0] || "";
- this._status.LOADING = o.status[1] || "";
- this._status.SELECT = o.status[2] || "";
- if (o.status.length === 4) {
- this._status.ERROR = o.status[3] || "";
- }
- }
-
- // create the container for the drop down list
- var s = this.status = $('