This commit is contained in:
Andy Bunce 2015-03-08 22:27:09 +00:00
parent 00c0ce3892
commit 0b197567dc
10 changed files with 23 additions and 10 deletions

View file

@ -63,8 +63,9 @@ function graphxq-svg($dot,$url,$dl,$dotopt) {
declare declare
%restxq:GET %restxq:path("graphxq/dot") %restxq:GET %restxq:path("graphxq/dot")
%output:method("html") %output:version("5.0") %output:method("html") %output:version("5.0")
%restxq:form-param("src","{$src}") %restxq:query-param("src","{$src}")
function dotform($src){ function dotform($src){
let $_:=fn:trace($src,"SRC")
let $dot:= getdot("digraph {a -> b}",$src) let $dot:= getdot("digraph {a -> b}",$src)
let $svgwidget:=fn:doc("views/widget.svg") let $svgwidget:=fn:doc("views/widget.svg")
let $toolbar:=fn:doc("views/toolbar.xml") let $toolbar:=fn:doc("views/toolbar.xml")
@ -80,12 +81,14 @@ function dotform($src){
declare declare
%restxq:GET %restxq:path("graphxq/dotml") %restxq:GET %restxq:path("graphxq/dotml")
%output:method("html") %output:version("5.0") %output:method("html") %output:version("5.0")
%restxq:form-param("src","{$src}") %restxq:query-param("src","{$src}")
function dotmlform($src){ function dotmlform($src){
let $svgwidget:=fn:doc("views/widget.svg") let $svgwidget:=fn:doc("views/widget.svg")
let $toolbar:=fn:doc("views/toolbar.xml") let $toolbar:=fn:doc("views/toolbar.xml")
let $default:=<graph xmlns="http://www.martin-loetzsch.de/DOTML"><node id="test"/></graph> let $default:=<graph xmlns="http://www.martin-loetzsch.de/DOTML"><node id="test"/></graph>
let $dotml:= getdotml($default ,$src) let $dotml:= getdotml($default ,$src)
let $_:=fn:trace($dotml)
let $dotml:= fn:serialize($dotml) let $dotml:= fn:serialize($dotml)
let $v:=map{ "svgwidget": $svgwidget, let $v:=map{ "svgwidget": $svgwidget,
"toolbar": $toolbar, "toolbar": $toolbar,

View file

@ -1,6 +1,8 @@
declare variable $toolbar external :="{tooolbar}"; declare variable $toolbar external :="{tooolbar}";
declare variable $dot external :="{dot}"; declare variable $dot external :="{dot}";
declare variable $svgwidget external :="{svg}"; declare variable $svgwidget external :="{svg}";
<div class="row-fluid"> <div class="row-fluid">
<div class="row-fluid" style="height:24px"> <div class="row-fluid" style="height:24px">

View file

@ -11,7 +11,7 @@ declare variable $url external;
<div class="media-body"> <div class="media-body">
<h4 class="media-heading"> <h4 class="media-heading">
<img src="/graphxq/{$item/url/@type}.png" /> <img src="/static/graphxq/{$item/url/@type}.png" />
{$item/title/fn:string()} {$item/title/fn:string()}
</h4> </h4>
{$item/description/node()} {$item/description/node()}

View file

@ -23,7 +23,7 @@ declare variable $active-link external :=function($_){$_};
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.8.1/jquery.min.js" type="text/javascript"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.8.1/jquery.min.js" type="text/javascript"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.2.2/bootstrap.min.js" type="text/javascript"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.2.2/bootstrap.min.js" type="text/javascript"></script>
<script src="http://raw.github.com/ajaxorg/ace-builds/master/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.1.8/ace.js" type="text/javascript" charset="utf-8"></script>
<link href="/static/graphxq/app.css" rel="stylesheet" type="text/css" /> <link href="/static/graphxq/app.css" rel="stylesheet" type="text/css" />
<script src="/static/graphxq/app.js" type="text/javascript"></script> <script src="/static/graphxq/app.js" type="text/javascript"></script>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
@ -48,7 +48,7 @@ declare variable $active-link external :=function($_){$_};
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</a> </a>
<a href="about" class="brand" title="Version 0.4.0"> <a href="about" class="brand" title="Version 0.5.0">
<img src="/static/graphxq/graphxq2.png" /> <img src="/static/graphxq/graphxq2.png" />
graphXQ graphXQ
</a> </a>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -105,7 +105,7 @@ function acediv(id){
// https://github.com/ajaxorg/ace/issues/1161 // https://github.com/ajaxorg/ace/issues/1161
var mode=$("#"+id).attr("data-mode"); var mode=$("#"+id).attr("data-mode");
var readonly=!!$("#"+id).attr("data-readonly"); var readonly=!!$("#"+id).attr("data-readonly");
ace.config.set("workerPath", "/graphxq/ace-worker"); // ace.config.set("workerPath", "/static/graphxq/ace-worker");
var editor = ace.edit(id); var editor = ace.edit(id);
editor.setTheme("ace/theme/textmate"); editor.setTheme("ace/theme/textmate");
editor.getSession().setMode("ace/mode/"+mode); editor.getSession().setMode("ace/mode/"+mode);

View file

@ -0,0 +1,12 @@
<?xml version="1.0"?>
<svg width="438" height="438" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
<!-- Created with SVG-edit - http://svg-edit.googlecode.com/ -->
<g>
<title>Graphviz</title>
<circle id="svg_1" r="62.93647" cy="65.436478" cx="211.436462" stroke-width="5" stroke="#000000" fill="#FF0000"/>
<circle id="svg_4" r="62.936462" cy="294.436478" cx="65.43647" stroke-width="5" stroke="#000000" fill="#00bf00"/>
<circle id="svg_5" r="62.936462" cy="286.436478" cx="372.43647" stroke-width="5" stroke="#000000" fill="#ffff00"/>
<line id="svg_6" y2="241.436478" x2="101.436462" y1="119.436478" x1="180.436462" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke-width="5" stroke="#000000" fill="none"/>
<line id="svg_7" y2="226.436478" x2="344.436462" y1="109.436478" x1="255.436462" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke-width="5" stroke="#000000" fill="none"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 985 B