Browse Source

Umstellung auf chartModel #5

makro_datasrc
Daniel Quathamer 2 years ago
parent
commit
7ba6350d5d
  1. 188
      superx/xml/js/viz/viz_functions.js
  2. 1044
      superx/xml/viz_demo.html
  3. 203
      superx/xml/viz_html_chart.xsl

188
superx/xml/js/viz/viz_functions.js

@ -1,4 +1,79 @@
/* d3 Code */ /* d3 Code */
/*
const chartModel={
id: "TEST",
name: "testname",
renderer: "plot" ,//renderer;
//this.dataSources=datasources;
//this.globalProperties=globalproperties;
options: [],
targetDiv: document.getElementById("chartDiv"),
renderChart : function () {
//console.log(JSON.stringify(this));
document.getElementById("chartDiv").innerHTML=""; //reset canvas
switch (this.renderer) {
case "plot":
this.renderChartWithPlot();
break;
default:
alert("No renderer");
break;
}
},
renderChartWithPlot: function ()
{
console.log("using Plot");
var svgPlot=Plot.plot(this.options[0]);
document.getElementById("chartDiv").appendChild(svgPlot);
}
}
*/
function chartModel(id,name,renderer,datasources)
{
this.id=id;
this.name=name;
this.renderer=renderer;
this.dataSources=datasources;
//this.globalProperties=globalproperties;
this.options=new Object;
this.options.marks=new Array();
//let globalProperties={};
this.getChartSVG = function () {
//console.log(JSON.stringify(this));
var mySVG="";
switch (this.renderer) {
case "plot":
mySVG=this.getChartSVGWithPlot();
break;
default:
alert("No renderer");
break;
}
return mySVG;
}
this.getChartSVGWithPlot=function ()
{
console.log("using Plot");
var svgPlot=Plot.plot(this.options);
return svgPlot;
}
this.updateModel = function () {
}
}
function d3dataRow(nr,dimension1,dimension2,measure ) function d3dataRow(nr,dimension1,dimension2,measure )
{ {
@ -115,6 +190,81 @@ this.getValueResultset = function () {
} }
} }
function updateChartModel(myChartModel)
{
var optionsString="{";
if(document.getElementById("chartName").value=="")
document.getElementById("chartName").value=vizInitialName;
var chartName=document.getElementById("chartName").value;
//myChartModel.options.caption=chartName;
optionsString+="\"caption\":\""+chartName+"\"";
var myForm=document.forms["chartPropertiesForm"];
for(var k=0;k < commonChartProperties.length;k++)
{
for(var i=0;i < myForm.elements.length;i++)
{
if(commonChartProperties[k].name==myForm.elements[i].name
&&myForm.elements[i].value!="")
{
console.log("Feld ausgefüllt:" +commonChartProperties[k].name);
textDelim=(commonChartProperties[k].propValueType=="string")?"\"":"";
optionsString+=",\""+commonChartProperties[k].variableName+"\":"+textDelim+myForm.elements[i].value+textDelim;
}
}
}
optionsString+= ", \"marks\":[]";
optionsString+=" }"; //close tag
/*
var stylesString="{\"overflow\": \"visible\"";
for(var k=0;k < commonChartProperties.length;k++)
{
if(commonChartProperties[k].groupUniquename=="STYLE" )
{
stylesString+=",\""+commonChartProperties[k].variableName+"\":\""+getCommonChartProperty(commonChartProperties[k].name)+"\"";
}
}
stylesString+=" }";
console.log("Styles:"+ stylesString);
var styles=JSON.parse(stylesString); */
var chartOptions=JSON.parse(optionsString);
var marksArray=new Array();
marksArray[0]=Plot.barX(rs0,
{
x: "gesamt",
y: "eintrag",
fill: "blue"
}
);
chartOptions["marks"].push(marksArray);
myChartModel.options=chartOptions;
//console.log("options:"+ optionsString);
//var globalProperties=JSON.parse(optionsString);
//globalProperties["marks"].push(marksArray);
//myChartModel.options=globalProperties;
//myChartModel.options["marks"].push(marksArray);
return myChartModel;
}
function renderChart(renderer,chartDiv)
{
if(document.getElementById("chartName").value=="")
document.getElementById("chartName").value=vizInitialName;
var chartName=document.getElementById("chartName").value;
var myChartModel=new chartModel(1,chartName,renderer,rsTableMetaData);
myChartModel=updateChartModel(myChartModel);
var mySVG=myChartModel.getChartSVG();
document.getElementById(chartDiv).innerHTML="";
document.getElementById(chartDiv).appendChild(mySVG);
}
function prepareSelectionForm() function prepareSelectionForm()
{ {
@ -130,9 +280,11 @@ function prepareSelectionForm()
return selectionProperties; return selectionProperties;
} }
function showChartPropertiesForm() function showGeneralChartPropertiesFormDiv(renderer)
{ {
var myDiv=document.getElementById("chartPropertiesFormDetails"); var myDiv=document.getElementById("generalChartPropertiesFormDiv");
renderGeneralChartPropertiesForm("generalChartPropertiesFormElementsDiv",commonChartProperties,renderer);
if(myDiv.style.display=="block") if(myDiv.style.display=="block")
myDiv.style.display="none"; myDiv.style.display="none";
else else
@ -454,6 +606,38 @@ function renderDimensionField(dimensionProperty)
} }
function renderGeneralChartPropertiesForm(formDiv,myCommonChartProperties,renderer)
{
//first empty form:
var myForm=document.getElementById(formDiv);
while (myForm.firstChild) {
myForm.removeChild(myForm.firstChild);
}
const divBox = document.createElement("div");
//divBox.classList.add("box");
//divBox.style="width: 300px";
/*
const colHeader = document.createTextNode("Layout");
const colHeaderParagraph = document.createElement("p");
colHeaderParagraph.classList.add("title");
colHeaderParagraph.classList.add("is-6");
colHeaderParagraph.appendChild(colHeader);
divBox.appendChild(colHeaderParagraph);
*/
for(var k=0;k < myCommonChartProperties.length;k++)
{
if((myCommonChartProperties[k].groupVariableName=="layout"
|| myCommonChartProperties[k].groupVariableName=="style"
)
&& myCommonChartProperties[k].rendererUniquename==renderer)
divBox.appendChild(renderChartPropertyField(myCommonChartProperties[k]));
}
myForm.appendChild(divBox);
}
function renderFormDetails(formDiv,myCommonChartProperties) function renderFormDetails(formDiv,myCommonChartProperties)
{ {
//first empty form: //first empty form:

1044
superx/xml/viz_demo.html

File diff suppressed because it is too large Load Diff

203
superx/xml/viz_html_chart.xsl

@ -43,7 +43,7 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:HtmlUtils="de.superx.util
<!-- start Body--> <!-- start Body-->
<body onload="document.getElementById('progressbar').style.display='none';tableonload();"> <!-- tableonload definiert in pageComponents.pccustomize position table_post_javascript --> <body onload="document.getElementById('progressbar').style.display='none';tableonload();"> <!-- tableonload definiert in pageComponents.pccustomize position table_post_javascript -->
<div id="progressbar" style="position:absolute; width:150px; height:150px; left:200px; top:200px; background:#AAAAAA"> <div id="progressbar" style="position:absolute; width:150px; height:150px; left:200px; top:200px; background:#AAAAAA">
<p>&#160;<b>Laden...</b><br/><img src="/superx/images/progress_bar.gif"></img><br/></p></div> <p>&#160;<b>Laden...</b><br/><img src="../images/progress_bar.gif"></img><br/></p></div>
<xsl:if test="/ergebnisse/@showNavigation='true'"> <xsl:if test="/ergebnisse/@showNavigation='true'">
<xsl:for-each select="/ergebnisse/menue"> <xsl:for-each select="/ergebnisse/menue">
@ -120,8 +120,8 @@ padding-bottom:10px;
<!-- start Javascript--> <!-- start Javascript-->
<xsl:template name="tableJavascript_viz"> <xsl:template name="tableJavascript_viz">
<script language="Javascript" type="text/javascript" src="/superx/xml/js/viz/d3.min.js" /> <script language="Javascript" type="text/javascript" src="../xml/js/viz/d3.min.js" />
<script language="Javascript" type="text/javascript" src="/superx/xml/js/viz/plot.js" /> <script language="Javascript" type="text/javascript" src="../xml/js/viz/plot.js" />
<xsl:for-each select="/ergebnisse/ergebnis/ergebniselement/vizTypes/vizType[@srcpath !='/superx/xml/js/viz/d3.min.js' and @srcpath != '/superx/xml/js/viz/plot.js']"> <xsl:for-each select="/ergebnisse/ergebnis/ergebniselement/vizTypes/vizType[@srcpath !='/superx/xml/js/viz/d3.min.js' and @srcpath != '/superx/xml/js/viz/plot.js']">
<script language="Javascript" type="text/javascript" src="{@srcpath}" /> <script language="Javascript" type="text/javascript" src="{@srcpath}" />
</xsl:for-each> </xsl:for-each>
@ -192,7 +192,7 @@ this.groupVariableName=groupVariableName;
var commonChartProperties=[]; var commonChartProperties=[];
]]></xsl:text> ]]></xsl:text>
<xsl:for-each select="/ergebnisse/ergebnis/ergebniselement/chartProperties/commonChartProperty"> <xsl:for-each select="/ergebnisse/ergebnis[@ordnr='0']/ergebniselement/chartProperties/commonChartProperty">
<xsl:text> <xsl:text>
var newCommonChartProperty = new commonChartProperty("</xsl:text> var newCommonChartProperty = new commonChartProperty("</xsl:text>
<xsl:value-of select="@prop_uniquename" /> <xsl:value-of select="@prop_uniquename" />
@ -232,7 +232,7 @@ var newCommonChartProperty = new commonChartProperty("</xsl:text>
commonChartProperties.push(newCommonChartProperty); commonChartProperties.push(newCommonChartProperty);
</xsl:text> </xsl:text>
</xsl:for-each> </xsl:for-each>
<xsl:text> <!--<xsl:text>
var newCommonChartProperty = new commonChartProperty("caption", var newCommonChartProperty = new commonChartProperty("caption",
"Titel des Diagramms", "Titel des Diagramms",
false, false,
@ -241,7 +241,7 @@ false,
"", "",
"", "",
"</xsl:text> "</xsl:text>
<xsl:value-of select="/ergebnisse/ergebnis/maskenname" /><xsl:text>", <xsl:value-of select="/ergebnisse/ergebnis[@ordnr='0']/maskenname" /><xsl:text>",
"wird unter dem Diagramm angezeigt", "wird unter dem Diagramm angezeigt",
"Diagrammkopf", "Diagrammkopf",
"", "",
@ -251,7 +251,7 @@ false,
"string"); "string");
commonChartProperties.push(newCommonChartProperty); commonChartProperties.push(newCommonChartProperty);
</xsl:text> </xsl:text>-->
<xsl:text> <xsl:text>
function vizTypeProperty(propUniquename,caption,typeUniquename,groupUniquename,isMandatory) function vizTypeProperty(propUniquename,caption,typeUniquename,groupUniquename,isMandatory)
{ {
@ -264,7 +264,7 @@ this.isMandatory=isMandatory;
var vizTypeProperties=[]; var vizTypeProperties=[];
</xsl:text> </xsl:text>
<xsl:for-each select="/ergebnisse/ergebnis/ergebniselement/viz_type_properties/viz_type_property"> <xsl:for-each select="/ergebnisse/ergebnis[@ordnr='0']/ergebniselement/viz_type_properties/viz_type_property">
<xsl:text> <xsl:text>
var newVizTypeProperty = new vizTypeProperty("</xsl:text> var newVizTypeProperty = new vizTypeProperty("</xsl:text>
<xsl:value-of select="@uniquename" /> <xsl:value-of select="@uniquename" />
@ -287,7 +287,7 @@ vizTypeProperties.push(newVizTypeProperty);
</xsl:template> </xsl:template>
<xsl:template name="tableJavascript"> <xsl:template name="tableJavascript">
<script language="Javascript" type="text/javascript" src="/superx/xml/js/jquery-2.1.1.min.js" /> <script language="Javascript" type="text/javascript" src="../xml/js/jquery-2.1.1.min.js" />
<script language="JavaScript" type="text/javascript"> <script language="JavaScript" type="text/javascript">
function getTid(){ function getTid(){
<xsl:choose> <xsl:choose>
@ -317,7 +317,7 @@ function jsDisableInput(datei) {
} }
</script> </script>
<script language="JavaScript" type="text/javascript" src="/superx/xml/js/memtext/sx_functions.js"></script> <script language="JavaScript" type="text/javascript" src="../xml/js/memtext/sx_functions.js"></script>
<script language="JavaScript" type="text/javascript"> <script language="JavaScript" type="text/javascript">
var isTreeTable=false; var isTreeTable=false;
<xsl:if test="/ergebnisse/@isMakro!='true' and /ergebnisse/ergebnis/ergebniselement/sqlerg/@istreetable='true'"> <xsl:if test="/ergebnisse/@isMakro!='true' and /ergebnisse/ergebnis/ergebniselement/sqlerg/@istreetable='true'">
@ -336,7 +336,7 @@ function jsDisableInput(datei) {
debugContainerId:"dojoDebug" debugContainerId:"dojoDebug"
}; };
</script> </script>
<script language="JavaScript" type="text/javascript" src="/superx/xml/js/dojo/dojo.js"></script> <script language="JavaScript" type="text/javascript" src="../xml/js/dojo/dojo.js"></script>
<script language="JavaScript" type="text/javascript"> <script language="JavaScript" type="text/javascript">
@ -391,14 +391,14 @@ function printDiv(divName) {
<!-- start x für Tabellenfixierung--> <!-- start x für Tabellenfixierung-->
<script type='text/javascript' src='/superx/xml/js/x/x_core.js'></script> <script type='text/javascript' src='../xml/js/x/x_core.js'></script>
<script type='text/javascript' src='/superx/xml/js/x/lib/xaddeventlistener.js'></script> <script type='text/javascript' src='../xml/js/x/lib/xaddeventlistener.js'></script>
<script type='text/javascript' src='/superx/xml/js/x/lib/xtablefixed.js'></script> <script type='text/javascript' src='../xml/js/x/lib/xtablefixed.js'></script>
<!-- start xTableHeaderFixed --> <!-- start xTableHeaderFixed -->
<script type='text/javascript'> <script type='text/javascript'>
var addBehavior = false, ss = '/superx/xml/js/x/xthf.css'; var addBehavior = false, ss = '../xml/js/x/xthf.css';
if (window.XMLHttpRequest) { if (window.XMLHttpRequest) {
addBehavior = true; addBehavior = true;
@ -407,7 +407,7 @@ else {
/*@cc_on /*@cc_on
@if (@_jscript_version == 5.6) // IE6 @if (@_jscript_version == 5.6) // IE6
if(navigator.appName=="Microsoft Internet Explorer" ) if(navigator.appName=="Microsoft Internet Explorer" )
ss = '/superx/xml/js/x/xthf_ie6.css'; ss = '../xml/js/x/xthf_ie6.css';
addBehavior = false; addBehavior = false;
@end @*/ @end @*/
} }
@ -553,7 +553,7 @@ configdlg.show();
function tableReload(colsetParam,colsortParam) function tableReload(colsetParam,colsortParam)
{ {
document.getElementById('progressbar').style.display=""; document.getElementById('progressbar').style.display="";
<xsl:text>var callurl="/superx/servlet/SuperXmlTabelle</xsl:text> <xsl:text>var callurl="../servlet/SuperXmlTabelle</xsl:text>
<!--<xsl:if test="/ergebnisse/@jsessionid!=''">;jsessionid=<xsl:value-of select="/ergebnisse/@jsessionid"/></xsl:if>--> <!--<xsl:if test="/ergebnisse/@jsessionid!=''">;jsessionid=<xsl:value-of select="/ergebnisse/@jsessionid"/></xsl:if>-->
<xsl:text>?tid=</xsl:text><xsl:value-of select="/ergebnisse/ergebnis/ergebniselement/@id"/> <xsl:text>?tid=</xsl:text><xsl:value-of select="/ergebnisse/ergebnis/ergebniselement/@id"/>
<xsl:text><![CDATA[&navi=true&stylesheet=tabelle_html.xsl&reuseresult=true&colset=";]]></xsl:text> <xsl:text><![CDATA[&navi=true&stylesheet=tabelle_html.xsl&reuseresult=true&colset=";]]></xsl:text>
@ -605,7 +605,7 @@ self.location=callurl;
<!-- end dojo--> <!-- end dojo-->
<!-- start treetable --> <!-- start treetable -->
<xsl:if test="/ergebnisse/ergebnis/ergebniselement/sqlerg/@istreetable='true'"> <xsl:if test="/ergebnisse/ergebnis/ergebniselement/sqlerg/@istreetable='true'">
<script type="text/javascript" src="/superx/xml/js/treetable.js"></script> <script type="text/javascript" src="../xml/js/treetable.js"></script>
<script type="text/javascript"> <script type="text/javascript">
treetable_callbacks['eventRowStateChanged'] = 'treetable_eventRowChanged'; treetable_callbacks['eventRowStateChanged'] = 'treetable_eventRowChanged';
@ -635,9 +635,9 @@ self.location=callurl;
} }
if (state == 1) { if (state == 1) {
img.src = '/superx/xml/minus_circ.svg'; img.src = '../xml/minus_circ.svg';
} else { } else {
img.src = '/superx/xml/plus_circ.svg'; img.src = '../xml/plus_circ.svg';
} }
} }
catch (e) { catch (e) {
@ -654,7 +654,7 @@ self.location=callurl;
if (!document.getElementById(nodeid+"_0")) if (!document.getElementById(nodeid+"_0"))
{ {
document.getElementById('progressbar').style.display=""; document.getElementById('progressbar').style.display="";
<xsl:text>var callurl="/superx/servlet/SuperXmlTabelle</xsl:text> <xsl:text>var callurl="../servlet/SuperXmlTabelle</xsl:text>
<!-- <xsl:if test="/ergebnisse/@jsessionid!=''">;jsessionid=<xsl:value-of select="/ergebnisse/@jsessionid"/></xsl:if>--> <!-- <xsl:if test="/ergebnisse/@jsessionid!=''">;jsessionid=<xsl:value-of select="/ergebnisse/@jsessionid"/></xsl:if>-->
<xsl:text>?tid=</xsl:text><xsl:value-of select="/ergebnisse/ergebnis/ergebniselement/@id"/><xsl:text>"; <xsl:text>?tid=</xsl:text><xsl:value-of select="/ergebnisse/ergebnis/ergebniselement/@id"/><xsl:text>";
</xsl:text> </xsl:text>
@ -747,7 +747,7 @@ anders definiert als in maske_html, muss genauso heißen, damit allgemeine Vorla
--> -->
function applyMerkmale(merkmale) function applyMerkmale(merkmale)
{ {
<xsl:text><![CDATA[url=location.protocol+'//'+location.host+"/superx/servlet/SuperXmlTabelle";]]> <xsl:text><![CDATA[url=location.protocol+'//'+location.host+"../servlet/SuperXmlTabelle";]]>
</xsl:text> </xsl:text>
<!-- <xsl:if test="/ergebnisse/@jsessionid!=''"><xsl:text>url+=';jsessionid=</xsl:text><xsl:value-of select="/maske/@jsessionid"/><xsl:text>'; <!-- <xsl:if test="/ergebnisse/@jsessionid!=''"><xsl:text>url+=';jsessionid=</xsl:text><xsl:value-of select="/maske/@jsessionid"/><xsl:text>';
</xsl:text></xsl:if>--> </xsl:text></xsl:if>-->
@ -892,7 +892,7 @@ title='Tab <xsl:value-of select="/ergebnisse/ergebnis/maskenname"/>';
//dojo.debug(params); //dojo.debug(params);
//lesezeichen funktion setzt nur noch Titel, Params hier obsolet //lesezeichen funktion setzt nur noch Titel, Params hier obsolet
<xsl:text>lesezeichen('/superx/servlet/SuperXmlTabelle',getTid(),'</xsl:text><xsl:value-of select="/ergebnisse/@MandantenID"/><xsl:text>',params,title); <xsl:text>lesezeichen('../servlet/SuperXmlTabelle',getTid(),'</xsl:text><xsl:value-of select="/ergebnisse/@MandantenID"/><xsl:text>',params,title);
createLinkForTable('</xsl:text><xsl:value-of select="/ergebnisse/@hisinone_refapp" /><xsl:text>','</xsl:text><xsl:value-of select="/ergebnisse/ergebnis/ergebniselement/sqlerg/headers/@colset"/><xsl:text>','</xsl:text><xsl:value-of select="/ergebnisse/ergebnis/ergebniselement/sqlerg/headers/@colsort"/><xsl:text>');</xsl:text> createLinkForTable('</xsl:text><xsl:value-of select="/ergebnisse/@hisinone_refapp" /><xsl:text>','</xsl:text><xsl:value-of select="/ergebnisse/ergebnis/ergebniselement/sqlerg/headers/@colset"/><xsl:text>','</xsl:text><xsl:value-of select="/ergebnisse/ergebnis/ergebniselement/sqlerg/headers/@colsort"/><xsl:text>');</xsl:text>
dojo.widget.byId("lesezeichendlg").show(); dojo.widget.byId("lesezeichendlg").show();
@ -1075,7 +1075,7 @@ var platform='superx';
<xsl:attribute name="href"><xsl:text>javascript:setHeaderExpanded('</xsl:text> <xsl:attribute name="href"><xsl:text>javascript:setHeaderExpanded('</xsl:text>
<xsl:value-of select="/ergebnisse/@jsessionid"/><xsl:text>',</xsl:text><xsl:value-of select="/ergebnisse/ergebnis/maskenname/@id" /> <xsl:value-of select="/ergebnisse/@jsessionid"/><xsl:text>',</xsl:text><xsl:value-of select="/ergebnisse/ergebnis/maskenname/@id" />
<xsl:text>,</xsl:text><xsl:value-of select="@id"/><xsl:text>,false);</xsl:text></xsl:attribute> <xsl:text>,</xsl:text><xsl:value-of select="@id"/><xsl:text>,false);</xsl:text></xsl:attribute>
<img border='0' src='/superx/xml/folder_green_open.gif'/>&#160; <img border='0' src='../xml/folder_green_open.gif'/>&#160;
<xsl:call-template name="removeBackslashN" > <xsl:call-template name="removeBackslashN" >
<xsl:with-param name="derwert"><xsl:value-of select="." /></xsl:with-param> <xsl:with-param name="derwert"><xsl:value-of select="." /></xsl:with-param>
<xsl:with-param name="format"><xsl:value-of select="'html'" /></xsl:with-param> <xsl:with-param name="format"><xsl:value-of select="'html'" /></xsl:with-param>
@ -1087,7 +1087,7 @@ var platform='superx';
<xsl:attribute name="href"><xsl:text>javascript:setHeaderExpanded('</xsl:text> <xsl:attribute name="href"><xsl:text>javascript:setHeaderExpanded('</xsl:text>
<xsl:value-of select="/ergebnisse/@jsessionid"/><xsl:text>',</xsl:text><xsl:value-of select="/ergebnisse/ergebnis/maskenname/@id" /> <xsl:value-of select="/ergebnisse/@jsessionid"/><xsl:text>',</xsl:text><xsl:value-of select="/ergebnisse/ergebnis/maskenname/@id" />
<xsl:text>,</xsl:text><xsl:value-of select="@id"/><xsl:text>,true);</xsl:text></xsl:attribute> <xsl:text>,</xsl:text><xsl:value-of select="@id"/><xsl:text>,true);</xsl:text></xsl:attribute>
<img border='0' src='/superx/xml/folder_green.gif'/>&#160; <img border='0' src='../xml/folder_green.gif'/>&#160;
<xsl:call-template name="removeBackslashN" > <xsl:call-template name="removeBackslashN" >
<xsl:with-param name="derwert"><xsl:value-of select="." /></xsl:with-param> <xsl:with-param name="derwert"><xsl:value-of select="." /></xsl:with-param>
<xsl:with-param name="format"><xsl:value-of select="'html'" /></xsl:with-param> <xsl:with-param name="format"><xsl:value-of select="'html'" /></xsl:with-param>
@ -1207,17 +1207,6 @@ var platform='superx';
<div class="card has-background-light"> <div class="card has-background-light">
<div class="card-content"> <div class="card-content">
<p class="title is-4">Konfigurationsassistent Datenvisualisierung</p> <p class="title is-4">Konfigurationsassistent Datenvisualisierung</p>
<xsl:for-each select="ergebnis/ergebniselement">
<p class="title is-5"><xsl:value-of select="../maskenname" /></p>
<xsl:call-template name="legende" />
<!--<xsl:if test="/ergebnisse/@isMakro!='true' and /ergebnisse/ergebnis/ergebniselement/sqlerg/@istreetable!='true' and /ergebnisse/ergebnis/ergebniselement/sqlerg/@max &gt; 19">
<xsl:call-template name="navigationsmenue" />
</xsl:if>-->
<xsl:call-template name="buildVizData" >
<xsl:with-param name="tableId" select="@ordnr" />
</xsl:call-template>
</xsl:for-each>
<span class="separator">&#160;</span>
<!--Beginn NavTabs--> <!--Beginn NavTabs-->
<div class="tabs is-left is-small" id="viznav"> <div class="tabs is-left is-small" id="viznav">
@ -1274,7 +1263,7 @@ var platform='superx';
<xsl:param name="title" /> <xsl:param name="title" />
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</meta><!-- <link rel="stylesheet" type="text/css" href="/superx/xml/his1/css/superx_menue_html.css" /> --> </meta><!-- <link rel="stylesheet" type="text/css" href="../xml/his1/css.._menue_html.css" /> -->
<link rel="stylesheet" type="text/css" href="../style/superx.css"/> <link rel="stylesheet" type="text/css" href="../style/superx.css"/>
<link rel="stylesheet" type="text/css" href="../xml/menue_html.css"/> <link rel="stylesheet" type="text/css" href="../xml/menue_html.css"/>
<link rel="stylesheet" type="text/css" href="../xml/superxml_html.css"/> <link rel="stylesheet" type="text/css" href="../xml/superxml_html.css"/>
@ -1294,10 +1283,24 @@ var platform='superx';
</xsl:template> </xsl:template>
<xsl:template name="buildVizMetadata"> <xsl:template name="buildVizMetadata">
<xsl:variable name="vizInitialName">
<xsl:choose>
<xsl:when test="/ergebnisse/@isMakro='true'">
<xsl:value-of select="/ergebnisse/makro/name"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="/ergebnisse/ergebnis/ergebniselement/maskenname" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:call-template name="navigationsmenue" />
<script language="Javascript"> <script language="Javascript">
<xsl:text> <xsl:text>
var vizInitialName='</xsl:text><xsl:value-of select="$vizInitialName"/><xsl:text>';
function tableMetaData(tableId,nr,name) function tableMetaData(tableId,nr,name)
{ {
this.tableId=tableId; this.tableId=tableId;
@ -1429,6 +1432,17 @@ rs</xsl:text><xsl:value-of select="$tableId"/><xsl:text>.push(new dataRow</xsl:t
</script> </script>
</xsl:template> </xsl:template>
<xsl:template name="diagrammdaten"> <xsl:template name="diagrammdaten">
<xsl:for-each select="ergebnis/ergebniselement">
<p class="title is-5"><xsl:value-of select="../maskenname" /></p>
<xsl:call-template name="legende" />
<!--<xsl:if test="/ergebnisse/@isMakro!='true' and /ergebnisse/ergebnis/ergebniselement/sqlerg/@istreetable!='true' and /ergebnisse/ergebnis/ergebniselement/sqlerg/@max &gt; 19">
<xsl:call-template name="navigationsmenue" />
</xsl:if>-->
<xsl:call-template name="buildVizData" >
<xsl:with-param name="tableId" select="@ordnr" />
</xsl:call-template>
</xsl:for-each>
<span class="separator">&#160;</span>
<!--Aufruf/Anzeige Diagrammdaten--> <!--Aufruf/Anzeige Diagrammdaten-->
<xsl:for-each select="ergebnis/ergebniselement"> <xsl:for-each select="ergebnis/ergebniselement">
@ -1750,8 +1764,97 @@ rs</xsl:text><xsl:value-of select="$tableId"/><xsl:text>.push(new dataRow</xsl:t
<!--Formular Allg. Layoutmerkmale--> <!--Formular Allg. Layoutmerkmale-->
<div id="chartProperties"> <!--class="section">--> <div id="chartProperties"> <!--class="section">-->
<form name="chartPropertiesForm"> <form name="chartPropertiesForm">
<div class="columns">
<div class="column is-one-quarter">
<p class="bd-notification is-primary">
Diagramm
</p>
<p><span class="button is-link is-outlined is-small" onClick="renderChart(document.getElementById('fldVizRenderer').value,'chartDiv');">Erzeugen</span></p>
</div>
<div class="column is-half">
<div class="field is-grouped">
<div class="label-container">
<label class="label is-required is-small">Name</label>
</div>
<div class="field is-active">
<p class="control-new">
<div class="select is-small is-fullwidth">
<textarea class="maskinput" id="chartName" name="chartName" rows="3" cols="20" />
</div>
</p>
</div>
<xsl:call-template name="Infobutton" />
</div>
</div>
<div class="column">
<div class="field is-grouped">
<div class="label-container">
<label class="label is-required is-small">Renderer</label>
</div>
<div class="field is-active">
<p class="control-new">
<div class="select is-small is-fullwidth">
<select class="maskinputPflicht" id="fldVizRenderer" NAME="fldVizRenderer" tabindex="1" onChange="" >
<option class="maskinput" value="plot" selected="selected">Observable Plot</option>
<option class="maskinput" value="d3js" >D3JS</option>
</select>
</div>
</p>
</div>
<xsl:call-template name="Infobutton" />
</div>
</div>
</div>
<div class="columns">
<div class="column is-one-third">
<p class="bd-notification is-primary">
Eigenschaften
</p>
<div class="field is-grouped">
<div class="label-container">
<label class="label is-required is-small"><strong>Layoutmerkmale</strong></label>
</div>
<span class="separator">&#160;</span>
<span class="separator">&#160;</span>
<a
onClick="showGeneralChartPropertiesFormDiv(document.getElementById('fldVizRenderer').value);">
<span class="icon">
<img src="../images/icons/more.svg" title="Laden" />
</span>
</a>
</div>
<div id="generalChartPropertiesFormDiv" style="display:none">
<div id="generalChartPropertiesFormElementsDiv"> </div>
</div>
</div>
<div class="column">
<p class="bd-notification is-fojeisj">Vorschau</p>
<div id="chartCanvas">
<div id="chartDiv"><svg viewBox="0 0 650 450">
<rect x="0" y="0" width="650" height="450" fill=""></rect>
<path fill="#5a9900" d="M20,20 h300 v100 h-100 v100 h-200 z" />
<path fill="#c32e04" d="M320,20 h200 v200 h-200 z" />
<path fill="#dfac20" d="M220,120 h100 v100 h100 v100 h-100 v100 h-100 z" />
<path fill="#3983ab" d="M420,220 h200 v100 h-100 v100 h-200 v-100 h100 z" />
</svg></div>
</div>
</div>
</div>
<!--
<div class="label-container"> <div class="label-container">
<label class="label is-required is-small"><strong>Basismerkmale</strong></label> <label class="label is-required is-small"><strong>Basismerkmale</strong></label>
</div> </div>
@ -1790,8 +1893,9 @@ rs</xsl:text><xsl:value-of select="$tableId"/><xsl:text>.push(new dataRow</xsl:t
<span class="separator">&#160;</span> <span class="separator">&#160;</span>
<span class="separator">&#160;</span> <span class="separator">&#160;</span>
-->
<!--Formular Erweiterte Layoutmerkmale--> <!--Formular Erweiterte Layoutmerkmale-->
<!--
<div class="field is-grouped"> <div class="field is-grouped">
<div class="label-container"> <div class="label-container">
<label class="label is-required is-small"><strong>Zusatzmerkmale</strong></label> <label class="label is-required is-small"><strong>Zusatzmerkmale</strong></label>
@ -1809,15 +1913,16 @@ rs</xsl:text><xsl:value-of select="$tableId"/><xsl:text>.push(new dataRow</xsl:t
</a> </a>
</div> </div>
<div id="chartPropertiesFormDetails" style="display:none"><!--<p>Eigenschaften</p>--> </div> <div id="chartPropertiesFormDetails" style="display:none"> </div>
-->
</form> </form>
</div> </div>
<!--Ende Formular Erweiterte Layoutmerkmale-->
<span class="separator">&#160;</span> <span class="separator">&#160;</span>
<span class="separator">&#160;</span> <span class="separator">&#160;</span>
<!--Aufruf/Anzeige Layout-Vorschau--> <!--Aufruf/Anzeige Layout-Vorschau-->
<!--
<div class="field is-grouped"> <div class="field is-grouped">
<div class="label-container"> <div class="label-container">
<label class="label is-required is-small"><strong>Layout-Vorschau</strong></label> <label class="label is-required is-small"><strong>Layout-Vorschau</strong></label>
@ -1838,6 +1943,7 @@ rs</xsl:text><xsl:value-of select="$tableId"/><xsl:text>.push(new dataRow</xsl:t
<div id="chartDiv"> </div> <div id="chartDiv"> </div>
</div> </div>
-->
<!--footer (BF nach unten verschoben)--> <!--footer (BF nach unten verschoben)-->
<footer class="card-footer"> <footer class="card-footer">
@ -1916,4 +2022,21 @@ rs</xsl:text><xsl:value-of select="$tableId"/><xsl:text>.push(new dataRow</xsl:t
</footer> </footer>
</xsl:template> </xsl:template>
<xsl:template name="Infobutton">
<xsl:param name="targetUrl" select="'https://super-ics.de/superx/doku/kern_modul/admin/f_Patcheinspielen.htm'" />
<span class="separator">&#160;</span>
<span class="separator">&#160;</span>
<span class="info">
<xsl:attribute name="onclick">
<xsl:text>window.open('</xsl:text>
<xsl:value-of select="$targetUrl"/>
<xsl:text>','_blank','directories=no,location=no,menubar=no,scrollbars=yes,resizable=yes,toolbar=no,width=800,height=660');</xsl:text>
</xsl:attribute>
<figure class="image is-24x24">
<img src="../images/information_grey_liberation.svg" />
</figure>
</span>
</xsl:template>
</xsl:stylesheet> </xsl:stylesheet>

Loading…
Cancel
Save