Index: /main/trunk/model-sites-dev/von-sparql/js/von-sparql-setup.js
===================================================================
--- /main/trunk/model-sites-dev/von-sparql/js/von-sparql-setup.js (revision 29442)
+++ /main/trunk/model-sites-dev/von-sparql/js/von-sparql-setup.js (revision 29443)
@@ -2,18 +2,4 @@
var sparqlEndpoint= location.protocol + '//' + location.hostname + ":3030/greenstone/query" ;
var collectionName = gs.cgiParams.c;
-
-//returns the query used to recieve autocomplete data
-function getAutocompleteQuery()
-{
-var sparqlQuery = "PREFIX gsdl: " +
- "SELECT ?o ?identifier where{ "+
- " GRAPH gsdl:" + collectionName + " {" +
- " ?s ?o" +
- ' FILTER regex(?o, "' + $('#autocomplete').val() + '", "i")'+
- '}}LIMIT 50 ';
-
- return sparqlEndpoint + "?query=" + encodeURIComponent(sparqlQuery);
-
-}
//Sets up various parts of the page, setting up onclick actions etc
@@ -62,33 +48,4 @@
$('#table_refineControls tr td:first').addClass("alignRight");
- $('#autocomplete').autocomplete({
- source: function(request, response) {
- $.ajax({
- url: getAutocompleteQuery(),
- type:"GET",
- data:"output=json",
- success: function( json ) {
- console.log($('#autocomplete').val());
- var parsedJSON = ((typeof json) == "string") ? $.parseJSON(json) : json;
- response( $.map(json.results.bindings, function(item){
- return{
- label: /*item.identifier.value + " " + */item.o.value,
- value: item.o.value
- }
- }))
- },
- open: function(){
- $(this).removeClass("ui-corner-all").addClass("ui-corner-top");
- },
- close: function(){
- $(this).removeClass("ui-corner-top").addClass("ui-corner-all");
- }
- });
- },
- appendTo: "div_autocomplete",
- minLength: 0,
- delay: 500,
- })
-
setupCharts();