update html5

This commit is contained in:
Andy Bunce 2013-01-02 21:01:28 +00:00
parent a34cfab069
commit 3aa4cb7757
26 changed files with 1019 additions and 3218 deletions

View file

@ -48,12 +48,9 @@ jQuery(function($) { $.extend({
$(document).ready(function(){
$("#bnup").on("click",getsvg);
$("#bnsvg").on("click",function(){ submit(false)});
$("#bndn").on("click",function(){submit(true)});
$("#bnsvg").on("click",function(){ $("#dotForm").submit()});
$("#bndn").on("click",function(){getsvg(true)});
$("#dot").on("keyup",getsvg);
$('.colorpicker').colorPicker();
// set height where extend class
var resize=function(){
var h=$(window).height();
$('.extend').each(function(){
@ -66,11 +63,6 @@ $(document).ready(function(){
resize();
});
function submit(dl){
$("#ckdnload").prop("checked",dl);
$("#dotForm").submit()
}
function getsvg(dl){
var f=$("#dotForm").serializeArray()
var d=$("#frm-defaults").serializeArray()
@ -81,13 +73,7 @@ function getsvg(dl){
url:"svg",
data:f,
dataType: "text",
success: updateSvg,
error:function(jqXHR, textStatus, errorThrown){
console.log("ajax error: "+textStatus + errorThrown);
}
});
};
function updateSvg(str){
success: function(str){
// console.log(data)
var oParser = new DOMParser();
var data = oParser.parseFromString(str, "text/xml");
@ -95,6 +81,11 @@ function updateSvg(str){
var n = document.importNode(data.documentElement,true);
$("#cuthere").empty().append(n);
$("#svgsrc").empty().text(str);
},
error:function(jqXHR, textStatus, errorThrown){
console.log("ajax error: "+textStatus + errorThrown);
}
});
};
function dotit(){

181
src/graphxq/graphviz.xml Normal file
View file

@ -0,0 +1,181 @@
<!--
graphviz options for shape,color
-->
<graphviz>
<shapes>
<shape>box</shape>
<shape>polygon</shape>
<shape>ellipse</shape>
<shape>circle</shape>
<shape>point</shape>
<shape>egg</shape>
<shape>triangle</shape>
<shape>plaintext</shape>
<shape>diamond</shape>
<shape>trapezium</shape>
<shape>parallelogram</shape>
<shape>house</shape>
<shape>hexagon</shape>
<shape>octagon</shape>
<shape>doublecircle</shape>
<shape>doubleoctagon</shape>
<shape>tripleoctagon</shape>
<shape>invtriangle</shape>
<shape>invtrapezium</shape>
<shape>invhouse</shape>
<shape>Mdiamond</shape>
<shape>Msquare</shape>
<shape>Mcircle</shape>
<shape>record</shape>
<shape>Mrecord</shape>
</shapes>
<colors>
<color>aliceblue</color>
<color>antiquewhite</color>
<color>aqua</color>
<color>aquamarine</color>
<color>azure</color>
<color>beige</color>
<color>bisque</color>
<color>black</color>
<color>blanchedalmond</color>
<color>blue</color>
<color>blueviolet</color>
<color>brown</color>
<color>burlywood</color>
<color>cadetblue</color>
<color>chartreuse</color>
<color>chocolate</color>
<color>coral</color>
<color>cornflowerblue</color>
<color>cornsilk</color>
<color>crimson</color>
<color>cyan</color>
<color>darkblue</color>
<color>darkcyan</color>
<color>darkgoldenrod</color>
<color>darkgray</color>
<color>darkgreen</color>
<color>darkgrey</color>
<color>darkkhaki</color>
<color>darkmagenta</color>
<color>darkolivegreen</color>
<color>darkorange</color>
<color>darkorchid</color>
<color>darkred</color>
<color>darksalmon</color>
<color>darkseagreen</color>
<color>darkslateblue</color>
<color>darkslategray</color>
<color>darkslategrey</color>
<color>darkturquoise</color>
<color>darkviolet</color>
<color>deeppink</color>
<color>deepskyblue</color>
<color>dimgray</color>
<color>dimgrey</color>
<color>dodgerblue</color>
<color>firebrick</color>
<color>floralwhite</color>
<color>forestgreen</color>
<color>fuchsia</color>
<color>gainsboro</color>
<color>ghostwhite</color>
<color>gold</color>
<color>goldenrod</color>
<color>gray</color>
<color>grey</color>
<color>green</color>
<color>greenyellow</color>
<color>honeydew</color>
<color>hotpink</color>
<color>indianred</color>
<color>indigo</color>
<color>ivory</color>
<color>khaki</color>
<color>lavender</color>
<color>lavenderblush</color>
<color>lawngreen</color>
<color>lemonchiffon</color>
<color>lightblue</color>
<color>lightcoral</color>
<color>lightcyan</color>
<color>lightgoldenrodyellow</color>
<color>lightgray</color>
<color>lightgreen</color>
<color>lightgrey</color>
<color>lightpink</color>
<color>lightsalmon</color>
<color>lightseagreen</color>
<color>lightskyblue</color>
<color>lightslategray</color>
<color>lightslategrey</color>
<color>lightsteelblue</color>
<color>lightyellow</color>
<color>lime</color>
<color>limegreen</color>
<color>linen</color>
<color>magenta</color>
<color>maroon</color>
<color>mediumaquamarine</color>
<color>mediumblue</color>
<color>mediumorchid</color>
<color>mediumpurple</color>
<color>mediumseagreen</color>
<color>mediumslateblue</color>
<color>mediumspringgreen</color>
<color>mediumturquoise</color>
<color>mediumvioletred</color>
<color>midnightblue</color>
<color>mintcream</color>
<color>mistyrose</color>
<color>moccasin</color>
<color>navajowhite</color>
<color>navy</color>
<color>oldlace</color>
<color>olive</color>
<color>olivedrab</color>
<color>orange</color>
<color>orangered</color>
<color>orchid</color>
<color>palegoldenrod</color>
<color>palegreen</color>
<color>paleturquoise</color>
<color>palevioletred</color>
<color>papayawhip</color>
<color>peachpuff</color>
<color>peru</color>
<color>pink</color>
<color>plum</color>
<color>powderblue</color>
<color>purple</color>
<color>red</color>
<color>rosybrown</color>
<color>royalblue</color>
<color>saddlebrown</color>
<color>salmon</color>
<color>sandybrown</color>
<color>seagreen</color>
<color>seashell</color>
<color>sienna</color>
<color>silver</color>
<color>skyblue</color>
<color>slateblue</color>
<color>slategray</color>
<color>slategrey</color>
<color>snow</color>
<color>springgreen</color>
<color>steelblue</color>
<color>tan</color>
<color>teal</color>
<color>thistle</color>
<color>tomato</color>
<color>turquoise</color>
<color>violet</color>
<color>wheat</color>
<color>white</color>
<color>whitesmoke</color>
<color>yellow</color>
<color>yellowgreen</color>
</colors>
</graphviz>

View file

Before

Width:  |  Height:  |  Size: 880 B

After

Width:  |  Height:  |  Size: 880 B

View file

@ -7,21 +7,17 @@
module namespace grxq = 'apb.graphviz.web';
declare default function namespace 'apb.graphviz.web';
import module namespace gr = 'apb.graphviz' at "graphviz.xqm";
import module namespace dotui = 'apb.graphxq.dotui' at "dotui.xqm";
import module namespace txq = 'apb.txq' at "lib/txq.xqm";
import module namespace gr = 'apb.graphviz' at "lib/graphviz.xqm";
import module namespace oa="http://basex.org/ns/oauth" at "lib/oauth.xqy";
import module namespace config="apb.config" at "lib/config.xqm";
import module namespace request = "http://exquery.org/ns/request";
declare namespace rest = 'http://exquery.org/ns/restxq';
declare variable $grxq:layout:=fn:resolve-uri("views/layout.xml");
declare
%rest:GET %rest:path("graphxq")
%output:method("html5")
%output:method("html") %output:version("5.0")
%rest:form-param("dot","{$dot}","")
%rest:form-param("url","{$url}")
function graphxq($dot,$url) {
@ -63,7 +59,7 @@ function graphxq-svg($dot,$url,$dl) {
:)
declare
%rest:GET %rest:path("graphxq/dot")
%output:method("html5")
%output:method("html") %output:version("5.0")
%rest:form-param("src","{$src}")
function dotform($src){
let $dot:= getdot("digraph {{a -> b}}",$src)
@ -77,43 +73,35 @@ function dotform($src){
declare
%rest:GET %rest:path("graphxq/dotml")
%output:method("html5")
%output:method("html") %output:version("5.0")
function dotmlform(){
render("views/dotmlform.xml",map{})
};
declare
%rest:GET %rest:path("graphxq/about")
%output:method("html5")
%output:method("html") %output:version("5.0")
function about(){
render("views/about.xml",map{})
};
declare
%rest:GET %rest:path("graphxq/search")
%output:method("html5")
%output:method("html") %output:version("5.0")
%rest:form-param("q", "{$q}")
function search($q ) {
let $map:=map{"q":=$q}
return render("views/search.xml",$map)
};
declare
%rest:GET %rest:path("graphxq/library")
%output:method("html5")
function library( ) {
%output:method("html") %output:version("5.0")
function library( ) {
let $map:=map{ }
return render("views/library.xml",$map)
};
declare
%rest:GET %rest:path("graphxq/twitter")
%output:method("html5")
function twitter( ) {
let $d:=$config:config
let $map:=map{"data":=fn:serialize($d) }
return render("views/twitter.xml",$map)
};
(:~ use dot or url :)
declare %private function getdot($dot,$url) as xs:string{
@ -142,9 +130,7 @@ declare function render($template,$locals){
let $default:=map{"sidebar":=$sidebar ,
"usermenu":=<div>users</div>,
"title":=request:path(),
"messages":=(),
"libserver":=$config:libserver,
"aceserver":=$config:aceserver}
"messages":=()}
let $locals:=map:new(($default,$locals))
return txq:render(fn:resolve-uri($template),$locals,$grxq:layout)
};

View file

Before

Width:  |  Height:  |  Size: 880 B

After

Width:  |  Height:  |  Size: 880 B

View file

@ -1,33 +0,0 @@
(:~
: configuration access
: looks in WEB-INF/site-config.xml for actual values
:
: @author andy bunce
: @since sept 2012
:)
module namespace config = 'apb.config';
declare default function namespace 'apb.config';
declare variable $config:default:=
<config>
<libserver>//cdnjs.cloudflare.com/ajax/libs</libserver>
<aceserver>http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict</aceserver>
<twitter>
<CONSUMER-KEY>CONSUMER-KEY</CONSUMER-KEY>
<CONSUMER-SECRET>CONSUMER-SECRET</CONSUMER-SECRET>
<access-token>your token</access-token>
<access-token-secret>your secret</access-token-secret>
</twitter>
</config>
;
declare variable $config:config:=
fn:doc(fn:resolve-uri("../../WEB-INF/site-config.xml"))/config
;
(:
: /twitter-bootstrap/2.1.1/..
: /jquery/1.8.1/jquery.min.js
:)
declare variable $config:libserver as xs:string:=$config:config/libserver/fn:string();
declare variable $config:aceserver as xs:string:=$config:config/aceserver/fn:string();

View file

@ -1,238 +0,0 @@
(:
: an OAuth implementation written in XQuery for BaseX 7.4
: based on http://norman.walsh.name/2010/09/25/oauth
:)
module namespace oa="http://basex.org/ns/oauth";
import module namespace crypto="http://expath.org/ns/crypto";
declare function oa:twitter-service($CONSUMER-KEY as xs:string,
$CONSUMER-SECRET as xs:string){
<oa:service-provider realm="">
<oa:request-token>
<oa:uri>http://twitter.com/oauth/request_token</oa:uri>
<oa:method>GET</oa:method>
</oa:request-token>
<oa:user-authorization>
<oa:uri>http://twitter.com/oauth/authorize</oa:uri>
</oa:user-authorization>
<oa:user-authentication>
<oa:uri>http://twitter.com/oauth/authenticate</oa:uri>
<oa:additional-params>force_login=true</oa:additional-params>
</oa:user-authentication>
<oa:access-token>
<oa:uri>http://twitter.com/oauth/access_token</oa:uri>
<oa:method>POST</oa:method>
</oa:access-token>
<oa:signature-methods>
<oa:method>HMAC-SHA1</oa:method>
</oa:signature-methods>
<oa:oauth-version>1.0</oa:oauth-version>
<oa:authentication>
<oa:consumer-key>{$CONSUMER-KEY}</oa:consumer-key>
<oa:consumer-key-secret>{$CONSUMER-SECRET}</oa:consumer-key-secret>
</oa:authentication>
</oa:service-provider>
};
declare function oa:timestamp() as xs:unsignedLong {
let $epoch := xs:dateTime('1970-01-01T00:00:00Z')
let $now := current-dateTime()
let $d := $now - $epoch
let $seconds
:= 86400 * days-from-duration($d)
+ 3600 * hours-from-duration($d)
+ 60 * minutes-from-duration($d)
+ seconds-from-duration($d)
return
xs:unsignedLong($seconds)
};
declare function oa:sign($key as xs:string, $data as xs:string) as xs:string {
crypto:hmac($data,$key,'SHA1','base64')
};
declare function oa:signature-method(
$service as element(oa:service-provider)
) as xs:string
{
if ($service/oa:signature-methods/oa:method = "HMAC-SHA1")
then "HMAC-SHA1"
else error(xs:QName("oa:BADSIGMETHOD"),
"Service must support 'HMAC-SHA1' signatures.")
};
declare function oa:http-method(
$proposed-method as xs:string
) as xs:string
{
if (upper-case($proposed-method) = "GET")
then "GET"
else if (upper-case($proposed-method) = "POST")
then "POST"
else error(xs:QName("oa:BADHTTPMETHOD"),
"Service must use HTTP GET or POST.")
};
declare function oa:request-token(
$service as element(oa:service-provider),
$callback as xs:string?)
as element(oa:request-token)
{
let $options := if (empty($callback))
then ()
else
<oa:options>
<oauth_callback>{$callback}</oauth_callback>
</oa:options>
let $data
:= oa:signed-request($service,
$service/oa:request-token/oa:method,
$service/oa:request-token/oa:uri,
$options, (), ())
return
<oa:request-token>
{ if ($data/oa:error)
then
$data/*
else
for $pair in tokenize($data, "&amp;")
return
element { concat("oa:", substring-before($pair, '=')) }
{ substring-after($pair, '=') }
}
</oa:request-token>
};
declare function oa:access-token(
$service as element(oa:service-provider),
$request as element(oa:request-token),
$verifier as xs:string)
as element(oa:access-token)
{
let $options := <oa:options><oauth_verifier>{$verifier}</oauth_verifier></oa:options>
let $data
:= oa:signed-request($service,
$service/oa:access-token/oa:method,
$service/oa:access-token/oa:uri,
$options,
$request/oa:oauth_token,
$request/oa:oaauth_token_secret)
return
<oa:access-token>
{ if ($data/oa:error)
then
$data/*
else
for $pair in tokenize($data, "&amp;")
return
element { concat("oa:", substring-before($pair, '=')) }
{ substring-after($pair, '=') }
}
</oa:access-token>
};
declare function oa:signed-request(
$service as element(oa:service-provider),
$method as xs:string,
$serviceuri as xs:string,
$options as element(oa:options)?,
$token as xs:string?,
$secret as xs:string?)
as element(oa:response)
{
let $realm := string($service/@realm)
let $nonce :=convert:integer-to-base(random:integer(),16)
let $stamp := oa:timestamp()
let $key := string($service/oa:authentication/oa:consumer-key)
let $sigkey := concat($service/oa:authentication/oa:consumer-key-secret,
"&amp;", if (empty($secret)) then "" else $secret)
let $version := string($service/oa:oauth-version)
let $sigmethod := oa:signature-method($service)
let $httpmethod := oa:http-method($method)
let $sigstruct
:= <oa:signature-base-string>
<oauth_consumer_key>{$key}</oauth_consumer_key>
<oauth_nonce>{$nonce}</oauth_nonce>
<oauth_signature_method>{$sigmethod}</oauth_signature_method>
<oauth_timestamp>{$stamp}</oauth_timestamp>
<oauth_version>{$version}</oauth_version>
{ if (not(empty($token)))
then <oauth_token>{$token}</oauth_token>
else ()
}
{ if (not(empty($options)))
then $options/*
else ()
}
</oa:signature-base-string>
let $encparams
:= for $field in $sigstruct/*
order by local-name($field)
return
concat(local-name($field), "=", encode-for-uri(string($field)))
let $sigbase := string-join(($httpmethod, encode-for-uri($serviceuri),
encode-for-uri(string-join($encparams,"&amp;"))), "&amp;")
let $signature := encode-for-uri(oa:sign($sigkey, $sigbase))
(: This is a bit of a pragmatic hack, what's the real answer? :)
let $authfields := $sigstruct/*[starts-with(local-name(.), "oauth_")
and not(self::oauth_callback)]
let $authheader := concat("OAuth realm=&quot;", $service/@realm, "&quot;, ",
"oauth_signature=&quot;", $signature, "&quot;, ",
string-join(
for $field in $authfields
return
concat(local-name($field),"=&quot;", encode-for-uri($field), "&quot;"),
", "))
let $uriparam := for $field in $options/*
return
concat(local-name($field),"=",encode-for-uri($field))
(: This strikes me as slightly weird. Twitter wants the parameters passed
encoded in the URI even for a POST. I don't know if that's a Twitter
quirk or the natural way that OAuth apps work. Anyway, if you find
this library isn't working for some other OAuth'd API, you might want
to play with this bit.
let $requri := if ($httpmethod = "GET")
then concat($serviceuri,
if (empty($uriparam)) then ''
else concat("?",string-join($uriparam,"&amp;")))
else $serviceuri
let $data := if ($httpmethod = "POST" and not(empty($uriparam)))
then <xh:data>{string-join($uriparam,"&amp;")}</xh:data>
else ()
:)
let $requri := concat($serviceuri,
if (empty($uriparam)) then ''
else concat("?",string-join($uriparam,"&amp;")))
let $request := <http:request method = "{$httpmethod}">
<http:header name="Authorization" value="{$authheader}"/>
</http:request>
let $tokenreq :=http:send-request($request,$requri)
return
<oa:response>
{ if (string($tokenreq[1]/@status) != "200")
then
(<oa:error>{$tokenreq[1]}</oa:error>,
<oa:error-body>{$tokenreq[2]}</oa:error-body>)
else
$tokenreq[2]
}
</oa:response>
};

View file

@ -1,16 +0,0 @@
digraph hierarchy_of_D {
node [color=Green,fontcolor=Blue,font=Courier]
B -> D
C -> D
{rank=same; B C }
A -> B
A -> C
object -> A
}

View file

@ -1,27 +0,0 @@
digraph process {
subgraph cluster_0 {
style=filled;
color=lightgrey;
node [style=filled,color=white];
a0 -> a1 -> a2 -> a3;
label = "process #1";
}
subgraph cluster_1 {
node [style=filled];
b0 -> b1 -> b2 -> b3;
label = "process #2";
color=blue
}
start -> a0;
start -> b0;
a1 -> b3;
b2 -> a3;
a3 -> a0;
a3 -> end;
b3 -> end;
start [shape=Mdiamond];
end [shape=Msquare];
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,713 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="skupina_files/xsdvi.css" type="text/css"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg id="svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="loadSVG();" height="1328" width="1496">
<title>XsdVi</title>
<script type="text/ecmascript"><![CDATA[
var efBoxes = [];
var eSvg = null;
////////// loadSVG()
function loadSVG() {
efBoxes = getElementsByClassName('box', document.getElementsByTagName('g'));
eSvg = document.getElementById('svg');
expandAll();
}
////////// getElementsByClassName(string, nodeList)
function getElementsByClassName(sClass, nlNodes) {
var elements = [];
for (var i=0; i<nlNodes.length; i++) {
if(nlNodes.item(i).nodeType==1 && sClass==nlNodes.item(i).getAttribute('class')) {
elements.push(nlNodes.item(i));
}
}
return elements;
}
////////// show(string)
function show(sId) {
var useElement = document.getElementById('s'+sId);
var moveNext = false;
var eBoxLast;
var maxX = 500;
if (notPlus(useElement)) {
eBoxLast = document.getElementById(sId);
setPlus(useElement);
for (var i=0; i<efBoxes.length; i++) {
var eBox = efBoxes[i];
if (moveNext) {
move(eBoxLast, eBox);
}
else if (isDescendant(sId, eBox.id)) {
eBox.setAttribute('visibility', 'hidden');
}
else if (isHigherBranch(sId, eBox.id)) {
move(eBoxLast, eBox);
moveNext = true;
}
if (eBox.getAttribute('visibility') != 'hidden') {
eBoxLast = eBox;
x = xTrans(eBox);
if (x > maxX) maxX = x;
}
}
}
else {
setMinus(useElement);
var skipDescendantsOf;
for (var i=0; i<efBoxes.length; i++) {
var eBox = efBoxes[i];
if (moveNext) {
move(eBoxLast, eBox);
}
else if (isDescendant(sId, eBox.id) && (!skipDescendantsOf || !isDescendant(skipDescendantsOf.id, eBox.id))) {
eBox.setAttribute('visibility', 'visible');
move(eBoxLast, eBox);
if (nextClosed(eBox)) skipDescendantsOf = eBox;
}
else if (isHigherBranch(sId, eBox.id)) {
move(eBoxLast, eBox);
moveNext = true;
}
if (eBox.getAttribute('visibility') != 'hidden') {
eBoxLast = eBox;
x = xTrans(eBox);
if (x > maxX) maxX = x;
}
}
}
setHeight(yTrans(eBoxLast)+71);
setWidth(maxX+300);
}
////////// collapseAll()
function collapseAll() {
for (var i=0; i<efBoxes.length; i++) {
var eBox = efBoxes[i];
var useElement = document.getElementById('s'+eBox.id);
if (useElement) setPlus(useElement);
if (eBox.id != '_1') eBox.setAttribute('visibility', 'hidden');
}
setHeight(400);
setWidth(500);
}
////////// expandAll()
function expandAll() {
var eBoxLast;
var maxX = 0;
for (var i=0; i<efBoxes.length; i++) {
var eBox = efBoxes[i];
var useElement = document.getElementById('s'+eBox.id);
if (useElement) setMinus(useElement);
move(eBoxLast, eBox);
eBox.setAttribute('visibility', 'visible');
eBoxLast = eBox;
var x = xTrans(eBox);
if (x > maxX) maxX = x;
}
setHeight(yTrans(eBoxLast)+71);
setWidth(maxX+300);
}
////////// makeVisible(string)
function makeVisible(sId) {
var childNodes = document.getElementById(sId).childNodes;
var hidden = getElementsByClassName('hidden', childNodes);
var visible = getElementsByClassName('visible', childNodes);
inheritVisibility(hidden);
hiddenVisibility(visible);
}
////////// makeHidden(string)
function makeHidden(sId) {
var childNodes = document.getElementById(sId).childNodes;
var hidden = getElementsByClassName('hidden', childNodes);
var visible = getElementsByClassName('visible', childNodes);
inheritVisibility(visible);
hiddenVisibility(hidden);
}
////////// inheritVisibility(element[])
function inheritVisibility(efElements) {
for (var i=0; i<efElements.length; i++) {
efElements[i].setAttribute('visibility', 'inherit');
}
}
////////// hiddenVisibility(element[])
function hiddenVisibility(efElements) {
for (var i=0; i<efElements.length; i++) {
efElements[i].setAttribute('visibility', 'hidden');
}
}
////////// nextClosed(element)
function nextClosed(eBox) {
var useElement = document.getElementById('s'+eBox.id);
return (useElement && !notPlus(useElement));
}
////////// isHigherBranch(string, string)
function isHigherBranch(sSerialLower, sSerialHigher) {
var sLower = sSerialLower.split('_');
var sHigher = sSerialHigher.split('_');
for (var i=0; i<sLower.length; i++) {
if (Number(sHigher[i]) > Number(sLower[i])) return true;
else if (Number(sHigher[i]) < Number(sLower[i])) return false;
}
return false;
}
////////// isOnHigherLevel(element, element)
function isOnHigherLevel(eBoxLower, eBoxHigher) {
var sLower = eBoxLower.id.split('_');
var sHigher = eBoxHigher.id.split('_');
for (var i=0; i<sLower.length; i++) {
if (Number(sHigher[i]) > Number(sLower[i])) return true;
}
return false;
}
////////// isDescendant(string, string)
function isDescendant(sSerialAsc, sSerialDesc) {
return (sSerialDesc.length > sSerialAsc.length && sSerialDesc.indexOf(sSerialAsc) === 0);
}
////////// getParent(element)
function getParent(eBox) {
var serial = eBox.id.substring(0, eBox.id.lastIndexOf('_'));
return document.getElementById(serial);
}
////////// move(element, element)
function move(eBoxLast, eBox) {
if (!eBoxLast) return;
if (isOnHigherLevel(eBoxLast, eBox)) {
setYTrans(eBox, yTrans(eBoxLast)+71);
var parent = getParent(eBox);
var line = document.getElementById('p'+eBox.id);
if (!parent || !line) return;
line.setAttribute('y1', String(yTrans(parent)-yTrans(eBox)+23));
}
else {
setYTrans(eBox, yTrans(eBoxLast));
}
}
////////// notPlus(element)
function notPlus(eUseElement) {
return (eUseElement.getAttributeNS('http://www.w3.org/1999/xlink', 'href') != '#plus');
}
////////// setPlus(element)
function setPlus(eUseElement) {
eUseElement.setAttributeNS('http://www.w3.org/1999/xlink', 'href', '#plus');
}
////////// setMinus(element)
function setMinus(eUseElement) {
eUseElement.setAttributeNS('http://www.w3.org/1999/xlink', 'href', '#minus');
}
////////// setHeight(number)
function setHeight(nHeight) {
eSvg.setAttribute('height', nHeight);
}
////////// setWidth(number)
function setWidth(nWidth) {
eSvg.setAttribute('width', nWidth);
}
////////// xyTrans(element)
function xTrans(eBox) {
var transform = eBox.getAttribute('transform');
var x = Number(transform.substring(10, Number(transform.length)-1).split(',')[0]);
if(!x) x = 0;
return x;
}
////////// yTrans(element)
function yTrans(eBox) {
var transform = eBox.getAttribute('transform');
var y = Number(transform.substring(10, Number(transform.length)-1).split(',')[1]);
if(!y) y = 0;
return y;
}
////////// setYTrans(element, number)
function setYTrans(eBox, nValue) {
eBox.setAttribute('transform', 'translate('+xTrans(eBox)+','+nValue+')');
}
]]></script>
<defs>
<symbol class="button" id="plus">
<rect x="1" y="1" width="10" height="10"/>
<line x1="3" y1="6" x2="9" y2="6"/>
<line x1="6" y1="3" x2="6" y2="9"/>
</symbol>
<symbol class="button" id="minus">
<rect x="1" y="1" width="10" height="10"/>
<line x1="3" y1="6" x2="9" y2="6"/>
</symbol>
</defs>
<rect class="button" x="300" y="10" width="20" height="20" onclick="collapseAll()"/>
<line x1="303" y1="20" x2="317" y2="20"/>
<text x="330" y="20">collapse all</text>
<rect class="button" x="400" y="10" width="20" height="20" onclick="expandAll()"/>
<line x1="403" y1="20" x2="417" y2="20"/>
<line x1="410" y1="13" x2="410" y2="27"/>
<text x="430" y="20">expand all</text>
<g id="_1" class="box" transform="translate(20,50)" visibility="visible">
<rect class="boxschema" x="0" y="12" width="63" height="21"/>
<text x="5" y="27"><tspan class="big">/ </tspan>schema</text>
<use x="62" y="17" xlink:href="#minus" id="s_1" onclick='show("_1")'/>
</g>
<g id="_1_1" class="box" transform="translate(128,50)" visibility="visible">
<rect class="shadow" x="3" y="3" width="171" height="46"/>
<rect class="boxelement" x="0" y="0" width="171" height="46" onmouseover='makeVisible("_1_1")' onmouseout='makeHidden("_1_1")'/>
<text class="visible" x="5" y="13">urn:x-kibic:ns:skupina:1.0</text>
<text class="hidden" visibility="hidden" x="5" y="13">nillable: 0</text>
<text class="hidden" visibility="hidden" x="5" y="41">abstract: 0</text>
<text class="strong" x="5" y="27">skupina</text>
<line class="connection" x1="-35" y1="23" x2="0" y2="23"/>
<use x="170" y="17" xlink:href="#minus" id="s_1_1" onclick='show("_1_1")'/>
</g>
<g id="_1_1_1" class="box" transform="translate(344,50)" visibility="visible">
<rect class="boxcompositor" x="0" y="8" width="60" height="31" rx="9"/>
<circle cx="42" cy="14" r="2"/>
<circle cx="42" cy="23" r="2"/>
<circle cx="42" cy="32" r="2"/>
<text class="small" x="30" y="17">1</text>
<text class="small" x="30" y="26">2</text>
<text class="small" x="30" y="35">3</text>
<line x1="42" y1="14" x2="42" y2="32"/>
<line class="connection" x1="-35" y1="23" x2="0" y2="23"/>
<use x="59" y="17" xlink:href="#minus" id="s_1_1_1" onclick='show("_1_1_1")'/>
</g>
<g id="_1_1_1_1" class="box" transform="translate(449,50)" visibility="visible">
<rect class="shadow" x="3" y="3" width="171" height="46"/>
<rect class="boxelement" x="0" y="0" width="171" height="46" onmouseover='makeVisible("_1_1_1_1")' onmouseout='makeHidden("_1_1_1_1")'/>
<text class="visible" x="5" y="13">urn:x-kibic:ns:skupina:1.0</text>
<text class="hidden" visibility="hidden" x="5" y="13">nillable: 0</text>
<text class="hidden" visibility="hidden" x="5" y="41">abstract: 0</text>
<text class="strong" x="5" y="27">nazev</text>
<text class="visible" x="5" y="41">type: string</text>
<line class="connection" x1="-35" y1="23" x2="0" y2="23"/>
</g>
<g id="_1_1_1_2" class="box" transform="translate(449,121)" visibility="visible">
<rect class="shadow" x="3" y="3" width="171" height="46"/>
<rect class="boxelement" x="0" y="0" width="171" height="46" onmouseover='makeVisible("_1_1_1_2")' onmouseout='makeHidden("_1_1_1_2")'/>
<text class="visible" x="5" y="13">urn:x-kibic:ns:skupina:1.0</text>
<text class="hidden" visibility="hidden" x="5" y="13">nillable: 0</text>
<text class="hidden" visibility="hidden" x="5" y="41">abstract: 0</text>
<text class="strong" x="5" y="27">styl</text>
<text class="visible" x="5" y="41">type: string</text>
<line class="connection" x1="-35" y1="23" x2="0" y2="23"/>
</g>
<g id="_1_1_1_3" class="box" transform="translate(449,192)" visibility="visible">
<rect class="shadow" x="3" y="3" width="171" height="46"/>
<rect class="boxelement" x="0" y="0" width="171" height="46" onmouseover='makeVisible("_1_1_1_3")' onmouseout='makeHidden("_1_1_1_3")'/>
<text class="visible" x="5" y="13">urn:x-kibic:ns:skupina:1.0</text>
<text class="hidden" visibility="hidden" x="5" y="13">nillable: 0</text>
<text class="hidden" visibility="hidden" x="5" y="41">abstract: 0</text>
<text class="strong" x="5" y="27">datum_vzniku</text>
<text class="visible" x="5" y="41">type: date</text>
<text x="5" y="59">0..1</text>
<line class="connection" x1="-35" y1="23" x2="0" y2="23"/>
</g>
<g id="_1_1_1_4" class="box" transform="translate(449,263)" visibility="visible">
<rect class="shadow" x="3" y="3" width="171" height="46"/>
<rect class="boxelement" x="0" y="0" width="171" height="46" onmouseover='makeVisible("_1_1_1_4")' onmouseout='makeHidden("_1_1_1_4")'/>
<text class="visible" x="5" y="13">urn:x-kibic:ns:skupina:1.0</text>
<text class="hidden" visibility="hidden" x="5" y="13">nillable: 0</text>
<text class="hidden" visibility="hidden" x="5" y="41">abstract: 0</text>
<text class="strong" x="5" y="27">puvod</text>
<text class="visible" x="5" y="41">type: string</text>
<line class="connection" x1="-35" y1="23" x2="0" y2="23"/>
</g>
<g id="_1_1_1_5" class="box" transform="translate(449,334)" visibility="visible">
<rect class="shadow" x="3" y="3" width="171" height="46"/>
<rect class="boxelement" x="0" y="0" width="171" height="46" onmouseover='makeVisible("_1_1_1_5")' onmouseout='makeHidden("_1_1_1_5")'/>
<text class="visible" x="5" y="13">urn:x-kibic:ns:skupina:1.0</text>
<text class="hidden" visibility="hidden" x="5" y="13">nillable: 0</text>
<text class="hidden" visibility="hidden" x="5" y="41">abstract: 0</text>
<text class="strong" x="5" y="27">oficialni_web</text>
<text class="visible" x="5" y="41">type: anyURI</text>
<line class="connection" x1="-35" y1="23" x2="0" y2="23"/>
</g>
<g id="_1_1_1_6" class="box" transform="translate(449,405)" visibility="visible">
<rect class="shadow" x="3" y="3" width="171" height="46"/>
<rect class="boxelement" x="0" y="0" width="171" height="46" onmouseover='makeVisible("_1_1_1_6")' onmouseout='makeHidden("_1_1_1_6")'/>
<text class="visible" x="5" y="13">urn:x-kibic:ns:skupina:1.0</text>
<text class="hidden" visibility="hidden" x="5" y="13">nillable: 0</text>
<text class="hidden" visibility="hidden" x="5" y="41">abstract: 0</text>
<text class="strong" x="5" y="27">fotka</text>
<text class="visible" x="5" y="41">type: fotkaTyp</text>
<text x="5" y="59">0..1</text>
<line class="connection" x1="-35" y1="23" x2="0" y2="23"/>
<use x="170" y="17" xlink:href="#minus" id="s_1_1_1_6" onclick='show("_1_1_1_6")'/>
</g>
<g id="_1_1_1_6_1" class="box" transform="translate(665,405)" visibility="visible">
<rect class="shadow" x="3" y="3" width="93" height="46" rx="9"/>
<rect class="boxattribute1" x="0" y="0" width="93" height="46" rx="9" onmouseover='makeVisible("_1_1_1_6_1")' onmouseout='makeHidden("_1_1_1_6_1")'/>
<text class="strong" x="5" y="27"><tspan class="big">@</tspan> zdroj</text>
<text class="visible" x="5" y="41">type: string</text>
<text class="hidden" visibility="hidden" x="5" y="41">use: required</text>
<line class="connection" x1="-35" y1="23" x2="0" y2="23"/>
</g>
<g id="_1_1_1_6_2" class="box" transform="translate(665,476)" visibility="visible">
<rect class="shadow" x="3" y="3" width="93" height="46" rx="9"/>
<rect class="boxattribute1" x="0" y="0" width="93" height="46" rx="9" onmouseover='makeVisible("_1_1_1_6_2")' onmouseout='makeHidden("_1_1_1_6_2")'/>
<text class="strong" x="5" y="27"><tspan class="big">@</tspan> popis</text>
<text class="visible" x="5" y="41">type: string</text>
<text class="hidden" visibility="hidden" x="5" y="41">use: required</text>
<line class="connection" x1="-35" y1="23" x2="0" y2="23"/>
</g>
<g id="_1_1_1_6_3" class="box" transform="translate(665,547)" visibility="visible">
<rect class="shadow" x="3" y="3" width="93" height="46" rx="9"/>
<rect class="boxattribute1" x="0" y="0" width="93" height="46" rx="9" onmouseover='makeVisible("_1_1_1_6_3")' onmouseout='makeHidden("_1_1_1_6_3")'/>
<text class="strong" x="5" y="27"><tspan class="big">@</tspan> sirka</text>
<text class="visible" x="5" y="41">type: string</text>
<text class="hidden" visibility="hidden" x="5" y="41">use: required</text>
<line class="connection" x1="-35" y1="23" x2="0" y2="23"/>
</g>
<g id="_1_1_1_6_4" class="box" transform="translate(665,618)" visibility="visible">
<rect class="shadow" x="3" y="3" width="93" height="46" rx="9"/>
<rect class="boxattribute1" x="0" y="0" width="93" height="46" rx="9" onmouseover='makeVisible("_1_1_1_6_4")' onmouseout='makeHidden("_1_1_1_6_4")'/>
<text class="strong" x="5" y="27"><tspan class="big">@</tspan> vyska</text>
<text class="visible" x="5" y="41" visibility="inherit">type: string</text>
<text class="hidden" visibility="hidden" x="5" y="41">use: required</text>
<line class="connection" id="p_1_1_1_6_4" x1="-35" y1="-190" x2="-35" y2="-40"/>
<path class="connection" d="M-35,-40 Q-35,15 0,23"/>
</g>
<g id="_1_1_1_7" class="box" transform="translate(449,689)" visibility="visible">
<rect class="shadow" x="3" y="3" width="171" height="46"/>
<rect class="boxelement" x="0" y="0" width="171" height="46" onmouseover='makeVisible("_1_1_1_7")' onmouseout='makeHidden("_1_1_1_7")'/>
<text class="visible" x="5" y="13" visibility="inherit">urn:x-kibic:ns:skupina:1.0</text>
<text class="hidden" visibility="hidden" x="5" y="13">nillable: 0</text>
<text class="hidden" visibility="hidden" x="5" y="41">abstract: 0</text>
<text class="strong" x="5" y="27">popis</text>
<text class="visible" x="5" y="41" visibility="inherit">type: popisTyp</text>
<line class="connection" x1="-35" y1="23" x2="0" y2="23"/>
<use x="170" y="17" xlink:href="#minus" id="s_1_1_1_7" onclick='show("_1_1_1_7")'/>
</g>
<g id="_1_1_1_7_1" class="box" transform="translate(665,689)" visibility="visible">
<rect class="boxcompositor" x="0" y="8" width="60" height="31" rx="9"/>
<circle cx="42" cy="14" r="2"/>
<circle cx="42" cy="23" r="2"/>
<circle cx="42" cy="32" r="2"/>
<text class="small" x="30" y="17">1</text>
<text class="small" x="30" y="26">2</text>
<text class="small" x="30" y="35">3</text>
<line x1="42" y1="14" x2="42" y2="32"/>
<text x="5" y="52">1..∞</text>
<line class="connection" x1="-35" y1="23" x2="0" y2="23"/>
<use x="59" y="17" xlink:href="#minus" id="s_1_1_1_7_1" onclick='show("_1_1_1_7_1")'/>
</g>
<g id="_1_1_1_7_1_1" class="box" transform="translate(770,689)" visibility="visible">
<rect class="shadow" x="3" y="3" width="171" height="46"/>
<rect class="boxelement" x="0" y="0" width="171" height="46" onmouseover='makeVisible("_1_1_1_7_1_1")' onmouseout='makeHidden("_1_1_1_7_1_1")'/>
<text class="visible" x="5" y="13" visibility="inherit">urn:x-kibic:ns:skupina:1.0</text>
<text class="hidden" visibility="hidden" x="5" y="13">nillable: 0</text>
<text class="hidden" visibility="hidden" x="5" y="41">abstract: 0</text>
<text class="strong" x="5" y="27">odstavec</text>
<text class="visible" x="5" y="41" visibility="inherit">type: string</text>
<line class="connection" x1="-35" y1="23" x2="0" y2="23"/>
</g>
<g id="_1_1_1_8" class="box" transform="translate(449,760)" visibility="visible">
<rect class="shadow" x="3" y="3" width="171" height="46"/>
<rect class="boxelement" x="0" y="0" width="171" height="46" onmouseover='makeVisible("_1_1_1_8")' onmouseout='makeHidden("_1_1_1_8")'/>
<text class="visible" x="5" y="13" visibility="inherit">urn:x-kibic:ns:skupina:1.0</text>
<text class="hidden" visibility="hidden" x="5" y="13">nillable: 0</text>
<text class="hidden" visibility="hidden" x="5" y="41">abstract: 0</text>
<text class="strong" x="5" y="27">clenove</text>
<text class="visible" x="5" y="41" visibility="inherit">type: clenoveTyp</text>
<line class="connection" x1="-35" y1="23" x2="0" y2="23"/>
<use x="170" y="17" xlink:href="#minus" id="s_1_1_1_8" onclick='show("_1_1_1_8")'/>
</g>
<g id="_1_1_1_8_1" class="box" transform="translate(665,760)" visibility="visible">
<rect class="boxcompositor" x="0" y="8" width="60" height="31" rx="9"/>
<circle cx="42" cy="14" r="2"/>
<circle cx="42" cy="23" r="2"/>
<circle cx="42" cy="32" r="2"/>
<text class="small" x="30" y="17">1</text>
<text class="small" x="30" y="26">2</text>
<text class="small" x="30" y="35">3</text>
<line x1="42" y1="14" x2="42" y2="32"/>
<text x="5" y="52">1..∞</text>
<line class="connection" x1="-35" y1="23" x2="0" y2="23"/>
<use x="59" y="17" xlink:href="#minus" id="s_1_1_1_8_1" onclick='show("_1_1_1_8_1")'/>
</g>
<g id="_1_1_1_8_1_1" class="box" transform="translate(770,760)" visibility="visible">
<rect class="shadow" x="3" y="3" width="171" height="46"/>
<rect class="boxelement" x="0" y="0" width="171" height="46" onmouseover='makeVisible("_1_1_1_8_1_1")' onmouseout='makeHidden("_1_1_1_8_1_1")'/>
<text class="visible" x="5" y="13">urn:x-kibic:ns:skupina:1.0</text>
<text class="hidden" visibility="hidden" x="5" y="13">nillable: 0</text>
<text class="hidden" visibility="hidden" x="5" y="41">abstract: 0</text>
<text class="strong" x="5" y="27">clen</text>
<line class="connection" x1="-35" y1="23" x2="0" y2="23"/>
<use x="170" y="17" xlink:href="#minus" id="s_1_1_1_8_1_1" onclick='show("_1_1_1_8_1_1")'/>
</g>
<g id="_1_1_1_8_1_1_1" class="box" transform="translate(986,760)" visibility="visible">
<rect class="boxcompositor" x="0" y="8" width="60" height="31" rx="9"/>
<circle cx="42" cy="14" r="2"/>
<circle cx="42" cy="23" r="2"/>
<circle cx="42" cy="32" r="2"/>
<text class="small" x="30" y="17">1</text>
<text class="small" x="30" y="26">2</text>
<text class="small" x="30" y="35">3</text>
<line x1="42" y1="14" x2="42" y2="32"/>
<line class="connection" x1="-35" y1="23" x2="0" y2="23"/>
<use x="59" y="17" xlink:href="#minus" id="s_1_1_1_8_1_1_1" onclick='show("_1_1_1_8_1_1_1")'/>
</g>
<g id="_1_1_1_8_1_1_1_1" class="box" transform="translate(1091,760)" visibility="visible">
<rect class="shadow" x="3" y="3" width="171" height="46"/>
<rect class="boxelement" x="0" y="0" width="171" height="46" onmouseover='makeVisible("_1_1_1_8_1_1_1_1")' onmouseout='makeHidden("_1_1_1_8_1_1_1_1")'/>
<text class="visible" x="5" y="13">urn:x-kibic:ns:skupina:1.0</text>
<text class="hidden" visibility="hidden" x="5" y="13">nillable: 0</text>
<text class="hidden" visibility="hidden" x="5" y="41">abstract: 0</text>
<text class="strong" x="5" y="27">jmeno</text>
<text class="visible" x="5" y="41">type: string</text>
<line class="connection" x1="-35" y1="23" x2="0" y2="23"/>
</g>
<g id="_1_1_1_8_1_1_1_2" class="box" transform="translate(1091,831)" visibility="visible">
<rect class="boxcompositor" x="0" y="8" width="60" height="31" rx="9"/>
<circle cx="42" cy="14" r="2"/>
<circle cx="42" cy="23" r="2"/>
<circle cx="42" cy="32" r="2"/>
<text class="small" x="30" y="17">1</text>
<text class="small" x="30" y="26">2</text>
<text class="small" x="30" y="35">3</text>
<line x1="42" y1="14" x2="42" y2="32"/>
<text x="5" y="52">1..∞</text>
<line class="connection" id="p_1_1_1_8_1_1_1_2" x1="-35" y1="-48" x2="-35" y2="-40"/>
<path class="connection" d="M-35,-40 Q-35,15 0,23"/>
<use x="59" y="17" xlink:href="#minus" id="s_1_1_1_8_1_1_1_2" onclick='show("_1_1_1_8_1_1_1_2")'/>
</g>
<g id="_1_1_1_8_1_1_1_2_1" class="box" transform="translate(1196,831)" visibility="visible">
<rect class="shadow" x="3" y="3" width="171" height="46"/>
<rect class="boxelement" x="0" y="0" width="171" height="46" onmouseover='makeVisible("_1_1_1_8_1_1_1_2_1")' onmouseout='makeHidden("_1_1_1_8_1_1_1_2_1")'/>
<text class="visible" x="5" y="13">urn:x-kibic:ns:skupina:1.0</text>
<text class="hidden" visibility="hidden" x="5" y="13">nillable: 0</text>
<text class="hidden" visibility="hidden" x="5" y="41">abstract: 0</text>
<text class="strong" x="5" y="27">nastroj</text>
<text class="visible" x="5" y="41">type: string</text>
<line class="connection" x1="-35" y1="23" x2="0" y2="23"/>
</g>
<g id="_1_1_1_9" class="box" transform="translate(449,902)" visibility="visible">
<rect class="shadow" x="3" y="3" width="171" height="46"/>
<rect class="boxelement" x="0" y="0" width="171" height="46" onmouseover='makeVisible("_1_1_1_9")' onmouseout='makeHidden("_1_1_1_9")'/>
<text class="visible" x="5" y="13" visibility="inherit">urn:x-kibic:ns:skupina:1.0</text>
<text class="hidden" visibility="hidden" x="5" y="13">nillable: 0</text>
<text class="hidden" visibility="hidden" x="5" y="41">abstract: 0</text>
<text class="strong" x="5" y="27">alba</text>
<text class="visible" x="5" y="41" visibility="inherit">type: albaTyp</text>
<text x="5" y="59">0..1</text>
<line class="connection" x1="-35" y1="23" x2="0" y2="23"/>
<use x="170" y="17" xlink:href="#minus" id="s_1_1_1_9" onclick='show("_1_1_1_9")'/>
</g>
<g id="_1_1_1_9_1" class="box" transform="translate(665,902)" visibility="visible">
<rect class="boxcompositor" x="0" y="8" width="60" height="31" rx="9"/>
<circle cx="42" cy="14" r="2"/>
<circle cx="42" cy="23" r="2"/>
<circle cx="42" cy="32" r="2"/>
<text class="small" x="30" y="17">1</text>
<text class="small" x="30" y="26">2</text>
<text class="small" x="30" y="35">3</text>
<line x1="42" y1="14" x2="42" y2="32"/>
<text x="5" y="52">1..∞</text>
<line class="connection" x1="-35" y1="23" x2="0" y2="23"/>
<use x="59" y="17" xlink:href="#minus" id="s_1_1_1_9_1" onclick='show("_1_1_1_9_1")'/>
</g>
<g id="_1_1_1_9_1_1" class="box" transform="translate(770,902)" visibility="visible">
<rect class="shadow" x="3" y="3" width="171" height="46"/>
<rect class="boxelement" x="0" y="0" width="171" height="46" onmouseover='makeVisible("_1_1_1_9_1_1")' onmouseout='makeHidden("_1_1_1_9_1_1")'/>
<text class="visible" x="5" y="13">urn:x-kibic:ns:skupina:1.0</text>
<text class="hidden" visibility="hidden" x="5" y="13">nillable: 0</text>
<text class="hidden" visibility="hidden" x="5" y="41">abstract: 0</text>
<text class="strong" x="5" y="27">album</text>
<line class="connection" x1="-35" y1="23" x2="0" y2="23"/>
<use x="170" y="17" xlink:href="#minus" id="s_1_1_1_9_1_1" onclick='show("_1_1_1_9_1_1")'/>
</g>
<g id="_1_1_1_9_1_1_1" class="box" transform="translate(986,902)" visibility="visible">
<rect class="boxcompositor" x="0" y="8" width="60" height="31" rx="9"/>
<circle cx="42" cy="14" r="2"/>
<circle cx="42" cy="23" r="2"/>
<circle cx="42" cy="32" r="2"/>
<text class="small" x="30" y="17">1</text>
<text class="small" x="30" y="26">2</text>
<text class="small" x="30" y="35">3</text>
<line x1="42" y1="14" x2="42" y2="32"/>
<line class="connection" x1="-35" y1="23" x2="0" y2="23"/>
<use x="59" y="17" xlink:href="#minus" id="s_1_1_1_9_1_1_1" onclick='show("_1_1_1_9_1_1_1")'/>
</g>
<g id="_1_1_1_9_1_1_1_1" class="box" transform="translate(1091,902)" visibility="visible">
<rect class="shadow" x="3" y="3" width="171" height="46"/>
<rect class="boxelement" x="0" y="0" width="171" height="46" onmouseover='makeVisible("_1_1_1_9_1_1_1_1")' onmouseout='makeHidden("_1_1_1_9_1_1_1_1")'/>
<text class="visible" x="5" y="13">urn:x-kibic:ns:skupina:1.0</text>
<text class="hidden" visibility="hidden" x="5" y="13">nillable: 0</text>
<text class="hidden" visibility="hidden" x="5" y="41">abstract: 0</text>
<text class="strong" x="5" y="27">nazev</text>
<text class="visible" x="5" y="41">type: string</text>
<line class="connection" x1="-35" y1="23" x2="0" y2="23"/>
</g>
<g id="_1_1_1_9_1_1_1_2" class="box" transform="translate(1091,973)" visibility="visible">
<rect class="shadow" x="3" y="3" width="171" height="46"/>
<rect class="boxelement" x="0" y="0" width="171" height="46" onmouseover='makeVisible("_1_1_1_9_1_1_1_2")' onmouseout='makeHidden("_1_1_1_9_1_1_1_2")'/>
<text class="visible" x="5" y="13">urn:x-kibic:ns:skupina:1.0</text>
<text class="hidden" visibility="hidden" x="5" y="13">nillable: 0</text>
<text class="hidden" visibility="hidden" x="5" y="41">abstract: 0</text>
<text class="strong" x="5" y="27">vydano</text>
<text class="visible" x="5" y="41">type: date</text>
<line class="connection" x1="-35" y1="23" x2="0" y2="23"/>
</g>
<g id="_1_1_1_9_1_1_1_3" class="box" transform="translate(1091,1044)" visibility="visible">
<rect class="shadow" x="3" y="3" width="171" height="46"/>
<rect class="boxelement" x="0" y="0" width="171" height="46" onmouseover='makeVisible("_1_1_1_9_1_1_1_3")' onmouseout='makeHidden("_1_1_1_9_1_1_1_3")'/>
<text class="visible" x="5" y="13">urn:x-kibic:ns:skupina:1.0</text>
<text class="hidden" visibility="hidden" x="5" y="13">nillable: 0</text>
<text class="hidden" visibility="hidden" x="5" y="41">abstract: 0</text>
<text class="strong" x="5" y="27">vydavatelstvi</text>
<text class="visible" x="5" y="41">type: string</text>
<line class="connection" id="p_1_1_1_9_1_1_1_3" x1="-35" y1="-119" x2="-35" y2="-40"/>
<path class="connection" d="M-35,-40 Q-35,15 0,23"/>
</g>
<g id="_1_1_1_10" class="box" transform="translate(449,1115)" visibility="visible">
<rect class="shadow" x="3" y="3" width="171" height="46"/>
<rect class="boxelement" x="0" y="0" width="171" height="46" onmouseover='makeVisible("_1_1_1_10")' onmouseout='makeHidden("_1_1_1_10")'/>
<text class="visible" x="5" y="13" visibility="inherit">urn:x-kibic:ns:skupina:1.0</text>
<text class="hidden" visibility="hidden" x="5" y="13">nillable: 0</text>
<text class="hidden" visibility="hidden" x="5" y="41">abstract: 0</text>
<text class="strong" x="5" y="27">kontakty</text>
<text class="visible" x="5" y="41" visibility="inherit">type: kontaktyTyp</text>
<line class="connection" id="p_1_1_1_10" x1="-35" y1="-1042" x2="-35" y2="-40"/>
<path class="connection" d="M-35,-40 Q-35,15 0,23"/>
<use x="170" y="17" xlink:href="#minus" id="s_1_1_1_10" onclick='show("_1_1_1_10")'/>
</g>
<g id="_1_1_1_10_1" class="box" transform="translate(665,1115)" visibility="visible">
<rect class="boxcompositor" x="0" y="8" width="60" height="31" rx="9"/>
<circle cx="42" cy="14" r="2"/>
<circle cx="42" cy="23" r="2"/>
<circle cx="42" cy="32" r="2"/>
<text class="small" x="30" y="17">1</text>
<text class="small" x="30" y="26">2</text>
<text class="small" x="30" y="35">3</text>
<line x1="42" y1="14" x2="42" y2="32"/>
<text x="5" y="52">1..∞</text>
<line class="connection" x1="-35" y1="23" x2="0" y2="23"/>
<use x="59" y="17" xlink:href="#minus" id="s_1_1_1_10_1" onclick='show("_1_1_1_10_1")'/>
</g>
<g id="_1_1_1_10_1_1" class="box" transform="translate(770,1115)" visibility="visible">
<rect class="shadow" x="3" y="3" width="171" height="46"/>
<rect class="boxelement" x="0" y="0" width="171" height="46" onmouseover='makeVisible("_1_1_1_10_1_1")' onmouseout='makeHidden("_1_1_1_10_1_1")'/>
<text class="visible" x="5" y="13">urn:x-kibic:ns:skupina:1.0</text>
<text class="hidden" visibility="hidden" x="5" y="13">nillable: 0</text>
<text class="hidden" visibility="hidden" x="5" y="41">abstract: 0</text>
<text class="strong" x="5" y="27">kontakt</text>
<line class="connection" x1="-35" y1="23" x2="0" y2="23"/>
<use x="170" y="17" xlink:href="#minus" id="s_1_1_1_10_1_1" onclick='show("_1_1_1_10_1_1")'/>
</g>
<g id="_1_1_1_10_1_1_1" class="box" transform="translate(986,1115)" visibility="visible">
<rect class="boxcompositor" x="0" y="8" width="60" height="31" rx="9"/>
<circle cx="42" cy="14" r="2"/>
<circle cx="42" cy="23" r="2"/>
<circle cx="42" cy="32" r="2"/>
<text class="small" x="30" y="17">1</text>
<text class="small" x="30" y="26">2</text>
<text class="small" x="30" y="35">3</text>
<line x1="42" y1="14" x2="42" y2="32"/>
<line class="connection" x1="-35" y1="23" x2="0" y2="23"/>
<use x="59" y="17" xlink:href="#minus" id="s_1_1_1_10_1_1_1" onclick='show("_1_1_1_10_1_1_1")'/>
</g>
<g id="_1_1_1_10_1_1_1_1" class="box" transform="translate(1091,1115)" visibility="visible">
<rect class="shadow" x="3" y="3" width="171" height="46"/>
<rect class="boxelement" x="0" y="0" width="171" height="46" onmouseover='makeVisible("_1_1_1_10_1_1_1_1")' onmouseout='makeHidden("_1_1_1_10_1_1_1_1")'/>
<text class="visible" x="5" y="13">urn:x-kibic:ns:skupina:1.0</text>
<text class="hidden" visibility="hidden" x="5" y="13">nillable: 0</text>
<text class="hidden" visibility="hidden" x="5" y="41">abstract: 0</text>
<text class="strong" x="5" y="27">kontaktni_osoba</text>
<text class="visible" x="5" y="41">type: string</text>
<line class="connection" x1="-35" y1="23" x2="0" y2="23"/>
</g>
<g id="_1_1_1_10_1_1_1_2" class="box" transform="translate(1091,1186)" visibility="visible">
<rect class="boxcompositor" x="0" y="8" width="60" height="31" rx="9"/>
<circle cx="42" cy="14" r="2"/>
<circle class="empty" cx="42" cy="23" r="2"/>
<circle class="empty" cx="42" cy="32" r="2"/>
<polyline points="26,23 34,23 34,14 40,14"/>
<text x="5" y="52">1..2</text>
<line class="connection" id="p_1_1_1_10_1_1_1_2" x1="-35" y1="-48" x2="-35" y2="-40"/>
<path class="connection" d="M-35,-40 Q-35,15 0,23"/>
<use x="59" y="17" xlink:href="#minus" id="s_1_1_1_10_1_1_1_2" onclick='show("_1_1_1_10_1_1_1_2")'/>
</g>
<g id="_1_1_1_10_1_1_1_2_1" class="box" transform="translate(1196,1186)" visibility="visible">
<rect class="shadow" x="3" y="3" width="171" height="46"/>
<rect class="boxelement" x="0" y="0" width="171" height="46" onmouseover='makeVisible("_1_1_1_10_1_1_1_2_1")' onmouseout='makeHidden("_1_1_1_10_1_1_1_2_1")'/>
<text class="visible" x="5" y="13">urn:x-kibic:ns:skupina:1.0</text>
<text class="hidden" visibility="hidden" x="5" y="13">nillable: 0</text>
<text class="hidden" visibility="hidden" x="5" y="41">abstract: 0</text>
<text class="strong" x="5" y="27">mail</text>
<text class="visible" x="5" y="41">type: string</text>
<line class="connection" x1="-35" y1="23" x2="0" y2="23"/>
</g>
<g id="_1_1_1_10_1_1_1_2_2" class="box" transform="translate(1196,1257)" visibility="visible">
<rect class="shadow" x="3" y="3" width="171" height="46"/>
<rect class="boxelement" x="0" y="0" width="171" height="46" onmouseover='makeVisible("_1_1_1_10_1_1_1_2_2")' onmouseout='makeHidden("_1_1_1_10_1_1_1_2_2")'/>
<text class="visible" x="5" y="13">urn:x-kibic:ns:skupina:1.0</text>
<text class="hidden" visibility="hidden" x="5" y="13">nillable: 0</text>
<text class="hidden" visibility="hidden" x="5" y="41">abstract: 0</text>
<text class="strong" x="5" y="27">telefon</text>
<text class="visible" x="5" y="41">type: positiveInteger</text>
<line class="connection" id="p_1_1_1_10_1_1_1_2_2" x1="-35" y1="-48" x2="-35" y2="-40"/>
<path class="connection" d="M-35,-40 Q-35,15 0,23"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 33 KiB

View file

@ -0,0 +1,24 @@
svg {pointer-events: none;}
text {font-family: arial; font-size: 11px;}
line, polyline, polygon {fill: none; stroke: black;}
.strong {font-size: 12px; font-weight: bold;}
.small {font-size: 10px;}
.big {font-size: 15px; fill: #882222;}
.button {fill: white; stroke: black; pointer-events: all;}
.shadow {fill: #ccccd8; stroke: none;}
.connection {fill: none; stroke: #666666;}
.empty {fill: none; stroke: black;}
.filled {fill: black; stroke: none;}
.boxelement, .boxany, .boxattribute1, .boxanyattribute {fill: #FFFFBB; stroke: #776633; pointer-events: all;}
.boxattribute2 {fill: #FFFFBB; stroke: #776633; pointer-events: all; stroke-dasharray: 2;}
.boxschema, .boxloop, .boxcompositor {fill: #E7EBF3; stroke: #666677;}
.boxselector, .boxfield, .boxidc {fill: #E0F7B7; stroke: #667733;}
.lax {fill: white; stroke: black;}
.skip {fill: #cc6666; stroke: black;}
.strict {fill: black; stroke: none;}
.border {fill: #f9f9f9; stroke: #dddddd;}

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 26 KiB

View file

@ -1,55 +0,0 @@
/* courtesy Ian Darwin and Geoff Collyer, Softquad Inc. */
digraph unix {
size="6,6";
node [color=lightblue2, style=filled];
"5th Edition" -> "6th Edition";
"5th Edition" -> "PWB 1.0";
"6th Edition" -> "LSX";
"6th Edition" -> "1 BSD";
"6th Edition" -> "Mini Unix";
"6th Edition" -> "Wollongong";
"6th Edition" -> "Interdata";
"Interdata" -> "Unix/TS 3.0";
"Interdata" -> "PWB 2.0";
"Interdata" -> "7th Edition";
"7th Edition" -> "8th Edition";
"7th Edition" -> "32V";
"7th Edition" -> "V7M";
"7th Edition" -> "Ultrix-11";
"7th Edition" -> "Xenix";
"7th Edition" -> "UniPlus+";
"V7M" -> "Ultrix-11";
"8th Edition" -> "9th Edition";
"1 BSD" -> "2 BSD";
"2 BSD" -> "2.8 BSD";
"2.8 BSD" -> "Ultrix-11";
"2.8 BSD" -> "2.9 BSD";
"32V" -> "3 BSD";
"3 BSD" -> "4 BSD";
"4 BSD" -> "4.1 BSD";
"4.1 BSD" -> "4.2 BSD";
"4.1 BSD" -> "2.8 BSD";
"4.1 BSD" -> "8th Edition";
"4.2 BSD" -> "4.3 BSD";
"4.2 BSD" -> "Ultrix-32";
"PWB 1.0" -> "PWB 1.2";
"PWB 1.0" -> "USG 1.0";
"PWB 1.2" -> "PWB 2.0";
"USG 1.0" -> "CB Unix 1";
"USG 1.0" -> "USG 2.0";
"CB Unix 1" -> "CB Unix 2";
"CB Unix 2" -> "CB Unix 3";
"CB Unix 3" -> "Unix/TS++";
"CB Unix 3" -> "PDP-11 Sys V";
"USG 2.0" -> "USG 3.0";
"USG 3.0" -> "Unix/TS 3.0";
"PWB 2.0" -> "Unix/TS 3.0";
"Unix/TS 1.0" -> "Unix/TS 3.0";
"Unix/TS 3.0" -> "TS 4.0";
"Unix/TS++" -> "TS 4.0";
"CB Unix 3" -> "TS 4.0";
"TS 4.0" -> "System V.0";
"System V.0" -> "System V.2";
"System V.2" -> "System V.3";
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 B

View file

@ -1,35 +0,0 @@
button.colorPicker-picker {
height: 16px;
width: 16px;
padding: 0 !important;
border: 1px solid #ccc;
background: url(arrow.gif) no-repeat top right;
cursor: pointer;
line-height: 16px;
}
div.colorPicker-palette {
width: 200px;
position: absolute;
border: 1px solid #598FEF;
background-color: #EFEFEF;
padding: 2px;
z-index: 9999;
}
div.colorPicker_hexWrap {width: 100%; float:left }
div.colorPicker_hexWrap label {font-size: 95%; color: #2F2F2F; margin: 5px 2px; width: 25%}
div.colorPicker_hexWrap input {margin: 5px 2px; padding: 0; font-size: 95%; border: 1px solid #000; width: 65%; }
button.colorPicker-swatch {
height: 16px;
width: 16px;
border: 2px solid #ccc;
margin: 1px;
float: left;
cursor: pointer;
line-height: 16px;
padding:0px;
}
button.colorPicker-swatch:focus{
border: 2px solid #598FEF;
}

View file

@ -1,347 +0,0 @@
/**
* Really Simple Color Picker in jQuery
*
* Licensed under the MIT (MIT-LICENSE.txt) licenses.
*
* Copyright (c) 2008-2012
* Lakshan Perera (www.laktek.com) & Daniel Lacy (daniellacy.com)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
(function ($) {
/**
* Create a couple private variables.
**/
var selectorOwner,
activePalette,
cItterate = 0,
templates = {
control : $('<button type="button" class="colorPicker-picker" >&nbsp;</button>'),
palette : $('<div id="colorPicker_palette" class="colorPicker-palette" />'),
swatch : $('<button type="button" class="colorPicker-swatch">&nbsp;</button>'),
hexLabel: $('<label for="colorPicker_hex">Hex</label>'),
hexField: $('<input type="text" id="colorPicker_hex" />')
},
transparent = "transparent",
lastColor;
/**
* Create our colorPicker function
**/
$.fn.colorPicker = function (options) {
return this.each(function () {
// Setup time. Clone new elements from our templates, set some IDs, make shortcuts, jazzercise.
var element = $(this),
opts = $.extend({}, $.fn.colorPicker.defaults, options),
defaultColor = $.fn.colorPicker.toHex(
(element.val().length > 0) ? element.val() : opts.pickerDefault
),
newControl = templates.control.clone(),
newPalette = templates.palette.clone().attr('id', 'colorPicker_palette-' + cItterate),
newHexLabel = templates.hexLabel.clone(),
newHexField = templates.hexField.clone(),
paletteId = newPalette[0].id,
swatch;
/**
* Build a color palette.
**/
$.each(opts.colors, function (n,v) {
swatch = templates.swatch.clone();
if (n === transparent) {
swatch.addClass(transparent).text('X');
$.fn.colorPicker.bindPalette(newHexField, swatch, transparent);
} else {
swatch.css("background-color", v);
swatch.attr("title", n);
$.fn.colorPicker.bindPalette(newHexField, swatch);
}
swatch.appendTo(newPalette);
});
newHexLabel.attr('for', 'colorPicker_hex-' + cItterate);
newHexField.attr({
'id' : 'colorPicker_hex-' + cItterate,
'value' : defaultColor
});
newHexField.bind("keydown", function (event) {
if (event.keyCode === 13) {
var hexColor = $.fn.colorPicker.toHex($(this).val());
$.fn.colorPicker.changeColor(hexColor ? hexColor : element.val());
}
if (event.keyCode === 27) {
$.fn.colorPicker.hidePalette();
}
});
newHexField.bind("keyup", function (event) {
var hexColor = $.fn.colorPicker.toHex($(event.target).val());
$.fn.colorPicker.previewColor(hexColor ? hexColor : element.val());
});
$('<div class="colorPicker_hexWrap" />').append(newHexLabel).appendTo(newPalette);
newPalette.find('.colorPicker_hexWrap').append(newHexField);
$("body").append(newPalette);
newPalette.hide();
/**
* Build replacement interface for original color input.
**/
newControl.css("background-color", defaultColor);
newControl.bind("click", function () {
$.fn.colorPicker.togglePalette($('#' + paletteId), $(this));
});
if( options && options.onColorChange ) {
newControl.data('onColorChange', options.onColorChange);
} else {
newControl.data('onColorChange', function() {} );
}
element.after(newControl);
element.bind("change", function () {
element.next(".colorPicker-picker").css(
"background-color", $.fn.colorPicker.toHex($(this).val())
);
});
// Hide the original input.
element.val(defaultColor).hide();
cItterate++;
});
};
/**
* Extend colorPicker with... all our functionality.
**/
$.extend(true, $.fn.colorPicker, {
/**
* Return a Hex color, convert an RGB value and return Hex, or return false.
*
* Inspired by http://code.google.com/p/jquery-color-utils
**/
toHex : function (color) {
// If we have a standard or shorthand Hex color, return that value.
if (color.match(/[0-9A-F]{6}|[0-9A-F]{3}$/i)) {
return (color.charAt(0) === "#") ? color : ("#" + color);
// Alternatively, check for RGB color, then convert and return it as Hex.
} else if (color.match(/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/)) {
var c = ([parseInt(RegExp.$1, 10), parseInt(RegExp.$2, 10), parseInt(RegExp.$3, 10)]),
pad = function (str) {
if (str.length < 2) {
for (var i = 0, len = 2 - str.length; i < len; i++) {
str = '0' + str;
}
}
return str;
};
if (c.length === 3) {
var r = pad(c[0].toString(16)),
g = pad(c[1].toString(16)),
b = pad(c[2].toString(16));
return '#' + r + g + b;
}
// Otherwise we wont do anything.
} else {
return false;
}
},
/**
* Check whether user clicked on the selector or owner.
**/
checkMouse : function (event, paletteId) {
var selector = activePalette,
selectorParent = $(event.target).parents("#" + selector.attr('id')).length;
if (event.target === $(selector)[0] || event.target === selectorOwner[0] || selectorParent > 0) {
return;
}
$.fn.colorPicker.hidePalette();
},
/**
* Hide the color palette modal.
**/
hidePalette : function () {
$(document).unbind("mousedown", $.fn.colorPicker.checkMouse);
$('.colorPicker-palette').hide();
},
/**
* Show the color palette modal.
**/
showPalette : function (palette) {
var hexColor = selectorOwner.prev("input").val();
palette.css({
top: selectorOwner.offset().top + (selectorOwner.outerHeight()),
left: selectorOwner.offset().left
});
$("#color_value").val(hexColor);
palette.show();
//palette.focus();
$(document).bind("mousedown", $.fn.colorPicker.checkMouse);
},
/**
* Toggle visibility of the colorPicker palette.
**/
togglePalette : function (palette, origin) {
// selectorOwner is the clicked .colorPicker-picker.
if (origin) {
selectorOwner = origin;
}
activePalette = palette;
if (activePalette.is(':visible')) {
$.fn.colorPicker.hidePalette();
} else {
$.fn.colorPicker.showPalette(palette);
}
},
/**
* Update the input with a newly selected color.
**/
changeColor : function (value) {
selectorOwner.css("background-color", value);
selectorOwner.prev("input").val(value).change();
$.fn.colorPicker.hidePalette();
selectorOwner.data('onColorChange').call(selectorOwner, $(selectorOwner).prev("input").attr("id"), value);
},
/**
* Preview the input with a newly selected color.
**/
previewColor : function (value) {
selectorOwner.css("background-color", value);
},
/**
* Bind events to the color palette swatches.
*/
bindPalette : function (paletteInput, element, color) {
color = color ? color : $.fn.colorPicker.toHex(element.css("background-color"));
element.bind({
click : function (ev) {
lastColor = color;
$.fn.colorPicker.changeColor(color);
},
mouseover : function (ev) {
lastColor = paletteInput.val();
$(this).css("border-color", "#598FEF");
paletteInput.val(color);
$.fn.colorPicker.previewColor(color);
},
mouseout : function (ev) {
$(this).css("border-color", "#CCC");
paletteInput.val(selectorOwner.css("background-color"));
paletteInput.val(lastColor);
$.fn.colorPicker.previewColor(lastColor);
}
});
}
});
/**
* Default colorPicker options.
*
* These are publibly available for global modification using a setting such as:
*
* $.fn.colorPicker.defaults.colors = ['151337', '111111']
*
* They can also be applied on a per-bound element basis like so:
*
* $('#element1').colorPicker({pickerDefault: 'efefef', transparency: true});
* $('#element2').colorPicker({pickerDefault: '333333', colors: ['333333', '111111']});
*
**/
$.fn.colorPicker.defaults = {
// colorPicker default selected color.
pickerDefault : "FFFFFF",
// Default color set.
colors : {"aliceblue":"#f0f8ff","antiquewhite":"#faebd7","aqua":"#00ffff",
"aquamarine":"#7fffd4","azure":"#f0ffff","beige":"#f5f5dc","bisque":"#ffe4c4",
"black":"#000000","blanchedalmond":"#ffebcd","blue":"#0000ff","blueviolet":"#8a2be2","brown":"#a52a2a","burlywood":"#deb887",
"cadetblue":"#5f9ea0","chartreuse":"#7fff00","chocolate":"#d2691e","coral":"#ff7f50","cornflowerblue":"#6495ed","cornsilk":"#fff8dc","crimson":"#dc143c","cyan":"#00ffff",
"darkblue":"#00008b","darkcyan":"#008b8b","darkgoldenrod":"#b8860b","darkgray":"#a9a9a9","darkgreen":"#006400","darkkhaki":"#bdb76b","darkmagenta":"#8b008b","darkolivegreen":"#556b2f",
"darkorange":"#ff8c00","darkorchid":"#9932cc","darkred":"#8b0000","darksalmon":"#e9967a","darkseagreen":"#8fbc8f","darkslateblue":"#483d8b","darkslategray":"#2f4f4f","darkturquoise":"#00ced1",
"darkviolet":"#9400d3","deeppink":"#ff1493","deepskyblue":"#00bfff","dimgray":"#696969","dodgerblue":"#1e90ff",
"firebrick":"#b22222","floralwhite":"#fffaf0","forestgreen":"#228b22","fuchsia":"#ff00ff",
"gainsboro":"#dcdcdc","ghostwhite":"#f8f8ff","gold":"#ffd700","goldenrod":"#daa520","gray":"#808080","green":"#008000","greenyellow":"#adff2f",
"honeydew":"#f0fff0","hotpink":"#ff69b4",
"indianred ":"#cd5c5c","indigo ":"#4b0082","ivory":"#fffff0","khaki":"#f0e68c",
"lavender":"#e6e6fa","lavenderblush":"#fff0f5","lawngreen":"#7cfc00","lemonchiffon":"#fffacd","lightblue":"#add8e6","lightcoral":"#f08080","lightcyan":"#e0ffff","lightgoldenrodyellow":"#fafad2",
"lightgrey":"#d3d3d3","lightgreen":"#90ee90","lightpink":"#ffb6c1","lightsalmon":"#ffa07a","lightseagreen":"#20b2aa","lightskyblue":"#87cefa","lightslategray":"#778899","lightsteelblue":"#b0c4de",
"lightyellow":"#ffffe0","lime":"#00ff00","limegreen":"#32cd32","linen":"#faf0e6",
"magenta":"#ff00ff","maroon":"#800000","mediumaquamarine":"#66cdaa","mediumblue":"#0000cd","mediumorchid":"#ba55d3","mediumpurple":"#9370d8","mediumseagreen":"#3cb371","mediumslateblue":"#7b68ee",
"mediumspringgreen":"#00fa9a","mediumturquoise":"#48d1cc","mediumvioletred":"#c71585","midnightblue":"#191970","mintcream":"#f5fffa","mistyrose":"#ffe4e1","moccasin":"#ffe4b5",
"navajowhite":"#ffdead","navy":"#000080",
"oldlace":"#fdf5e6","olive":"#808000","olivedrab":"#6b8e23","orange":"#ffa500","orangered":"#ff4500","orchid":"#da70d6",
"palegoldenrod":"#eee8aa","palegreen":"#98fb98","paleturquoise":"#afeeee","palevioletred":"#d87093","papayawhip":"#ffefd5","peachpuff":"#ffdab9","peru":"#cd853f","pink":"#ffc0cb","plum":"#dda0dd","powderblue":"#b0e0e6","purple":"#800080",
"red":"#ff0000","rosybrown":"#bc8f8f","royalblue":"#4169e1",
"saddlebrown":"#8b4513","salmon":"#fa8072","sandybrown":"#f4a460","seagreen":"#2e8b57","seashell":"#fff5ee","sienna":"#a0522d","silver":"#c0c0c0","skyblue":"#87ceeb","slateblue":"#6a5acd","slategray":"#708090","snow":"#fffafa","springgreen":"#00ff7f","steelblue":"#4682b4",
"tan":"#d2b48c","teal":"#008080","thistle":"#d8bfd8","tomato":"#ff6347","turquoise":"#40e0d0",
"violet":"#ee82ee",
"wheat":"#f5deb3","white":"#ffffff","whitesmoke":"#f5f5f5",
"yellow":"#ffff00","yellowgreen":"#9acd32"},
// If we want to simply add more colors to the default set, use addColors.
addColors : []
};
})(jQuery);

46
src/graphxq/txq.xqm Normal file
View file

@ -0,0 +1,46 @@
(:~
: A(nother) templating Engine for XQuery (BaseX 7.5+(or -) specific)
:
: @author andy bunce
: @since sept 2012
:)
module namespace txq = 'apb.txq';
declare default function namespace 'apb.txq';
import module namespace xquery = "http://basex.org/modules/xquery";
(:~
: template function
: @return updated doc from map
:)
declare function render($map as map(*),$layout as xs:string,$file as xs:string)
{
let $content:=render($map,$file)
let $map:=map:new(($map,map{"body":=$content}))
return render($map,$layout)
};
(:~
: template function
: @return updated doc from map
:)
declare function render($layout as xs:string,$map as map(*))
{
let $map:=map:new(($map,map{"partial":=partial(?,?,?,$map,$layout)}))
return xquery:invoke($layout,$map)
};
(:~
: partial template function: evaluate part for each value in sequence
: @return updated doc from map
:)
declare function partial($part as xs:string,$name,$seq,$map,$base)
{
for $s in $seq
let $map:=map:new(($map,map{$name:=$s}))
return render($map,fn:resolve-uri($part,$base))
};

View file

@ -37,12 +37,12 @@
-->
<li class="follow-btn"><iframe title="Twitter Follow Button"
style="width: 237px; height: 20px;" class="twitter-follow-button"
src="http://platform.twitter.com/widgets/follow_button.html?id=twitter-widget-2&amp;lang=en&amp;screen_name=apb1704&amp;show_count=false&amp;show_screen_name=true&amp;size=m"
src="http://platform.twitter.com/widgets/follow_button.html?id=twitter-widget-2&amp;lang=en&amp;screen_name=apb1704&amp;show_count=true&amp;show_screen_name=true&amp;size=m"
allowtransparency="true" scrolling="no" frameborder="0"></iframe></li>
<li class="tweet-btn"><iframe title="Twitter Tweet Button"
style="width: 106px; height: 20px;"
class="twitter-share-button twitter-count-horizontal"
src="http://platform.twitter.com/widgets/tweet_button.html?count=horizontal&amp;id=twitter-widget-0&amp;lang=en&amp;original_referer=https%3A%2F%2Fgithub.com%2Fapb2006%2Fgraphxq%2F&amp;size=m&amp;text=graphxq graphviz #xquery&amp;url=https%3A%2F%2Fgithub.com%2Fapb2006%2Fgraphxq&amp;via=apb1704"
src="http://platform.twitter.com/widgets/tweet_button.html?count=horizontal&amp;id=twitter-widget-0&amp;lang=en&amp;original_referer=https%3A%2F%2Fgithub.com%2Fapb2006%2Fxqwebdoc%2F&amp;size=m&amp;text=xqwebdoc #xquery&amp;url=https%3A%2F%2Fgithub.com%2Fapb2006%2Fxqwebdoc&amp;via=apb1704"
allowtransparency="true" scrolling="no" frameborder="0"></iframe></li>
</ul>
</div>

View file

@ -4,25 +4,21 @@
<ul class="nav nav-tabs">
<li class="active"><a href="#tab-dot" data-toggle="tab">Dot</a></li>
<li><a href="#tab-defaults" data-toggle="tab">Defaults</a></li>
<li><a href="#tab-xml" data-toggle="tab">SVG</a></li>
<li> <div class="btn-group">
<button id="bnup" class="btn btn-mini" ><i class="icon-refresh"></i>Redraw</button>
<button id="bnsvg" class="btn btn-mini" ><i class="icon-fullscreen"></i>SVG</button>
<button id="bndn" class="btn btn-mini"><i class="icon-download-alt"></i>download</button>
<input id="color1" type="text" name="color1" value="#333399" class="colorpicker" />
</div>
</li>
<li><a href="#tab-xml" data-toggle="tab">Raw XML</a></li>
</ul>
<div class="tab-content" style="overflow:hidden">
<div class="tab-content extend">
<div class="tab-pane active " id="tab-dot" >
<form id="dotForm" action= "svg" method="post" target="_new" >
<textarea id="dot" name="dot" rows="10" class="extend" style="width:90%;overflow:scroll"
>{$dot}</textarea>
<input id="ckdnload" name="dl" type="checkbox" style="display:none"/>
<form id="dotForm" action= "svg" method="post" target="_new" class="well " >
<label>digraph "
<input type="text" name="title" placeholder="title" class="input-small" />"
</label>
<span style="margin-right:-5px;padding-right:2px;">{{</span>
<textarea id="dot" name="dot" rows="100" style="width:90%;height:100%;overflow:scroll"
>{$dot}</textarea><span style="margin-right:-5px;">}}</span>
<label class="checkbox">
<input name="dl" type="checkbox"/> Download
</label>
</form >
</div>
@ -59,17 +55,18 @@
</div>
</div>
<div class="span6">
<div id="svgdiv" class="extend well" style="width:95%;height:30em;min-height:20em;">{$svgwidget}</div>
<div class="btn-group">
<button id="bnup" class="btn btn-mini" ><i class="icon-refresh"></i>Redraw</button>
<button id="bnsvg" class="btn btn-mini" ><i class="icon-fullscreen"></i>SVG</button>
<button id="bndn" class="btn btn-mini"><i class="icon-download-alt"></i>download</button>
</div>
<div id="svgdiv" class="extend" style="width:100%;height:30em;border: 1px solid #E3E3E3;min-height:20em;">{$svgwidget}</div>
</div>
<script src="{$aceserver}/ace.js" type="text/javascript" charset="utf-8"></script>
<script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
$(document).ready(function(){{
getsvg(false)
$('#color1').change(function(){{
alert("color changed");
}});
}})
</script>
</div>

View file

@ -5,23 +5,21 @@
<base href="/restxq/graphxq/" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="graphviz and svg tools" />
<meta name="description" content="xquery documentation" />
<meta name="author" content="andy bunce" />
<link href="{$libserver}/twitter-bootstrap/2.1.1/css/bootstrap.css" rel="stylesheet"
<link href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.2.2/css/bootstrap.css" rel="stylesheet"
type="text/css" />
<link href="{$libserver}//twitter-bootstrap/2.1.1/css/bootstrap-responsive.min.css"
<link href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.2.2/css/bootstrap-responsive.min.css"
rel="stylesheet" type="text/css" />
<link href="/graphxq/static/app.css" rel="stylesheet" type="text/css" />
<link href="/graphxq/app.css" rel="stylesheet" type="text/css" />
<!-- Le fav and touch icons -->
<link rel="shortcut icon" href="/graphxq/static/graphxq2.png" />
<link rel="shortcut icon" href="/graphxq/graphxq2.png" />
<script src="{$libserver}/jquery/1.8.1/jquery.min.js" type="text/javascript"></script>
<script src="{$libserver}/twitter-bootstrap/2.1.1/js/bootstrap.min.js" type="text/javascript"></script>
<script src="/graphxq/static/jquery.colorPicker.js" type="text/javascript"></script>
<link href="/graphxq/static/colorPicker.css" rel="stylesheet" type="text/css" />
<script src="/graphxq/static/app.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="/graphxq/app.js" type="text/javascript"></script>
<script type="text/javascript"><![CDATA[
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-34544921-1']);
@ -44,8 +42,8 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a href="." class="brand" title="Version 0.0.3">
<img src="/graphxq/static/graphxq2.png" />
<a href="." class="brand" title="Version 0.1.0">
<img src="/graphxq/graphxq2.png" />
graphXQ
</a>
@ -68,19 +66,8 @@
<li class="nav">
<a href="library">Library</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
About
<b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="about"><i class="icon-info-sign"></i> This application</a>
</li>
<li>
<a href="twitter"><i class="icon-comment"></i> Twitter test</a>
</li>
</ul>
<li class="nav">
<a href="about">About</a>
</li>
</ul>
<form class="pull-right navbar-search" action="search">

View file

@ -1,5 +0,0 @@
<div>
<!-- q,collection, hits -->
<h1>No twitter yet</h1>
<pre>{$data}</pre>
</div>