Browse Source

Enable Multi Datasource #5

makro_datasrc
Daniel Quathamer 2 years ago
parent
commit
8d09c36bfa
  1. 80
      superx/xml/viz_html_chart.xsl

80
superx/xml/viz_html_chart.xsl

@ -1194,10 +1194,11 @@ var platform='superx';
<h1><xsl:value-of select="/ergebnisse/makro/name" /></h1> <h1><xsl:value-of select="/ergebnisse/makro/name" /></h1>
</xsl:if> </xsl:if>
<p></p> <p></p>
<xsl:call-template name="buildVizMetadata" />
<!-- end Kopf--> <!-- end Kopf-->
<!-- start Grafik--> <!-- start Grafik-->
<xsl:for-each select="ergebnisse/ergebnis/ergebniselement"> <xsl:for-each select="ergebnisse">
<!--Beginn Selektions-Card--> <!--Beginn Selektions-Card-->
<!--Beginn Berichtstitel, Pfad, Knopfleiste--> <!--Beginn Berichtstitel, Pfad, Knopfleiste-->
@ -1205,14 +1206,17 @@ var platform='superx';
<div class="columns is-mobile is-left"> <div class="columns is-mobile is-left">
<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: <xsl:value-of select="../maskenname" /></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: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: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:call-template name="navigationsmenue" />
</xsl:if>--> </xsl:if>-->
<xsl:call-template name="buildVizRs" /> <xsl:call-template name="buildVizData" >
<xsl:with-param name="tableId" select="@ordnr" />
</xsl:call-template>
</xsl:for-each>
<span class="separator">&#160;</span> <span class="separator">&#160;</span>
<!--Beginn NavTabs--> <!--Beginn NavTabs-->
@ -1289,12 +1293,23 @@ var platform='superx';
</head> </head>
</xsl:template> </xsl:template>
<xsl:template name="buildVizRs"> <xsl:template name="buildVizMetadata">
<script language="Javascript"> <script language="Javascript">
<xsl:text> <xsl:text>
function dataRowMetaData(nr,colname,colcaption,coltype,colfunction)
function tableMetaData(tableId,nr,name)
{ {
this.tableId=tableId;
this.nr=nr;
this.name=name;
}
function dataRowMetaData(tableId,nr,colname,colcaption,coltype,colfunction)
{
this.tableId=tableId;
this.nr=nr; this.nr=nr;
this.colname=colname; this.colname=colname;
this.colcaption=colcaption; this.colcaption=colcaption;
@ -1302,7 +1317,28 @@ this.coltype=coltype;
this.colfunction=colfunction; this.colfunction=colfunction;
} }
function dataRow(rownr</xsl:text> var rsTableMetaData=new Array();
</xsl:text>
</script>
</xsl:template>
<xsl:template name="buildVizData">
<xsl:param name="tableId" />
<script language="Javascript">
<xsl:text>
rsTableMetaData.push(new tableMetaData(</xsl:text>
<xsl:value-of select="$tableId"/><xsl:text>,</xsl:text>
<xsl:value-of select="position()"/>
<xsl:text>,''));
var rs</xsl:text><xsl:value-of select="$tableId"/><xsl:text>MetaData=new Array();
function dataRow</xsl:text><xsl:value-of select="$tableId"/><xsl:text>(rownr</xsl:text>
<xsl:for-each select="sqlerg/complete_headers/header"> <xsl:for-each select="sqlerg/complete_headers/header">
<xsl:text>,</xsl:text> <xsl:text>,</xsl:text>
<xsl:call-template name="getColumnNameJS"> <xsl:call-template name="getColumnNameJS">
@ -1325,8 +1361,7 @@ function dataRow(rownr</xsl:text>
</xsl:for-each><xsl:text> </xsl:for-each><xsl:text>
} }
var rsMetaData=new Array(); var rs</xsl:text><xsl:value-of select="$tableId"/><xsl:text>= new Array();
var rs= new Array();
</xsl:text> </xsl:text>
@ -1335,7 +1370,8 @@ var rs= new Array();
<xsl:value-of select="position()"/> <xsl:value-of select="position()"/>
</xsl:variable> </xsl:variable>
<xsl:text> <xsl:text>
rsMetaData.push(new dataRowMetaData(</xsl:text> rs</xsl:text><xsl:value-of select="$tableId"/><xsl:text>MetaData.push(new dataRowMetaData(</xsl:text>
<xsl:value-of select="$tableId"/><xsl:text>,</xsl:text>
<xsl:value-of select="$rownr"/> <xsl:value-of select="$rownr"/>
<xsl:text>,'</xsl:text> <xsl:text>,'</xsl:text>
<xsl:call-template name="getColumnNameJS"> <xsl:call-template name="getColumnNameJS">
@ -1349,7 +1385,6 @@ rsMetaData.push(new dataRowMetaData(</xsl:text>
</xsl:for-each> </xsl:for-each>
<xsl:for-each select="sqlerg/row"> <xsl:for-each select="sqlerg/row">
<xsl:variable name="rownr"> <xsl:variable name="rownr">
<xsl:value-of select="position()"/> <xsl:value-of select="position()"/>
@ -1361,7 +1396,7 @@ rsMetaData.push(new dataRowMetaData(</xsl:text>
<xsl:value-of select="position()"/> <xsl:value-of select="position()"/>
</xsl:variable> </xsl:variable>
<xsl:text> <xsl:text>
rsMetaData[</xsl:text><xsl:value-of select="number($colnr)-1"/><xsl:text>].coltype=</xsl:text><xsl:value-of select="@typ"/> rs</xsl:text><xsl:value-of select="$tableId"/><xsl:text>MetaData[</xsl:text><xsl:value-of select="number($colnr)-1"/><xsl:text>].coltype=</xsl:text><xsl:value-of select="@typ"/>
<xsl:text>; <xsl:text>;
</xsl:text> </xsl:text>
</xsl:for-each> </xsl:for-each>
@ -1369,7 +1404,7 @@ rsMetaData[</xsl:text><xsl:value-of select="number($colnr)-1"/><xsl:text>].colty
</xsl:if> </xsl:if>
<!--now resultset--> <!--now resultset-->
<xsl:text> <xsl:text>
rs.push(new dataRow(</xsl:text><xsl:value-of select="$rownr"/> rs</xsl:text><xsl:value-of select="$tableId"/><xsl:text>.push(new dataRow</xsl:text><xsl:value-of select="$tableId"/><xsl:text>(</xsl:text><xsl:value-of select="$rownr"/>
<xsl:for-each select="col"> <xsl:for-each select="col">
<xsl:text>,</xsl:text> <xsl:text>,</xsl:text>
<xsl:choose> <xsl:choose>
@ -1396,9 +1431,11 @@ rs.push(new dataRow(</xsl:text><xsl:value-of select="$rownr"/>
<xsl:template name="diagrammdaten"> <xsl:template name="diagrammdaten">
<!--Aufruf/Anzeige Diagrammdaten--> <!--Aufruf/Anzeige Diagrammdaten-->
<xsl:for-each select="ergebnis/ergebniselement">
<xsl:variable name="tableId"><xsl:value-of select="@ordnr"/></xsl:variable>
<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>Daten-Tabelle</strong></label> <label class="label is-required is-small"><strong><xsl:text>Daten-Tabelle </xsl:text><xsl:value-of select="../maskenname"/></strong></label>
</div> </div>
<span class="separator">&#160;</span> <span class="separator">&#160;</span>
@ -1411,8 +1448,13 @@ rs.push(new dataRow(</xsl:text><xsl:value-of select="$rownr"/>
</span> </span>
</button>--> </button>-->
<a <a>
onClick="showDataTable('dataDivTable',rs,rsMetaData,10);"> <xsl:attribute name="onClick">
<xsl:text>showDataTable('dataDivTable</xsl:text>
<xsl:value-of select="$tableId"/>
<xsl:text>',rs</xsl:text><xsl:value-of select="$tableId"/>
<xsl:text>,rs</xsl:text><xsl:value-of select="$tableId"/><xsl:text>MetaData,10);</xsl:text>
</xsl:attribute>
<span class="icon"> <span class="icon">
<img src="../images/icons/more.svg" title="Laden" /> <img src="../images/icons/more.svg" title="Laden" />
</span> </span>
@ -1421,13 +1463,15 @@ rs.push(new dataRow(</xsl:text><xsl:value-of select="$rownr"/>
</div> </div>
<div id="dataDiv"> <!--class="section">--> <div id="dataDiv"> <!--class="section">-->
<div id="dataDivTable"> <!--style="border:thin solid black">--> <div id="{concat('dataDivTable',$tableId)}"> <!--style="border:thin solid black">-->
</div> </div>
</div> </div>
<span class="separator">&#160;</span> <span class="separator">&#160;</span>
<span class="separator">&#160;</span> <span class="separator">&#160;</span>
</xsl:for-each>
<!--Aufruf/Anzeige Formular Datenauswahl--> <!--Aufruf/Anzeige Formular Datenauswahl-->
<div class="field is-grouped"> <div class="field is-grouped">
<div class="label-container"> <div class="label-container">

Loading…
Cancel
Save