|
From: <tob...@us...> - 2014-03-12 21:08:23
|
Revision: 7945
http://sourceforge.net/p/bigdata/code/7945
Author: tobycraig
Date: 2014-03-12 21:08:16 +0000 (Wed, 12 Mar 2014)
Log Message:
-----------
#850 - Search functionality
Modified Paths:
--------------
branches/RDR/bigdata-war/src/html/js/workbench.js
branches/RDR/bigdata-war/src/html/new.html
Modified: branches/RDR/bigdata-war/src/html/js/workbench.js
===================================================================
--- branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-12 20:33:19 UTC (rev 7944)
+++ branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-12 21:08:16 UTC (rev 7945)
@@ -1,5 +1,19 @@
$(function() {
+/* Search */
+
+$('#search-form').submit(function(e) {
+ e.preventDefault();
+ var term = $(this).find('input').val();
+ if(!term) {
+ return;
+ }
+ var query = 'select * { ?o bds:search "' + term + '" . ?s ?p ?o . }'
+ $('#query-box').val(query);
+ $('#query-form').submit();
+ showTab('query');
+});
+
/* Tab selection */
$('#tab-selector a').click(function(e) {
Modified: branches/RDR/bigdata-war/src/html/new.html
===================================================================
--- branches/RDR/bigdata-war/src/html/new.html 2014-03-12 20:33:19 UTC (rev 7944)
+++ branches/RDR/bigdata-war/src/html/new.html 2014-03-12 21:08:16 UTC (rev 7945)
@@ -15,7 +15,7 @@
<div id="top">
<img src="/bigdata/html/images/logo.png" id="logo">
- <p><label for="search-text">Search:</label> <input type="text" id="search-text"></p>
+ <form id="search-form"><label for="search-text">Search:</label> <input type="text" id="search-text"></form>
<p>Current namespace: <span id="current-namespace"></span></p>
</div>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|