From 51738f463172f301a549efc7041a40f685b70b33 Mon Sep 17 00:00:00 2001 From: apb Date: Wed, 23 Jan 2013 23:36:52 +0000 Subject: [PATCH] css woes --- src/graphxq/app.css | 23 +----- src/graphxq/app.js | 8 +- src/graphxq/data/library.xml | 23 ++++++ src/graphxq/dotml.png | Bin 0 -> 1060 bytes src/graphxq/graphxq.xqm | 23 ++++-- src/graphxq/views/about.xml | 33 ++++---- src/graphxq/views/dotform.xml | 141 +++++++++++++------------------- src/graphxq/views/dotmlform.xml | 13 ++- src/graphxq/views/layout.xml | 14 ++-- src/graphxq/views/library.xml | 57 ++++++++----- src/graphxq/views/toolbar.xml | 52 +++++++++--- 11 files changed, 211 insertions(+), 176 deletions(-) create mode 100644 src/graphxq/data/library.xml create mode 100644 src/graphxq/dotml.png diff --git a/src/graphxq/app.css b/src/graphxq/app.css index f5753e0..6eb3b5f 100644 --- a/src/graphxq/app.css +++ b/src/graphxq/app.css @@ -7,6 +7,9 @@ body { padding-top: 0; } } +.h100{ + height:100%; +} /* search bar icon */ .navbar-search .search-query { padding-left: 29px; @@ -26,26 +29,6 @@ body { .navbar-fixed-top { margin-bottom: 4px; } -.quick-links { - list-style: none outside none; - margin: 0; - min-height: 30px; - overflow: hidden; - padding: 5px 20px; - text-align: center; -} -.quick-links:first-child { - min-height: 0; -} -.quick-links li { - color: #999999; - display: inline; - margin: 0 8px; -} -.quick-links .github-btn, .quick-links .tweet-btn, .quick-links .follow-btn { - position: relative; - top: 5px; -} #editor { diff --git a/src/graphxq/app.js b/src/graphxq/app.js index 7878e6e..1572a46 100644 --- a/src/graphxq/app.js +++ b/src/graphxq/app.js @@ -63,9 +63,11 @@ $('a[data-action="rDom"]').click(function (){ $(document).ready(function(){ $("#bnup").on("click",getsvg); - $("#bnsvg").on("click",function(){ $("#dotForm").submit()}); + $("#bnsvg").on("click",function(){ $("#editForm").submit()}); $("#bndn").on("click",function(){getsvg(true)}); $("#dot").on("keyup",getsvg); + $("#bnxml").on("click",function(){$("#svgdiv,#svgsrc").toggle()}); + var resize=function(){ var h=$(window).height(); $('.extend').each(function(){ @@ -79,13 +81,13 @@ $(document).ready(function(){ }); function getsvg(dl){ - var f=$("#dotForm").serializeArray() + var f=$("#editForm").serializeArray() //var d=$("#frm-defaults").serializeArray() //console.log("#frm-default",d) // if(dl)f.push({"name":"dl","value":1}) $.ajax({ type:"POST", - url:"svg", + url:$("#editForm").attr("action"), data:f, dataType: "text", success: function(str){ diff --git a/src/graphxq/data/library.xml b/src/graphxq/data/library.xml new file mode 100644 index 0000000..5a03ccb --- /dev/null +++ b/src/graphxq/data/library.xml @@ -0,0 +1,23 @@ + + + Process + samples/dot/process.gv + (dot) + + + Unix + samples/dot/unix.gv + + + Root + samples/dot/root.gv + + + Sample + samples/dotml/sample1.xml + + + Cluster + samples/dotml/cluster.xml + + \ No newline at end of file diff --git a/src/graphxq/dotml.png b/src/graphxq/dotml.png new file mode 100644 index 0000000000000000000000000000000000000000..da2b50464fc8910f94c64d5c8897a6f815827418 GIT binary patch literal 1060 zcmV+<1l#+GP)hI+)PhxHvW~L&kqd-u5`JU z5PR+-3kwT*Ey>p1(ia{kcCr0!n4^tRYK%tdU3ob(5x*)Z;ABh7E@ICtu(q~VG&eV= z-!TFg7Z;V0kr96|6x=gE_Hyp;N;a+6a-<j*e~(4i2jQ{rx1rlG@tZXncHJ-*~pkn97+VF=50a2f4s_AXvZz zHg$G(d|SM2FMd()z#IUv9U2KDJh}e-d_A|ed8JLaE2Jf zA_uv^02VNTO-=C_zge{~ez%I*<<}L<~rIglN@*LD(R05IP7R zgbxA;A%q}i6uXluL4qO0kYq?RBpOl;$%b@8!Xf35^sM9>MPVi|6_^W524(}(f%(9M zU`8;d^OEu~UhGg2TU5jz71$)~5*zj@HmZo7Du~ItzzL=gusers, "title":=request:path(), - "messages":=()} + "active-link":=active-link($path,?), (: *** FAILS IF request:path() :) + "bodyclass":=""} let $locals:=map:new(($default,$locals)) return txq:render(fn:resolve-uri($template),$locals,$grxq:layout) }; \ No newline at end of file diff --git a/src/graphxq/views/about.xml b/src/graphxq/views/about.xml index 4c0734e..60a4b32 100644 --- a/src/graphxq/views/about.xml +++ b/src/graphxq/views/about.xml @@ -9,19 +9,6 @@
-
-

Server

-

The server side is written entirely in XQuery. It uses the - BaseX implementation. RestXQ - is used to map XQuery annotations to web server behavior. -

-

The graphviz dot executable is used to generate SVG from the DOT source. - The resultant SVG is viewed in an interface that provides pan and zoom functionality. - The SVG may also be viewed standalone or downloaded.

-

This application includes DOTML developed by Martin Loetzsch. - DOTML is a XML based syntax for the input language of the 'Dot'.

-

Client

The client side targets modern browsers. It was tested against Firefox 15 and Chrome 21. @@ -35,12 +22,28 @@

The resultant SVG is viewed in an interface that provides pan and zoom functionality. The SVG may also be viewed standalone or downloaded.

+
+

Server

+

The server side is written entirely in XQuery. It uses the + BaseX implementation. RestXQ + is used to map XQuery annotations to web server behavior. +

+

The graphviz dot executable is used to generate SVG from the DOT source. + The resultant SVG is viewed in an interface that provides pan and zoom functionality. + The SVG may also be viewed standalone or downloaded.

+

This application includes an XSLT transform to convert DOTML to + dot developed by Martin Loetzsch. + DOTML + is a XML based syntax for the input language of the 'Dot'.

+
-

Bugs

+

Todo

The SVG pan and zoom has problems, especially in Firefox. In part this maybe due to firefox bugs

For reference this shows how the SVG viewbox -works.

+works. See also here. +

diff --git a/src/graphxq/views/dotform.xml b/src/graphxq/views/dotform.xml index 8411393..a4a0a30 100644 --- a/src/graphxq/views/dotform.xml +++ b/src/graphxq/views/dotform.xml @@ -1,96 +1,69 @@
+
{$toolbar}
-
- - -
-
- -
- - {{ - - }} - -
-
- -
-
- - - - - - - - - -
- - -
-
-
source
-
-
+
+
+ + + +
+
{$svgwidget}
- +
- +