From 7d7b369d5eddcd8c9f551120c0b9767ddbca2542 Mon Sep 17 00:00:00 2001 From: Daniel Quathamer Date: Mon, 2 May 2022 07:28:02 +0200 Subject: [PATCH] Bugfix copy d3js-libaries and xsl-files, install viz-XSL-file #2 --- build.xml | 15 ++++-- .../sx_stylesheets_einfuegen.sql | 48 +++++++++++++------ 2 files changed, 45 insertions(+), 18 deletions(-) diff --git a/build.xml b/build.xml index 0c32a24..a103a7b 100644 --- a/build.xml +++ b/build.xml @@ -29,13 +29,20 @@ ant -DMODULE_PATH=$VIZ_PFAD -DWEBAPP_DIR=$WEBAPP -DMODULE=viz dist + - + + + + + + + @@ -47,9 +54,9 @@ ant -DMODULE_PATH=$VIZ_PFAD -DWEBAPP_DIR=$WEBAPP -DMODULE=viz dist - + + @@ -61,5 +68,5 @@ ant -DMODULE_PATH=$VIZ_PFAD -DWEBAPP_DIR=$WEBAPP -DMODULE=viz dist - + --> diff --git a/src-modules/module/viz/schluesseltabellen/sx_stylesheets_einfuegen.sql b/src-modules/module/viz/schluesseltabellen/sx_stylesheets_einfuegen.sql index f018b31..bb92273 100755 --- a/src-modules/module/viz/schluesseltabellen/sx_stylesheets_einfuegen.sql +++ b/src-modules/module/viz/schluesseltabellen/sx_stylesheets_einfuegen.sql @@ -1,4 +1,3 @@ ---(c) 2011 Andre Knieschewski --Freemarker Template --Achtung: Macro fügt Inhalte ein --Bitte nur Freemarker Variablen füllen @@ -9,7 +8,13 @@ ] /> <#assign stylesheet = [ -{"filename":"viz_html_chart.xsl", "caption":"Diagramm erzeugen", "description":"Diagramm-Assistent", "relation":"table", "contenttype":"text/html"} +{"filename":"viz_html_chart.xsl", +"caption":"Diagramm erzeugen", +"description":"Diagramm-Assistent", +"relation":"table", +"contenttype":"text/html", +"is_generic":"1" +} ] /> <#assign stylesheet_field = [ @@ -51,26 +56,41 @@ caption CHAR(255) , description CHAR(255) , relation CHAR(10) , useragent CHAR(255) , -contenttype CHAR(200) +contenttype CHAR(200) , +is_generic smallint ); create temp table tmp_hilf (tid integer); insert into tmp_hilf select max(tid) from sx_stylesheets; update tmp_hilf set tid=1 where tid is null; -<#assign couter_tid = 1 /> +<#assign counter_tid = 1 /> <#foreach column in m_stylesheet> -insert into tmp_stylesheets (tid,filename,caption,description,relation,contenttype) -select max(tid)+${couter_tid},'${column.filename}','${column.caption}', '${column.description}', '${column.relation}','${column.contenttype}' from tmp_hilf; -<#assign couter_tid = couter_tid + 1 /> +insert into tmp_stylesheets (tid,filename,caption,description,relation,contenttype,is_generic) +select max(tid)+${counter_tid},'${column.filename}', +'${column.caption}', + '${column.description}', + '${column.relation}', +'${column.contenttype}', +${column.is_generic} +from tmp_hilf; +<#assign counter_tid = counter_tid + 1 /> --delete für tml_stylesheets hinzugefügt #ak 06.03.2013 delete from tmp_stylesheets where filename in (select filename from sx_stylesheets); -insert into sx_stylesheets (tid,filename, caption, description, relation, useragent, contenttype) +insert into sx_stylesheets (tid, +filename, caption, description, relation, useragent, contenttype +<#if TableFieldExists?exists && TableFieldExists('sx_stylesheets','is_generic')> +,is_generic + +) SELECT tid, filename, caption, description, relation, useragent, contenttype +<#if TableFieldExists?exists && TableFieldExists('sx_stylesheets','is_generic')> +,is_generic + FROM tmp_stylesheets; drop table tmp_stylesheets; @@ -90,14 +110,14 @@ delete from tmp_hilf; insert into tmp_hilf select max(tid) from sx_mask_style; update tmp_hilf set tid=1 where tid is null; -<#assign couter_tid = 1 /> +<#assign counter_tid = 1 /> <#foreach column in m_masken> insert into tmp_mask_style (tid,maskeninfo_id,ord,filename) -select max(tid)+${couter_tid},${column.mask},${column.ord},'${column.filename}' from tmp_hilf; +select max(tid)+${counter_tid},${column.mask},${column.ord},'${column.filename}' from tmp_hilf; update tmp_mask_style set stylesheet_id=(select max(tid) from sx_stylesheets where filename='${column.filename}') where filename='${column.filename}'; -<#assign couter_tid = couter_tid + 1 /> +<#assign counter_tid = counter_tid + 1 /> insert into sx_mask_style ( tid, maskeninfo_id, stylesheet_id, ord) @@ -122,14 +142,14 @@ delete from tmp_hilf; insert into tmp_hilf select max(tid) from stylesheet_field; update tmp_hilf set tid=1 where tid is null; -<#assign couter_tid = 1 /> +<#assign counter_tid = 1 /> <#foreach column in m_stylesheet_field> INSERT INTO tmp_stylesheet_field (tid, filename, tablename, fieldname) -select max(tid)+${couter_tid}, '${column.filename}', '${column.tablename}', '${column.fieldname}' from tmp_hilf; +select max(tid)+${counter_tid}, '${column.filename}', '${column.tablename}', '${column.fieldname}' from tmp_hilf; update tmp_stylesheet_field set stylesheet_id=(select max(tid) from sx_stylesheets where filename='${column.filename}') where filename='${column.filename}'; -<#assign couter_tid = couter_tid + 1 /> +<#assign counter_tid = counter_tid + 1 /> insert into stylesheet_field ( tid, stylesheet_id, tablename, fieldname)