Browse Source

Bugfix copy d3js-libaries and xsl-files, install viz-XSL-file #2

makro_datasrc
Daniel Quathamer 3 years ago
parent
commit
7d7b369d5e
  1. 15
      build.xml
  2. 48
      src-modules/module/viz/schluesseltabellen/sx_stylesheets_einfuegen.sql

15
build.xml

@ -29,13 +29,20 @@ ant -DMODULE_PATH=$VIZ_PFAD -DWEBAPP_DIR=$WEBAPP -DMODULE=viz dist @@ -29,13 +29,20 @@ ant -DMODULE_PATH=$VIZ_PFAD -DWEBAPP_DIR=$WEBAPP -DMODULE=viz dist
<target name="all" description="Gruppe: Kopiere Modul Sourcen in den WEB-INF-Verzeichnisbaum">
<antcall target="module_copy_source" />
<antcall target="call_module_scripts_create_ant" />
<antcall target="module_copy_webapp_files" />
</target>
<target name="module_copy_source" description="Gruppe: Kopiere Modul Sourcen in den WEB-INF-Verzeichnisbaum">
<target name="module_copy_source" description="Kopiere Modul Sourcen in den WEB-INF-Verzeichnisbaum">
<echo message="Start module_copy_sources für Modul ${MODULE} in Pfad ${MODULE_PATH}" />
<copy todir="${MODULE_PATH}" overwrite="true">
<fileset dir="${BASE_DIR}/src-modules/module/${MODULE}" />
</copy>
</target>
<target name="module_copy_webapp_files" description="Kopiere webapp-Dateien in den WEBAPP-Verzeichnisbaum">
<echo message="Start module_copy_webapp_files für Modul ${MODULE} in Pfad ${MODULE_PATH}" />
<copy todir="${WEBAPP}" overwrite="true">
<fileset dir="${BASE_DIR}/superx" />
</copy>
</target>
<target name="call_module_scripts_create_ant" description="Call to module_scripts_create_ant">
<subant target="all">
<!--<property name="basedir" value="${MODULE_PATH}/../../conf/" />-->
@ -47,9 +54,9 @@ 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
<fileset dir="${MODULE_PATH}/../../conf" includes="module_scripts_create_ant.xml" />
</subant>
</target>
<target name="dist" description="Create Download package">
<!-- <target name="dist" description="Create Download package">
<subant target="erzeuge_paket">
<!--<property name="basedir" value="${MODULE_PATH}/../../conf/" />-->
<property name="MODULE" value="${MODULE}" />
<property name="PFAD" value="/home/superx/fertige_module" />
<property name="DATABASE" value="POSTGRES" />
@ -61,5 +68,5 @@ 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
<property name="SUPERX_BASE" value="${WEBAPP}/WEB-INF" />
<fileset dir="${MODULE_PATH}/../../conf" includes="build.xml" />
</subant>
</target>
</target>-->
</project>

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

@ -1,4 +1,3 @@ @@ -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 @@ @@ -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) , @@ -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 />
</#foreach>
--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
</#if>
)
SELECT tid, filename, caption, description, relation, useragent, contenttype
<#if TableFieldExists?exists && TableFieldExists('sx_stylesheets','is_generic')>
,is_generic
</#if>
FROM tmp_stylesheets;
drop table tmp_stylesheets;
@ -90,14 +110,14 @@ delete from tmp_hilf; @@ -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 />
</#foreach>
insert into sx_mask_style ( tid, maskeninfo_id, stylesheet_id, ord)
@ -122,14 +142,14 @@ delete from tmp_hilf; @@ -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 />
</#foreach>
insert into stylesheet_field ( tid, stylesheet_id, tablename, fieldname)

Loading…
Cancel
Save