From be7765e07e626c8be1e3d433ddb2e4f84259cf59 Mon Sep 17 00:00:00 2001 From: shefali shetty Date: Wed, 9 May 2012 11:24:16 +0530 Subject: bug related to 'relation' is rectified --- objectapp/models.py | 24 +++++++++++++++++++----- objectapp/static/objectapp/css/screen.css | 6 +++--- objectapp/templates/objectapp/skeleton.html | 2 +- 3 files changed, 23 insertions(+), 9 deletions(-) (limited to 'objectapp') diff --git a/objectapp/models.py b/objectapp/models.py index a27832af..97501c81 100644 --- a/objectapp/models.py +++ b/objectapp/models.py @@ -391,13 +391,27 @@ class Gbobject(Node): g_json["relations"].append({"from":self.id ,"type":str(key),"value":1,"to":predicate_id[key] }) if not isinstance(nbh[key],basestring): for item in nbh[key]: + if item.reftype!="Relation": # create nodes - g_json["node_metadata"].append({"_id":str(item.id),"screen_name":item.title,"title":self.title, "url":item.get_absolute_url(),"expanded":"false"}) - # g_json[str(key)].append({"from":predicate_id[key] , "to":item.id ,"value":1 }) - #create links - g_json["relations"].append({"from":predicate_id[key] ,"type":str(key), "value":1,"to":item.id }) - + g_json["node_metadata"].append({"_id":str(item.id),"screen_name":item.title,"title":self.title, "url":item.get_absolute_url(),"expanded":"false"}) + + # g_json[str(key)].append({"from":predicate_id[key] , "to":item.id ,"value":1 }) + #create links + g_json["relations"].append({"from":predicate_id[key] ,"type":str(key), "value":1,"to":item.id }) + + else: + + if item.left_subject.id==self.id: + item1=item.right_subject + elif item.right_subject.id==self.id: + item1=item.left_subject + + g_json["node_metadata"].append({"_id":str(item1.id),"screen_name":item1.title,"title":self.title, "url":item1.get_absolute_url(),"expanded":"false"}) + + # g_json[str(key)].append({"from":predicate_id[key] , "to":item.id ,"value":1 }) + #create links + g_json["relations"].append({"from":predicate_id[key] ,"type":str(key), "value":1,"to":item1.id }) else: #value={nbh["plural"]:"a4",nbh["altnames"]:"a5"} #this_node[str(key)]=nbh[key] key, nbh[key] diff --git a/objectapp/static/objectapp/css/screen.css b/objectapp/static/objectapp/css/screen.css index c69ca997..fd913f71 100644 --- a/objectapp/static/objectapp/css/screen.css +++ b/objectapp/static/objectapp/css/screen.css @@ -479,9 +479,9 @@ a:hover { text-decoration: underline; } font-weight: bold; } #graphcss{ - margin-left: 230px; - margin-right: 150px; - margin-top: 1px; + margin-left: 180px; + margin-right: 200px; + margin-top: -150px; position: absolute; width: 300px; height: 900px diff --git a/objectapp/templates/objectapp/skeleton.html b/objectapp/templates/objectapp/skeleton.html index 2990d9a5..f3325b87 100644 --- a/objectapp/templates/objectapp/skeleton.html +++ b/objectapp/templates/objectapp/skeleton.html @@ -264,7 +264,7 @@ var a = 800 * s; .charge(-5000) .friction(0.7) .gravity(0.7) - .linkDistance(75) + .linkDistance(50) .nodes([]) .links([]) .size([w, h]) -- cgit v1.2.3-70-g09d2 From 06db97bafe284e9d974a869db4cb2b6bd86f39de Mon Sep 17 00:00:00 2001 From: shefali shetty Date: Wed, 9 May 2012 14:16:09 +0530 Subject: Arrow marker added to the links --- gstudio/models.py | 8 ++++++-- gstudio/templates/gstudio/skeleton.html | 26 ++++++++++++++++++++----- objectapp/models.py | 4 +++- objectapp/templates/objectapp/skeleton.html | 30 ++++++++++++++++++++++------- 4 files changed, 53 insertions(+), 15 deletions(-) (limited to 'objectapp') diff --git a/gstudio/models.py b/gstudio/models.py index 0b6886de..f4715a51 100644 --- a/gstudio/models.py +++ b/gstudio/models.py @@ -722,7 +722,8 @@ class Nodetype(Node): g_json = {} g_json["node_metadata"]= [] g_json["relations"]=[] - + g_json["relset"]=[] + global counter global attr_counter nbh = self.get_nbh @@ -737,7 +738,8 @@ class Nodetype(Node): this_node = {"_id":str(self.id),"title":self.title,"screen_name":self.title, "url":self.get_absolute_url(),"expanded":"true"} - g_json["node_metadata"].append(this_node) + g_json["node_metadata"].append(this_node) + g_json["relset"].append(self.id) for key in predicate_id.keys(): if nbh[key]: @@ -757,6 +759,8 @@ class Nodetype(Node): # create nodes g_json["node_metadata"].append({"_id":str(item.id),"screen_name":item.title,"title":self.title, "url":item.get_absolute_url(),"expanded":"false"}) + g_json["relset"].append(item.id) + # g_json[str(key)].append({"from":predicate_id[key] , "to":item.id ,"value":1 }) #create links 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); diff --git a/objectapp/models.py b/objectapp/models.py index 97501c81..2c56dbf9 100644 --- a/objectapp/models.py +++ b/objectapp/models.py @@ -364,6 +364,7 @@ class Gbobject(Node): g_json = {} g_json["node_metadata"]= [] g_json["relations"]=[] + g_json["relset"]=[] global counter global attr_counter @@ -380,6 +381,7 @@ class Gbobject(Node): this_node = {"_id":str(self.id),"title":self.title,"screen_name":self.title, "url":self.get_absolute_url(),"expanded":"true"} g_json["node_metadata"].append(this_node) + g_json["relset"].append(self.id) for key in predicate_id.keys(): if nbh[key]: @@ -395,7 +397,7 @@ class Gbobject(Node): # create nodes g_json["node_metadata"].append({"_id":str(item.id),"screen_name":item.title,"title":self.title, "url":item.get_absolute_url(),"expanded":"false"}) - + g_json["relset"].append(item.id) # g_json[str(key)].append({"from":predicate_id[key] , "to":item.id ,"value":1 }) #create links g_json["relations"].append({"from":predicate_id[key] ,"type":str(key), "value":1,"to":item.id }) diff --git a/objectapp/templates/objectapp/skeleton.html b/objectapp/templates/objectapp/skeleton.html index f3325b87..2e08471f 100644 --- a/objectapp/templates/objectapp/skeleton.html +++ b/objectapp/templates/objectapp/skeleton.html @@ -290,12 +290,12 @@ var a = 800 * s; force.links(edges); force.start(); - 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") .attr("class", "link") - .style("stroke-width", 2 /* function(d) { + .style("stroke-width", 2/* function(d) { return Math.sqrt(d.value); } */ ) .attr("x1", function(d) { @@ -313,9 +313,8 @@ var a = 800 * s; .attr("text", function(d) { return d.type; }) - - .append("a") - .text(function(d) { return d.type; }); + + .attr("marker-end", "url(#arrowhead)"); @@ -332,6 +331,23 @@ var a = 800 * s; .call(force.drag); + 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){ @@ -408,8 +424,8 @@ $(window).bind('keydown',function(event){ .attr("cx", bbox.x+25) .attr("cy", bbox.y+13) .call(force.drag) - .attr("rx",function(d) {var ttx=d.screen_name ; return (ttx.length + 40)}) - .attr("ry",13) + .attr("rx",function(d) {var ttx=d.screen_name ; return (ttx.length + 55)}) + .attr("ry",14) .style("fill-opacity", ".2") .style("stroke", "#666") .style("stroke-width", "1.5px") -- cgit v1.2.3-70-g09d2 From 7c9ec1f64552c4232c4ecb41b9b718de13908893 Mon Sep 17 00:00:00 2001 From: Dhiru Date: Thu, 10 May 2012 18:23:10 +0530 Subject: change in css affecting header color graph position , space and eliminating blank space after the third column. --- demo/grappelli/static/grappelli/css/forms.css | 6 +-- .../grappelli/css/grappelli-skin-default.css | 13 +++--- gstudio/static/gstudio/css/screen.css | 29 ++++++------ gstudio/templates/gstudio/skeleton.html | 38 ++++++++-------- objectapp/settings.py | 2 +- objectapp/static/objectapp/css/screen.css | 26 +++++------ .../templates/objectapp/_gbobject_detail.html | 4 +- objectapp/templates/objectapp/skeleton.html | 51 ++++++++++++---------- 8 files changed, 87 insertions(+), 82 deletions(-) (limited to 'objectapp') diff --git a/demo/grappelli/static/grappelli/css/forms.css b/demo/grappelli/static/grappelli/css/forms.css index 84e21f6d..277334ee 100644 --- a/demo/grappelli/static/grappelli/css/forms.css +++ b/demo/grappelli/static/grappelli/css/forms.css @@ -2,7 +2,7 @@ /* Basic Settings, Fieldsets, Form-Rows ------------------------------------------------------------------------------------------------------- */ +----------------------------------------------------------------------------------------------------- */ form { margin: 0; @@ -657,7 +657,7 @@ select.span-16, textarea.span-16, div.autocomplete-wrapper-m2m.span-16, .span-20 label + input[type=text], .span-20 label + input[type=password], .span-20 label + select, .span-20 label + textarea { - width: 598px; + width: 230px; } .span-16 div.autocomplete-wrapper-m2m ul.repr, .span-16 div.autocomplete-wrapper-m2m ul.repr li, @@ -1240,4 +1240,4 @@ div.autocomplete-wrapper-m2m input.vManyToManyRawIdAdminField, div.autocomplete- background: transparent !important; box-shadow: none !important; -moz-box-shadow: none !important; -webkit-box-shadow: none !important; cursor: default !important; -} \ No newline at end of file +} diff --git a/demo/grappelli/static/grappelli/css/grappelli-skin-default.css b/demo/grappelli/static/grappelli/css/grappelli-skin-default.css index 6f5e721f..fe718a3e 100644 --- a/demo/grappelli/static/grappelli/css/grappelli-skin-default.css +++ b/demo/grappelli/static/grappelli/css/grappelli-skin-default.css @@ -7,7 +7,7 @@ /* Paragraphs ------------------------------------------------------------------------------------------------------- */ +----------------------------------------------------------------------------------------------------- */ .module p.help, p.help { @@ -166,6 +166,7 @@ body { background: -moz-linear-gradient(top, white, white); background: -webkit-gradient(linear, left top, left bottom, from(white), to(white)); background: -o-linear-gradient(top, white, white); + background: #2B3959; } #header a:hover, #header a:active { color: red; @@ -1907,7 +1908,7 @@ a:hover, a:active, a.selected { } #header a:link, #header a:visited { - color: #0872B4; + color: white; } #header a:hover, #header a:active { color: red; @@ -2016,11 +2017,11 @@ hr { /* User Tools ................................................... */ #user-tools { - border-left: 1px solid #303030; + border-left: 0px solid #303030; } #user-tools>li { - border-left: 1px solid #404040; - border-right: 1px solid #303030; + border-left: 0px solid #404040; + border-right: 0px solid #303030; } li.user-options-container.open a.user-options-handler { color: #eee !important; @@ -2946,7 +2947,7 @@ ul.pagination li.separator span { /* Tooltips ------------------------------------------------------------------------------------------------------- */ +----------------------------------------------------------------------------------------------------- */ .module.search .tooltip .tooltip-content { border: 1px solid #ccc; diff --git a/gstudio/static/gstudio/css/screen.css b/gstudio/static/gstudio/css/screen.css index a5e3ba39..c1077768 100644 --- a/gstudio/static/gstudio/css/screen.css +++ b/gstudio/static/gstudio/css/screen.css @@ -1,4 +1,4 @@ -body { line-height: 1.5; font-family: Arial, Helvetica, sans-serif; color: #333333; font-size: 75%; height:1500px;width:1500px} +body { line-height: 1.5; font-family: Arial, Helvetica, sans-serif; color: #333333; font-size: 75%; height:1500px; width: 90%; } h1, h2, h3, h4, h5, h6 { font-weight: normal; color: #176691; border-radius:15px; } h1 img, h2 img, h3 img, h4 img, h5 img, h6 img { margin: 0; } @@ -130,7 +130,7 @@ caption { background: #eeeeee; } .span-15 { width: 590px; } -.span-16 { width: 150px; } +.span-16 { width: 500px; } .span-17 { width: 670px; } @@ -406,7 +406,7 @@ textarea { margin: 0.5em 0; padding: 5px; } select { margin: 0.5em 0; } -fieldset { border: 1px solid #cccccc; } +fieldset { border: 1px solid #cccccc; width:150px;} input.text, input.title, input[type=email], input[type=text], input[type=password], textarea { background-color: #fff; border: 1px solid #bbbbbb; } input.text:focus, input.title:focus, input[type=email]:focus, input[type=text]:focus, input[type=password]:focus, textarea:focus { border: 1px solid #666666; } @@ -424,7 +424,7 @@ ul, ol { margin: 0 1.5em 1.5em 0; padding-left: 3.333em; } a { text-decoration: none; } a:hover { text-decoration: underline; } -#header { margin-bottom: 1em; border-bottom: 1px solid #e9e9f3; } +#header { margin-bottom: 1em; border-bottom: 1px solid #e9e9f3; background: #2b3959; color: white;} #header h1 { font-size: 2em; font-weight: bold; margin-bottom: 0; } #header .top-navigation { float: right; } #header .top-navigation img { border: 0; } @@ -436,7 +436,7 @@ a:hover { text-decoration: underline; } #b1 {position:relative; center:5%; background-color:#43AEE7; color: white; border: 1px solid #000000; font-size:1em;} #b2 {position:relative; center:6%; background-color:#43AEE7; color: white; border: 1px solid #000000; font-size:1em;} -#body { margin-bottom: 1em; border-bottom: 1px solid #e9e9f3; } +#body { margin-bottom: 1em; border-bottom: 1px solid #e9e9f3; width: 100%; } #content h1, #content h2, #content h3 { margin-top: 10px; } @@ -446,13 +446,12 @@ a:hover { text-decoration: underline; } float: left; clear: both; margin-bottom: 10px; - margin-left: 0; - margin-right: 60px; + margin-left: 0%; + margin-right: 0%; margin-top: 10px; - padding-right: 30px; + padding-right: 0px; width:250px; } - #graph { position: absolute; float: left; @@ -475,14 +474,14 @@ a:hover { text-decoration: underline; } font-weight: bold; } #graphcss { - margin-left: 180px; - margin-right: 200px; - margin-top: -150px; + margin-left: 231px; + margin-right: 0%; + margin-top: 1px; position: absolute; - width: 300px; + width: 54%; height: 900px } -#sidebar{position:absolute; margin-left:1000px; margin-right:150px; margin-top:10px; width:300px;} +#sidebar{position:relative; margin-left:85%; margin-right:0%; margin-top:10px; width:24%;} #sidebar div:first-child h3 { margin-top:0px; } #sidebar h3 { background-color: #C4EBF4; padding: 0.5em; } #sidebar p { padding-left: 1em; } @@ -504,7 +503,7 @@ a:hover { text-decoration: underline; } #sidebar .tags div ul .tag_4 { font-size: 2em; color: #0070a8; } #sidebar .tags div ul .tag_5 { font-size: 2.25em; color: #0099e5; } #sidebar .tags div ul .tag_6 { font-size: 3em; color: #00adff; } - +#footer{position: static; top: 4px; left: -1px; margin-top: 18px;} th.month{padding:0cm 2.5cm;} table.month { margin-bottom: 0; } table.month th.month { text-transform: uppercase; color: #006699; background: none; } diff --git a/gstudio/templates/gstudio/skeleton.html b/gstudio/templates/gstudio/skeleton.html index d1792207..3b945f48 100644 --- a/gstudio/templates/gstudio/skeleton.html +++ b/gstudio/templates/gstudio/skeleton.html @@ -46,8 +46,8 @@ display: block; } svg { - margin-left: 50%; - margin-right: 50%; + margin-left: 0%; + margin-right: 10%; display: block; position: absolute; } @@ -215,26 +215,25 @@ $.getJSON('/nodetypes/graphs/graph_json/' + {{object.id}}, function (json1) { function load(key) { - -var a = 25 * s; - - if ( a > 700 ) - { - var w = 700; - } - else - { - var w = a; - } - - var h = 24 * s, + if (s > 0 ){ + var a = 50 * s; + var w = 700; + var p = 100 + "%"; + var h = 600; + var q = 3 * s + 35 + "%"; + }else{ + var w = 700; + var p = 100 + "%"; + var h = 600; + var q = 110 + "%"; + } fill = d3.scale.category20(); var vis = d3.select("#chart") .append("svg:svg") .attr("id", "amazingViz") - .attr("width", w) - .attr("height", h); + .attr("width", p) + .attr("height", q); vis.append("svg:g").attr("class", "edges"); vis.append("svg:g").attr("class", "nodes"); @@ -469,7 +468,6 @@ $(window).bind('keydown',function(event){ - - diff --git a/objectapp/settings.py b/objectapp/settings.py index 885a8701..2b215f02 100644 --- a/objectapp/settings.py +++ b/objectapp/settings.py @@ -56,7 +56,7 @@ SAVE_PING_EXTERNAL_URLS = getattr(settings, 'OBJECTAPP_PING_EXTERNAL_URLS', True COPYRIGHT = getattr(settings, 'OBJECTAPP_COPYRIGHT', 'Objectapp') -PAGINATION = getattr(settings, 'OBJECTAPP_PAGINATION', 10) +PAGINATION = getattr(settings, 'OBJECTAPP_PAGINATION', 4) ALLOW_EMPTY = getattr(settings, 'OBJECTAPP_ALLOW_EMPTY', True) ALLOW_FUTURE = getattr(settings, 'OBJECTAPP_ALLOW_FUTURE', True) diff --git a/objectapp/static/objectapp/css/screen.css b/objectapp/static/objectapp/css/screen.css index fd913f71..408dd84b 100644 --- a/objectapp/static/objectapp/css/screen.css +++ b/objectapp/static/objectapp/css/screen.css @@ -1,4 +1,4 @@ -body { line-height: 1.5; font-family: Arial, Helvetica, sans-serif; color: #333333; font-size: 75%; height:1500px;width:1500px} +body { line-height: 1.5; font-family: Arial, Helvetica, sans-serif; color: #333333; font-size: 75%; height:1500px; width: 85%; } h1, h2, h3, h4, h5, h6 { font-weight: normal; color: #000000; border-radius:15px; } h1 img, h2 img, h3 img, h4 img, h5 img, h6 img { margin: 0; } @@ -424,7 +424,7 @@ ul, ol { margin: 0 1.5em 1.5em 0; padding-left: 3.333em; } a { text-decoration: none; } a:hover { text-decoration: underline; } -#header { margin-bottom: 1em; border-bottom: 1px solid #e9e9f3; } +#header { margin-bottom: 1em; border-bottom: 1px solid #e9e9f3; background: #2b3959; color: white;} #header h1 { font-size: 2em; font-weight: bold; margin-bottom: 0; } #header .top-navigation { float: right; } #header .top-navigation img { border: 0; } @@ -440,7 +440,7 @@ a:hover { text-decoration: underline; } #b1 {position:relative; center:5%; background-color:#43AEE7; color: white; border: 1px solid #000000; font-size:1em;} #b2 {position:relative; center:6%; background-color:#43AEE7; color: white; border: 1px solid #000000; font-size:1em;} -#body { margin-bottom: 1em; border-bottom: 1px solid #e9e9f3; } +#body { margin-bottom: 1em; border-bottom: 0px solid #e9e9f3; width: 100%;} #content h1, #content h2, #content h3 { margin-top: 10px; } @@ -450,10 +450,10 @@ a:hover { text-decoration: underline; } float: left; clear: both; margin-bottom: 10px; - margin-left: 0; - margin-right: 60px; + margin-left: 0%; + margin-right: 0%; margin-top: 10px; - padding-right: 30px; + padding-right: 0%; width:250px; } @@ -479,14 +479,14 @@ a:hover { text-decoration: underline; } font-weight: bold; } #graphcss{ - margin-left: 180px; - margin-right: 200px; - margin-top: -150px; + margin-left: 237px; + margin-right: 0px; + margin-top: 1px; position: absolute; - width: 300px; + width: 46%; height: 900px } -#sidebar{position:absolute; margin-left:600px; margin-right:150px; margin-top:10px; width:300px;} +#sidebar{position:relative; margin-left:92%; margin-right:0px; margin-top:10px; width:23%;} #sidebar div:first-child h3 { margin-top:0px; } #sidebar h3 { background-color: #FFE9E8; padding: 0.5em; } #sidebar p { padding-left: 1em; } @@ -508,7 +508,7 @@ a:hover { text-decoration: underline; } #sidebar .tags div ul .tag_4 { font-size: 2em; color: #0070a8; } #sidebar .tags div ul .tag_5 { font-size: 2.25em; color: #0099e5; } #sidebar .tags div ul .tag_6 { font-size: 3em; color: #00adff; } - +#footer{ position:static; border-bottom: 1px solid #E9E9F3; margin-top: 85px; } th.month{padding:0cm 2.5cm;} table.month { margin-bottom: 0; } table.month th.month { text-transform: uppercase; color: #555555; background: none; } @@ -516,7 +516,7 @@ table.month th { text-transform: capitalize; color: #555555; background-color: # table.month td { text-align: center; font-weight: bold; } table.month td.objecttype { background-color: #C4EBF4; } -div.paginator { margin-bottom: 1em; } +div.paginator { margin-bottom: 2em; } div.paginator span { font-size: 1.2em; margin-left: 0.3em; padding: 0 0.5em 0 0.5em; float: left; border: 1px solid #e9e9f3; } div.paginator span.index { margin-left: 0; } div.paginator span.page:hover, div.paginator span.next:hover, div.paginator span.previous:hover { background-color: #006699; } diff --git a/objectapp/templates/objectapp/_gbobject_detail.html b/objectapp/templates/objectapp/_gbobject_detail.html index 6b213566..ee43aba2 100644 --- a/objectapp/templates/objectapp/_gbobject_detail.html +++ b/objectapp/templates/objectapp/_gbobject_detail.html @@ -28,7 +28,7 @@ - +

Name: {{ object.title }}
@@ -76,7 +76,7 @@

- +
diff --git a/objectapp/templates/objectapp/skeleton.html b/objectapp/templates/objectapp/skeleton.html index 2e08471f..928c0e64 100644 --- a/objectapp/templates/objectapp/skeleton.html +++ b/objectapp/templates/objectapp/skeleton.html @@ -47,8 +47,8 @@ display: block; } svg { - margin-left: 10%; - margin-right: 10%; + margin-left: 0%; + margin-right: 0%; display: block; position: absolute; } @@ -224,27 +224,26 @@ $.getJSON('/nodetypes/graphs/graph_json/' + {{object.id}}, function (json1) { function load(key) { - -var a = 800 * s; - - if ( a > 700 ) - { - var w = 700; - } - else - { - var w = a; - } - - var h = 232 * s, + +if ( s > 0) { +var w = 700; +var p = 122 + "%"; +var h = 800; +var q = 3 * s + 60 + "%"; +}else{ +var w = 700; +var p = 122 + "%"; +var h = 800; +var q = 110 + "%"; +} fill = d3.scale.category20(); var vis = d3.select("#chart") .append("svg:svg") .attr("id", "amazingViz") - .attr("width", w) - .attr("height", h); + .attr("width", p) + .attr("height", q); vis.append("svg:g").attr("class", "edges"); vis.append("svg:g").attr("class", "nodes"); @@ -474,16 +473,24 @@ $(window).bind('keydown',function(event){ {% block graph %} {% endblock %}
- -
- -- cgit v1.2.3-70-g09d2