diff options
Diffstat (limited to 'gstudio/templates')
-rw-r--r-- | gstudio/templates/gstudio/base.html | 4 | ||||
-rw-r--r-- | gstudio/templates/gstudio/skeleton.html | 26 |
2 files changed, 23 insertions, 7 deletions
diff --git a/gstudio/templates/gstudio/base.html b/gstudio/templates/gstudio/base.html index 20b010df..d0363f3e 100644 --- a/gstudio/templates/gstudio/base.html +++ b/gstudio/templates/gstudio/base.html @@ -20,8 +20,8 @@ {% endblock %} {% block sidebar %} - <img src="{{ STATIC_URL }}objectapp/img/rss.png" alt="?" width="20" height="" /> - <a href="{% url objectapp_gbobject_latest_feed %}" class="feeds"><h4>Rssfeed</h4></a> + <img src="{{ STATIC_URL }}gstudio/img/rss.png" alt="?" width="20" height="" /> + <a href="{% url gstudio_nodetype_latest_feed %}" class="feeds"><h4>Rssfeed</h4></a> <div class="search"> <h3>{% trans "Search" %}</h3> diff --git a/gstudio/templates/gstudio/skeleton.html b/gstudio/templates/gstudio/skeleton.html index c5a15c3c..d1792207 100644 --- a/gstudio/templates/gstudio/skeleton.html +++ b/gstudio/templates/gstudio/skeleton.html @@ -207,6 +207,7 @@ $(function fgraph() { $.getJSON('/nodetypes/graphs/graph_json/' + {{object.id}}, function (json1) { metadata=json1.node_metadata; relations=json1.relations; + relnset=json1.relset init(metadata,relations); load({{object.id}}) }); @@ -282,7 +283,7 @@ var a = 25 * s; - link = d3.select("#chart g.edges").selectAll("line.link") + link = d3.select("#chart g.edges").selectAll("line.link").select(this.arrowhead) .data(edges, function(e){return e.from + "-" + e.to + "-" + e.type}); link.enter().append("svg:line") @@ -304,13 +305,12 @@ var a = 25 * s; }) .attr("text", function(d) { return d.type; - }); + }) + .attr("marker-end", "url(#arrowhead)"); - - var node = d3.select("#chart g.nodes").selectAll("g.node").data(nodes); @@ -325,6 +325,21 @@ var a = 25 * s; + new_g.append("svg:marker") + .attr("id", "arrowhead") + .attr("viewBox","0 0 10 10") + .attr("refX","20") + .attr("refY","5") + .attr("markerUnits","strokeWidth") + .attr("markerWidth","9") + .attr("markerHeight","5") + .attr("orient","auto") + .append("svg:path") + .attr("d","M 0 0 L 10 5 L 0 10 z") + .attr("fill", "#6D6666"); + + + $(window).bind('keydown',function(event){ if(17==event.keyCode){ new_g.on("click",function(d){ @@ -334,7 +349,8 @@ $(window).bind('keydown',function(event){ d.expanded="true"; $.getJSON('/nodetypes/graphs/graph_json/' + d._id , function (json2) { new_metadata=json2.node_metadata; - new_relations=json2.relations; + new_relations=json2.relations; + new_relnset=json2.relset metadata=_.union(new_metadata,metadata); relations=_.union(new_relations,relations); init(metadata,relations); |