Mercurial > hg > NetworkVis
comparison ismi-python-neo4jrestclient/static/commentaries_authors3.html @ 22:b709419d4235
show id for author in detail panel.
author | root@ismi-dev.rz-berlin.mpg.de |
---|---|
date | Fri, 09 Oct 2015 15:12:34 +0200 |
parents | d964d9a23837 |
children |
comparison
equal
deleted
inserted
replaced
21:d964d9a23837 | 22:b709419d4235 |
---|---|
112 $(".panel-heading").on("click", function() { | 112 $(".panel-heading").on("click", function() { |
113 $(this).find(".clickhide").toggle(); | 113 $(this).find(".clickhide").toggle(); |
114 $(this).next().slideToggle(); | 114 $(this).next().slideToggle(); |
115 }); | 115 }); |
116 // provide search and graph | 116 // provide search and graph |
117 backendApiPrefix = ""; | 117 backendApiPrefix = "/netvis-ismi"; |
118 searchApi = {}; | 118 searchApi = {}; |
119 $(function () { | 119 $(function () { |
120 function showText(text_id) { | 120 function showText(text_id) { |
121 $.get(backendApiPrefix+"/textandcommentaries/" + encodeURIComponent(text_id), | 121 $.get(backendApiPrefix+"/textandcommentaries/" + encodeURIComponent(text_id), |
122 function (data) { | 122 function (data) { |
123 if (!data) return; | 123 if (!data) return; |
124 $("#title").text("Title: "+data.title); | 124 $("#title").text("Title: "+data.title); |
125 var $list = $("#info").empty(); | 125 var $list = $("#info").empty(); |
126 $list.append($("<li> Author: " + data.author.label + "</li>") | 126 $list.append($("<li>Author: " + data.author.label + " [" + data.author.ismi_id + "]</li>") |
127 .click(function() { | 127 .click(function() { |
128 search(data.author.ismi_id, true); | 128 search(data.author.ismi_id, true); |
129 })); | 129 })); |
130 for (var key in data.attrs) { | 130 for (var key in data.attrs) { |
131 var val = data.attrs[key]; | 131 var val = data.attrs[key]; |
220 .append("path") | 220 .append("path") |
221 .attr("d", "M0,-5 L10,0 L0,5") | 221 .attr("d", "M0,-5 L10,0 L0,5") |
222 .attr("class","arrowHead"); | 222 .attr("class","arrowHead"); |
223 | 223 |
224 // load graph | 224 // load graph |
225 d3.json(backendApiPrefix+"/graph?limit=10", function(error, graph) { | 225 d3.json(backendApiPrefix+"/graph?limit=1000", function(error, graph) { |
226 if (error) return; | 226 if (error) return; |
227 | 227 |
228 force.nodes(graph.nodes).links(graph.links).start(); | 228 force.nodes(graph.nodes).links(graph.links).start(); |
229 | 229 |
230 var link = svg.selectAll(".link") | 230 var link = svg.selectAll(".link") |