From: <tob...@us...> - 2014-04-07 20:40:46
|
Revision: 8077 http://sourceforge.net/p/bigdata/code/8077 Author: tobycraig Date: 2014-04-07 20:40:41 +0000 (Mon, 07 Apr 2014) Log Message: ----------- #878 - Hide output box on query/load/explore pages until it has content Modified Paths: -------------- branches/RDR/bigdata-war/src/html/css/style.css branches/RDR/bigdata-war/src/html/index.html branches/RDR/bigdata-war/src/html/js/workbench.js Modified: branches/RDR/bigdata-war/src/html/css/style.css =================================================================== --- branches/RDR/bigdata-war/src/html/css/style.css 2014-04-07 20:33:31 UTC (rev 8076) +++ branches/RDR/bigdata-war/src/html/css/style.css 2014-04-07 20:40:41 UTC (rev 8077) @@ -179,7 +179,7 @@ border: none; } -#advanced-features, #query-explanation, #namespace-properties { +#advanced-features, #query-response, #query-explanation, #query-tab .bottom *, #load-response, #load-clear, #explore-results, #namespace-properties { display: none; } Modified: branches/RDR/bigdata-war/src/html/index.html =================================================================== --- branches/RDR/bigdata-war/src/html/index.html 2014-04-07 20:33:31 UTC (rev 8076) +++ branches/RDR/bigdata-war/src/html/index.html 2014-04-07 20:40:41 UTC (rev 8077) @@ -75,8 +75,8 @@ <button id="load-load">Load</button> </div> - <div class="box"> - <pre id="load-response"></pre> + <div class="box" id="load-response"> + <pre></pre> </div> <div class="bottom"> @@ -151,6 +151,8 @@ <div class="box" id="explore-attributes"></div> </div> + <div class="bottom"></div> + </div> <div class="tab" id="status-tab"> Modified: branches/RDR/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/RDR/bigdata-war/src/html/js/workbench.js 2014-04-07 20:33:31 UTC (rev 8076) +++ branches/RDR/bigdata-war/src/html/js/workbench.js 2014-04-07 20:40:41 UTC (rev 8077) @@ -382,7 +382,8 @@ } $('#load-clear').click(function() { - $('#load-response').text(''); + $('#load-response, #load-clear').hide(); + $('#load-response pre').text(''); }); $('#advanced-features-toggle').click(function() { @@ -391,17 +392,20 @@ }); function updateResponseHTML(data) { - $('#load-response').html(data); + $('#load-response, #load-clear').show(); + $('#load-response pre').html(data); } function updateResponseXML(data) { var modified = data.childNodes[0].attributes['modified'].value; var milliseconds = data.childNodes[0].attributes['milliseconds'].value; - $('#load-response').text('Modified: ' + modified + '\nMilliseconds: ' + milliseconds); + $('#load-response, #load-clear').show(); + $('#load-response pre').text('Modified: ' + modified + '\nMilliseconds: ' + milliseconds); } function updateResponseError(jqXHR, textStatus, errorThrown) { - $('#load-response').text('Error! ' + textStatus + ' ' + errorThrown); + $('#load-response, #load-clear').show(); + $('#load-response pre').text('Error! ' + textStatus + ' ' + errorThrown); } @@ -440,7 +444,7 @@ $('#query-response-clear').click(function() { $('#query-response, #query-explanation').empty(''); - $('#query-explanation').hide(); + $('#query-response, #query-explanation, #query-tab .bottom *').hide(); }); $('#query-export-csv').click(exportCSV); @@ -543,6 +547,7 @@ function showQueryResults(data) { $('#query-response').empty(); + $('#query-response, #query-tab .bottom *').show(); var table = $('<table>').appendTo($('#query-response')); if(this.dataTypes[1] == 'xml') { // RDF @@ -627,6 +632,7 @@ } function queryResultsError(jqXHR, textStatus, errorThrown) { + $('#query-response, #query-tab .bottom *').show(); $('#query-response').text('Error! ' + textStatus + ' ' + errorThrown); } @@ -724,6 +730,8 @@ // clear tables $('#explore-incoming, #explore-outgoing, #explore-attributes').html('<table>'); + $('#explore-tab .bottom').hide(); + $('#explore-results, #explore-results .box').show(); // go through each binding, adding it to the appropriate table $.each(data.results.bindings, function(i, binding) { @@ -823,8 +831,10 @@ }); function updateExploreError(jqXHR, textStatus, errorThrown) { - $('#explore-results .box').html(''); - $('#explore-header').html('Error! ' + textStatus + ' ' + errorThrown); + $('#explore-tab .bottom').show(); + $('#explore-results .box').html('').hide(); + $('#explore-header').text('Error! ' + textStatus + ' ' + errorThrown); + $('#explore-results, #explore-header').show(); } /* Status */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |