From: <tob...@us...> - 2014-03-15 01:21:23
|
Revision: 7977 http://sourceforge.net/p/bigdata/code/7977 Author: tobycraig Date: 2014-03-15 01:21:15 +0000 (Sat, 15 Mar 2014) Log Message: ----------- #827 - Changed header when no incoming/outgoing links/attributes 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-15 00:54:42 UTC (rev 7976) +++ branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-15 01:21:15 UTC (rev 7977) @@ -728,7 +728,7 @@ } // clear tables - $('#explore-incoming table, #explore-outgoing table, #explore-attributes table').html(''); + $('#explore-incoming, #explore-outgoing, #explore-attributes').html('<table>'); // go through each binding, adding it to the appropriate table $.each(data.results.bindings, function(i, binding) { @@ -770,6 +770,13 @@ } }); + var sections = {incoming: 'Incoming Links', outgoing: 'Outgoing Links', attributes: 'Attributes'}; + for(var k in sections) { + if($('#explore-' + k + ' table tr').length == 0) { + $('#explore-' + k).html('No ' + sections[k]); + } + } + $('#explore-results a').click(function(e) { e.preventDefault(); explore($(this).data('sid') ? $(this).data('sid') : this.text); Modified: branches/RDR/bigdata-war/src/html/new.html =================================================================== --- branches/RDR/bigdata-war/src/html/new.html 2014-03-15 00:54:42 UTC (rev 7976) +++ branches/RDR/bigdata-war/src/html/new.html 2014-03-15 01:21:15 UTC (rev 7977) @@ -145,18 +145,9 @@ <div id="explore-results"> <div class="box" id="explore-header"><h1></h1></div> - <div class="box" id="explore-incoming"> - <h2>Incoming links</h2> - <table></table> - </div> - <div class="box" id="explore-outgoing"> - <h2>Outgoing links</h2> - <table></table> - </div> - <div class="box" id="explore-attributes"> - <h2>Attributes</h2> - <table></table> - </div> + <div class="box" id="explore-incoming"></div> + <div class="box" id="explore-outgoing"></div> + <div class="box" id="explore-attributes"></div> </div> <div class="box" id="explore-no-results"></div> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |