Browse Source

Visualisierung mit Kreuztabellen Installer #16

master
Daniel Quathamer 1 week ago
parent
commit
70f2d65974
  1. 1
      src-modules/module/viz/conf/includes.txt
  2. 48
      src-modules/module/viz/conf/viz.xml
  3. 10
      src-modules/module/viz/schluesseltabellen/customxmladd.sql
  4. 26
      src-modules/module/viz/schluesseltabellen/sx_repository_customxmladd.unl
  5. 6
      src-modules/module/viz/schluesseltabellen/sx_stylesheets_einfuegen.sql
  6. 688
      src-modules/module/viz/schluesseltabellen/viz_chart.unl
  7. 55
      src-modules/module/viz/schluesseltabellen/viz_chart_fuellen.sql
  8. 57
      src-modules/module/viz/schluesseltabellen/viz_chart_unload.x
  9. 4
      src-modules/module/viz/schluesseltabellen/viz_chart_upload.x
  10. 4
      superx/xml/js/viz/viz_assistent.js
  11. 141
      superx/xml/viz_components.xsl
  12. 5
      superx/xml/viz_html_chart.xsl
  13. 433
      superx/xml/viz_html_chart_viewer_mask_and_detailchart.xsl

1
src-modules/module/viz/conf/includes.txt

@ -73,6 +73,7 @@ xml/viz_html_chart_sankey.xsl @@ -73,6 +73,7 @@ xml/viz_html_chart_sankey.xsl
xml/viz_html_chart_viewer.xsl
xml/viz_html_chart_viewer_mask.xsl
xml/viz_html_chart_viewer_mask_and_table.xsl
xml/viz_html_chart_viewer_mask_and_detailchart.xsl
xml/viz_html_chart_viewer_grid.xsl
xml/viz_components.xsl
xml/viz_tableComponents.xsl

48
src-modules/module/viz/conf/viz.xml

@ -127,7 +127,6 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[VIZ]" /> @@ -127,7 +127,6 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[VIZ]" />
<column name="mask_params" type="TEXT" size="255" default="" notnull="" description="Maskenparameter" />
<column name="renderer_id" type="INTEGER" size="" default="" notnull="true" description="Renderer" isKey=""/>
<column name="chartmodel_miniature" type="TEXT" size="255" default="" notnull="" description="Quellcode des Diagramms (Miniatur)" />
<column name="chartmodel_detail" type="TEXT" size="255" default="" notnull="" description="Quellcode des Diagramms (Detail)" />
<column name="chart_position" type="CHAR" size="10" default="" notnull="" description="Position des Diagramms"><comment>CENTER,TOP,BOTTOM,LEFT,RIGHT,INLINE</comment></column>
<column name="chart_active" type="SMALLINT" size="2"
default="1" notnull="false" description="Grafik aktiv"></column>
@ -147,6 +146,8 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[VIZ]" /> @@ -147,6 +146,8 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[VIZ]" />
<column name="chart_class_name" type="VARCHAR" size="255" default="" notnull="" description="CSS-Klasse der Grafik" ><comment>für Größenangaben</comment></column>
<column name="chart_element_id" type="VARCHAR" size="255" default="" notnull="" description="HTML-Element-ID der Grafik" ><comment>für Javascript Interaktion</comment></column>
<column name="chart_title_position" type="VARCHAR" size="255" default="" notnull="" description="Position des Grafiktitels" ><comment>top,bottom,inline (also im Chart-Code selbst definiert)</comment></column>
<column name="detail_chart_id" type="INTEGER" size="255" default="" notnull="" description="Detailvisualisierung" ><comment>Visualisierung mit gleicher Datenquelle, z.B. Kreuztabelle unter eine Grafik</comment></column>
</columns>
<primaryKeys><rs>
<row>
@ -978,7 +979,37 @@ gueltig_bis DATE @@ -978,7 +979,37 @@ gueltig_bis DATE
version integer default 1
) ;"
scriptfile="" database=""/>
<nativeaction sql="create table tmp_viz_chart(
uniquename VARCHAR(255) not null,
caption VARCHAR(255) ,
description TEXT ,
chartmodel TEXT ,
preview_svg TEXT ,
userinfo_id INTEGER ,
creation_date DATE default today(),
update_date DATE default today(),
maskeninfo_id INTEGER ,
mask_params TEXT ,
renderer_id INTEGER ,
chartmodel_miniature TEXT ,
chart_position CHAR(10) ,
chart_active SMALLINT default 1 ,
chart_width varchar(255) default '600' ,
chart_height varchar(255) default '400' ,
chart_miniature_width varchar(255) default '200' ,
chart_miniature_height varchar(255) default '100' ,
is_custom SMALLINT,
js_handler varchar(255),
chart_card_class varchar(255),
chart_container_class varchar(255),
chart_container_id varchar(255),
chart_class_name varchar(255),
chart_element_id varchar(255),
chart_title_position varchar(255),
detail_chart_uniquename varchar(255)
)
;" scriptfile="" database=""/>
</action>
<action error="stop">
<loadtable refresh="true" delimiter="^" header="false" tabname="tmp_repository"><file path="$VIZ_PFAD/schluesseltabellen/sx_repository.unl"/></loadtable>
@ -994,7 +1025,7 @@ scriptfile="" database=""/> @@ -994,7 +1025,7 @@ scriptfile="" database=""/>
<loadtable refresh="true" delimiter="^" header="false" tabname="viz_property_renderer"><file path="$VIZ_PFAD/schluesseltabellen/viz_property_renderer.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="viz_property_group_renderer"><file path="$VIZ_PFAD/schluesseltabellen/viz_property_group_renderer.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="viz_type_property"><file path="$VIZ_PFAD/schluesseltabellen/viz_type_property.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="viz_chart"><file path="$VIZ_PFAD/schluesseltabellen/viz_chart.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="tmp_viz_chart"><file path="$VIZ_PFAD/schluesseltabellen/viz_chart.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="viz_staat_isocode"><file path="$VIZ_PFAD/schluesseltabellen/viz_staat_isocode.unl"/></loadtable>
</action>
<action error="stop">
@ -1005,6 +1036,7 @@ scriptfile="" database=""/> @@ -1005,6 +1036,7 @@ scriptfile="" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/sachgebiete_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/viz_colorscheme_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/sx_captions_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/viz_chart_fuellen.sql" database=""/>
@ -1146,7 +1178,6 @@ gueltig_bis DATE @@ -1146,7 +1178,6 @@ gueltig_bis DATE
) ;"
scriptfile="" database=""/>
<nativeaction sql="create table tmp_viz_chart(
tid SERIAL not null,
uniquename VARCHAR(255) not null,
caption VARCHAR(255) ,
description TEXT ,
@ -1166,7 +1197,14 @@ chart_height varchar(255) default '400' , @@ -1166,7 +1197,14 @@ chart_height varchar(255) default '400' ,
chart_miniature_width varchar(255) default '200' ,
chart_miniature_height varchar(255) default '100' ,
is_custom SMALLINT,
js_handler varchar(255)
js_handler varchar(255),
chart_card_class varchar(255),
chart_container_class varchar(255),
chart_container_id varchar(255),
chart_class_name varchar(255),
chart_element_id varchar(255),
chart_title_position varchar(255),
detail_chart_uniquename varchar(255)
)
;" scriptfile="" database=""/>
@ -1213,6 +1251,7 @@ booklet_stylesheet VARCHAR(255) @@ -1213,6 +1251,7 @@ booklet_stylesheet VARCHAR(255)
<loadtable refresh="true" delimiter="^" header="false" tabname="viz_staat_isocode"><file path="$VIZ_PFAD/schluesseltabellen/viz_staat_isocode.unl"/></loadtable>
</action>
<action error="stop">
<nativeaction sql="" scriptfile="$VIZ_PFAD/upgrade/viz_upgrade_man.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/sx_repository_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/fm_templates_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/viz_colorscheme_fuellen.sql" database=""/>
@ -1222,7 +1261,6 @@ booklet_stylesheet VARCHAR(255) @@ -1222,7 +1261,6 @@ booklet_stylesheet VARCHAR(255)
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/konstanten_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/sachgebiete_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/upgrade/viz_upgrade_man.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/viz_properties_plot_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/viz_properties_plot_line_bar_boxplot_fuellen.sql" database=""/>

10
src-modules/module/viz/schluesseltabellen/customxmladd.sql

@ -135,10 +135,12 @@ V.chart_container_class, @@ -135,10 +135,12 @@ V.chart_container_class,
V.chart_container_id,
V.chart_class_name,
V.chart_element_id,
V.chart_title_position
FROM viz_chart V, viz_renderer R
V.chart_title_position,
V.detail_chart_id,
V2.uniquename as detail_chart_uniquename
FROM viz_renderer R,viz_chart V left outer join viz_chart V2 on (V2.tid=V.detail_chart_id and V2.chart_active=1)
where R.tid=V.renderer_id
and chart_active=1
and V.chart_active=1
order by 3
;
</sqlvar>
@ -326,6 +328,8 @@ order by 2,5,3 @@ -326,6 +328,8 @@ order by 2,5,3
chart_class_name="${ch.chart_class_name}"
chart_element_id="${ch.chart_element_id}"
chart_title_position="${ch.chart_title_position}"
detail_chart_id="${ch.detail_chart_id}"
detail_chart_uniquename="${ch.detail_chart_uniquename}"
/>
</#foreach>
</#if>

26
src-modules/module/viz/schluesseltabellen/sx_repository_customxmladd.unl

@ -128,10 +128,19 @@ V.chart_width,\ @@ -128,10 +128,19 @@ V.chart_width,\
V.chart_height,\
V.chart_miniature_width,\
V.chart_miniature_height,\
V.maskeninfo_id\
FROM viz_chart V, viz_renderer R\
V.maskeninfo_id,\
V.js_handler,\
V.chart_card_class,\
V.chart_container_class,\
V.chart_container_id,\
V.chart_class_name,\
V.chart_element_id,\
V.chart_title_position,\
V.detail_chart_id,\
V2.uniquename as detail_chart_uniquename\
FROM viz_renderer R,viz_chart V left outer join viz_chart V2 on (V2.tid=V.detail_chart_id and V2.chart_active=1) \
where R.tid=V.renderer_id\
and chart_active=1\
and V.chart_active=1\
order by 3\
;\
</sqlvar>\
@ -160,7 +169,7 @@ R.uniquename as renderer_uniquename,\ @@ -160,7 +169,7 @@ R.uniquename as renderer_uniquename,\
R.tid as renderer_id,\
P.tid as prop_tid,\
P.prop_uniquename,\
(select min(P2.prop_uniquename) from viz_property P2\
(select P2.prop_uniquename from viz_property P2\
where P2.tid=N.parent_property_id) as parent_property_uniquename,\
N.sortnr,\
N.is_mandatory\
@ -312,6 +321,15 @@ order by 2,5,3\ @@ -312,6 +321,15 @@ order by 2,5,3\
chart_miniature_width="${ch.chart_width}"\
chart_miniature_height="${ch.chart_height}"\
maskeninfo_id="${ch.maskeninfo_id}"\
js_handler="${ch.js_handler}" \
chart_card_class="${ch.chart_card_class}"\
chart_container_class="${ch.chart_container_class}"\
chart_container_id="${ch.chart_container_id}"\
chart_class_name="${ch.chart_class_name}"\
chart_element_id="${ch.chart_element_id}"\
chart_title_position="${ch.chart_title_position}"\
detail_chart_id="${ch.detail_chart_id}"\
detail_chart_uniquename="${ch.detail_chart_uniquename}"\
/>\
</#foreach>\
</#if>\

6
src-modules/module/viz/schluesseltabellen/sx_stylesheets_einfuegen.sql

@ -43,7 +43,7 @@ @@ -43,7 +43,7 @@
{"mask":"44570", "filename":"viz_html_chart_viewer.xsl", "ord":"1"},
{"mask":"44570", "filename":"viz_html_chart_viewer_mask.xsl", "ord":"30"},
{"mask":"44570", "filename":"viz_html_chart_viewer_mask_and_table.xsl", "ord":"40"},
{"mask":"44570", "filename":"viz_html_chart_viewer_mask_and_tablechart.xsl", "ord":"50"},
{"mask":"44570", "filename":"viz_html_chart_viewer_mask_and_detailchart.xsl", "ord":"50"},
{"mask":"44600", "filename":"tabelle_html_datenblatt.xsl", "ord":"10"},
{"mask":"44600", "filename":"viz_html_chart_viewer.xsl", "ord":"1"},
@ -139,9 +139,9 @@ @@ -139,9 +139,9 @@
"stylesheet_type":"XSL",
"jr_datasource":""
},
{"filename":"viz_html_chart_viewer_mask_and_tablechart.xsl",
{"filename":"viz_html_chart_viewer_mask_and_detailchart.xsl",
"caption":"Diagramm, dynamische Tabelle + Maskenfelder",
"description":"Viewer-Stylesheet für VIZ Charts mit dynamischer Tabelle und Maskenfeldern",
"description":"Viewer-Stylesheet für VIZ Charts mit zusätzlichem Detailchart und Maskenfeldern",
"relation":"table",
"contenttype":"text/html",
"is_generic":"0",

688
src-modules/module/viz/schluesseltabellen/viz_chart.unl

File diff suppressed because one or more lines are too long

55
src-modules/module/viz/schluesseltabellen/viz_chart_fuellen.sql

@ -46,8 +46,39 @@ where uniquename in ( @@ -46,8 +46,39 @@ where uniquename in (
'STUD_ZEITR_BAR_LINE_DOT',
'STUD_ZEITR_BAR_LINE_DOT_TEXT');
delete from viz_chart where uniquename in (select uniquename from tmp_viz_chart)
and is_custom=0;
alter table tmp_viz_chart add column ist_neu smallint default 0,
add column detail_chart_id integer ;
update viz_chart V set chartmodel=T.chartmodel,
preview_svg=T.preview_svg,
userinfo_id=T.userinfo_id,
creation_date=T.creation_date,
update_date=T.update_date,
maskeninfo_id=T.maskeninfo_id,
mask_params=T.mask_params,
renderer_id=T.renderer_id,
chartmodel_miniature=T.chartmodel_miniature,
chart_position=T.chart_position,
chart_active=T.chart_active,
chart_width=T.chart_width,
chart_height=T.chart_height,
chart_miniature_width=T.chart_miniature_width,
chart_miniature_height=T.chart_miniature_height,
is_custom=T.is_custom,
js_handler=T.js_handler,
chart_card_class=T.chart_card_class,
chart_container_class=T.chart_container_class,
chart_container_id=T.chart_container_id,
chart_class_name=T.chart_class_name,
chart_element_id=T.chart_element_id,
chart_title_position=T.chart_title_position
from tmp_viz_chart T
where V.uniquename=T.uniquename
and V.uniquename in (select T2.uniquename from tmp_viz_chart T2);
update tmp_viz_chart T set ist_neu=1
where not exists (select V.uniquename from viz_chart V
where V.uniquename=T.uniquename);
select sp_update_sequence('viz_chart');
@ -77,7 +108,8 @@ uniquename, @@ -77,7 +108,8 @@ uniquename,
chart_container_id,
chart_class_name,
chart_element_id,
chart_title_position)
chart_title_position,
detail_chart_id)
select
uniquename,
@ -105,9 +137,22 @@ uniquename, @@ -105,9 +137,22 @@ uniquename,
chart_container_id,
chart_class_name,
chart_element_id,
chart_title_position
chart_title_position,
detail_chart_id
FROM tmp_viz_chart
where is_custom=0;
where ist_neu=1;
update tmp_viz_chart T set detail_chart_id=V.tid
from viz_chart V
where V.uniquename=T.detail_chart_uniquename;
update viz_chart V set detail_chart_id=T.detail_chart_id
from tmp_viz_chart T
where T.uniquename =V.uniquename;
drop table tmp_viz_chart;

57
src-modules/module/viz/schluesseltabellen/viz_chart_unload.x

@ -1,33 +1,34 @@ @@ -1,33 +1,34 @@
#!/bin/bash
#entlädt nur die charts, die Teil der Auslieferung sind:
DOQUERY "select tid,
uniquename,
caption,
description,
chartmodel,
preview_svg,
userinfo_id,
creation_date,
update_date,
maskeninfo_id,
mask_params,
renderer_id,
chartmodel_miniature,
chart_position,
chart_active,
chart_width,
chart_height,
chart_miniature_width,
chart_miniature_height,
is_custom,
js_handler ,
chart_card_class,
chart_container_class,
chart_container_id,
chart_class_name,
chart_element_id,
chart_title_position
from viz_chart where is_custom=0 order by uniquename" false ^ viz_chart.unl txt
DOQUERY "select
V.uniquename,
V.caption,
V.description,
V.chartmodel,
V.preview_svg,
V.userinfo_id,
V.creation_date,
V.update_date,
V.maskeninfo_id,
V.mask_params,
V.renderer_id,
V.chartmodel_miniature,
V.chart_position,
V.chart_active,
V.chart_width,
V.chart_height,
V.chart_miniature_width,
V.chart_miniature_height,
V.is_custom,
V.js_handler ,
V.chart_card_class,
V.chart_container_class,
V.chart_container_id,
V.chart_class_name,
V.chart_element_id,
V.chart_title_position,
V2.uniquename as detail_chart_uniquename
from viz_chart V left outer join viz_chart V2 on (V2.tid=V.detail_chart_id) where V.is_custom=0 order by V.uniquename" false ^ viz_chart.unl txt

4
src-modules/module/viz/schluesseltabellen/viz_chart_upload.x

@ -3,7 +3,6 @@ @@ -3,7 +3,6 @@
DOQUERY "drop table if exists tmp_viz_chart ;"
DOQUERY "create table tmp_viz_chart(
tid SERIAL not null,
uniquename VARCHAR(255) not null,
caption VARCHAR(255) ,
description TEXT ,
@ -29,7 +28,8 @@ chart_container_class VARCHAR(255) , @@ -29,7 +28,8 @@ chart_container_class VARCHAR(255) ,
chart_container_id VARCHAR(255) ,
chart_class_name VARCHAR(255) ,
chart_element_id VARCHAR(255) ,
chart_title_position VARCHAR(255)
chart_title_position VARCHAR(255) ,
detail_chart_uniquename VARCHAR(255)
)
;"

4
superx/xml/js/viz/viz_assistent.js

@ -656,7 +656,7 @@ function resetChartPropertiesForm(chosenRenderer) @@ -656,7 +656,7 @@ function resetChartPropertiesForm(chosenRenderer)
myChartModel=new chartModel(1,"",document.getElementById("fldVizRenderer").value,rsTableMetaData);
renderChart('chartDiv',myChartModel);
//Show Plot Code if renderer =plot:
var myDiv=document.getElementById("chartCodeDiv");
/*var myDiv=document.getElementById("chartCodeDiv");
if(chosenRenderer=="plot" || chosenRenderer=="echarts")
myDiv.style.display="block";
else
@ -666,7 +666,7 @@ function resetChartPropertiesForm(chosenRenderer) @@ -666,7 +666,7 @@ function resetChartPropertiesForm(chosenRenderer)
document.getElementById("fldChartTypeSelection").style="display:block;";
else
document.getElementById("fldChartTypeSelection").style="display:none;";
*/
createChartElementConfig1Form(chosenRenderer,null);
return true;
}

141
superx/xml/viz_components.xsl

@ -663,18 +663,90 @@ var myChartModelStr=""; @@ -663,18 +663,90 @@ var myChartModelStr="";
var myDiv="";
var rsNr=0;
]]></xsl:text>
<xsl:choose>
<xsl:when test="count(/ergebnisse/ergebnis/ergebniselement[@id='44750'])=100">
<!--TODO: DashboardMakro-->
<xsl:for-each select="/ergebnisse/ergebnis/ergebniselement[@id='44750']/sqlerg/row">
<xsl:variable name="ergebniselement_nr" select="col[f_name='sortnr']/wert" />
<xsl:variable name="chart_uniquename" select="col[f_name='hiddenchart_uniquename']/wert" />
<xsl:variable name="chart_title" select="col[f_name='caption']/wert" />
<xsl:variable name="ergebniselement_ordnr" select="col[f_name='hiddendatasource']/wert" />
<xsl:call-template name="buildchartDivRenderers">
<xsl:with-param name="chart_uniquename" select="$chart_uniquename" />
<xsl:with-param name="chart_title" select="$chart_title" />
<xsl:with-param name="chartDiv" select="concat('chartDiv',$ergebniselement_nr)" />
<xsl:with-param name="ergebniselement_ordnr" select="$ergebniselement_ordnr" />
</xsl:call-template>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<!--TODO: kein Dashboard Makro:-->
<xsl:for-each select="ergebnisse">
<xsl:for-each select="ergebnis/ergebniselement">
<xsl:variable name="chart_uniquename"><xsl:value-of select="../felder/feld[@varname='Grafik']/value" /></xsl:variable>
<xsl:variable name="chart_title"><xsl:value-of select="../felder/feld[@varname='Grafiktitel']/value" /></xsl:variable>
<xsl:variable name="ergebniselement_ordnr"><xsl:value-of select="@ordnr" /></xsl:variable>
<xsl:call-template name="buildchartDivRenderers">
<xsl:with-param name="chart_uniquename" select="$chart_uniquename" />
<xsl:with-param name="chart_title" select="$chart_title" />
<xsl:with-param name="chartDiv" select="concat('chartDiv',$ergebniselement_ordnr)" />
<xsl:with-param name="ergebniselement_ordnr" select="$ergebniselement_ordnr" />
</xsl:call-template>
</xsl:for-each>
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>
<xsl:text><![CDATA[
}
function createChartsViewer(chartModel,chartDiv,rsNr,myRenderer,chartTitle)
{
if(myRenderer=="echarts")
{
renderEChart2(chartModel,chartDiv,rsNr,chartTitle);
}
else if(myRenderer=="viz")
{
renderVizBaseTools(chartModel,chartDiv,rsNr,chartTitle);
}
else
{
//d3js or plot:
//myChartModel=JSON.parse(myChartModelStr);
renderPlotD3Chart(chartDiv,chartModel,rsNr);
}
}
function toggleLegendeDisplay(legendeDiv)
{
var myDiv=document.getElementById(legendeDiv);
if(myDiv.style.display=="block")
myDiv.style.display="none";
else
myDiv.style.display="block";
}
]]></xsl:text>
</script>
</xsl:template>
<xsl:template name="buildchartDivRenderers">
<xsl:param name="chart_uniquename" />
<xsl:param name="chart_title" />
<xsl:param name="chartDiv" select="'chartDiv0'" />
<xsl:param name="ergebniselement_ordnr" select="0" />
<xsl:if test="$chart_uniquename != ''">
<xsl:text>
var myRenderer='</xsl:text>
<xsl:value-of select="viz_charts/viz_chart[@uniquename=$chart_uniquename]/@renderer" />
<xsl:text>';
myDiv="</xsl:text>
<xsl:value-of select="concat('chartDiv',$ergebniselement_ordnr)" />
<xsl:value-of select="$chartDiv" />
<xsl:text><![CDATA[";
rsNr=]]></xsl:text>
<xsl:value-of select="$ergebniselement_ordnr" />
@ -687,7 +759,7 @@ chartTitle="]]></xsl:text> @@ -687,7 +759,7 @@ chartTitle="]]></xsl:text>
<xsl:when test="viz_charts/viz_chart[@uniquename=$chart_uniquename]/@js_handler !=''">
<xsl:text>
render_</xsl:text><xsl:value-of select="$chart_uniquename" /><xsl:text>("</xsl:text>
<xsl:value-of select="concat('chartDiv',$ergebniselement_ordnr)" />
<xsl:value-of select="$chartDiv" />
<xsl:text>",rsNr,chartTitle);
</xsl:text>
</xsl:when>
@ -710,42 +782,6 @@ createChartsViewer(myChartModel,myDiv,rsNr,myRenderer,chartTitle); @@ -710,42 +782,6 @@ createChartsViewer(myChartModel,myDiv,rsNr,myRenderer,chartTitle);
</xsl:choose>
</xsl:if>
</xsl:for-each>
</xsl:for-each>
<xsl:text><![CDATA[
}
function createChartsViewer(chartModel,chartDiv,rsNr,myRenderer,chartTitle)
{
if(myRenderer=="echarts")
{
renderEChart2(chartModel,chartDiv,rsNr,chartTitle);
}
else if(myRenderer=="viz")
{
renderVizBaseTools(chartModel,chartDiv,rsNr,chartTitle);
}
else
{
//d3js or plot:
//myChartModel=JSON.parse(myChartModelStr);
renderPlotD3Chart(chartDiv,chartModel,rsNr);
}
}
function toggleLegendeDisplay(legendeDiv)
{
var myDiv=document.getElementById(legendeDiv);
if(myDiv.style.display=="block")
myDiv.style.display="none";
else
myDiv.style.display="block";
}
]]></xsl:text>
</script>
</xsl:template>
<xsl:template name="buildVizMetadata">
<xsl:param name="fillChartModel" select="'true'" />
@ -872,7 +908,7 @@ rsColumnMetaData[</xsl:text><xsl:value-of select="$tableId"/><xsl:text>].push(ne @@ -872,7 +908,7 @@ rsColumnMetaData[</xsl:text><xsl:value-of select="$tableId"/><xsl:text>].push(ne
<xsl:text>,'rownr','Zeilennr.',0,4));
</xsl:text>
<xsl:variable name="headersCount" select="sqlerg/complete_headers/header" />
<xsl:variable name="headersCount" select="sqlerg/complete_headers/@count" />
<xsl:for-each select="sqlerg/complete_headers/header">
<xsl:variable name="rownr">
<xsl:value-of select="position()"/>
@ -1158,7 +1194,7 @@ Stand: <xsl:value-of select="../stand" /></p> @@ -1158,7 +1194,7 @@ Stand: <xsl:value-of select="../stand" /></p>
<xsl:template name="viz_viewer_grid">
<xsl:param name="openModalCardDetail" select="'true'" />
<xsl:param name="openModalCardDetail" select="'1'" />
<!-- Variableninitialisierung fürs Dashboard:
-->
<xsl:variable name="spalten_anz">
@ -1229,8 +1265,10 @@ Stand: <xsl:value-of select="../stand" /></p> @@ -1229,8 +1265,10 @@ Stand: <xsl:value-of select="../stand" /></p>
<xsl:template name="viz_viewer_grid_cells">
<xsl:param name="kachelbreite" select="800"/>
<xsl:param name="kachelhoehe" select="600"/>
<xsl:param name="openModalCardDetail" select="'true'" />
<xsl:param name="openModalCardDetail" select="'1'" />
<xsl:choose>
<xsl:when test="count(/ergebnisse/ergebnis/ergebniselement[@id='44750'])=100">
<!--TODO: Dashboard Makro:-->
<xsl:for-each select="ergebnisse/ergebnis/ergebniselement[@id='44750']/sqlerg/row">
<xsl:variable name="ergebniselement_nr" select="col[f_name='sortnr']/wert" />
<xsl:variable name="chart_uniquename" select="col[f_name='hiddenchart_uniquename']/wert" />
@ -1240,6 +1278,19 @@ Stand: <xsl:value-of select="../stand" /></p> @@ -1240,6 +1278,19 @@ Stand: <xsl:value-of select="../stand" /></p>
<xsl:variable name="link_chart_uniquename"><xsl:value-of select="col[f_name='hiddenlink_chart_uniquename']/wert" /></xsl:variable>
<xsl:variable name="link_tablestylesheet"><xsl:value-of select="col[f_name='hiddenlink_tablestylesheet']/wert" /></xsl:variable>
<xsl:variable name="open_modal_card_detail"><xsl:value-of select="col[f_name='hiddenopen_modal_card_detail']/wert" /></xsl:variable>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:for-each select="ergebnisse/ergebnis[felder/feld[@varname='Grafik']/value!='']/ergebniselement">
<xsl:variable name="ergebniselement_counter" select="position()" />
<xsl:variable name="chart_uniquename"><xsl:value-of select="../felder/feld[@varname='Grafik']/value" /></xsl:variable>
<xsl:variable name="ergebniselement_ordnr"><xsl:value-of select="@ordnr" /></xsl:variable>
<xsl:variable name="caption" select="../felder/feld[@varname='Grafik']/value_caption" />
<xsl:variable name="link_maskennummer"><xsl:value-of select="@id" /></xsl:variable>
<xsl:variable name="link_chart_uniquename"><xsl:value-of select="../felder/feld[@varname='Grafik']/value" /></xsl:variable>
<xsl:variable name="link_tablestylesheet"><xsl:value-of select="'viz_html_chart_viewer_mask_and_detailchart.xsl'" /></xsl:variable>
<xsl:variable name="open_modal_card_detail"><xsl:value-of select="$openModalCardDetail" /></xsl:variable>
<!--<p><xsl:value-of select="concat('Zähler: ',$ergebniselement_counter)"/></p>-->
@ -1267,6 +1318,8 @@ Stand: <xsl:value-of select="../stand" /></p> @@ -1267,6 +1318,8 @@ Stand: <xsl:value-of select="../stand" /></p>
<!--<p><xsl:value-of select="concat($spalten_anz,'-',$ergebniselement_counter,':',$ergebniselement_counter mod $spalten_anz)"/></p>-->
</div>
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="viewer_kachel">
@ -1279,7 +1332,7 @@ Stand: <xsl:value-of select="../stand" /></p> @@ -1279,7 +1332,7 @@ Stand: <xsl:value-of select="../stand" /></p>
<xsl:param name="chart_tid" />
<xsl:param name="link_tablestylesheet" select="'viz_html_chart_viewer_mask_and_table.xsl'"/>
<xsl:param name="showEdit" select="'false'" />
<xsl:param name="openModalCardDetail" select="'true'" />
<xsl:param name="openModalCardDetail" select="'1'" />
<xsl:param name="chart_card_class" select="'card is-shady'" />
<xsl:param name="chart_container_class" select="'card-image'" />
<xsl:param name="chart_container_id" select="concat('cardImage',$ergebniselement_ordnr)" />
@ -1310,7 +1363,7 @@ Stand: <xsl:value-of select="../stand" /></p> @@ -1310,7 +1363,7 @@ Stand: <xsl:value-of select="../stand" /></p>
<div class="{$chart_container_class}" id="{$chart_container_id}">
<!--zum Debuggen: <a onClick="initPage()">Anzeigen</a><br />-->
<xsl:choose>
<xsl:when test="$openModalCardDetail='true'">
<xsl:when test="$openModalCardDetail='1'">
<a onClick="{concat('javascript:openModalCardDetail(',$ergebniselement_ordnr,');')}">
<div id="{$chart_element_id}">

5
superx/xml/viz_html_chart.xsl

@ -41,8 +41,9 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:HtmlUtils="de.superx.util @@ -41,8 +41,9 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:HtmlUtils="de.superx.util
<link rel="stylesheet" href="../style/sx_tabelle.css" />
<link rel="stylesheet" href="../style/sx_treeform.css" />
<link rel="stylesheet" href="../style/sx_viz_muster.css" />
<!--<link rel="stylesheet" href="../style/superx.css" />-->
</head>
<xsl:call-template name="nd_htmlscript" />
<xsl:call-template name="nd_tableJavascript" />
@ -224,7 +225,7 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:HtmlUtils="de.superx.util @@ -224,7 +225,7 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:HtmlUtils="de.superx.util
<label class="label is-required is-small"><strong>Datentabelle</strong></label>
</div>
<a onClick="exportDataTable(rs[0],rsColumnMetaData[0])">EXPORT</a>
<!--<a onClick="exportDataTable(rs[0],rsColumnMetaData[0])">EXPORT</a>-->
<span class="separator">&#160;</span>
<span class="separator">&#160;</span>

433
superx/xml/viz_html_chart_viewer_mask_and_detailchart.xsl

@ -0,0 +1,433 @@ @@ -0,0 +1,433 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:HtmlUtils="de.superx.util.HtmlUtils">
<xsl:import href="resultset_html.xsl" />
<xsl:import href="interLinks_html.xsl" />
<xsl:import href="nd_templates.xsl" />
<xsl:import href="pageComponents_html.xsl" />
<xsl:import href="viz_components.xsl" />
<!--In diesem Stylesheet können Sie individuelle templates unterbringen,
die in ihrer Präzedenz das normale Stylesheet
pageComponents_html.xsl überragt. -->
<xsl:import href="pageComponents_html_final.xsl" />
<xsl:decimal-format name="German" grouping-separator="." NaN="" zero-digit ="0" decimal-separator="," />
<!-- wichtig für DOJO!-->
<xsl:output method="xml" media-type="text/html" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
doctype-system="DTD/xhtml1-strict.dtd" cdata-section-elements="script style" indent="yes" encoding="UTF-8"/>
<xsl:variable name="colon"><xsl:text>'</xsl:text></xsl:variable>
<xsl:variable name="quote"><xsl:text>"</xsl:text></xsl:variable>
<!--<xsl:variable name="defaultRenderer" select="'echarts'" />
<xsl:variable name="availableRendererPlot" select="'true'" />
<xsl:variable name="availableRendererD3" select="'true'" />
-->
<xsl:template match="/">
<xsl:variable name="maskenname">
<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/maskenname" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<html>
<head>
<xsl:call-template name="nd_htmlhead">
<xsl:with-param name="title" select="concat('Tabelle ',$maskenname)" />
</xsl:call-template>
<xsl:call-template name="viz_html_chart_viewer_css" />
</head>
<xsl:call-template name="nd_htmlscript" />
<xsl:call-template name="nd_tableJavascript" />
<xsl:call-template name="nd_tableCSS" />
<!--<xsl:call-template name="vizTableCSS" />-->
<xsl:call-template name="importVizViewer"></xsl:call-template>
<script language="javascript">
<xsl:text>
function showDataTable(targetDiv)
{
var myChartModelStr="";
var myDiv=targetDiv;
var rsNr=0;
</xsl:text>
<xsl:for-each select="/ergebnisse/ergebnis/ergebniselement[@ordnr='0']">
<xsl:variable name="chart_uniquename"><xsl:value-of select="../felder/feld[@varname='Grafik']/value" /></xsl:variable>
<xsl:variable name="detail_chart_uniquename"><xsl:value-of select="viz_charts/viz_chart[@uniquename=$chart_uniquename]/@detail_chart_uniquename" /></xsl:variable>
<xsl:text>
// chart_uniquename=</xsl:text><xsl:value-of select="$chart_uniquename"/><xsl:text>
// detail_chart_uniquename=</xsl:text><xsl:value-of select="$detail_chart_uniquename"/><xsl:text>
</xsl:text>
<xsl:call-template name="buildchartDivRenderers">
<xsl:with-param name="chart_uniquename" select="viz_charts/viz_chart[@uniquename=$chart_uniquename]/@detail_chart_uniquename" />
<xsl:with-param name="chartDiv" select="'chartDiv1'" />
<xsl:with-param name="ergebniselement_ordnr" select="0" />
</xsl:call-template>
</xsl:for-each>
<xsl:text>
}
</xsl:text>
</script>
<body class="has-navbar-fixed-top" onload="document.getElementById('progressbar').style.display='none';initPage();showDataTable('chartDiv1');">
<!--#Template Beginn Top-Navigation-->
<xsl:call-template name="viz_navi_top" />
<!--<xsl:call-template name="ude_header_dashboard" />-->
<!--#Template Ende Top-Navigation-->
<div class="columns">
<!--#Template Beginn Navigations-Panel Auswertungen-->
<xsl:if test="/ergebnisse/@showNavigation='true' and 1=0"><!-- erstmal kein Panel,weil der Asssistent schon recht breit ist -->
<xsl:for-each select="/ergebnisse">
<xsl:call-template name="nd_navi_panel" />
</xsl:for-each>
</xsl:if>
<!--#Template Ende Navigations-Panel Auswertungen-->
<!--Beginn Seitentitel, Krümelpfad, Knopfleiste, Legende, Erläuterung-->
<section class="hero-body">
<div class="container">
<!--<div class="columns is-mobile is-left">
<div class="column is-full">-->
<div class="card ">
<div class="card-content">
<xsl:call-template name="nd_progressbar" />
<xsl:variable name="chartCollapsibleHeading">
<xsl:call-template name="getChartCollapsibleHeading" />
</xsl:variable>
<xsl:call-template name="viz_viewer_columnwise">
<xsl:with-param name="chartCollapsibleHeading" select="$chartCollapsibleHeading" />
</xsl:call-template>
<xsl:call-template name="bottombar" />
<xsl:comment>customfooter</xsl:comment>
</div> <!--Ende content -->
</div> <!--Ende card-content-->
<!--</div>--> <!--Ende card-background -->
<!--</div>--> <!--Ende column-->
</div> <!--Ende container-->
</section> <!--Ende hero = Berichts-Card-->
</div> <!--Ende site-columns-->
<xsl:call-template name="modalCards" />
</body>
<!-- end body -->
</html>
</xsl:template>
<!-- end main -->
<xsl:template name="viz_viewer_columnwise">
<xsl:param name="chartCollapsibleHeading" select="''" />
<xsl:if test="/ergebnisse/@isMakro='true'">
<p class="cockpit_title"><xsl:value-of select="/ergebnisse/makro/name" /></p>
</xsl:if>
<p></p>
<xsl:call-template name="buildVizMetadata" />
<!-- end Kopf-->
<!-- start Grafiken-->
<span class="separator">&#160;</span>
<!--Beginn Selektions-Card-->
<!--Beginn Berichtstitel, Pfad, Knopfleiste-->
<section class="hero-body">
<section class="container"> <!--Beginn Kartenreihe -->
<div class="columns features is-mobile is-left"> <!--Beginn columns Kartenreihe -->
<div class="column is-two-thirds">
<xsl:for-each select="ergebnisse/ergebnis[felder/feld[@varname='Grafik']/value!='']/ergebniselement">
<xsl:variable name="ergebniselement_counter" select="position()" />
<xsl:variable name="chart_uniquename"><xsl:value-of select="../felder/feld[@varname='Grafik']/value" /></xsl:variable>
<xsl:variable name="ergebniselement_ordnr"><xsl:value-of select="@ordnr" /></xsl:variable>
<xsl:if test="$chartCollapsibleHeading !=''">
<p class="teiltabelle_titel" style="font-size:3em;">
<xsl:value-of select="concat($chartCollapsibleHeading,' ')"/><a onclick="{concat('toggleTableVisibility(',$colon,'toggleBtnChart',@ordnr+1, $colon,',',$colon, 'cardImage',@ordnr,$colon,');')}"> <img id="{concat('toggleBtnChart',@ordnr+1)}" src="../images/minus-circled.svg" height="20px" style="height:20px" border="0" /></a>
</p>
</xsl:if>
<!--<p><xsl:value-of select="concat('Zähler: ',$ergebniselement_counter)"/></p>-->
<xsl:call-template name="viewer_kachel">
<xsl:with-param name="caption" select="viz_charts/viz_chart[@uniquename=$chart_uniquename]/@caption"/>
<xsl:with-param name="ergebniselement_ordnr" select="$ergebniselement_ordnr" />
<xsl:with-param name="kachelbreite" select="viz_charts/viz_chart[@uniquename=$chart_uniquename]/@chart_width"/>
<xsl:with-param name="kachelhoehe" select="viz_charts/viz_chart[@uniquename=$chart_uniquename]/@chart_height"/>
<xsl:with-param name="chart_tid" select="viz_charts/viz_chart[@uniquename=$chart_uniquename]/@tid"/>
<xsl:with-param name="showEdit" select="/ergebnisse/user/@admin" />
<xsl:with-param name="openModalCardDetail" select="'false'" />
</xsl:call-template>
<!--<p><xsl:value-of select="concat($spalten_anz,'-',$ergebniselement_counter,':',$ergebniselement_counter mod $spalten_anz)"/></p>-->
</xsl:for-each>
<xsl:call-template name="displayTables" />
</div>
<xsl:call-template name="vizSidebar" />
<!--<div class="column">
<xsl:if test="count(/ergebnisse/ergebnis[@ordnr='0']/completefields/feld[@art='1']) &gt; 0">
<xsl:call-template name="renderTableDialogs" />
</xsl:if>
</div>--><!--Ende column-->
</div> <!--Ende hero-columns-->
</section>
</section><!-- des Portals -->
</xsl:template>
<xsl:template name="ude_header_dashboard_alt">
<header>
<div class="hs_header">
<div class="hs_header_box1"></div>
<div class="hs_header_box2">
<a class="button is-link is-outlined is-small" onclick="alert('todo');">Studienanfänger*innen</a>
<a class="button is-link is-outlined is-small" onclick="alert('todo');">Studierende</a>
<a class="button is-link is-outlined is-small" onclick="alert('todo');">Absolvent*innen</a>
<a class="button is-link is-outlined is-small" onclick="alert('todo');">Doktorand*innen</a>
<!--<p class="cockpit_title">Universität Duisburg-Essen</p>-->
<div class="field"><span class="buttonlist">
<a onmouseover="window.status='Export starten';return true" onfocus="window.status='Download starten';return true" onmouseout="window.status='Download starten';return true" href="javascript:exportBooklet('application/pdf')">
<img title="Ausgabe im PDF-Querformat" alt="Ausgabe im PDF-Querformat" src="../images/icons/into_pdf.svg" class="svg_icon" border="0" /></a>
<span class="separator">&#160;</span>
<a onmouseover="window.status='Export starten';return true" onfocus="window.status='Download starten';return true" onmouseout="window.status='Download starten';return true" href="javascript:exportBooklet('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet')">
<img title="Ausgabe in Excel" alt="Ausgabe in Excel" src="../images/icons/into_excel_normal.svg" class="svg_icon" border="0" /></a>
<span class="separator">&#160;</span>
<a onmouseover="window.status='Export starten';return true" onfocus="window.status='Download starten';return true" onmouseout="window.status='Download starten';return true" href="javascript:exportBooklet('application/vnd.openxmlformats-officedocument.wordprocessingml.document')">
<img title="Ausgabe in Word" alt="Ausgabe in Word" width="25px" height="25px" src="../images/icons/into_word.svg" class="svg_icon" border="0" /></a>
</span>
</div>
<a href="https://www.uni-due.de/verwaltung/dtac/akademisches_controlling.php">
<figure class="image is-64x64"><img src="../images/signet_ude_rgb.svg" title="UDE. Akademisches Controlling" /></figure></a>
</div>
<div class="hs_header_box1"></div>
</div>
</header>
</xsl:template>
<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/maskenname" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!--<xsl:call-template name="navigationsmenue" />-->
<script language="Javascript">
<xsl:text>
var vizInitialName='</xsl:text><xsl:value-of select="$vizInitialName"/><xsl:text>';
function dataRowMetaData(tableId,nr,colname,colcaption,coltype,colfunction)
{
this.tableId=tableId;
this.nr=nr;
this.colname=colname;
this.colcaption=colcaption;
this.coltype=coltype;
this.colfunction=colfunction;
}
function tableMetaData(nr,value,name,isDefault)
{
this.value=value;
this.nr=nr;
this.name=name
this.isDefault=isDefault;
}
var rsTableMetaData=new Array();
var rsColumnMetaData=new Array();
var rs=new Array();
</xsl:text>
</script>
<xsl:for-each select="/ergebnisse/ergebnis/ergebniselement">
<xsl:call-template name="buildVizData" >
<xsl:with-param name="tableId" select="@ordnr" />
</xsl:call-template>
</xsl:for-each>
</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="position()"/>
<xsl:text>,'</xsl:text>
<xsl:value-of select="$tableId"/>
<xsl:text>','</xsl:text>
<xsl:value-of select="concat('Tab. ',$tableId+1)"/>
<xsl:text>',
</xsl:text>
<xsl:choose>
<xsl:when test="position()=1">
<xsl:text>true</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>false</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:text>
));
rs[</xsl:text><xsl:value-of select="$tableId"/><xsl:text>]=new Array();
//var myChartModel=new chartModel(1,"","",rsTableMetaData);
function dataRow_</xsl:text><xsl:value-of select="$tableId"/><xsl:text>(rownr</xsl:text>
<xsl:for-each select="sqlerg/complete_headers/header">
<xsl:text>,</xsl:text>
<xsl:call-template name="getColumnNameJS">
<xsl:with-param name="columnNameFromDB" select="f_name"/>
</xsl:call-template>
</xsl:for-each>
<xsl:text>
)
{
this.rownr=rownr;
</xsl:text>
<xsl:for-each select="sqlerg/complete_headers/header">
<xsl:text>this.</xsl:text><xsl:call-template name="getColumnNameJS">
<xsl:with-param name="columnNameFromDB" select="f_name"/>
</xsl:call-template><xsl:text>=</xsl:text>
<xsl:call-template name="getColumnNameJS">
<xsl:with-param name="columnNameFromDB" select="f_name"/>
</xsl:call-template><xsl:text>;
</xsl:text>
</xsl:for-each><xsl:text>
}
rsColumnMetaData[</xsl:text><xsl:value-of select="$tableId"/><xsl:text>]=new Array();
rsColumnMetaData[</xsl:text><xsl:value-of select="$tableId"/><xsl:text>].push(new dataRowMetaData('</xsl:text>
<xsl:value-of select="$tableId"/><xsl:text>',</xsl:text>
<xsl:value-of select="0"/>
<xsl:text>,'rownr','Zeilennr.',0,4));
</xsl:text>
<xsl:for-each select="sqlerg/complete_headers/header">
<xsl:variable name="rownr">
<xsl:value-of select="position()"/>
</xsl:variable>
<xsl:text>
rsColumnMetaData[</xsl:text><xsl:value-of select="$tableId"/><xsl:text>].push(new dataRowMetaData('</xsl:text>
<xsl:value-of select="$tableId"/><xsl:text>',</xsl:text>
<xsl:value-of select="$rownr"/>
<xsl:text>,'</xsl:text>
<xsl:call-template name="getColumnNameJS">
<xsl:with-param name="columnNameFromDB" select="f_name"/>
</xsl:call-template>
<xsl:text>','</xsl:text>
<xsl:call-template name="remove_linebreaksAndQuot">
<xsl:with-param name="volltext" select="wert" />
</xsl:call-template>
<xsl:text>',0,null));</xsl:text> <!--coltype noch unbekannt, colfunction unnötig-->
</xsl:for-each>
<xsl:for-each select="sqlerg/row">
<xsl:variable name="rownr">
<xsl:value-of select="position()"/>
</xsl:variable>
<xsl:if test="$rownr=1">
<!-- first metadata -->
<xsl:for-each select="col">
<xsl:variable name="colnr">
<xsl:value-of select="position()"/>
</xsl:variable>
<xsl:text>
rsColumnMetaData[</xsl:text><xsl:value-of select="$tableId"/><xsl:text>][</xsl:text><xsl:value-of select="number($colnr)"/><xsl:text>].coltype=</xsl:text><xsl:value-of select="@typ"/>
<xsl:text>;
</xsl:text>
</xsl:for-each>
</xsl:if>
<!--now resultset-->
<xsl:text>
//rs[</xsl:text><xsl:value-of select="$tableId"/><xsl:text>]= new Array();
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:text>,</xsl:text>
<xsl:choose>
<xsl:when test="@typ='1'"><xsl:text>'</xsl:text>
<xsl:call-template name="remove_linebreaksAndQuot">
<xsl:with-param name="volltext" select="wert" />
</xsl:call-template>
<xsl:text>'</xsl:text></xsl:when>
<!--todo:Typ Datum -->
<xsl:when test="string-length(wert)=0"><xsl:text>null</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="wert"/>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
<xsl:text>));
</xsl:text>
</xsl:for-each>
</script>
</xsl:template>
<xsl:template name="displayTables">
<!-- jetzt Tabelle-->
<div>
<xsl:for-each select="/ergebnisse/ergebnis/ergebniselement">
<p class="teiltabelle_titel" style="font-size:3em;">
<xsl:text>Datentabelle </xsl:text><a onclick="{concat('toggleTableVisibility(',$colon,'toggleBtnTable',@ordnr+1, $colon,',',$colon, 'table',@ordnr+1,$colon,');')}"> <img id="{concat('toggleBtnTable',@ordnr+1)}" src="../images/minus-circled.svg" height="20px" style="height:20px" border="0" /></a></p>
<!--<xsl:call-template name="nd_singleTable">
<xsl:with-param name="ergebniselement_ordnr" select="@ordnr" />
<xsl:with-param name="showPager" select="'none'" />
</xsl:call-template>-->
<div id="table1">
<div id="chartDiv1" />
</div>
<!--<xsl:call-template name="vizPivotTable" />-->
</xsl:for-each>
</div>
</xsl:template>
</xsl:stylesheet>
Loading…
Cancel
Save