Updated Branches:
  refs/heads/develop ce252f3e0 -> 022993035

MARMOTTA-380: applied patch by Oliver


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/b22401d3
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/b22401d3
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/b22401d3

Branch: refs/heads/develop
Commit: b22401d3bc3abe48d2adc781e270d7e9e9669240
Parents: ce252f3
Author: Jakob Frank <[email protected]>
Authored: Wed Dec 11 12:01:28 2013 +0100
Committer: Jakob Frank <[email protected]>
Committed: Wed Dec 11 12:01:28 2013 +0100

----------------------------------------------------------------------
 .../src/main/resources/web/admin/dataview.html  | 38 +++++++++++++++-----
 1 file changed, 29 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/b22401d3/platform/marmotta-core/src/main/resources/web/admin/dataview.html
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/resources/web/admin/dataview.html 
b/platform/marmotta-core/src/main/resources/web/admin/dataview.html
index 850534f..78eb471 100644
--- a/platform/marmotta-core/src/main/resources/web/admin/dataview.html
+++ b/platform/marmotta-core/src/main/resources/web/admin/dataview.html
@@ -44,7 +44,7 @@
         sgvizler.option.query.endpoint_output = 'json';
 
         function drawGraphs() {
-            $("#graphs").empty().append(loader());
+            //$("#graphs").empty().append(loader());
 
             var query = "SELECT ?graph (COUNT(?s) AS ?triples) WHERE { GRAPH 
?graph { ?s ?p ?o }} GROUP BY ?graph";
 
@@ -63,10 +63,15 @@
                     }
                 }
             },{is3D:true,title:'All Graphs in the system. Click to 
select!',colors:colors})
+                       
+                       if (document.getElementById('loading_graphs') != null) {
+                               var l_g = 
document.getElementById('loading_graphs');
+                               l_g.parentNode.removeChild(l_g);
+                       }
         }
 
         function drawClasses(graph) {
-            if(graph) {
+                       if(graph) {
                 $("#classes_all").removeAttr("disabled").show();
             }
             else $("#classes_all").prop("disabled", "disabled").hide();
@@ -80,7 +85,7 @@
             $("#classes").attr('data-sgvizler-query',query);
             $("#classes").attr('data-sgvizler-chart','gPieChart');
             $("#classes").attr('data-sgvizler-log',"2");
-
+                       
             var query = new sgvizler.query();
             
$.extend(query,sgvizler.option.query,sgvizler.ui.getQueryOptionAttr(document.getElementById('classes')));
             
$.extend(query.chartOptions,sgvizler.ui.getChartOptionAttr(document.getElementById('classes')));
@@ -98,7 +103,7 @@
 
 
         function drawResources(graph,clazz,lim,color) {
-            var limit = lim ? lim : 5;
+                       var limit = lim ? lim : 5;
             var query;
             var l_s = limit=="all" ? "":" LIMIT "+limit;
             if(graph) {
@@ -115,6 +120,11 @@
                 }
             }
 
+                       if (document.getElementById('loading_types') != null) {
+                               var l_t = 
document.getElementById('loading_types');
+                               l_t.parentNode.removeChild(l_t);
+                       }
+                       
             sparql(query,function(data){
                 $("#resources").empty();
                 if(data.results.bindings.length==0) return 
$("#resources").append("<p>Nothing to display!</p>");
@@ -136,6 +146,11 @@
                 }
 
             },function(){alert("cannot show data")});
+
+                       if (document.getElementById('loading_resources') != 
null) {
+                               var l_r = 
document.getElementById('loading_resources');
+                               l_r.parentNode.removeChild(l_r);
+                       }
         }
 
         //return a result object
@@ -164,9 +179,9 @@
 
         function drawStatistics() {
 
-            $("#view").append("<h2>Overview</h2>");
+            $("#view").append("<h2>Overview <img id='loading_overview' 
src='../public/img/loader/lmf-loader_32.gif'></h2>");
             $("#view").append("<div id='statistics'></div>");
-            $("#statistics").append(loader());
+            //$("#statistics").append(loader());
             count();
 
             function count() {
@@ -198,6 +213,7 @@
                 },error);
 
                 draw(statistics);
+                               
             }
 
             function draw(statistics) {
@@ -210,6 +226,10 @@
                    s = s.replace(/\$3/g,statistics.graphs);
                    $("#statistics").empty().text(s);
                }
+                               if (document.getElementById('loading_overview') 
!= null) {
+                                       var l_o = 
document.getElementById('loading_overview');
+                                       l_o.parentNode.removeChild(l_o);
+                               }
             }
 
             function error() {
@@ -228,11 +248,11 @@
         sgvizler.go(function(){
             drawStatistics();
             if(HAS_DATA) {
-                $("#view").append("<h2>Graphs</h2>");
+                $("#view").append("<h2>Graphs <img id='loading_graphs' 
src='../public/img/loader/lmf-loader_32.gif'></h2>");
                 $("#view").append("<div id='graphs' 
style='height:350px;'></div>");
-                $("#view").append($("<h2>Types</h2>").append($("<button 
id='classes_all' style='font-size: 12px;margin-left:5px;'>(show types of all 
graphs)</button>").click(function(){drawClasses()})));
+                $("#view").append($("<h2>Types <img id='loading_types' 
src='../public/img/loader/lmf-loader_32.gif'></h2>").append($("<button 
id='classes_all' style='font-size: 12px;margin-left:5px;'>(show types of all 
graphs)</button>").click(function(){drawClasses()})));
                 $("#view").append("<div id='classes' 
style='height:350px;'></div>");
-                $("#view").append("<h2>Resources</h2>");
+                $("#view").append("<h2>Resources <img id='loading_resources' 
src='../public/img/loader/lmf-loader_32.gif'></h2>");
                 $("#view").append("<div id='resources' style=''></div>");
                 drawGraphs();
                 drawClasses();

Reply via email to