diff options
author | Arun yadav <arunkumar5587@gmail.com> | 2012-05-10 14:25:23 +0530 |
---|---|---|
committer | Arun yadav <arunkumar5587@gmail.com> | 2012-05-10 14:25:23 +0530 |
commit | 4d4df37a9f858d5fc2dc342d06d30b87031000d8 (patch) | |
tree | 13cbe361fe5636596cb1dbce9c0206d463399383 /gstudio/templates | |
parent | fe4a82b80954e4a4666afa71ab3161c8b824f9e9 (diff) | |
parent | b06db59efba106edb115598f822887143e729d33 (diff) | |
download | gnowsys-4d4df37a9f858d5fc2dc342d06d30b87031000d8.tar.gz |
Merge remote-tracking branch 'gn/master'
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 20b010d..d0363f3 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 c5a15c3..d179220 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); |