mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
Gantt
This commit is contained in:
@@ -32,8 +32,8 @@ function onProjektSelect()
|
||||
var tree=document.getElementById('tree-projekt');
|
||||
|
||||
// Wenn auf die Ueberschrift geklickt wird, soll nix passieren
|
||||
if(tree.currentIndex==-1)
|
||||
return;
|
||||
if(tree.currentIndex==-1)
|
||||
return;
|
||||
|
||||
var bezeichnung = getTreeCellText(tree, "tree-projekt-bezeichnung", tree.currentIndex);
|
||||
var oe=getTreeCellText(tree, "tree-projekt-oe", tree.currentIndex);
|
||||
@@ -42,41 +42,83 @@ function onProjektSelect()
|
||||
var projekt_phase_id=getTreeCellText(tree, "tree-projekt-projekt_phase_id", tree.currentIndex);
|
||||
|
||||
//alert("Projekt Phase ID "+projekt_phase_id);
|
||||
|
||||
// Projektphasen neu laden
|
||||
if(projekt_phase_id=='' && projekt_kurzbz!='')
|
||||
{
|
||||
//alert("OE "+oe+" | Projekt KurzBZ "+projekt_kurzbz);
|
||||
try
|
||||
{
|
||||
var datasources="<?php echo APP_ROOT; ?>rdf/projektphase.rdf.php?"+gettimestamp();
|
||||
var ref="http://www.technikum-wien.at/projektphase/"+oe+"/"+projekt_kurzbz;
|
||||
var treePhase=document.getElementById('tree-projektphase');
|
||||
|
||||
//Alte DS entfernen
|
||||
var oldDatasources = treePhase.database.GetDataSources();
|
||||
while(oldDatasources.hasMoreElements())
|
||||
{
|
||||
treePhase.database.RemoveDataSource(oldDatasources.getNext());
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
TaskTreeDatasource.removeXMLSinkObserver(TaskTreeSinkObserver);
|
||||
treePhase.builder.removeListener(TaskTreeListener);
|
||||
}
|
||||
catch(e)
|
||||
{}
|
||||
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
|
||||
TaskTreeDatasource = rdfService.GetDataSource(datasources);
|
||||
TaskTreeDatasource.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);
|
||||
TaskTreeDatasource.QueryInterface(Components.interfaces.nsIRDFXMLSink);
|
||||
treePhase.database.AddDataSource(TaskTreeDatasource);
|
||||
TaskTreeDatasource.addXMLSinkObserver(TaskTreeSinkObserver);
|
||||
treePhase.builder.addListener(TaskTreeListener);
|
||||
treePhase.ref=ref;
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
debug("whoops Projekttask load failed with exception: "+e);
|
||||
}
|
||||
}
|
||||
|
||||
// Projekttasks neu laden
|
||||
if(projekt_phase_id!='')
|
||||
{
|
||||
try
|
||||
{
|
||||
url = "<?php echo APP_ROOT; ?>rdf/projekttask.rdf.php?projektphase_id="+projekt_phase_id+"&"+gettimestamp();
|
||||
|
||||
var treeTask=document.getElementById('projekttask-tree');
|
||||
|
||||
//Alte DS entfernen
|
||||
var oldDatasources = treeTask.database.GetDataSources();
|
||||
while(oldDatasources.hasMoreElements())
|
||||
{
|
||||
treeTask.database.RemoveDataSource(oldDatasources.getNext());
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
TaskTreeDatasource.removeXMLSinkObserver(TaskTreeSinkObserver);
|
||||
treeTask.builder.removeListener(TaskTreeListener);
|
||||
}
|
||||
catch(e)
|
||||
{}
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
|
||||
TaskTreeDatasource = rdfService.GetDataSource(url);
|
||||
TaskTreeDatasource.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);
|
||||
TaskTreeDatasource.QueryInterface(Components.interfaces.nsIRDFXMLSink);
|
||||
treeTask.database.AddDataSource(TaskTreeDatasource);
|
||||
TaskTreeDatasource.addXMLSinkObserver(TaskTreeSinkObserver);
|
||||
treeTask.builder.addListener(TaskTreeListener);
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
debug("whoops Projekttask load failed with exception: "+e);
|
||||
}
|
||||
try
|
||||
{
|
||||
url = "<?php echo APP_ROOT; ?>rdf/projekttask.rdf.php?projektphase_id="+projekt_phase_id+"&"+gettimestamp();
|
||||
|
||||
var treeTask=document.getElementById('projekttask-tree');
|
||||
|
||||
//Alte DS entfernen
|
||||
var oldDatasources = treeTask.database.GetDataSources();
|
||||
while(oldDatasources.hasMoreElements())
|
||||
{
|
||||
treeTask.database.RemoveDataSource(oldDatasources.getNext());
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
TaskTreeDatasource.removeXMLSinkObserver(TaskTreeSinkObserver);
|
||||
treeTask.builder.removeListener(TaskTreeListener);
|
||||
}
|
||||
catch(e)
|
||||
{}
|
||||
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
|
||||
TaskTreeDatasource = rdfService.GetDataSource(url);
|
||||
TaskTreeDatasource.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);
|
||||
TaskTreeDatasource.QueryInterface(Components.interfaces.nsIRDFXMLSink);
|
||||
treeTask.database.AddDataSource(TaskTreeDatasource);
|
||||
TaskTreeDatasource.addXMLSinkObserver(TaskTreeSinkObserver);
|
||||
treeTask.builder.addListener(TaskTreeListener);
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
debug("whoops Projekttask load failed with exception: "+e);
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById('projekttask-toolbar-del').disabled=true;
|
||||
|
||||
@@ -9,6 +9,7 @@ echo '<?xul-overlay href="'.APP_ROOT.'content/lvplanung/lehrveranstaltungoverlay
|
||||
echo '<?xul-overlay href="'.APP_ROOT.'content/lvplanung/stpl-week-overlay.xul.php"?>';*/
|
||||
echo '<?xul-overlay href="'.APP_ROOT.'content/projekt/projektphase.overlay.xul.php"?>';
|
||||
echo '<?xul-overlay href="'.APP_ROOT.'content/projekt/projekttask.overlay.xul.php"?>';
|
||||
echo '<?xul-overlay href="'.APP_ROOT.'content/projekt/gantt.overlay.xul.php"?>';
|
||||
?>
|
||||
|
||||
<!DOCTYPE overlay >
|
||||
@@ -89,47 +90,6 @@ echo '<?xul-overlay href="'.APP_ROOT.'content/projekt/projekttask.overlay.xul.ph
|
||||
</tree>
|
||||
</vbox>
|
||||
|
||||
<!--<tree id="tree-ort" onselect="onOrtSelect();"
|
||||
seltype="single" hidecolumnpicker="false" flex="1"
|
||||
datasources="../rdf/ort.rdf.php" ref="http://www.technikum-wien.at/ort/alle-orte">
|
||||
<treecols>
|
||||
<treecol id="raumtyp" label="Raumtyp" flex="2" primary="true" persist="hidden, width, ordinal"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="ort_kurzbz" label="Raum" flex="4" hidden="true" persist="hidden, width, ordinal"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="hierarchie" label="HI" flex="1" hidden="true" persist="hidden, width, ordinal"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="ort_bezeichnung" label="Bezeichnung" flex="3" hidden="true" persist="hidden, width, ordinal"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="max_person" label="MaxP" flex="1" hidden="true" persist="hidden, width, ordinal"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="raumtypen" label="Raumtypen" flex="1" hidden="true" persist="hidden, width, ordinal"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="stockwerk" label="Stockwerk" flex="1" hidden="true" persist="hidden, width, ordinal"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="planbezeichnung" label="Planbezeichnung" flex="1" hidden="true" persist="hidden, width, ordinal"/>
|
||||
</treecols>
|
||||
|
||||
<template>
|
||||
<rule>
|
||||
<treechildren>
|
||||
<treeitem uri="rdf:*">
|
||||
<treerow>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/ort/rdf#raumtyp"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/ort/rdf#ort_kurzbz"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/ort/rdf#hierarchie"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/ort/rdf#ort_bezeichnung"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/ort/rdf#max_person"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/ort/rdf#raumtypen"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/ort/rdf#stockwerk"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/ort/rdf#planbezeichnung"/>
|
||||
</treerow>
|
||||
</treeitem>
|
||||
</treechildren>
|
||||
</rule>
|
||||
</template>
|
||||
</tree>-->
|
||||
|
||||
<vbox id="vbox-main">
|
||||
<popupset>
|
||||
<popup id="fasoverlay-lektor-tree-popup">
|
||||
@@ -143,18 +103,17 @@ echo '<?xul-overlay href="'.APP_ROOT.'content/projekt/projekttask.overlay.xul.ph
|
||||
<tab id="tab-projektphase" label="Phasen" />
|
||||
<tab id="tab-projekttask" label="Tasks" />
|
||||
<tab id="tab-notiz" label="Notizen" />
|
||||
<tab id="tab-dokumente" label="Dokumente" />
|
||||
<tab id="tab-bestellung" label="Bestellungen" />
|
||||
<tab id="tab-gantt" label="Gantt" />
|
||||
</tabs>
|
||||
<tabpanels id="tabpanels-main" flex="1">
|
||||
<!-- Projekttask -->
|
||||
<vbox id="box-projektphase" />
|
||||
<!-- Semesterplan -->
|
||||
<vbox id="box-projekttask" />
|
||||
<!-- Semesterplan -->
|
||||
<vbox id="box-notiz" />
|
||||
<!-- Studenten -->
|
||||
<vbox id="box-dokumente" />
|
||||
<vbox id="box-bestellung" />
|
||||
<!-- Lehrfachverteilung -->
|
||||
<vbox id="box-gantt" />
|
||||
<vbox id="LehrveranstaltungEditor" />
|
||||
</tabpanels>
|
||||
</tabbox>
|
||||
|
||||
Executable
+57
@@ -0,0 +1,57 @@
|
||||
svg-shape {
|
||||
-moz-binding: url("gantt.svg.xbl#shape");
|
||||
-moz-user-focus: normal;
|
||||
stroke-width: 4px;
|
||||
font-family: Lucida Grande,Geneva,Verdana,Arial,Helvetica,sans-serif;
|
||||
font-style: bold;
|
||||
font-variant: normal;
|
||||
line-height: normal;
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
svg-shape .svg-shape-text {
|
||||
fill: white;
|
||||
}
|
||||
|
||||
svg-shape .svg-shape-rect {
|
||||
fill: red;
|
||||
stroke: white;
|
||||
}
|
||||
|
||||
svg-shape:focus .svg-shape-rect {
|
||||
fill: green;
|
||||
stroke: white;
|
||||
}
|
||||
|
||||
svg-shape .svg-shape-circle {
|
||||
fill-opacity: .20;
|
||||
stroke: white;
|
||||
}
|
||||
|
||||
svg-shape:focus .svg-shape-circle {
|
||||
fill-opacity: 1;
|
||||
stroke: white;
|
||||
}
|
||||
|
||||
#circ1 .svg-shape-circle {
|
||||
fill: yellow;
|
||||
}
|
||||
|
||||
#circ2 .svg-shape-circle {
|
||||
fill: green;
|
||||
}
|
||||
|
||||
#circ3 .svg-shape-circle {
|
||||
fill: blue;
|
||||
}
|
||||
|
||||
#svg-button {
|
||||
min-width: 48px;
|
||||
min-height: 48px;
|
||||
max-height: 48px;
|
||||
}
|
||||
|
||||
#background-circle .svg-shape-circle {
|
||||
fill: lightslategray;
|
||||
}
|
||||
|
||||
Executable
+99
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
/* Copyright (C) 2006 Technikum-Wien
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Christian Paminger <christian.paminger@technikum-wien.at>
|
||||
*/
|
||||
|
||||
header("Cache-Control: no-cache");
|
||||
header("Cache-Control: post-check=0, pre-check=0",false);
|
||||
header("Expires Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Pragma: no-cache");
|
||||
header("Content-type: application/vnd.mozilla.xul+xml");
|
||||
|
||||
require_once('../../config/vilesci.config.inc.php');
|
||||
|
||||
echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
echo '<?xml-stylesheet href="gantt.css" type="text/css"?>';
|
||||
?>
|
||||
|
||||
<overlay id="GanttOverlay"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
>
|
||||
|
||||
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/phpRequest.js.php" />
|
||||
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/projekt/gantt.overlay.js.php" />
|
||||
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/functions.js.php" />
|
||||
|
||||
<!-- ************************ -->
|
||||
<!-- * Projekttask * -->
|
||||
<!-- ************************ -->
|
||||
<vbox id="box-gantt" flex="1" uid="" stg_kz="">
|
||||
<popupset>
|
||||
<popup id="projektphase-tree-popup">
|
||||
<menuitem label="Entfernen" oncommand="TaskDelete();" id="projektphase-tree-popup-entf" disabled="false"/>
|
||||
</popup>
|
||||
</popupset>
|
||||
<toolbox>
|
||||
<toolbar id="projektphase-nav-toolbar">
|
||||
<toolbarbutton id="toolbarbutton-gantt-zoomin" label="Zoom In" oncommand="PhaseNeu();" disabled="true" image="../skin/images/NeuDokument.png" tooltiptext="Neuen Task anlegen" />
|
||||
<toolbarbutton id="toolbarbutton-gantt-zoomout" label="Zoom Out" oncommand="PhaseDelete();" disabled="true" image="../skin/images/DeleteIcon.png" tooltiptext="Task löschen"/>
|
||||
<toolbarbutton id="toolbarbutton-gantt-print" label="Drucken" oncommand="PhaseTreeRefresh()" disabled="false" image="../skin/images/refresh.png" tooltiptext="Liste neu laden"/>
|
||||
</toolbar>
|
||||
</toolbox>
|
||||
|
||||
<stack flex="1">
|
||||
<vbox flex="1">
|
||||
<svg-shape id="background-circle" flex="1" type="circle" />
|
||||
</vbox>
|
||||
<vbox flex="1">
|
||||
<spacer flex="2"/>
|
||||
<svg-shape flex="1" id="svg-button" type="rect" radius="12" label="Box"/>
|
||||
<spacer flex="2"/>
|
||||
<hbox flex="4">
|
||||
<svg-shape flex="1" id="circ1" type="circle" label="1"/>
|
||||
<svg-shape flex="1" id="circ2" type="circle" label="2" />
|
||||
<svg-shape flex="1" id="circ3" type="circle" label="3" />
|
||||
</hbox>
|
||||
<spacer flex="1"/>
|
||||
</vbox>
|
||||
</stack>
|
||||
|
||||
|
||||
<splitter collapse="after" persist="state">
|
||||
<grippy />
|
||||
</splitter>
|
||||
|
||||
<!-- ************ -->
|
||||
<!-- * Detail * -->
|
||||
<!-- ************ -->
|
||||
<vbox flex="1" style="overflow:auto;margin:0px;" persist="height">
|
||||
<tabbox id="projektphase-tabbox" flex="3" orient="vertical">
|
||||
<tabs orient="horizontal" id="projektphase-tabs">
|
||||
<tab id="projektphase-tab-detail" label="Details" />
|
||||
<tab id="projektphase-tab-mantis" label="Mantis" />
|
||||
</tabs>
|
||||
<tabpanels id="projektphase-tabpanels-main" flex="1">
|
||||
<vbox id="projektphase-detail" />
|
||||
<vbox id="projektphase-mantis" />
|
||||
</tabpanels>
|
||||
</tabbox>
|
||||
</vbox>
|
||||
</vbox>
|
||||
</overlay>
|
||||
Executable
+36
@@ -0,0 +1,36 @@
|
||||
.box-inherit {
|
||||
-moz-box-orient: inherit;
|
||||
-moz-box-pack: inherit;
|
||||
-moz-box-align: inherit;
|
||||
-moz-box-direction: inherit;
|
||||
}
|
||||
|
||||
/* Text shape */
|
||||
|
||||
.svg-shape-text {
|
||||
font-weight: inherit;
|
||||
font-style: inherit;
|
||||
font-size: inherit;
|
||||
font-family: inherit;
|
||||
dominant-baseline: middle;
|
||||
text-anchor: middle;
|
||||
}
|
||||
|
||||
/* Rect shape */
|
||||
|
||||
.svg-shape-rect {
|
||||
stroke-width: inherit;
|
||||
}
|
||||
|
||||
/* Circle shape */
|
||||
|
||||
.svg-shape-circle {
|
||||
stroke-width: inherit;
|
||||
}
|
||||
|
||||
/* Ellipse shape */
|
||||
|
||||
.svg-shape-ellipse {
|
||||
stroke-width: inherit;
|
||||
}
|
||||
|
||||
Executable
+180
@@ -0,0 +1,180 @@
|
||||
<?xml version="1.0"?>
|
||||
<bindings
|
||||
xmlns="http://www.mozilla.org/xbl"
|
||||
xmlns:xbl="http://www.mozilla.org/xbl"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
>
|
||||
<binding id="shape">
|
||||
<implementation>
|
||||
<field name="svg_shape_box"/>
|
||||
<field name="svg_shape_type"/>
|
||||
<field name="svg_shape_rect"/>
|
||||
<field name="svg_shape_circle"/>
|
||||
<field name="svg_shape_ellipse"/>
|
||||
<field name="svg_shape_text"/>
|
||||
<field name="svg_shape_stroke"/>
|
||||
<field name="svg_shape_corner"/>
|
||||
<field name="svg_shape_loaded"/>
|
||||
<property name="disabled">
|
||||
<getter>
|
||||
<![CDATA[
|
||||
return this.getAttribute('disabled') == 'true';
|
||||
]]>
|
||||
</getter>
|
||||
<setter>
|
||||
<![CDATA[
|
||||
if (val) {
|
||||
this.setAttribute('disabled', 'true');
|
||||
}
|
||||
else {
|
||||
this.removeAttribute('disabled');
|
||||
}
|
||||
return val;
|
||||
]]>
|
||||
</setter>
|
||||
</property>
|
||||
<property name="label">
|
||||
<setter>
|
||||
<![CDATA[
|
||||
this.setText(val);
|
||||
this.setAttribute("label", val);
|
||||
return val;
|
||||
]]>
|
||||
</setter>
|
||||
</property>
|
||||
<constructor>
|
||||
<![CDATA[
|
||||
|
||||
const STROKE_WIDTH = 4;
|
||||
const CORNER_RADIUS = 0;
|
||||
|
||||
this.svg_shape_type = this.getAttribute("type");
|
||||
if (!this.svg_shape_type) this.svg_shape_type = "rect";
|
||||
|
||||
this.svg_shape_corner = parseInt(this.getAttribute("radius"));
|
||||
if (isNaN(this.svg_shape_corner)) this.svg_shape_corner = CORNER_RADIUS;
|
||||
|
||||
//This should not be necessary, but unfortunately getting the value
|
||||
//from the stylesheet programmatically is not possible in current builds
|
||||
|
||||
this.svg_shape_stroke = parseInt(this.getAttribute("stroke-width"));
|
||||
if (isNaN(this.svg_shape_stroke)) this.svg_shape_stroke = STROKE_WIDTH;
|
||||
|
||||
var my_this = this;
|
||||
|
||||
this.svg_shape_loaded = false;
|
||||
|
||||
this.svg_shape_box = document.getAnonymousElementByAttribute(this, "anonid", "svg-shape-box");
|
||||
this.svg_shape_rect = document.getAnonymousElementByAttribute(this, "anonid", "svg-shape-rect");
|
||||
this.svg_shape_circle = document.getAnonymousElementByAttribute(this, "anonid", "svg-shape-circle");
|
||||
this.svg_shape_ellipse = document.getAnonymousElementByAttribute(this, "anonid", "svg-shape-ellipse");
|
||||
this.svg_shape_text = document.getAnonymousElementByAttribute(this, "anonid", "svg-shape-text");
|
||||
|
||||
my_func = function myFunction(event){ window.setTimeout(function(xbl){ xbl.click(); }, 10, my_this); }
|
||||
this.svg_shape_box.addEventListener("click", my_func, true);
|
||||
|
||||
my_func = function myFunction(){ my_this.doLayout();}
|
||||
window.addEventListener("load", my_func, true);
|
||||
|
||||
]]>
|
||||
</constructor>
|
||||
<method name="doLayout">
|
||||
<body>
|
||||
<![CDATA[
|
||||
|
||||
if (this.svg_shape_loaded) return;
|
||||
|
||||
this.svg_shape_loaded = true;
|
||||
|
||||
var box_w = this.boxObject.width;
|
||||
var box_h = this.boxObject.height;
|
||||
var cx = box_w / 2;
|
||||
var cy = box_h / 2;
|
||||
|
||||
var stroke_w = this.svg_shape_stroke;
|
||||
|
||||
//Either of the following should work, but don't
|
||||
//var stroke_w = document.defaultView.getComputedStyle(this.svg_shape_rect, "").getPropertyCSSValue("stroke-width").getFloatValue(CSSPrimitiveValue.CSS_PX);
|
||||
//var stroke_w = this.svg_shape_rect.getPresentationAttribute("stroke-width").getFloatValue(CSSPrimitiveValue.CSS_PX);
|
||||
|
||||
this.svg_shape_box.setAttribute("width", box_w);
|
||||
this.svg_shape_box.setAttribute("height", box_h);
|
||||
|
||||
if (this.svg_shape_type == "circle") {
|
||||
var r = Math.min(cx, cy);
|
||||
|
||||
this.svg_shape_circle.setAttribute("cx", cx);
|
||||
this.svg_shape_circle.setAttribute("cy", cy);
|
||||
this.svg_shape_circle.setAttribute("r", r - stroke_w);
|
||||
|
||||
this.svg_shape_rect.setAttribute("style", "display: none");
|
||||
this.svg_shape_ellipse.setAttribute("style", "display: none");
|
||||
}
|
||||
else if (this.svg_shape_type == "ellipse") {
|
||||
|
||||
this.svg_shape_ellipse.setAttribute("cx", cx);
|
||||
this.svg_shape_ellipse.setAttribute("cy", cy);
|
||||
this.svg_shape_ellipse.setAttribute("rx", cx);
|
||||
this.svg_shape_ellipse.setAttribute("ry", cy);
|
||||
|
||||
this.svg_shape_circle.setAttribute("style", "display: none");
|
||||
this.svg_shape_rect.setAttribute("style", "display: none");
|
||||
}
|
||||
else {
|
||||
this.svg_shape_rect.setAttribute("x", stroke_w / 2);
|
||||
this.svg_shape_rect.setAttribute("y", stroke_w / 2);
|
||||
this.svg_shape_rect.setAttribute("width", box_w - ((stroke_w / 2) + stroke_w));
|
||||
this.svg_shape_rect.setAttribute("height", box_h - ((stroke_w / 2) + stroke_w));
|
||||
this.svg_shape_rect.setAttribute("rx", this.svg_shape_corner);
|
||||
this.svg_shape_rect.setAttribute("ry", this.svg_shape_corner);
|
||||
|
||||
this.svg_shape_circle.setAttribute("style", "display: none");
|
||||
this.svg_shape_ellipse.setAttribute("style", "display: none");
|
||||
}
|
||||
|
||||
|
||||
this.svg_shape_text.setAttribute("x", cx);
|
||||
this.svg_shape_text.setAttribute("y", cy - stroke_w);
|
||||
|
||||
this.setText(this.getAttribute("label"));
|
||||
|
||||
//Not used but useful to know
|
||||
//var text_w = this.svg_shape_text.getComputedTextLength();
|
||||
//var text_h = document.defaultView.getComputedStyle(this.svg_shape_text, "").getPropertyCSSValue("font-size").getFloatValue(CSSPrimitiveValue.CSS_PX);
|
||||
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
<method name="setText">
|
||||
<parameter name="text" />
|
||||
<body>
|
||||
<![CDATA[
|
||||
|
||||
if (!text) text = "";
|
||||
this.svg_shape_text.firstChild.nodeValue = text;
|
||||
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
</implementation>
|
||||
<resources>
|
||||
<stylesheet src="gantt.svg.css" />
|
||||
</resources>
|
||||
<content>
|
||||
<xul:hbox class="box-inherit" xbl:inherits="align,dir,pack,orient" align="center" pack="center" flex="1">
|
||||
<svg:svg anonid="svg-shape-box" width="10px" height="10px">
|
||||
<svg:g>
|
||||
<svg:rect anonid="svg-shape-rect" class="svg-shape-rect" x="2" y="2" width="10" height="10" rx="8" ry="8"/>
|
||||
<svg:circle anonid="svg-shape-circle" class="svg-shape-circle" cx="2" cy="2" r="10"/>
|
||||
<svg:ellipse anonid="svg-shape-ellipse" class="svg-shape-ellipse" cx="2" cy="2" rx="10" ry="10"/>
|
||||
<svg:text anonid="svg-shape-text" x="16" y="0" class="svg-shape-text">Text</svg:text>
|
||||
</svg:g>
|
||||
</svg:svg>
|
||||
</xul:hbox>
|
||||
</content>
|
||||
</binding>
|
||||
</bindings>
|
||||
|
||||
@@ -65,7 +65,7 @@ for ($i=0;$i<count($projekt_obj->result);$i++)
|
||||
</RDF:Description>'."\n";
|
||||
$descr.='<RDF:Description RDF:about="'.$rdf_url.$projekt->oe_kurzbz.'/'.$projekt->projekt_kurzbz.'" >
|
||||
<PROJEKTPHASE:bezeichnung>'.$projekt->titel.'</PROJEKTPHASE:bezeichnung>
|
||||
<PROJEKTPHASE:oe_kurzbz></PROJEKTPHASE:oe_kurzbz>
|
||||
<PROJEKTPHASE:oe_kurzbz>'.$projekt->oe_kurzbz.'</PROJEKTPHASE:oe_kurzbz>
|
||||
<PROJEKTPHASE:projekt_kurzbz>'.$projekt->projekt_kurzbz.'</PROJEKTPHASE:projekt_kurzbz>
|
||||
<PROJEKTPHASE:projekt_phase></PROJEKTPHASE:projekt_phase>
|
||||
<PROJEKTPHASE:projekt_phase_id></PROJEKTPHASE:projekt_phase_id>
|
||||
|
||||
Reference in New Issue
Block a user