|
From: <tob...@us...> - 2014-02-28 18:42:30
|
Revision: 7900
http://sourceforge.net/p/bigdata/code/7900
Author: tobycraig
Date: 2014-02-28 18:42:27 +0000 (Fri, 28 Feb 2014)
Log Message:
-----------
#827 - Basic explore tab functionality
Modified Paths:
--------------
branches/RDR/bigdata-war/src/html/new.html
branches/RDR/bigdata-war/src/html/style.css
branches/RDR/bigdata-war/src/html/workbench.js
Modified: branches/RDR/bigdata-war/src/html/new.html
===================================================================
--- branches/RDR/bigdata-war/src/html/new.html 2014-02-28 01:21:52 UTC (rev 7899)
+++ branches/RDR/bigdata-war/src/html/new.html 2014-02-28 18:42:27 UTC (rev 7900)
@@ -132,7 +132,14 @@
</div>
- <div class="tab" id="explore-tab">explore
+ <div class="tab" id="explore-tab">
+
+ <div class="box">
+ <p>Enter a URI to begin navigation <form id="explore-form"><input type="text"> <input type="submit"></form></p>
+ </div>
+
+ <div class="box" id="explore-results">
+ </div>
</div>
<div class="tab" id="status-tab">status
Modified: branches/RDR/bigdata-war/src/html/style.css
===================================================================
--- branches/RDR/bigdata-war/src/html/style.css 2014-02-28 01:21:52 UTC (rev 7899)
+++ branches/RDR/bigdata-war/src/html/style.css 2014-02-28 18:42:27 UTC (rev 7900)
@@ -169,7 +169,7 @@
td {
border: 1px solid;
- padding: 2px;
+ padding: 5px;
}
pre {
Modified: branches/RDR/bigdata-war/src/html/workbench.js
===================================================================
--- branches/RDR/bigdata-war/src/html/workbench.js 2014-02-28 01:21:52 UTC (rev 7899)
+++ branches/RDR/bigdata-war/src/html/workbench.js 2014-02-28 18:42:27 UTC (rev 7900)
@@ -395,15 +395,14 @@
}
-/* Navigator */
+/* Explore */
-$('#navigator').submit(function() {
- // get URI
- var uri = $('#navigator-uri').val();
+$('#explore-form').submit(function(e) {
+ e.preventDefault();
+ var uri = $(this).find('input').val();
if(uri) {
loadURI(uri);
}
- return false;
});
function loadURI(uri) {
@@ -440,14 +439,14 @@
data: 'query=' + encodeURI(query),
dataType: 'json',
accepts: {'json': 'application/sparql-results+json'},
- success: updateNavigationStart,
- error: updateNavigationError
+ success: updateExploreStart,
+ error: updateExploreError
};
$.ajax('/sparql', settings);
}
-function updateNavigationStart(data) {
- var disp = $('#navigator-display');
+function updateExploreStart(data) {
+ var disp = $('#explore-results');
disp.html('');
// see if we got any results
if(data.results.bindings.length == 0) {
@@ -498,11 +497,11 @@
}
}
- disp.find('a').click(function() { loadURI(this.text); return false; });
+ disp.find('a').click(function(e) { e.preventDefault(); loadURI(this.text); });
}
-function updateNavigationError(jqXHR, textStatus, errorThrown) {
- $('#navigator-display').html('Error! ' + textStatus + ' ' + errorThrown);
+function updateExploreError(jqXHR, textStatus, errorThrown) {
+ $('#explore-results').html('Error! ' + textStatus + ' ' + errorThrown);
}
});
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|