|
From: <tob...@us...> - 2014-03-12 01:13:16
|
Revision: 7936
http://sourceforge.net/p/bigdata/code/7936
Author: tobycraig
Date: 2014-03-12 01:13:11 +0000 (Wed, 12 Mar 2014)
Log Message:
-----------
#845 - Added Properties link to namespaces allowing user to view a namespace's properties
Modified Paths:
--------------
branches/RDR/bigdata-war/src/html/css/style.css
branches/RDR/bigdata-war/src/html/js/workbench.js
branches/RDR/bigdata-war/src/html/new.html
Modified: branches/RDR/bigdata-war/src/html/css/style.css
===================================================================
--- branches/RDR/bigdata-war/src/html/css/style.css 2014-03-12 00:22:02 UTC (rev 7935)
+++ branches/RDR/bigdata-war/src/html/css/style.css 2014-03-12 01:13:11 UTC (rev 7936)
@@ -181,3 +181,6 @@
font-family: monospace;
}
+#namespace-details {
+ display: none;
+}
Modified: branches/RDR/bigdata-war/src/html/js/workbench.js
===================================================================
--- branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-12 00:22:02 UTC (rev 7935)
+++ branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-12 01:13:11 UTC (rev 7936)
@@ -59,7 +59,7 @@
} else {
use = '<a href="#" class="use-namespace">Use</a>';
}
- $('#namespaces-list').append('<li data-name="' + title + '" data-url="' + url + '">' + titleText + ' - ' + use + ' - <a href="#" class="delete-namespace">Delete</a></li>');
+ $('#namespaces-list').append('<li data-name="' + title + '" data-url="' + url + '">' + titleText + ' - ' + use + ' - <a href="#" class="delete-namespace">Delete</a> - <a href="#" class="namespace-properties">Properties</a></li>');
}
$('.use-namespace').click(function(e) {
e.preventDefault();
@@ -69,6 +69,10 @@
e.preventDefault();
deleteNamespace($(this).parent().data('name'));
});
+ $('.namespace-properties').click(function(e) {
+ e.preventDefault();
+ getNamespaceProperties($(this).parent().data('name'));
+ });
});
}
@@ -99,6 +103,18 @@
}
}
+function getNamespaceProperties(namespace) {
+ $('#namespace-properties h1').html(namespace);
+ $('#namespace-properties ul').empty();
+ $('#namespace-properties').show();
+ var url = '/bigdata/namespace/' + namespace + '/properties';
+ $.get(url, function(data) {
+ $.each(data.getElementsByTagName('entry'), function(i, entry) {
+ $('#namespace-properties ul').append('<li>' + entry.getAttribute('key') + ': ' + entry.textContent + '</li>');
+ });
+ });
+}
+
function createNamespace(e) {
e.preventDefault();
var input = $(this).find('input[type=text]');
Modified: branches/RDR/bigdata-war/src/html/new.html
===================================================================
--- branches/RDR/bigdata-war/src/html/new.html 2014-03-12 00:22:02 UTC (rev 7935)
+++ branches/RDR/bigdata-war/src/html/new.html 2014-03-12 01:13:11 UTC (rev 7936)
@@ -166,6 +166,11 @@
<ul id="namespaces-list"></ul>
</div>
+ <div id="namespace-properties" class="box">
+ <h1></h1>
+ <ul></ul>
+ </div>
+
<div class="box">
<form id="namespace-create"><input type="text"> <input type="submit" value="Create namespace"></form>
</div>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|