diff --git a/src/graphxq/app.css b/src/graphxq/app.css
index 9ebdff5..a17ebc8 100644
--- a/src/graphxq/app.css
+++ b/src/graphxq/app.css
@@ -14,7 +14,9 @@ body {
.navbar-search .search-query {
padding-left: 29px;
}
-
+.popwidth {
+ width:50em;
+}
.navbar-search .icon-search {
position: absolute;
top: 7px;
diff --git a/src/graphxq/app.js b/src/graphxq/app.js
index 4184c30..f7f7f62 100644
--- a/src/graphxq/app.js
+++ b/src/graphxq/app.js
@@ -5,7 +5,10 @@ $(document).ready(function(){
if($("#editForm").length){
setupEdit()
};
- resize=function(){
+ $("#infotip").popover({"html":true,
+ template: '
'
+ });
+ resize=function(){
var h=$(window).height();
$('.extend').not(':hidden').each(function(){
var j=$(this)
@@ -45,10 +48,10 @@ function setupEdit(){
$('input[name=dl]').attr('checked', download);
$("#editForm").submit();
};
- $("#bnup").on("click",getsvg);
+ $("#bnRefresh").on("click",getsvg);
$("#bnsvg").on("click",function(){sub(false)});
$("#bndn").on("click",function(){sub(true)});
- $("#dot").on("keyup",throttle(getsvg,250));
+ $("#data").on("keyup",throttle(getsvg,250));
$("#bnxml").on("click",function(){
$("#svgdiv,#svgsrc").toggle()
resize();
@@ -80,10 +83,11 @@ function getsvg(){
$("#gInsertSVG").empty().append(n);
ace.edit("svgsrc2").setValue(str,1);
//ace.edit("svgsrc2").selection.clear();
-
+ $("#infotip").attr("data-content","SVG returned in: "+d +" ms.");
},
error:function(jqXHR, textStatus, errorThrown){
- console.log("ajax error: "+textStatus + errorThrown);
+ console.log("ajax error: "+textStatus + jqXHR.responseText);
+ $("#infotip").attr("data-content",""+jqXHR.responseText+" ");
}
});
};
diff --git a/src/graphxq/graphxq.xqm b/src/graphxq/graphxq.xqm
index 8e1e45f..9871048 100644
--- a/src/graphxq/graphxq.xqm
+++ b/src/graphxq/graphxq.xqm
@@ -33,8 +33,8 @@ function about(){
: GET or POST return svg for dot, with download option
:)
declare
-%rest:path("graphxq/svg")
-%rest:form-param("dot","{$dot}")
+%rest:path("graphxq/api/svg")
+%rest:form-param("data","{$dot}")
%rest:form-param("url","{$url}")
%rest:form-param("dl","{$dl}")
%output:media-type("image/svg+xml")
@@ -127,7 +127,7 @@ function library(){
:)
declare
%rest:POST %rest:path("graphxq/api/dotml")
-%rest:form-param("dotml","{$dotml}")
+%rest:form-param("data","{$dotml}")
%rest:form-param("dl","{$dl}")
function api-dotml($dotml,$dl ) {
let $dotml:=fn:trace($dotml,"dot: ")
diff --git a/src/graphxq/views/api.xml b/src/graphxq/views/api.xml
index 2584a0c..5c2e138 100644
--- a/src/graphxq/views/api.xml
+++ b/src/graphxq/views/api.xml
@@ -1,7 +1,24 @@
-
About GraphXQ API
+
The GraphXQ API
+
The Graphxq REST API.
+
+ POST
+ dot
+
+
Description
+
Return SVG from dot passed in the data
parameter.
+
Syntax
- POST or GET restxq/graphxq/api/dotml?dot=..
+ restxq/graphxq/api/dot?data=..
-
+
+ POST
+ dotml
+
+
Description
+
Return SVG from dotML passed in the data
parameter.
+
Syntax
+
+ restxq/graphxq/api/dotml?data=..
+
\ No newline at end of file
diff --git a/src/graphxq/views/dotform.xml b/src/graphxq/views/dotform.xml
index a6a63fa..3180d05 100644
--- a/src/graphxq/views/dotform.xml
+++ b/src/graphxq/views/dotform.xml
@@ -5,9 +5,9 @@
-
diff --git a/src/graphxq/views/dotmlform.xml b/src/graphxq/views/dotmlform.xml
index ad66ed0..86e05cc 100644
--- a/src/graphxq/views/dotmlform.xml
+++ b/src/graphxq/views/dotmlform.xml
@@ -1,17 +1,22 @@
-
-{$toolbar}
-
-
-
-
- {$dotml}
-
-
+
+ {$toolbar}
-
-
{$svgwidget}
-
(no svg loaded)
+
-
\ No newline at end of file
diff --git a/src/graphxq/views/item1.xml b/src/graphxq/views/item1.xml
index 28af059..00bf242 100644
--- a/src/graphxq/views/item1.xml
+++ b/src/graphxq/views/item1.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/src/graphxq/views/layout.xml b/src/graphxq/views/layout.xml
index b4badd9..8c135f4 100644
--- a/src/graphxq/views/layout.xml
+++ b/src/graphxq/views/layout.xml
@@ -13,13 +13,14 @@
-
+
+