diff --git a/client/javascript/NOTICE.txt b/client/javascript/NOTICE.txt deleted file mode 100644 index 3d40e9b49c4..00000000000 --- a/client/javascript/NOTICE.txt +++ /dev/null @@ -1,64 +0,0 @@ -============================================================== - Apache Solr / Contrib Javascript - Copyright 2006-2008 The Apache Software Foundation -============================================================== - - -========================================================================= -== jQuery -- http://www.jquery.com/ == -========================================================================= - -Copyright (c) 2008 John Resig, http://jquery.com/ - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - - -========================================================================= -== JsDoc Toolkit -- http://www.jsdoctoolkit.org/ == -========================================================================= - -JsDoc Toolkit - -All code specific to JsDoc Toolkit are free, open source and licensed -for use under the X11/MIT License. - -JsDoc Toolkit is Copyright (c)2008 Michael Mathews - -This program is free software; you can redistribute it and/or -modify it under the terms below. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: The above copyright notice and this -permission notice must be included in all copies or substantial -portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/client/javascript/README.txt b/client/javascript/README.txt new file mode 100644 index 00000000000..34188b01fa0 --- /dev/null +++ b/client/javascript/README.txt @@ -0,0 +1,5 @@ +For a Solr JavaScript Client, see: +http://evolvingweb.github.com/ajax-solr/ + +For information on (now deprecated) SorlJS, see: +http://wiki.apache.org/solr/SolrJS \ No newline at end of file diff --git a/client/javascript/build.xml b/client/javascript/build.xml deleted file mode 100644 index ff334833cbb..00000000000 --- a/client/javascript/build.xml +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/client/javascript/example/core/testClientside.html b/client/javascript/example/core/testClientside.html deleted file mode 100644 index 5fd94e52151..00000000000 --- a/client/javascript/example/core/testClientside.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -
-

cat

-
-
-
- - diff --git a/client/javascript/example/core/testServerside.html b/client/javascript/example/core/testServerside.html deleted file mode 100644 index 51deb88ea07..00000000000 --- a/client/javascript/example/core/testServerside.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - -
-

cat

-
-
-
- - - diff --git a/client/javascript/example/reuters/images/contenth2.gif b/client/javascript/example/reuters/images/contenth2.gif deleted file mode 100644 index 706048b0448..00000000000 Binary files a/client/javascript/example/reuters/images/contenth2.gif and /dev/null differ diff --git a/client/javascript/example/reuters/images/header.gif b/client/javascript/example/reuters/images/header.gif deleted file mode 100644 index 93217e4e526..00000000000 Binary files a/client/javascript/example/reuters/images/header.gif and /dev/null differ diff --git a/client/javascript/example/reuters/images/sidebarh2.gif b/client/javascript/example/reuters/images/sidebarh2.gif deleted file mode 100644 index b18356fd0c7..00000000000 Binary files a/client/javascript/example/reuters/images/sidebarh2.gif and /dev/null differ diff --git a/client/javascript/example/reuters/importer/java/org/apache/solr/solrjs/ReutersService.java b/client/javascript/example/reuters/importer/java/org/apache/solr/solrjs/ReutersService.java deleted file mode 100644 index 8c5523c3f57..00000000000 --- a/client/javascript/example/reuters/importer/java/org/apache/solr/solrjs/ReutersService.java +++ /dev/null @@ -1,267 +0,0 @@ -package org.apache.solr.solrjs; -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.io.BufferedReader; -import java.io.ByteArrayInputStream; -import java.io.File; -import java.io.FileFilter; -import java.io.FileReader; -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URL; -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Locale; -import java.util.Map; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.xpath.XPath; -import javax.xml.xpath.XPathConstants; -import javax.xml.xpath.XPathExpressionException; -import javax.xml.xpath.XPathFactory; - -import org.apache.solr.client.solrj.SolrServer; -import org.apache.solr.client.solrj.SolrServerException; -import org.apache.solr.client.solrj.impl.CommonsHttpSolrServer; -import org.apache.solr.common.SolrInputDocument; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.NodeList; -import org.xml.sax.SAXException; - -public class ReutersService { - - private Map countryCodesMap = new HashMap(); - - public static void main(String[] args) throws XPathExpressionException, IOException, ParserConfigurationException, SAXException, SolrServerException, ParseException { - String usage = "Usage: java -jar reutersimporter.jar "; - - URL solrUrl = null; - try { - solrUrl = new URL(args[0]); - } catch (Exception e) { - System.out.println("First argument needs to be an URL!"); - System.out.println(usage); - } - File baseDir = null; - try { - baseDir = new File(args[1]); - if (!baseDir.exists() || !baseDir.isDirectory()) { - System.out.println("Second argument needs to be an existing directory!");; - System.out.println(usage); - } - } catch (Exception e) { - System.out.println("Second argument needs to be an existing directory!");; - System.out.println(usage); - } - - if (solrUrl != null && baseDir!= null && baseDir.exists() && baseDir.isDirectory()) { - ReutersService reutersService = new ReutersService(solrUrl.toExternalForm()); - reutersService.readDirectory(baseDir); - } - } - - /** - * The Solr Server to use - */ - private SolrServer solrServer; - - /** - * A shared xpath instance - */ - private final XPath xPath = XPathFactory.newInstance().newXPath(); - - /** - * The format used in the sgml files. - * eg. 26-FEB-1987 15:01:01.79 - */ - private final SimpleDateFormat reutersDateFormat = new SimpleDateFormat("dd-MMM-yyyy kk:mm:ss.SS", Locale.ENGLISH); - - /** - * A service that inputs the reuters TODO dataset. - * @param solrUrl The url of the solr server. - */ - public ReutersService(String solrUrl) { - try { - this.solrServer = new CommonsHttpSolrServer(solrUrl); - this.solrServer.ping(); - } catch (Exception e) { - throw new RuntimeException("unable to connect to solr server: " + solrUrl, e ); - } - } - - /** - * Takes a node and converts it into a SolrInoutDocument. - * @param element A node. - * @throws XPathExpressionException - * @throws SolrServerException - * @throws IOException - * @throws ParseException - */ - public void readDocument(Element element) throws XPathExpressionException, SolrServerException, IOException, ParseException { - - SolrInputDocument inputDocument = new SolrInputDocument(); - inputDocument.addField("id", element.getAttribute("NEWID")); - inputDocument.addField("title", xPath.evaluate("TEXT/TITLE", element)); - inputDocument.addField("dateline", xPath.evaluate("TEXT/DATELINE", element).trim()); - inputDocument.addField("text", xPath.evaluate("TEXT/BODY", element).trim()); - inputDocument.addField("places", readList("PLACES/D", element)); - inputDocument.addField("topics", readList("TOPICS/D", element)); - inputDocument.addField("organisations", readList("ORGS/D", element)); - inputDocument.addField("exchanges", readList("EXCHANGES/D", element)); - inputDocument.addField("companies", readList("COMPANIES/D", element)); - try { - inputDocument.addField("date", this.reutersDateFormat.parse(xPath.evaluate("DATE", element))); - } catch (ParseException e) { - inputDocument.addField("date", this.reutersDateFormat.parse("0" + xPath.evaluate("DATE", element))); - } - - for (Object place : inputDocument.getFieldValues("places")) { - String code = this.countryCodesMap.get(place); - if (code == null) { - try { - code = getCodeForPlace((String) place); - this.countryCodesMap.put((String) place, code); - } catch (SAXException e) { - e.printStackTrace(); - } catch (ParserConfigurationException e) { - e.printStackTrace(); - } - } - inputDocument.addField("countryCodes", code); - } - - this.solrServer.add(inputDocument); - System.out.println(inputDocument.getField("title")); - } - - private String getCodeForPlace(String place) throws MalformedURLException, SAXException, IOException, ParserConfigurationException, XPathExpressionException { - DocumentBuilderFactory dbfac = DocumentBuilderFactory.newInstance(); - DocumentBuilder docBuilder = dbfac.newDocumentBuilder(); - Document doc = docBuilder.parse(new URL("http://ws.geonames.org/search?q=" + place).openStream()); - return xPath.evaluate("/geonames/geoname/countryCode", doc); - } - - /** - * Reads a whole .sgml file. - * @param file The sgml reuters file. - * @throws XPathExpressionException - * @throws IOException - * @throws ParserConfigurationException - * @throws SAXException - * @throws SolrServerException - * @throws ParseException - */ - public void readFile(File file) throws XPathExpressionException, IOException, ParserConfigurationException, SAXException, SolrServerException, ParseException { - String documentString = readFileAsString(file); - - // remove "bad" entities - documentString = documentString.replaceAll("&#\\d;", ""); - documentString = documentString.replaceAll("&#\\d\\d;", ""); - - // remove doctype declaration - documentString = documentString.replaceAll("", ""); - - // add a document root - documentString = "" + documentString + ""; - - DocumentBuilderFactory dbfac = DocumentBuilderFactory.newInstance(); - DocumentBuilder docBuilder = dbfac.newDocumentBuilder(); - Document doc = docBuilder.parse(new ByteArrayInputStream(documentString.getBytes())); - - NodeList nodeList = (NodeList) xPath.evaluate("/root/REUTERS", doc, XPathConstants.NODESET); - System.out.println("READING FILE: " + file.getAbsoluteFile()); - for (int i=0; i< nodeList.getLength(); i++) { - System.out.print(" - " + file.getName() + "(" + i + ") "); - readDocument((Element) nodeList.item(i)); - } - - this.solrServer.commit(); - - } - - /** - * Reads a whole directory containing reuters .sgml files- - * @param directory - * @throws XPathExpressionException - * @throws IOException - * @throws ParserConfigurationException - * @throws SAXException - * @throws SolrServerException - * @throws ParseException - */ - public void readDirectory(File directory) throws XPathExpressionException, IOException, ParserConfigurationException, SAXException, SolrServerException, ParseException { - File[] files = directory.listFiles(new FileFilter() { - public boolean accept(File pathname) { - if (pathname.getName().contains(".sgm")) { - return true; - } - return false; - } - }); - if (files.length == 0) { - throw new RuntimeException("Directory doesn't contain sgml files!"); - } - for (int i = 0; i < files.length; i++) { - File file = files[i]; - readFile(file); - } - } - - /** - * Helper that converts a listnode into a java list. - * @param path - * @param element - * @return - * @throws XPathExpressionException - */ - private List readList(String path, Element element) throws XPathExpressionException { - List list = new ArrayList(); - NodeList nodeList = (NodeList) xPath.evaluate(path, element, XPathConstants.NODESET); - for (int i=0; i< nodeList.getLength(); i++) { - list.add(nodeList.item(i).getTextContent()); - } - return list; - } - - /** - * Helper that reads a file into a string. - * @param file - * @return - * @throws java.io.IOException - */ - private static String readFileAsString(File file) throws java.io.IOException { - StringBuilder fileData = new StringBuilder(1000); - BufferedReader reader = new BufferedReader(new FileReader(file)); - char[] buf = new char[1024]; - int numRead=0; - while((numRead=reader.read(buf)) != -1){ - String readData = String.valueOf(buf, 0, numRead); - fileData.append(readData); - buf = new char[1024]; - } - reader.close(); - return fileData.toString(); - } - -} diff --git a/client/javascript/example/reuters/index.html b/client/javascript/example/reuters/index.html deleted file mode 100644 index c21ca5cebd3..00000000000 --- a/client/javascript/example/reuters/index.html +++ /dev/null @@ -1,199 +0,0 @@ - - - - - SolrJS - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
- -
-
-
- -
-

Current Selection

-
    -
  • -
-

Search

-
    -
  • - ( press ESC to close suggestions) - -
  • -
-

Top Topics

-
    -
  • -
-

Top Organisations

-
    -
  • -
-

Top Exchanges

-
    -
  • -
-

By Country

-
    -
  • -
  • -
-

By Date

-
    -
  • -
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/client/javascript/example/reuters/style.css b/client/javascript/example/reuters/style.css deleted file mode 100644 index 3016b99e463..00000000000 --- a/client/javascript/example/reuters/style.css +++ /dev/null @@ -1,128 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -* { - padding: 0; - margin: 0; -} - -body { -background: #fff url(images/header.gif) repeat-x; -font-family: Verdana, Arial, Helvetica, sans-serif; -font-size: 12px; -line-height: 18px; -color: #333333;; -} - -img { border: none; } -a { color: #6998F0; text-decoration: none; } -a:hover { text-decoration: underline; color : #000; } - -#wrap { -width: 1000px; -margin: 0px auto; -} - -#header { -height: 90px; -} - -#header h1 { -padding: 20px 0 5px 10px; -font-size: 20px; -letter-spacing: -2px; -} -#header h1 a { -color: #000; -text-decoration: none; -} -#header h1 a:hover { -text-decoration: none; -color: #666; -} -#header h2 { -padding-left: 11px; -font-size: 14px; -color: #666; -font-weight: 100; -} - -.right { -float: right; -width: 538px; -text-align: justify; -padding: 10px 20px 10px 40px; -border-left: 1px solid #aaa; -min-height:1000px; -} -.right h2 { -color: #B4241B; -font-size: 20px; -letter-spacing: -2px; -font-weight: 100; -padding : 15px 0 5px 0; -} -.right h2 a { - -} -.right h2 a:hover { - -} -.left { -float: left; -width: 400px; -padding: 10px 0 10px 0px; -} -.left h2 { -font-size: 13px; -color: #333; -padding: 5px 0 2px 10px; -} -.left ul { -list-style-type: none; -padding: 5px 0 10px 5px; -} -.left ul li { -padding: 2px 20px; - -} - -.left ul li a { -display: block; -color: #6998F0; -} -.left ul li a:hover { -color: #ff0000; -} - -.footer { -text-align: center; -color: #666; -font-size: 11px; -padding: 10px; -background: #f7f7f7; -border-top: 1px solid #aaa; -} -.footer a { color: #666; } - -#result a { - margin-right:5px; -} - -#search input { - width:350px; -} diff --git a/client/javascript/example/reuters/testdata/download-dataset.sh b/client/javascript/example/reuters/testdata/download-dataset.sh deleted file mode 100755 index 46870d26574..00000000000 --- a/client/javascript/example/reuters/testdata/download-dataset.sh +++ /dev/null @@ -1,4 +0,0 @@ -wget http://kdd.ics.uci.edu/databases/reuters21578/reuters21578.tar.gz -tar xvf reuters21578.tar.gz -wget http://kdd.ics.uci.edu/databases/reuters21578/reuters21578.tar.gz -tar xvf reuters21578.tar.gz diff --git a/client/javascript/example/reuters/testsolr/solr/conf/admin-extra.html b/client/javascript/example/reuters/testsolr/solr/conf/admin-extra.html deleted file mode 100644 index aa739da862c..00000000000 --- a/client/javascript/example/reuters/testsolr/solr/conf/admin-extra.html +++ /dev/null @@ -1,31 +0,0 @@ - - - diff --git a/client/javascript/example/reuters/testsolr/solr/conf/elevate.xml b/client/javascript/example/reuters/testsolr/solr/conf/elevate.xml deleted file mode 100644 index 7630ebe20fb..00000000000 --- a/client/javascript/example/reuters/testsolr/solr/conf/elevate.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/client/javascript/example/reuters/testsolr/solr/conf/protwords.txt b/client/javascript/example/reuters/testsolr/solr/conf/protwords.txt deleted file mode 100644 index 1dfc0abecbf..00000000000 --- a/client/javascript/example/reuters/testsolr/solr/conf/protwords.txt +++ /dev/null @@ -1,21 +0,0 @@ -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -#----------------------------------------------------------------------- -# Use a protected word file to protect against the stemmer reducing two -# unrelated words to the same base word. - -# Some non-words that normally won't be encountered, -# just to test that they won't be stemmed. -dontstems -zwhacky - diff --git a/client/javascript/example/reuters/testsolr/solr/conf/schema.xml b/client/javascript/example/reuters/testsolr/solr/conf/schema.xml deleted file mode 100755 index c2520577ce3..00000000000 --- a/client/javascript/example/reuters/testsolr/solr/conf/schema.xml +++ /dev/null @@ -1,251 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - - text - - - - - diff --git a/client/javascript/example/reuters/testsolr/solr/conf/scripts.conf b/client/javascript/example/reuters/testsolr/solr/conf/scripts.conf deleted file mode 100644 index f58b262ae0c..00000000000 --- a/client/javascript/example/reuters/testsolr/solr/conf/scripts.conf +++ /dev/null @@ -1,24 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -user= -solr_hostname=localhost -solr_port=8983 -rsyncd_port=18983 -data_dir= -webapp_name=solr -master_host= -master_data_dir= -master_status_dir= diff --git a/client/javascript/example/reuters/testsolr/solr/conf/solrconfig.xml b/client/javascript/example/reuters/testsolr/solr/conf/solrconfig.xml deleted file mode 100755 index d2b495c6ff3..00000000000 --- a/client/javascript/example/reuters/testsolr/solr/conf/solrconfig.xml +++ /dev/null @@ -1,698 +0,0 @@ - - - - - - ${solr.abortOnConfigurationError:true} - - - ${solr.data.dir:./solr/data} - - - - - false - - 10 - - - - 32 - 2147483647 - 10000 - 1000 - 10000 - - - - - - - - - - - single - - - - - false - 32 - 10 - - - 2147483647 - 10000 - - - false - - - - - - - - - - - - - - - - - - - - - - 1024 - - - - - - - - - - - - - true - - - - - - - - 50 - - - 200 - - - - - - - - - solr 0 10 - rocks 0 10 - static newSearcher warming query from solrconfig.xml - - - - - - - fast_warm 0 10 - static firstSearcher warming query from solrconfig.xml - - - - - false - - - 2 - - - - - - - - - - - - - - - - - - - - - - - explicit - - - - - - - - - dismax - explicit - 0.01 - - text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4 - - - text^0.2 features^1.1 name^1.5 manu^1.4 manu_exact^1.9 - - - ord(popularity)^0.5 recip(rord(price),1,1000,1000)^0.3 - - - id,name,price,score - - - 2<-1 5<-2 6<90% - - 100 - *:* - - text features name - - 0 - - name - regex - - - - - - - dismax - explicit - text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 - 2<-1 5<-2 6<90% - - incubationdate_dt:[* TO NOW/DAY-1MONTH]^2.2 - - - - inStock:true - - - - cat - manu_exact - price:[* TO 500] - price:[500 TO *] - - - - - - - - - - textSpell - - - default - spell - ./spellchecker1 - - - - jarowinkler - spell - - org.apache.lucene.search.spell.JaroWinklerDistance - ./spellchecker2 - - - - - solr.FileBasedSpellChecker - file - spellings.txt - UTF-8 - ./spellcheckerFile - - - - - - - - false - - false - - 1 - - - spellcheck - - - - - - - string - elevate.xml - - - - - - explicit - - - elevator - - - - - - - - - - - - - - - - - - - - - - standard - solrpingquery - all - - - - - - - explicit - true - - - - - - - - - 100 - - - - - - - - 70 - - 0.5 - - [-\w ,/\n\"']{20,200} - - - - - - - ]]> - ]]> - - - - - - - - - - - 5 - - - - - - - - - - - solr - - - - - diff --git a/client/javascript/example/reuters/testsolr/solr/conf/spellings.txt b/client/javascript/example/reuters/testsolr/solr/conf/spellings.txt deleted file mode 100644 index d7ede6f5611..00000000000 --- a/client/javascript/example/reuters/testsolr/solr/conf/spellings.txt +++ /dev/null @@ -1,2 +0,0 @@ -pizza -history \ No newline at end of file diff --git a/client/javascript/example/reuters/testsolr/solr/conf/stopwords.txt b/client/javascript/example/reuters/testsolr/solr/conf/stopwords.txt deleted file mode 100644 index 8433c832d2c..00000000000 --- a/client/javascript/example/reuters/testsolr/solr/conf/stopwords.txt +++ /dev/null @@ -1,57 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -#----------------------------------------------------------------------- -# a couple of test stopwords to test that the words are really being -# configured from this file: -stopworda -stopwordb - -#Standard english stop words taken from Lucene's StopAnalyzer -an -and -are -as -at -be -but -by -for -if -in -into -is -it -no -not -of -on -or -s -such -t -that -the -their -then -there -these -they -this -to -was -will -with - diff --git a/client/javascript/example/reuters/testsolr/solr/conf/synonyms.txt b/client/javascript/example/reuters/testsolr/solr/conf/synonyms.txt deleted file mode 100644 index b0e31cb7ec8..00000000000 --- a/client/javascript/example/reuters/testsolr/solr/conf/synonyms.txt +++ /dev/null @@ -1,31 +0,0 @@ -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -#----------------------------------------------------------------------- -#some test synonym mappings unlikely to appear in real input text -aaa => aaaa -bbb => bbbb1 bbbb2 -ccc => cccc1,cccc2 -a\=>a => b\=>b -a\,a => b\,b -fooaaa,baraaa,bazaaa - -# Some synonym groups specific to this example -GB,gib,gigabyte,gigabytes -MB,mib,megabyte,megabytes -Television, Televisions, TV, TVs -#notice we use "gib" instead of "GiB" so any WordDelimiterFilter coming -#after us won't split it into two words. - -# Synonym mappings can be used for spelling correction too -pixima => pixma - diff --git a/client/javascript/example/reuters/testsolr/solr/conf/velocity/VM_global_library.vm b/client/javascript/example/reuters/testsolr/solr/conf/velocity/VM_global_library.vm deleted file mode 100644 index af117df1ebf..00000000000 --- a/client/javascript/example/reuters/testsolr/solr/conf/velocity/VM_global_library.vm +++ /dev/null @@ -1,36 +0,0 @@ -#macro(url_for_filters $filter_queries) - /solr/itas?fq=$filter_queries -#end - -#macro(url_for_home)/solr/itas#end - -#macro(url_for_start $start)/solr/itas?start=$start#end - -#macro(url_for_nested_facet $field $value)/solr/itas?fq=$field:$value#end - -#macro(link_to_previous_page $text) - #if($page.current_page_number > 1) - #set($prev_start = $page.start - $page.results_per_page) - $text - #end -#end - -#macro(link_to_next_page $text) - #if($page.current_page_number < $page.page_count) - #set($next_start = $page.start + $page.results_per_page) - $text - #end -#end - -#macro(link_to_page $page_number $text) - #if($page_number == $page.current_page_number) - $text - #else - #if($page_number <= $page.page_count) - #set($page_start = $page_number * $page.results_per_page - $page.results_per_page) - $text - #end - #end -#end - -#macro(param $key)$request.params.get($key)#end diff --git a/client/javascript/example/reuters/testsolr/solr/conf/velocity/browse.vm b/client/javascript/example/reuters/testsolr/solr/conf/velocity/browse.vm deleted file mode 100644 index 9c1b4e11489..00000000000 --- a/client/javascript/example/reuters/testsolr/solr/conf/velocity/browse.vm +++ /dev/null @@ -1,70 +0,0 @@ -#set($doclist=$response.values.response) -#set($searcher=$request.searcher) -#set($params=$request.params) -#set($fields=$response.returnFields) - -## TODO: Implement layouts - - #param('title') - - - - - - -
- #parse("header.vm") - - #set($filter_queries = $params.getParams('fq')) - #foreach($fq in $filter_queries) - > $fq - #end -
- -
-
- Query: -
-
- -
- #foreach($field in $response.values.facet_counts.facet_fields) - $field.key -
    - #foreach($facet in $field.value) - #set($facetURL = "#url_for_nested_facet($field.key, $facet.key)") - #if ($facetURL != '') -
  • $facet.key ($facet.value)
  • - #end - #end -
- #end -
- - - -
- #foreach($id in $doclist.iterator()) - #set($doc = $searcher.doc($id,$response.returnFields)) - #parse("hit.vm") - #end -
- - - -
- #parse("footer.vm") -
- - - \ No newline at end of file diff --git a/client/javascript/example/reuters/testsolr/solr/conf/velocity/header.vm b/client/javascript/example/reuters/testsolr/solr/conf/velocity/header.vm deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/client/javascript/example/reuters/testsolr/solr/conf/velocity/hit.vm b/client/javascript/example/reuters/testsolr/solr/conf/velocity/hit.vm deleted file mode 100644 index 34c884dd501..00000000000 --- a/client/javascript/example/reuters/testsolr/solr/conf/velocity/hit.vm +++ /dev/null @@ -1,18 +0,0 @@ -
- #foreach($field in $doc.fields) - #if($response.returnFields.contains("*") || $response.returnFields.contains($field.name())) -

- $field.name() : - - ##TODO: Need to provide helpers for field values, including HTML escaping and highlighting - #foreach($value in $doc.getFieldables($field.name())) - $request.schema.getFieldType($field.name()).toExternal($value) - #end - -

- #end - #end - #if($params.getBool("debugQuery",false)) - toggle explain
$response.values.debug.explain.get($doc.get('id'))
- #end -
diff --git a/client/javascript/example/reuters/testsolr/solr/conf/velocity/main.css b/client/javascript/example/reuters/testsolr/solr/conf/velocity/main.css deleted file mode 100644 index 11f01716b3a..00000000000 --- a/client/javascript/example/reuters/testsolr/solr/conf/velocity/main.css +++ /dev/null @@ -1,96 +0,0 @@ -.array-field { - border: 2px solid #474747; - background: #FFE9D8; - padding: 5px; - margin: 5px; -} - -.array-field-list li { - list-style: circle; - margin-left: 20px; -} - -body { - font-family: Arial, Helvetica, sans-serif; - font-size: 10pt; -} - -.constraints-title { - background: gray; -} - -.facet-fields { - float: left; - margin: 5px; - margin-top: 0px; - background: #FEC293; - border: 2px solid #474747; - width: 185px; - padding: 2px; -} - -.facet-field { - font-weight: bold; -} - -.highlight { - color: white; - background-color: gray; - border: 1px black solid; -} - -.highlight-box { - margin-left: 15px; -} - -.field-name { - font-weight: bold; -} - -.highlighted-facet-field { - background: white; -} - -#logo { - margin: 10px; -} - -.query-box, .constraints { - padding: 5px; - margin: 5px; - border: 3px solid #474747; - color: white; - background: #FD9644; - font-weight: bold; - font-size: 16px; -} - -.query-box input { - margin-left: 8px; - width: 85%; -} - -.pagination { - padding-left: 33%; - font-weight: bold; - background: gray; - color: white; - margin: 5px; - margin-left: 200px; -} - -.result-document { - border: 3px solid #474747; - background: #FEC293; - padding: 5px; - margin: 5px; - margin-left: 200px; -} - -.selected-facet-field { - font-weight: bold; -} - -li.show { - list-style: disc; -} \ No newline at end of file diff --git a/client/javascript/example/reuters/testsolr/solr/conf/xslt/example.xsl b/client/javascript/example/reuters/testsolr/solr/conf/xslt/example.xsl deleted file mode 100644 index 6832a1d4cb3..00000000000 --- a/client/javascript/example/reuters/testsolr/solr/conf/xslt/example.xsl +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - - - - - - - - - <xsl:value-of select="$title"/> - - - -

-
- This has been formatted by the sample "example.xsl" transform - - use your own XSLT to get a nicer page -
- - - -
- - - -
- - - - -
-
-
- - - - - - - - - - - - - - javascript:toggle("");? -
- - exp - - - - - -
- - -
- - - - - - - -
    - -
  • -
    -
- - -
- - - - - - - - - - - - - - - - - - - - -
diff --git a/client/javascript/example/reuters/testsolr/solr/conf/xslt/example_atom.xsl b/client/javascript/example/reuters/testsolr/solr/conf/xslt/example_atom.xsl deleted file mode 100644 index e1c7d5a2af2..00000000000 --- a/client/javascript/example/reuters/testsolr/solr/conf/xslt/example_atom.xsl +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - Example Solr Atom 1.0 Feed - - This has been formatted by the sample "example_atom.xsl" transform - - use your own XSLT to get a nicer Atom feed. - - - Apache Solr - solr-user@lucene.apache.org - - - - - - tag:localhost,2007:example - - - - - - - - - <xsl:value-of select="str[@name='name']"/> - - tag:localhost,2007: - - - - - - diff --git a/client/javascript/example/reuters/testsolr/solr/conf/xslt/example_rss.xsl b/client/javascript/example/reuters/testsolr/solr/conf/xslt/example_rss.xsl deleted file mode 100644 index 3e09e654d5f..00000000000 --- a/client/javascript/example/reuters/testsolr/solr/conf/xslt/example_rss.xsl +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - Example Solr RSS 2.0 Feed - http://localhost:8983/solr - - This has been formatted by the sample "example_rss.xsl" transform - - use your own XSLT to get a nicer RSS feed. - - en-us - http://localhost:8983/solr - - - - - - - - - - - <xsl:value-of select="str[@name='name']"/> - - http://localhost:8983/solr/select?q=id: - - - - - - - http://localhost:8983/solr/select?q=id: - - - - diff --git a/client/javascript/example/reuters/testsolr/solr/conf/xslt/luke.xsl b/client/javascript/example/reuters/testsolr/solr/conf/xslt/luke.xsl deleted file mode 100644 index 6e9a064d7e0..00000000000 --- a/client/javascript/example/reuters/testsolr/solr/conf/xslt/luke.xsl +++ /dev/null @@ -1,337 +0,0 @@ - - - - - - - - - Solr Luke Request Handler Response - - - - - - - - - <xsl:value-of select="$title"/> - - - - - -

- -

-
- -
- -

Index Statistics

- -
- -

Field Statistics

- - - -

Document statistics

- - - - -
- - - - - -
- -
- - -
- -
- -
-
-
- - - - - - - - - - - - - - - - - - - - - -
-

- -

- -
- -
-
-
- - -
- - 50 - 800 - 160 - blue - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- background-color: ; width: px; height: px; -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
  • - -
  • -
    -
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/client/javascript/example/reuters/web/images/contenth2.gif b/client/javascript/example/reuters/web/images/contenth2.gif deleted file mode 100644 index 706048b0448..00000000000 Binary files a/client/javascript/example/reuters/web/images/contenth2.gif and /dev/null differ diff --git a/client/javascript/example/reuters/web/images/header.gif b/client/javascript/example/reuters/web/images/header.gif deleted file mode 100644 index 93217e4e526..00000000000 Binary files a/client/javascript/example/reuters/web/images/header.gif and /dev/null differ diff --git a/client/javascript/example/reuters/web/images/sidebarh2.gif b/client/javascript/example/reuters/web/images/sidebarh2.gif deleted file mode 100644 index b18356fd0c7..00000000000 Binary files a/client/javascript/example/reuters/web/images/sidebarh2.gif and /dev/null differ diff --git a/client/javascript/example/reuters/web/index.html b/client/javascript/example/reuters/web/index.html deleted file mode 100644 index 2df7b9d1716..00000000000 --- a/client/javascript/example/reuters/web/index.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - - SolrJS - - - - - - - - - - - - - - - - - - - - - - -
- -
-
- -
-
-
- -
-

Current Selection

-
    -
  • -
-

Search

-
    -
  • - ( press ESC to close suggestions) - -
  • -
-

Top Topics

-
    -
  • -
-

Top Organisations

-
    -
  • -
-

Top Exchanges

-
    -
  • -
-

By Country

-
    -
  • -
  • -
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/client/javascript/example/reuters/web/style.css b/client/javascript/example/reuters/web/style.css deleted file mode 100644 index 3016b99e463..00000000000 --- a/client/javascript/example/reuters/web/style.css +++ /dev/null @@ -1,128 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -* { - padding: 0; - margin: 0; -} - -body { -background: #fff url(images/header.gif) repeat-x; -font-family: Verdana, Arial, Helvetica, sans-serif; -font-size: 12px; -line-height: 18px; -color: #333333;; -} - -img { border: none; } -a { color: #6998F0; text-decoration: none; } -a:hover { text-decoration: underline; color : #000; } - -#wrap { -width: 1000px; -margin: 0px auto; -} - -#header { -height: 90px; -} - -#header h1 { -padding: 20px 0 5px 10px; -font-size: 20px; -letter-spacing: -2px; -} -#header h1 a { -color: #000; -text-decoration: none; -} -#header h1 a:hover { -text-decoration: none; -color: #666; -} -#header h2 { -padding-left: 11px; -font-size: 14px; -color: #666; -font-weight: 100; -} - -.right { -float: right; -width: 538px; -text-align: justify; -padding: 10px 20px 10px 40px; -border-left: 1px solid #aaa; -min-height:1000px; -} -.right h2 { -color: #B4241B; -font-size: 20px; -letter-spacing: -2px; -font-weight: 100; -padding : 15px 0 5px 0; -} -.right h2 a { - -} -.right h2 a:hover { - -} -.left { -float: left; -width: 400px; -padding: 10px 0 10px 0px; -} -.left h2 { -font-size: 13px; -color: #333; -padding: 5px 0 2px 10px; -} -.left ul { -list-style-type: none; -padding: 5px 0 10px 5px; -} -.left ul li { -padding: 2px 20px; - -} - -.left ul li a { -display: block; -color: #6998F0; -} -.left ul li a:hover { -color: #ff0000; -} - -.footer { -text-align: center; -color: #666; -font-size: 11px; -padding: 10px; -background: #f7f7f7; -border-top: 1px solid #aaa; -} -.footer a { color: #666; } - -#result a { - margin-right:5px; -} - -#search input { - width:350px; -} diff --git a/client/javascript/example/testServerside.html b/client/javascript/example/testServerside.html deleted file mode 100644 index 99ea7d018c4..00000000000 --- a/client/javascript/example/testServerside.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - -
-

topics

-
-
-
- - - diff --git a/client/javascript/example/testsolr/solr/conf/admin-extra.html b/client/javascript/example/testsolr/solr/conf/admin-extra.html deleted file mode 100644 index aa739da862c..00000000000 --- a/client/javascript/example/testsolr/solr/conf/admin-extra.html +++ /dev/null @@ -1,31 +0,0 @@ - - - diff --git a/client/javascript/example/testsolr/solr/conf/elevate.xml b/client/javascript/example/testsolr/solr/conf/elevate.xml deleted file mode 100644 index 7630ebe20fb..00000000000 --- a/client/javascript/example/testsolr/solr/conf/elevate.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/client/javascript/example/testsolr/solr/conf/protwords.txt b/client/javascript/example/testsolr/solr/conf/protwords.txt deleted file mode 100644 index 1dfc0abecbf..00000000000 --- a/client/javascript/example/testsolr/solr/conf/protwords.txt +++ /dev/null @@ -1,21 +0,0 @@ -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -#----------------------------------------------------------------------- -# Use a protected word file to protect against the stemmer reducing two -# unrelated words to the same base word. - -# Some non-words that normally won't be encountered, -# just to test that they won't be stemmed. -dontstems -zwhacky - diff --git a/client/javascript/example/testsolr/solr/conf/schema.xml b/client/javascript/example/testsolr/solr/conf/schema.xml deleted file mode 100755 index d461778ff55..00000000000 --- a/client/javascript/example/testsolr/solr/conf/schema.xml +++ /dev/null @@ -1,412 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - - - text - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/client/javascript/example/testsolr/solr/conf/scripts.conf b/client/javascript/example/testsolr/solr/conf/scripts.conf deleted file mode 100644 index f58b262ae0c..00000000000 --- a/client/javascript/example/testsolr/solr/conf/scripts.conf +++ /dev/null @@ -1,24 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -user= -solr_hostname=localhost -solr_port=8983 -rsyncd_port=18983 -data_dir= -webapp_name=solr -master_host= -master_data_dir= -master_status_dir= diff --git a/client/javascript/example/testsolr/solr/conf/solrconfig.xml b/client/javascript/example/testsolr/solr/conf/solrconfig.xml deleted file mode 100755 index d2b495c6ff3..00000000000 --- a/client/javascript/example/testsolr/solr/conf/solrconfig.xml +++ /dev/null @@ -1,698 +0,0 @@ - - - - - - ${solr.abortOnConfigurationError:true} - - - ${solr.data.dir:./solr/data} - - - - - false - - 10 - - - - 32 - 2147483647 - 10000 - 1000 - 10000 - - - - - - - - - - - single - - - - - false - 32 - 10 - - - 2147483647 - 10000 - - - false - - - - - - - - - - - - - - - - - - - - - - 1024 - - - - - - - - - - - - - true - - - - - - - - 50 - - - 200 - - - - - - - - - solr 0 10 - rocks 0 10 - static newSearcher warming query from solrconfig.xml - - - - - - - fast_warm 0 10 - static firstSearcher warming query from solrconfig.xml - - - - - false - - - 2 - - - - - - - - - - - - - - - - - - - - - - - explicit - - - - - - - - - dismax - explicit - 0.01 - - text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4 - - - text^0.2 features^1.1 name^1.5 manu^1.4 manu_exact^1.9 - - - ord(popularity)^0.5 recip(rord(price),1,1000,1000)^0.3 - - - id,name,price,score - - - 2<-1 5<-2 6<90% - - 100 - *:* - - text features name - - 0 - - name - regex - - - - - - - dismax - explicit - text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 - 2<-1 5<-2 6<90% - - incubationdate_dt:[* TO NOW/DAY-1MONTH]^2.2 - - - - inStock:true - - - - cat - manu_exact - price:[* TO 500] - price:[500 TO *] - - - - - - - - - - textSpell - - - default - spell - ./spellchecker1 - - - - jarowinkler - spell - - org.apache.lucene.search.spell.JaroWinklerDistance - ./spellchecker2 - - - - - solr.FileBasedSpellChecker - file - spellings.txt - UTF-8 - ./spellcheckerFile - - - - - - - - false - - false - - 1 - - - spellcheck - - - - - - - string - elevate.xml - - - - - - explicit - - - elevator - - - - - - - - - - - - - - - - - - - - - - standard - solrpingquery - all - - - - - - - explicit - true - - - - - - - - - 100 - - - - - - - - 70 - - 0.5 - - [-\w ,/\n\"']{20,200} - - - - - - - ]]> - ]]> - - - - - - - - - - - 5 - - - - - - - - - - - solr - - - - - diff --git a/client/javascript/example/testsolr/solr/conf/spellings.txt b/client/javascript/example/testsolr/solr/conf/spellings.txt deleted file mode 100644 index d7ede6f5611..00000000000 --- a/client/javascript/example/testsolr/solr/conf/spellings.txt +++ /dev/null @@ -1,2 +0,0 @@ -pizza -history \ No newline at end of file diff --git a/client/javascript/example/testsolr/solr/conf/stopwords.txt b/client/javascript/example/testsolr/solr/conf/stopwords.txt deleted file mode 100644 index b5824da3263..00000000000 --- a/client/javascript/example/testsolr/solr/conf/stopwords.txt +++ /dev/null @@ -1,58 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -#----------------------------------------------------------------------- -# a couple of test stopwords to test that the words are really being -# configured from this file: -stopworda -stopwordb - -#Standard english stop words taken from Lucene's StopAnalyzer -a -an -and -are -as -at -be -but -by -for -if -in -into -is -it -no -not -of -on -or -s -such -t -that -the -their -then -there -these -they -this -to -was -will -with - diff --git a/client/javascript/example/testsolr/solr/conf/synonyms.txt b/client/javascript/example/testsolr/solr/conf/synonyms.txt deleted file mode 100644 index b0e31cb7ec8..00000000000 --- a/client/javascript/example/testsolr/solr/conf/synonyms.txt +++ /dev/null @@ -1,31 +0,0 @@ -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -#----------------------------------------------------------------------- -#some test synonym mappings unlikely to appear in real input text -aaa => aaaa -bbb => bbbb1 bbbb2 -ccc => cccc1,cccc2 -a\=>a => b\=>b -a\,a => b\,b -fooaaa,baraaa,bazaaa - -# Some synonym groups specific to this example -GB,gib,gigabyte,gigabytes -MB,mib,megabyte,megabytes -Television, Televisions, TV, TVs -#notice we use "gib" instead of "GiB" so any WordDelimiterFilter coming -#after us won't split it into two words. - -# Synonym mappings can be used for spelling correction too -pixima => pixma - diff --git a/client/javascript/example/testsolr/solr/conf/velocity/VM_global_library.vm b/client/javascript/example/testsolr/solr/conf/velocity/VM_global_library.vm deleted file mode 100644 index af117df1ebf..00000000000 --- a/client/javascript/example/testsolr/solr/conf/velocity/VM_global_library.vm +++ /dev/null @@ -1,36 +0,0 @@ -#macro(url_for_filters $filter_queries) - /solr/itas?fq=$filter_queries -#end - -#macro(url_for_home)/solr/itas#end - -#macro(url_for_start $start)/solr/itas?start=$start#end - -#macro(url_for_nested_facet $field $value)/solr/itas?fq=$field:$value#end - -#macro(link_to_previous_page $text) - #if($page.current_page_number > 1) - #set($prev_start = $page.start - $page.results_per_page) - $text - #end -#end - -#macro(link_to_next_page $text) - #if($page.current_page_number < $page.page_count) - #set($next_start = $page.start + $page.results_per_page) - $text - #end -#end - -#macro(link_to_page $page_number $text) - #if($page_number == $page.current_page_number) - $text - #else - #if($page_number <= $page.page_count) - #set($page_start = $page_number * $page.results_per_page - $page.results_per_page) - $text - #end - #end -#end - -#macro(param $key)$request.params.get($key)#end diff --git a/client/javascript/example/testsolr/solr/conf/velocity/browse.vm b/client/javascript/example/testsolr/solr/conf/velocity/browse.vm deleted file mode 100644 index 9c1b4e11489..00000000000 --- a/client/javascript/example/testsolr/solr/conf/velocity/browse.vm +++ /dev/null @@ -1,70 +0,0 @@ -#set($doclist=$response.values.response) -#set($searcher=$request.searcher) -#set($params=$request.params) -#set($fields=$response.returnFields) - -## TODO: Implement layouts - - #param('title') - - - - - - -
- #parse("header.vm") - - #set($filter_queries = $params.getParams('fq')) - #foreach($fq in $filter_queries) - > $fq - #end -
- -
-
- Query: -
-
- -
- #foreach($field in $response.values.facet_counts.facet_fields) - $field.key -
    - #foreach($facet in $field.value) - #set($facetURL = "#url_for_nested_facet($field.key, $facet.key)") - #if ($facetURL != '') -
  • $facet.key ($facet.value)
  • - #end - #end -
- #end -
- - - -
- #foreach($id in $doclist.iterator()) - #set($doc = $searcher.doc($id,$response.returnFields)) - #parse("hit.vm") - #end -
- - - -
- #parse("footer.vm") -
- - - \ No newline at end of file diff --git a/client/javascript/example/testsolr/solr/conf/velocity/header.vm b/client/javascript/example/testsolr/solr/conf/velocity/header.vm deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/client/javascript/example/testsolr/solr/conf/velocity/hit.vm b/client/javascript/example/testsolr/solr/conf/velocity/hit.vm deleted file mode 100644 index 34c884dd501..00000000000 --- a/client/javascript/example/testsolr/solr/conf/velocity/hit.vm +++ /dev/null @@ -1,18 +0,0 @@ -
- #foreach($field in $doc.fields) - #if($response.returnFields.contains("*") || $response.returnFields.contains($field.name())) -

- $field.name() : - - ##TODO: Need to provide helpers for field values, including HTML escaping and highlighting - #foreach($value in $doc.getFieldables($field.name())) - $request.schema.getFieldType($field.name()).toExternal($value) - #end - -

- #end - #end - #if($params.getBool("debugQuery",false)) - toggle explain
$response.values.debug.explain.get($doc.get('id'))
- #end -
diff --git a/client/javascript/example/testsolr/solr/conf/velocity/main.css b/client/javascript/example/testsolr/solr/conf/velocity/main.css deleted file mode 100644 index 11f01716b3a..00000000000 --- a/client/javascript/example/testsolr/solr/conf/velocity/main.css +++ /dev/null @@ -1,96 +0,0 @@ -.array-field { - border: 2px solid #474747; - background: #FFE9D8; - padding: 5px; - margin: 5px; -} - -.array-field-list li { - list-style: circle; - margin-left: 20px; -} - -body { - font-family: Arial, Helvetica, sans-serif; - font-size: 10pt; -} - -.constraints-title { - background: gray; -} - -.facet-fields { - float: left; - margin: 5px; - margin-top: 0px; - background: #FEC293; - border: 2px solid #474747; - width: 185px; - padding: 2px; -} - -.facet-field { - font-weight: bold; -} - -.highlight { - color: white; - background-color: gray; - border: 1px black solid; -} - -.highlight-box { - margin-left: 15px; -} - -.field-name { - font-weight: bold; -} - -.highlighted-facet-field { - background: white; -} - -#logo { - margin: 10px; -} - -.query-box, .constraints { - padding: 5px; - margin: 5px; - border: 3px solid #474747; - color: white; - background: #FD9644; - font-weight: bold; - font-size: 16px; -} - -.query-box input { - margin-left: 8px; - width: 85%; -} - -.pagination { - padding-left: 33%; - font-weight: bold; - background: gray; - color: white; - margin: 5px; - margin-left: 200px; -} - -.result-document { - border: 3px solid #474747; - background: #FEC293; - padding: 5px; - margin: 5px; - margin-left: 200px; -} - -.selected-facet-field { - font-weight: bold; -} - -li.show { - list-style: disc; -} \ No newline at end of file diff --git a/client/javascript/example/testsolr/solr/conf/xslt/example.xsl b/client/javascript/example/testsolr/solr/conf/xslt/example.xsl deleted file mode 100644 index 6832a1d4cb3..00000000000 --- a/client/javascript/example/testsolr/solr/conf/xslt/example.xsl +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - - - - - - - - - <xsl:value-of select="$title"/> - - - -

-
- This has been formatted by the sample "example.xsl" transform - - use your own XSLT to get a nicer page -
- - - -
- - - -
- - - - -
-
-
- - - - - - - - - - - - - - javascript:toggle("");? -
- - exp - - - - - -
- - -
- - - - - - - -
    - -
  • -
    -
- - -
- - - - - - - - - - - - - - - - - - - - -
diff --git a/client/javascript/example/testsolr/solr/conf/xslt/example_atom.xsl b/client/javascript/example/testsolr/solr/conf/xslt/example_atom.xsl deleted file mode 100644 index e1c7d5a2af2..00000000000 --- a/client/javascript/example/testsolr/solr/conf/xslt/example_atom.xsl +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - Example Solr Atom 1.0 Feed - - This has been formatted by the sample "example_atom.xsl" transform - - use your own XSLT to get a nicer Atom feed. - - - Apache Solr - solr-user@lucene.apache.org - - - - - - tag:localhost,2007:example - - - - - - - - - <xsl:value-of select="str[@name='name']"/> - - tag:localhost,2007: - - - - - - diff --git a/client/javascript/example/testsolr/solr/conf/xslt/example_rss.xsl b/client/javascript/example/testsolr/solr/conf/xslt/example_rss.xsl deleted file mode 100644 index 3e09e654d5f..00000000000 --- a/client/javascript/example/testsolr/solr/conf/xslt/example_rss.xsl +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - Example Solr RSS 2.0 Feed - http://localhost:8983/solr - - This has been formatted by the sample "example_rss.xsl" transform - - use your own XSLT to get a nicer RSS feed. - - en-us - http://localhost:8983/solr - - - - - - - - - - - <xsl:value-of select="str[@name='name']"/> - - http://localhost:8983/solr/select?q=id: - - - - - - - http://localhost:8983/solr/select?q=id: - - - - diff --git a/client/javascript/example/testsolr/solr/conf/xslt/luke.xsl b/client/javascript/example/testsolr/solr/conf/xslt/luke.xsl deleted file mode 100644 index 6e9a064d7e0..00000000000 --- a/client/javascript/example/testsolr/solr/conf/xslt/luke.xsl +++ /dev/null @@ -1,337 +0,0 @@ - - - - - - - - - Solr Luke Request Handler Response - - - - - - - - - <xsl:value-of select="$title"/> - - - - - -

- -

-
- -
- -

Index Statistics

- -
- -

Field Statistics

- - - -

Document statistics

- - - - -
- - - - - -
- -
- - -
- -
- -
-
-
- - - - - - - - - - - - - - - - - - - - - -
-

- -

- -
- -
-
-
- - -
- - 50 - 800 - 160 - blue - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- background-color: ; width: px; height: px; -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
  • - -
  • -
    -
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/client/javascript/lib/jquery-autocomplete/jquery.autocomplete.css b/client/javascript/lib/jquery-autocomplete/jquery.autocomplete.css deleted file mode 100644 index 91b6228337a..00000000000 --- a/client/javascript/lib/jquery-autocomplete/jquery.autocomplete.css +++ /dev/null @@ -1,48 +0,0 @@ -.ac_results { - padding: 0px; - border: 1px solid black; - background-color: white; - overflow: hidden; - z-index: 99999; -} - -.ac_results ul { - width: 100%; - list-style-position: outside; - list-style: none; - padding: 0; - margin: 0; -} - -.ac_results li { - margin: 0px; - padding: 2px 5px; - cursor: default; - display: block; - /* - if width will be 100% horizontal scrollbar will apear - when scroll mode will be used - */ - /*width: 100%;*/ - font: menu; - font-size: 12px; - /* - it is very important, if line-height not setted or setted - in relative units scroll will be broken in firefox - */ - line-height: 16px; - overflow: hidden; -} - -.ac_loading { - background: white url('indicator.gif') right center no-repeat; -} - -.ac_odd { - background-color: #eee; -} - -.ac_over { - background-color: #0A246A; - color: white; -} diff --git a/client/javascript/lib/jquery-autocomplete/jquery.autocomplete.js b/client/javascript/lib/jquery-autocomplete/jquery.autocomplete.js deleted file mode 100644 index 5ad9178f862..00000000000 --- a/client/javascript/lib/jquery-autocomplete/jquery.autocomplete.js +++ /dev/null @@ -1,759 +0,0 @@ -/* - * Autocomplete - jQuery plugin 1.0.2 - * - * Copyright (c) 2007 Dylan Verheul, Dan G. Switzer, Anjesh Tuladhar, Jörn Zaefferer - * - * Dual licensed under the MIT and GPL licenses: - * http://www.opensource.org/licenses/mit-license.php - * http://www.gnu.org/licenses/gpl.html - * - * Revision: $Id: jquery.autocomplete.js 5747 2008-06-25 18:30:55Z joern.zaefferer $ - * - */ - -;(function($) { - -$.fn.extend({ - autocomplete: function(urlOrData, options) { - var isUrl = typeof urlOrData == "string"; - options = $.extend({}, $.Autocompleter.defaults, { - url: isUrl ? urlOrData : null, - data: isUrl ? null : urlOrData, - delay: isUrl ? $.Autocompleter.defaults.delay : 10, - max: options && !options.scroll ? 10 : 150 - }, options); - - // if highlight is set to false, replace it with a do-nothing function - options.highlight = options.highlight || function(value) { return value; }; - - // if the formatMatch option is not specified, then use formatItem for backwards compatibility - options.formatMatch = options.formatMatch || options.formatItem; - - return this.each(function() { - new $.Autocompleter(this, options); - }); - }, - result: function(handler) { - return this.bind("result", handler); - }, - search: function(handler) { - return this.trigger("search", [handler]); - }, - flushCache: function() { - return this.trigger("flushCache"); - }, - setOptions: function(options){ - return this.trigger("setOptions", [options]); - }, - unautocomplete: function() { - return this.trigger("unautocomplete"); - } -}); - -$.Autocompleter = function(input, options) { - - var KEY = { - UP: 38, - DOWN: 40, - DEL: 46, - TAB: 9, - RETURN: 13, - ESC: 27, - COMMA: 188, - PAGEUP: 33, - PAGEDOWN: 34, - BACKSPACE: 8 - }; - - // Create $ object for input element - var $input = $(input).attr("autocomplete", "off").addClass(options.inputClass); - - var timeout; - var previousValue = ""; - var cache = $.Autocompleter.Cache(options); - var hasFocus = 0; - var lastKeyPressCode; - var config = { - mouseDownOnSelect: false - }; - var select = $.Autocompleter.Select(options, input, selectCurrent, config); - - var blockSubmit; - - // prevent form submit in opera when selecting with return key - $.browser.opera && $(input.form).bind("submit.autocomplete", function() { - if (blockSubmit) { - blockSubmit = false; - return false; - } - }); - - // only opera doesn't trigger keydown multiple times while pressed, others don't work with keypress at all - $input.bind(($.browser.opera ? "keypress" : "keydown") + ".autocomplete", function(event) { - // track last key pressed - lastKeyPressCode = event.keyCode; - switch(event.keyCode) { - - case KEY.UP: - event.preventDefault(); - if ( select.visible() ) { - select.prev(); - } else { - onChange(0, true); - } - break; - - case KEY.DOWN: - event.preventDefault(); - if ( select.visible() ) { - select.next(); - } else { - onChange(0, true); - } - break; - - case KEY.PAGEUP: - event.preventDefault(); - if ( select.visible() ) { - select.pageUp(); - } else { - onChange(0, true); - } - break; - - case KEY.PAGEDOWN: - event.preventDefault(); - if ( select.visible() ) { - select.pageDown(); - } else { - onChange(0, true); - } - break; - - // matches also semicolon - case options.multiple && $.trim(options.multipleSeparator) == "," && KEY.COMMA: - case KEY.TAB: - case KEY.RETURN: - if( selectCurrent() ) { - // stop default to prevent a form submit, Opera needs special handling - event.preventDefault(); - blockSubmit = true; - return false; - } - break; - - case KEY.ESC: - select.hide(); - break; - - default: - clearTimeout(timeout); - timeout = setTimeout(onChange, options.delay); - break; - } - }).focus(function(){ - // track whether the field has focus, we shouldn't process any - // results if the field no longer has focus - hasFocus++; - }).blur(function() { - hasFocus = 0; - if (!config.mouseDownOnSelect) { - hideResults(); - } - }).click(function() { - // show select when clicking in a focused field - if ( hasFocus++ > 1 && !select.visible() ) { - onChange(0, true); - } - }).bind("search", function() { - // TODO why not just specifying both arguments? - var fn = (arguments.length > 1) ? arguments[1] : null; - function findValueCallback(q, data) { - var result; - if( data && data.length ) { - for (var i=0; i < data.length; i++) { - if( data[i].result.toLowerCase() == q.toLowerCase() ) { - result = data[i]; - break; - } - } - } - if( typeof fn == "function" ) fn(result); - else $input.trigger("result", result && [result.data, result.value]); - } - $.each(trimWords($input.val()), function(i, value) { - request(value, findValueCallback, findValueCallback); - }); - }).bind("flushCache", function() { - cache.flush(); - }).bind("setOptions", function() { - $.extend(options, arguments[1]); - // if we've updated the data, repopulate - if ( "data" in arguments[1] ) - cache.populate(); - }).bind("unautocomplete", function() { - select.unbind(); - $input.unbind(); - $(input.form).unbind(".autocomplete"); - }); - - - function selectCurrent() { - var selected = select.selected(); - if( !selected ) - return false; - - var v = selected.result; - previousValue = v; - - if ( options.multiple ) { - var words = trimWords($input.val()); - if ( words.length > 1 ) { - v = words.slice(0, words.length - 1).join( options.multipleSeparator ) + options.multipleSeparator + v; - } - v += options.multipleSeparator; - } - - $input.val(v); - hideResultsNow(); - $input.trigger("result", [selected.data, selected.value]); - return true; - } - - function onChange(crap, skipPrevCheck) { - if( lastKeyPressCode == KEY.DEL ) { - select.hide(); - return; - } - - var currentValue = $input.val(); - - if ( !skipPrevCheck && currentValue == previousValue ) - return; - - previousValue = currentValue; - - currentValue = lastWord(currentValue); - if ( currentValue.length >= options.minChars) { - $input.addClass(options.loadingClass); - if (!options.matchCase) - currentValue = currentValue.toLowerCase(); - request(currentValue, receiveData, hideResultsNow); - } else { - stopLoading(); - select.hide(); - } - }; - - function trimWords(value) { - if ( !value ) { - return [""]; - } - var words = value.split( options.multipleSeparator ); - var result = []; - $.each(words, function(i, value) { - if ( $.trim(value) ) - result[i] = $.trim(value); - }); - return result; - } - - function lastWord(value) { - if ( !options.multiple ) - return value; - var words = trimWords(value); - return words[words.length - 1]; - } - - // fills in the input box w/the first match (assumed to be the best match) - // q: the term entered - // sValue: the first matching result - function autoFill(q, sValue){ - // autofill in the complete box w/the first match as long as the user hasn't entered in more data - // if the last user key pressed was backspace, don't autofill - if( options.autoFill && (lastWord($input.val()).toLowerCase() == q.toLowerCase()) && lastKeyPressCode != KEY.BACKSPACE ) { - // fill in the value (keep the case the user has typed) - $input.val($input.val() + sValue.substring(lastWord(previousValue).length)); - // select the portion of the value not typed by the user (so the next character will erase) - $.Autocompleter.Selection(input, previousValue.length, previousValue.length + sValue.length); - } - }; - - function hideResults() { - clearTimeout(timeout); - timeout = setTimeout(hideResultsNow, 200); - }; - - function hideResultsNow() { - var wasVisible = select.visible(); - select.hide(); - clearTimeout(timeout); - stopLoading(); - if (options.mustMatch) { - // call search and run callback - $input.search( - function (result){ - // if no value found, clear the input box - if( !result ) { - if (options.multiple) { - var words = trimWords($input.val()).slice(0, -1); - $input.val( words.join(options.multipleSeparator) + (words.length ? options.multipleSeparator : "") ); - } - else - $input.val( "" ); - } - } - ); - } - if (wasVisible) - // position cursor at end of input field - $.Autocompleter.Selection(input, input.value.length, input.value.length); - }; - - function receiveData(q, data) { - if ( data && data.length && hasFocus ) { - stopLoading(); - select.display(data, q); - autoFill(q, data[0].value); - select.show(); - } else { - hideResultsNow(); - } - }; - - function request(term, success, failure) { - if (!options.matchCase) - term = term.toLowerCase(); - var data = cache.load(term); - // recieve the cached data - if (data && data.length) { - success(term, data); - // if an AJAX url has been supplied, try loading the data now - } else if( (typeof options.url == "string") && (options.url.length > 0) ){ - - var extraParams = { - timestamp: +new Date() - }; - $.each(options.extraParams, function(key, param) { - extraParams[key] = typeof param == "function" ? param() : param; - }); - - $.ajax({ - // try to leverage ajaxQueue plugin to abort previous requests - mode: "abort", - // limit abortion to this input - port: "autocomplete" + input.name, - dataType: options.dataType, - url: options.url, - data: $.extend({ - q: lastWord(term), - limit: options.max - }, extraParams), - success: function(data) { - var parsed = options.parse && options.parse(data) || parse(data); - cache.add(term, parsed); - success(term, parsed); - } - }); - } else { - // if we have a failure, we need to empty the list -- this prevents the the [TAB] key from selecting the last successful match - select.emptyList(); - failure(term); - } - }; - - function parse(data) { - var parsed = []; - var rows = data.split("\n"); - for (var i=0; i < rows.length; i++) { - var row = $.trim(rows[i]); - if (row) { - row = row.split("|"); - parsed[parsed.length] = { - data: row, - value: row[0], - result: options.formatResult && options.formatResult(row, row[0]) || row[0] - }; - } - } - return parsed; - }; - - function stopLoading() { - $input.removeClass(options.loadingClass); - }; - -}; - -$.Autocompleter.defaults = { - inputClass: "ac_input", - resultsClass: "ac_results", - loadingClass: "ac_loading", - minChars: 1, - delay: 400, - matchCase: false, - matchSubset: true, - matchContains: false, - cacheLength: 10, - max: 100, - mustMatch: false, - extraParams: {}, - selectFirst: true, - formatItem: function(row) { return row[0]; }, - formatMatch: null, - autoFill: false, - width: 0, - multiple: false, - multipleSeparator: ", ", - highlight: function(value, term) { - return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1") + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "$1"); - }, - scroll: true, - scrollHeight: 180 -}; - -$.Autocompleter.Cache = function(options) { - - var data = {}; - var length = 0; - - function matchSubset(s, sub) { - if (!options.matchCase) - s = s.toLowerCase(); - var i = s.indexOf(sub); - if (i == -1) return false; - return i == 0 || options.matchContains; - }; - - function add(q, value) { - if (length > options.cacheLength){ - flush(); - } - if (!data[q]){ - length++; - } - data[q] = value; - } - - function populate(){ - if( !options.data ) return false; - // track the matches - var stMatchSets = {}, - nullData = 0; - - // no url was specified, we need to adjust the cache length to make sure it fits the local data store - if( !options.url ) options.cacheLength = 1; - - // track all options for minChars = 0 - stMatchSets[""] = []; - - // loop through the array and create a lookup structure - for ( var i = 0, ol = options.data.length; i < ol; i++ ) { - var rawValue = options.data[i]; - // if rawValue is a string, make an array otherwise just reference the array - rawValue = (typeof rawValue == "string") ? [rawValue] : rawValue; - - var value = options.formatMatch(rawValue, i+1, options.data.length); - if ( value === false ) - continue; - - var firstChar = value.charAt(0).toLowerCase(); - // if no lookup array for this character exists, look it up now - if( !stMatchSets[firstChar] ) - stMatchSets[firstChar] = []; - - // if the match is a string - var row = { - value: value, - data: rawValue, - result: options.formatResult && options.formatResult(rawValue) || value - }; - - // push the current match into the set list - stMatchSets[firstChar].push(row); - - // keep track of minChars zero items - if ( nullData++ < options.max ) { - stMatchSets[""].push(row); - } - }; - - // add the data items to the cache - $.each(stMatchSets, function(i, value) { - // increase the cache size - options.cacheLength++; - // add to the cache - add(i, value); - }); - } - - // populate any existing data - setTimeout(populate, 25); - - function flush(){ - data = {}; - length = 0; - } - - return { - flush: flush, - add: add, - populate: populate, - load: function(q) { - if (!options.cacheLength || !length) - return null; - /* - * if dealing w/local data and matchContains than we must make sure - * to loop through all the data collections looking for matches - */ - if( !options.url && options.matchContains ){ - // track all matches - var csub = []; - // loop through all the data grids for matches - for( var k in data ){ - // don't search through the stMatchSets[""] (minChars: 0) cache - // this prevents duplicates - if( k.length > 0 ){ - var c = data[k]; - $.each(c, function(i, x) { - // if we've got a match, add it to the array - if (matchSubset(x.value, q)) { - csub.push(x); - } - }); - } - } - return csub; - } else - // if the exact item exists, use it - if (data[q]){ - return data[q]; - } else - if (options.matchSubset) { - for (var i = q.length - 1; i >= options.minChars; i--) { - var c = data[q.substr(0, i)]; - if (c) { - var csub = []; - $.each(c, function(i, x) { - if (matchSubset(x.value, q)) { - csub[csub.length] = x; - } - }); - return csub; - } - } - } - return null; - } - }; -}; - -$.Autocompleter.Select = function (options, input, select, config) { - var CLASSES = { - ACTIVE: "ac_over" - }; - - var listItems, - active = -1, - data, - term = "", - needsInit = true, - element, - list; - - // Create results - function init() { - if (!needsInit) - return; - element = $("
") - .hide() - .addClass(options.resultsClass) - .css("position", "absolute") - .appendTo(document.body); - - list = $("
';} -html+=(showStatus?'
'+(this._get(inst,'initStatus')||' ')+'
':'')+ -(!closeAtTop&&!inst.inline?controls:'')+'
'+ -($.browser.msie&&parseInt($.browser.version)<7&&!inst.inline?'':'');return html;},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,secondary,showStatus,monthNames){minDate=(inst.rangeStart&&minDate&&selectedDate';for(var month=0;month<12;month++){if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())) -html+='';} -html+='';} -if(secondary||!this._get(inst,'changeYear')) -html+=drawYear;else{var years=this._get(inst,'yearRange').split(':');var year=0;var endYear=0;if(years.length!=2){year=drawYear-10;endYear=drawYear+10;}else if(years[0].charAt(0)=='+'||years[0].charAt(0)=='-'){year=endYear=new Date().getFullYear();year+=parseInt(years[0],10);endYear+=parseInt(years[1],10);}else{year=parseInt(years[0],10);endYear=parseInt(years[1],10);} -year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);html+='';} -html+='';return html;},_addStatus:function(inst,text){return' onmouseover="jQuery(\'#ui-datepicker-status-'+inst.id+'\').html(\''+text+'\');" '+'onmouseout="jQuery(\'#ui-datepicker-status-'+inst.id+'\').html(\' \');"';},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period=='Y'?offset:0);var month=inst.drawMonth+(period=='M'?offset:0);var day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+ -(period=='D'?offset:0);var date=new Date(year,month,day);var minDate=this._getMinMaxDate(inst,'min',true);var maxDate=this._getMinMaxDate(inst,'max');date=(minDate&&datemaxDate?maxDate:date);inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period=='M'||period=='Y') -this._notifyChange(inst);},_notifyChange:function(inst){var onChange=this._get(inst,'onChangeMonthYear');if(onChange) -onChange.apply((inst.input?inst.input[0]:null),[new Date(inst.selectedYear,inst.selectedMonth,1),inst]);},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,'numberOfMonths');return(numMonths==null?[1,1]:(typeof numMonths=='number'?[1,numMonths]:numMonths));},_getMinMaxDate:function(inst,minMax,checkRange){var date=this._determineDate(this._get(inst,minMax+'Date'),null);if(date){date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0);} -return(!checkRange||!inst.rangeStart?date:(!date||inst.rangeStart>date?inst.rangeStart:date));},_getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate();},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay();},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst);var date=new Date(curYear,curMonth+(offset<0?offset:numMonths[1]),1);if(offset<0) -date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()));return this._isInRange(inst,date);},_isInRange:function(inst,date){var newMinDate=(!inst.rangeStart?null:new Date(inst.selectedYear,inst.selectedMonth,inst.selectedDay));newMinDate=(newMinDate&&inst.rangeStart=minDate)&&(!maxDate||date<=maxDate));},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,'shortYearCutoff');shortYearCutoff=(typeof shortYearCutoff!='string'?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,'dayNamesShort'),dayNames:this._get(inst,'dayNames'),monthNamesShort:this._get(inst,'monthNamesShort'),monthNames:this._get(inst,'monthNames')};},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear;} -var date=(day?(typeof day=='object'?day:new Date(year,month,day)):new Date(inst.currentYear,inst.currentMonth,inst.currentDay));return this.formatDate(this._get(inst,'dateFormat'),date,this._getFormatConfig(inst));}});function extendRemove(target,props){$.extend(target,props);for(var name in props) -if(props[name]==null||props[name]==undefined) -target[name]=props[name];return target;};function isArray(a){return(a&&(($.browser.safari&&typeof a=='object'&&a.length)||(a.constructor&&a.constructor.toString().match(/\Array\(\)/))));};$.fn.datepicker=function(options){var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=='string'&&(options=='isDisabled'||options=='getDate')) -return $.datepicker['_'+options+'Datepicker'].apply($.datepicker,[this[0]].concat(otherArgs));return this.each(function(){typeof options=='string'?$.datepicker['_'+options+'Datepicker'].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options);});};$.datepicker=new Datepicker();$(document).ready(function(){$(document.body).append($.datepicker.dpDiv).mousedown($.datepicker._checkExternalClick);});})(jQuery); \ No newline at end of file diff --git a/client/javascript/lib/jquery/jquery-1.2.6.js b/client/javascript/lib/jquery/jquery-1.2.6.js deleted file mode 100644 index 88e661eec80..00000000000 --- a/client/javascript/lib/jquery/jquery-1.2.6.js +++ /dev/null @@ -1,3549 +0,0 @@ -(function(){ -/* - * jQuery 1.2.6 - New Wave Javascript - * - * Copyright (c) 2008 John Resig (jquery.com) - * Dual licensed under the MIT (MIT-LICENSE.txt) - * and GPL (GPL-LICENSE.txt) licenses. - * - * $Date: 2008-05-24 14:22:17 -0400 (Sat, 24 May 2008) $ - * $Rev: 5685 $ - */ - -// Map over jQuery in case of overwrite -var _jQuery = window.jQuery, -// Map over the $ in case of overwrite - _$ = window.$; - -var jQuery = window.jQuery = window.$ = function( selector, context ) { - // The jQuery object is actually just the init constructor 'enhanced' - return new jQuery.fn.init( selector, context ); -}; - -// A simple way to check for HTML strings or ID strings -// (both of which we optimize for) -var quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/, - -// Is it a simple selector - isSimple = /^.[^:#\[\.]*$/, - -// Will speed up references to undefined, and allows munging its name. - undefined; - -jQuery.fn = jQuery.prototype = { - init: function( selector, context ) { - // Make sure that a selection was provided - selector = selector || document; - - // Handle $(DOMElement) - if ( selector.nodeType ) { - this[0] = selector; - this.length = 1; - return this; - } - // Handle HTML strings - if ( typeof selector == "string" ) { - // Are we dealing with HTML string or an ID? - var match = quickExpr.exec( selector ); - - // Verify a match, and that no context was specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) - selector = jQuery.clean( [ match[1] ], context ); - - // HANDLE: $("#id") - else { - var elem = document.getElementById( match[3] ); - - // Make sure an element was located - if ( elem ){ - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id != match[3] ) - return jQuery().find( selector ); - - // Otherwise, we inject the element directly into the jQuery object - return jQuery( elem ); - } - selector = []; - } - - // HANDLE: $(expr, [context]) - // (which is just equivalent to: $(content).find(expr) - } else - return jQuery( context ).find( selector ); - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) - return jQuery( document )[ jQuery.fn.ready ? "ready" : "load" ]( selector ); - - return this.setArray(jQuery.makeArray(selector)); - }, - - // The current version of jQuery being used - jquery: "1.2.6", - - // The number of elements contained in the matched element set - size: function() { - return this.length; - }, - - // The number of elements contained in the matched element set - length: 0, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num == undefined ? - - // Return a 'clean' array - jQuery.makeArray( this ) : - - // Return just the object - this[ num ]; - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - // Build a new jQuery matched element set - var ret = jQuery( elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - // Return the newly-formed element set - return ret; - }, - - // Force the current matched set of elements to become - // the specified array of elements (destroying the stack in the process) - // You should use pushStack() in order to do this, but maintain the stack - setArray: function( elems ) { - // Resetting the length to 0, then using the native Array push - // is a super-fast way to populate an object with array-like properties - this.length = 0; - Array.prototype.push.apply( this, elems ); - - return this; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - var ret = -1; - - // Locate the position of the desired element - return jQuery.inArray( - // If it receives a jQuery object, the first element is used - elem && elem.jquery ? elem[0] : elem - , this ); - }, - - attr: function( name, value, type ) { - var options = name; - - // Look for the case where we're accessing a style value - if ( name.constructor == String ) - if ( value === undefined ) - return this[0] && jQuery[ type || "attr" ]( this[0], name ); - - else { - options = {}; - options[ name ] = value; - } - - // Check to see if we're setting style values - return this.each(function(i){ - // Set all the styles - for ( name in options ) - jQuery.attr( - type ? - this.style : - this, - name, jQuery.prop( this, options[ name ], type, i, name ) - ); - }); - }, - - css: function( key, value ) { - // ignore negative width and height values - if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 ) - value = undefined; - return this.attr( key, value, "curCSS" ); - }, - - text: function( text ) { - if ( typeof text != "object" && text != null ) - return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); - - var ret = ""; - - jQuery.each( text || this, function(){ - jQuery.each( this.childNodes, function(){ - if ( this.nodeType != 8 ) - ret += this.nodeType != 1 ? - this.nodeValue : - jQuery.fn.text( [ this ] ); - }); - }); - - return ret; - }, - - wrapAll: function( html ) { - if ( this[0] ) - // The elements to wrap the target around - jQuery( html, this[0].ownerDocument ) - .clone() - .insertBefore( this[0] ) - .map(function(){ - var elem = this; - - while ( elem.firstChild ) - elem = elem.firstChild; - - return elem; - }) - .append(this); - - return this; - }, - - wrapInner: function( html ) { - return this.each(function(){ - jQuery( this ).contents().wrapAll( html ); - }); - }, - - wrap: function( html ) { - return this.each(function(){ - jQuery( this ).wrapAll( html ); - }); - }, - - append: function() { - return this.domManip(arguments, true, false, function(elem){ - if (this.nodeType == 1) - this.appendChild( elem ); - }); - }, - - prepend: function() { - return this.domManip(arguments, true, true, function(elem){ - if (this.nodeType == 1) - this.insertBefore( elem, this.firstChild ); - }); - }, - - before: function() { - return this.domManip(arguments, false, false, function(elem){ - this.parentNode.insertBefore( elem, this ); - }); - }, - - after: function() { - return this.domManip(arguments, false, true, function(elem){ - this.parentNode.insertBefore( elem, this.nextSibling ); - }); - }, - - end: function() { - return this.prevObject || jQuery( [] ); - }, - - find: function( selector ) { - var elems = jQuery.map(this, function(elem){ - return jQuery.find( selector, elem ); - }); - - return this.pushStack( /[^+>] [^+>]/.test( selector ) || selector.indexOf("..") > -1 ? - jQuery.unique( elems ) : - elems ); - }, - - clone: function( events ) { - // Do the clone - var ret = this.map(function(){ - if ( jQuery.browser.msie && !jQuery.isXMLDoc(this) ) { - // IE copies events bound via attachEvent when - // using cloneNode. Calling detachEvent on the - // clone will also remove the events from the orignal - // In order to get around this, we use innerHTML. - // Unfortunately, this means some modifications to - // attributes in IE that are actually only stored - // as properties will not be copied (such as the - // the name attribute on an input). - var clone = this.cloneNode(true), - container = document.createElement("div"); - container.appendChild(clone); - return jQuery.clean([container.innerHTML])[0]; - } else - return this.cloneNode(true); - }); - - // Need to set the expando to null on the cloned set if it exists - // removeData doesn't work here, IE removes it from the original as well - // this is primarily for IE but the data expando shouldn't be copied over in any browser - var clone = ret.find("*").andSelf().each(function(){ - if ( this[ expando ] != undefined ) - this[ expando ] = null; - }); - - // Copy the events from the original to the clone - if ( events === true ) - this.find("*").andSelf().each(function(i){ - if (this.nodeType == 3) - return; - var events = jQuery.data( this, "events" ); - - for ( var type in events ) - for ( var handler in events[ type ] ) - jQuery.event.add( clone[ i ], type, events[ type ][ handler ], events[ type ][ handler ].data ); - }); - - // Return the cloned set - return ret; - }, - - filter: function( selector ) { - return this.pushStack( - jQuery.isFunction( selector ) && - jQuery.grep(this, function(elem, i){ - return selector.call( elem, i ); - }) || - - jQuery.multiFilter( selector, this ) ); - }, - - not: function( selector ) { - if ( selector.constructor == String ) - // test special case where just one selector is passed in - if ( isSimple.test( selector ) ) - return this.pushStack( jQuery.multiFilter( selector, this, true ) ); - else - selector = jQuery.multiFilter( selector, this ); - - var isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType; - return this.filter(function() { - return isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector; - }); - }, - - add: function( selector ) { - return this.pushStack( jQuery.unique( jQuery.merge( - this.get(), - typeof selector == 'string' ? - jQuery( selector ) : - jQuery.makeArray( selector ) - ))); - }, - - is: function( selector ) { - return !!selector && jQuery.multiFilter( selector, this ).length > 0; - }, - - hasClass: function( selector ) { - return this.is( "." + selector ); - }, - - val: function( value ) { - if ( value == undefined ) { - - if ( this.length ) { - var elem = this[0]; - - // We need to handle select boxes special - if ( jQuery.nodeName( elem, "select" ) ) { - var index = elem.selectedIndex, - values = [], - options = elem.options, - one = elem.type == "select-one"; - - // Nothing was selected - if ( index < 0 ) - return null; - - // Loop through all the selected options - for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { - var option = options[ i ]; - - if ( option.selected ) { - // Get the specifc value for the option - value = jQuery.browser.msie && !option.attributes.value.specified ? option.text : option.value; - - // We don't need an array for one selects - if ( one ) - return value; - - // Multi-Selects return an array - values.push( value ); - } - } - - return values; - - // Everything else, we just grab the value - } else - return (this[0].value || "").replace(/\r/g, ""); - - } - - return undefined; - } - - if( value.constructor == Number ) - value += ''; - - return this.each(function(){ - if ( this.nodeType != 1 ) - return; - - if ( value.constructor == Array && /radio|checkbox/.test( this.type ) ) - this.checked = (jQuery.inArray(this.value, value) >= 0 || - jQuery.inArray(this.name, value) >= 0); - - else if ( jQuery.nodeName( this, "select" ) ) { - var values = jQuery.makeArray(value); - - jQuery( "option", this ).each(function(){ - this.selected = (jQuery.inArray( this.value, values ) >= 0 || - jQuery.inArray( this.text, values ) >= 0); - }); - - if ( !values.length ) - this.selectedIndex = -1; - - } else - this.value = value; - }); - }, - - html: function( value ) { - return value == undefined ? - (this[0] ? - this[0].innerHTML : - null) : - this.empty().append( value ); - }, - - replaceWith: function( value ) { - return this.after( value ).remove(); - }, - - eq: function( i ) { - return this.slice( i, i + 1 ); - }, - - slice: function() { - return this.pushStack( Array.prototype.slice.apply( this, arguments ) ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function(elem, i){ - return callback.call( elem, i, elem ); - })); - }, - - andSelf: function() { - return this.add( this.prevObject ); - }, - - data: function( key, value ){ - var parts = key.split("."); - parts[1] = parts[1] ? "." + parts[1] : ""; - - if ( value === undefined ) { - var data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]); - - if ( data === undefined && this.length ) - data = jQuery.data( this[0], key ); - - return data === undefined && parts[1] ? - this.data( parts[0] ) : - data; - } else - return this.trigger("setData" + parts[1] + "!", [parts[0], value]).each(function(){ - jQuery.data( this, key, value ); - }); - }, - - removeData: function( key ){ - return this.each(function(){ - jQuery.removeData( this, key ); - }); - }, - - domManip: function( args, table, reverse, callback ) { - var clone = this.length > 1, elems; - - return this.each(function(){ - if ( !elems ) { - elems = jQuery.clean( args, this.ownerDocument ); - - if ( reverse ) - elems.reverse(); - } - - var obj = this; - - if ( table && jQuery.nodeName( this, "table" ) && jQuery.nodeName( elems[0], "tr" ) ) - obj = this.getElementsByTagName("tbody")[0] || this.appendChild( this.ownerDocument.createElement("tbody") ); - - var scripts = jQuery( [] ); - - jQuery.each(elems, function(){ - var elem = clone ? - jQuery( this ).clone( true )[0] : - this; - - // execute all scripts after the elements have been injected - if ( jQuery.nodeName( elem, "script" ) ) - scripts = scripts.add( elem ); - else { - // Remove any inner scripts for later evaluation - if ( elem.nodeType == 1 ) - scripts = scripts.add( jQuery( "script", elem ).remove() ); - - // Inject the elements into the document - callback.call( obj, elem ); - } - }); - - scripts.each( evalScript ); - }); - } -}; - -// Give the init function the jQuery prototype for later instantiation -jQuery.fn.init.prototype = jQuery.fn; - -function evalScript( i, elem ) { - if ( elem.src ) - jQuery.ajax({ - url: elem.src, - async: false, - dataType: "script" - }); - - else - jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" ); - - if ( elem.parentNode ) - elem.parentNode.removeChild( elem ); -} - -function now(){ - return +new Date; -} - -jQuery.extend = jQuery.fn.extend = function() { - // copy reference to target object - var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options; - - // Handle a deep copy situation - if ( target.constructor == Boolean ) { - deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target != "object" && typeof target != "function" ) - target = {}; - - // extend jQuery itself if only one argument is passed - if ( length == i ) { - target = this; - --i; - } - - for ( ; i < length; i++ ) - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) - // Extend the base object - for ( var name in options ) { - var src = target[ name ], copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) - continue; - - // Recurse if we're merging object values - if ( deep && copy && typeof copy == "object" && !copy.nodeType ) - target[ name ] = jQuery.extend( deep, - // Never move original objects, clone them - src || ( copy.length != null ? [ ] : { } ) - , copy ); - - // Don't bring in undefined values - else if ( copy !== undefined ) - target[ name ] = copy; - - } - - // Return the modified object - return target; -}; - -var expando = "jQuery" + now(), uuid = 0, windowData = {}, - // exclude the following css properties to add px - exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i, - // cache defaultView - defaultView = document.defaultView || {}; - -jQuery.extend({ - noConflict: function( deep ) { - window.$ = _$; - - if ( deep ) - window.jQuery = _jQuery; - - return jQuery; - }, - - // See test/unit/core.js for details concerning this function. - isFunction: function( fn ) { - return !!fn && typeof fn != "string" && !fn.nodeName && - fn.constructor != Array && /^[\s[]?function/.test( fn + "" ); - }, - - // check if an element is in a (or is an) XML document - isXMLDoc: function( elem ) { - return elem.documentElement && !elem.body || - elem.tagName && elem.ownerDocument && !elem.ownerDocument.body; - }, - - // Evalulates a script in a global context - globalEval: function( data ) { - data = jQuery.trim( data ); - - if ( data ) { - // Inspired by code by Andrea Giammarchi - // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html - var head = document.getElementsByTagName("head")[0] || document.documentElement, - script = document.createElement("script"); - - script.type = "text/javascript"; - if ( jQuery.browser.msie ) - script.text = data; - else - script.appendChild( document.createTextNode( data ) ); - - // Use insertBefore instead of appendChild to circumvent an IE6 bug. - // This arises when a base node is used (#2709). - head.insertBefore( script, head.firstChild ); - head.removeChild( script ); - } - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase(); - }, - - cache: {}, - - data: function( elem, name, data ) { - elem = elem == window ? - windowData : - elem; - - var id = elem[ expando ]; - - // Compute a unique ID for the element - if ( !id ) - id = elem[ expando ] = ++uuid; - - // Only generate the data cache if we're - // trying to access or manipulate it - if ( name && !jQuery.cache[ id ] ) - jQuery.cache[ id ] = {}; - - // Prevent overriding the named cache with undefined values - if ( data !== undefined ) - jQuery.cache[ id ][ name ] = data; - - // Return the named cache data, or the ID for the element - return name ? - jQuery.cache[ id ][ name ] : - id; - }, - - removeData: function( elem, name ) { - elem = elem == window ? - windowData : - elem; - - var id = elem[ expando ]; - - // If we want to remove a specific section of the element's data - if ( name ) { - if ( jQuery.cache[ id ] ) { - // Remove the section of cache data - delete jQuery.cache[ id ][ name ]; - - // If we've removed all the data, remove the element's cache - name = ""; - - for ( name in jQuery.cache[ id ] ) - break; - - if ( !name ) - jQuery.removeData( elem ); - } - - // Otherwise, we want to remove all of the element's data - } else { - // Clean up the element expando - try { - delete elem[ expando ]; - } catch(e){ - // IE has trouble directly removing the expando - // but it's ok with using removeAttribute - if ( elem.removeAttribute ) - elem.removeAttribute( expando ); - } - - // Completely remove the data cache - delete jQuery.cache[ id ]; - } - }, - - // args is for internal usage only - each: function( object, callback, args ) { - var name, i = 0, length = object.length; - - if ( args ) { - if ( length == undefined ) { - for ( name in object ) - if ( callback.apply( object[ name ], args ) === false ) - break; - } else - for ( ; i < length; ) - if ( callback.apply( object[ i++ ], args ) === false ) - break; - - // A special, fast, case for the most common use of each - } else { - if ( length == undefined ) { - for ( name in object ) - if ( callback.call( object[ name ], name, object[ name ] ) === false ) - break; - } else - for ( var value = object[0]; - i < length && callback.call( value, i, value ) !== false; value = object[++i] ){} - } - - return object; - }, - - prop: function( elem, value, type, i, name ) { - // Handle executable functions - if ( jQuery.isFunction( value ) ) - value = value.call( elem, i ); - - // Handle passing in a number to a CSS property - return value && value.constructor == Number && type == "curCSS" && !exclude.test( name ) ? - value + "px" : - value; - }, - - className: { - // internal only, use addClass("class") - add: function( elem, classNames ) { - jQuery.each((classNames || "").split(/\s+/), function(i, className){ - if ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) ) - elem.className += (elem.className ? " " : "") + className; - }); - }, - - // internal only, use removeClass("class") - remove: function( elem, classNames ) { - if (elem.nodeType == 1) - elem.className = classNames != undefined ? - jQuery.grep(elem.className.split(/\s+/), function(className){ - return !jQuery.className.has( classNames, className ); - }).join(" ") : - ""; - }, - - // internal only, use hasClass("class") - has: function( elem, className ) { - return jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1; - } - }, - - // A method for quickly swapping in/out CSS properties to get correct calculations - swap: function( elem, options, callback ) { - var old = {}; - // Remember the old values, and insert the new ones - for ( var name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - callback.call( elem ); - - // Revert the old values - for ( var name in options ) - elem.style[ name ] = old[ name ]; - }, - - css: function( elem, name, force ) { - if ( name == "width" || name == "height" ) { - var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ]; - - function getWH() { - val = name == "width" ? elem.offsetWidth : elem.offsetHeight; - var padding = 0, border = 0; - jQuery.each( which, function() { - padding += parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0; - border += parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0; - }); - val -= Math.round(padding + border); - } - - if ( jQuery(elem).is(":visible") ) - getWH(); - else - jQuery.swap( elem, props, getWH ); - - return Math.max(0, val); - } - - return jQuery.curCSS( elem, name, force ); - }, - - curCSS: function( elem, name, force ) { - var ret, style = elem.style; - - // A helper method for determining if an element's values are broken - function color( elem ) { - if ( !jQuery.browser.safari ) - return false; - - // defaultView is cached - var ret = defaultView.getComputedStyle( elem, null ); - return !ret || ret.getPropertyValue("color") == ""; - } - - // We need to handle opacity special in IE - if ( name == "opacity" && jQuery.browser.msie ) { - ret = jQuery.attr( style, "opacity" ); - - return ret == "" ? - "1" : - ret; - } - // Opera sometimes will give the wrong display answer, this fixes it, see #2037 - if ( jQuery.browser.opera && name == "display" ) { - var save = style.outline; - style.outline = "0 solid black"; - style.outline = save; - } - - // Make sure we're using the right name for getting the float value - if ( name.match( /float/i ) ) - name = styleFloat; - - if ( !force && style && style[ name ] ) - ret = style[ name ]; - - else if ( defaultView.getComputedStyle ) { - - // Only "float" is needed here - if ( name.match( /float/i ) ) - name = "float"; - - name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase(); - - var computedStyle = defaultView.getComputedStyle( elem, null ); - - if ( computedStyle && !color( elem ) ) - ret = computedStyle.getPropertyValue( name ); - - // If the element isn't reporting its values properly in Safari - // then some display: none elements are involved - else { - var swap = [], stack = [], a = elem, i = 0; - - // Locate all of the parent display: none elements - for ( ; a && color(a); a = a.parentNode ) - stack.unshift(a); - - // Go through and make them visible, but in reverse - // (It would be better if we knew the exact display type that they had) - for ( ; i < stack.length; i++ ) - if ( color( stack[ i ] ) ) { - swap[ i ] = stack[ i ].style.display; - stack[ i ].style.display = "block"; - } - - // Since we flip the display style, we have to handle that - // one special, otherwise get the value - ret = name == "display" && swap[ stack.length - 1 ] != null ? - "none" : - ( computedStyle && computedStyle.getPropertyValue( name ) ) || ""; - - // Finally, revert the display styles back - for ( i = 0; i < swap.length; i++ ) - if ( swap[ i ] != null ) - stack[ i ].style.display = swap[ i ]; - } - - // We should always get a number back from opacity - if ( name == "opacity" && ret == "" ) - ret = "1"; - - } else if ( elem.currentStyle ) { - var camelCase = name.replace(/\-(\w)/g, function(all, letter){ - return letter.toUpperCase(); - }); - - ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ]; - - // From the awesome hack by Dean Edwards - // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 - - // If we're not dealing with a regular pixel number - // but a number that has a weird ending, we need to convert it to pixels - if ( !/^\d+(px)?$/i.test( ret ) && /^\d/.test( ret ) ) { - // Remember the original values - var left = style.left, rsLeft = elem.runtimeStyle.left; - - // Put in the new values to get a computed value out - elem.runtimeStyle.left = elem.currentStyle.left; - style.left = ret || 0; - ret = style.pixelLeft + "px"; - - // Revert the changed values - style.left = left; - elem.runtimeStyle.left = rsLeft; - } - } - - return ret; - }, - - clean: function( elems, context ) { - var ret = []; - context = context || document; - // !context.createElement fails in IE with an error but returns typeof 'object' - if (typeof context.createElement == 'undefined') - context = context.ownerDocument || context[0] && context[0].ownerDocument || document; - - jQuery.each(elems, function(i, elem){ - if ( !elem ) - return; - - if ( elem.constructor == Number ) - elem += ''; - - // Convert html string into DOM nodes - if ( typeof elem == "string" ) { - // Fix "XHTML"-style tags in all browsers - elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){ - return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ? - all : - front + ">"; - }); - - // Trim whitespace, otherwise indexOf won't work as expected - var tags = jQuery.trim( elem ).toLowerCase(), div = context.createElement("div"); - - var wrap = - // option or optgroup - !tags.indexOf("", "" ] || - - !tags.indexOf("", "" ] || - - tags.match(/^<(thead|tbody|tfoot|colg|cap)/) && - [ 1, "", "
" ] || - - !tags.indexOf("", "" ] || - - // matched above - (!tags.indexOf("", "" ] || - - !tags.indexOf("", "" ] || - - // IE can't serialize and