init
BIN
Doc/Backto.gif
Normal file
|
After Width: | Height: | Size: 852 B |
BIN
Doc/Button.gif
Normal file
|
After Width: | Height: | Size: 303 B |
BIN
Doc/DataDictionary.gif
Normal file
|
After Width: | Height: | Size: 683 B |
97
Doc/DataDictionary.xsl
Normal file
@ -0,0 +1,97 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
|
||||
<xsl:output method="html" version="4.0" encoding="ISO-8859-1"/>
|
||||
|
||||
<xsl:param name="default_extension" select="'.xml'"/> <!-- usato nei link del tag Plan -->
|
||||
|
||||
<xsl:include href="common.xsl"/>
|
||||
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:apply-templates select="Plan"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Nodo principale -->
|
||||
|
||||
<xsl:template match="Plan">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<STYLE>
|
||||
BODY {font-family:Times New Roman; color:black; background:white; margin:20px}
|
||||
TABLE {font-family:Times New Roman; color:black; background:white}
|
||||
A:hover {color:red}
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<P ALIGN="CENTER"><FONT COLOR="#000080" SIZE="6"><B>Data dictionary</B></FONT></P>
|
||||
<P ALIGN="CENTER">
|
||||
<TABLE BORDER="1" CELLPADDING="4" CELLSPACING="0">
|
||||
<TR BGCOLOR="#6495ED">
|
||||
<TD><FONT COLOR="WHITE"><B>Field</B></FONT></TD>
|
||||
<TD><FONT COLOR="WHITE"><B>Description</B></FONT></TD>
|
||||
<TD><FONT COLOR="WHITE"><B>Type</B></FONT></TD>
|
||||
<TD><FONT COLOR="WHITE"><B>Len</B></FONT></TD>
|
||||
<TD><FONT COLOR="WHITE"><B>Dec</B></FONT></TD>
|
||||
<TD><FONT COLOR="WHITE"><B>Key</B></FONT></TD>
|
||||
<xsl:if test="PlanItem/ItemField/FieldNotnull">
|
||||
<TD><FONT COLOR="WHITE"><B>Not null</B></FONT></TD>
|
||||
</xsl:if>
|
||||
<TD><FONT COLOR="WHITE"><B>Repeated</B></FONT></TD>
|
||||
<TD><FONT COLOR="WHITE"><B>Table</B></FONT></TD>
|
||||
<TD><FONT COLOR="WHITE"><B>Phisical name</B></FONT></TD>
|
||||
</TR>
|
||||
<xsl:for-each select="PlanItem/ItemField">
|
||||
<xsl:sort select="FieldName"/>
|
||||
<xsl:sort select="@TablePhName"/>
|
||||
<TR BGCOLOR="#F4FBFF">
|
||||
<TD>
|
||||
<A HREF="{/Plan/PlanName}_Tables{$default_extension}#{@TableName}_{FieldName}">
|
||||
<xsl:value-of select="FieldName"/>
|
||||
</A>
|
||||
</TD>
|
||||
<TD><xsl:apply-templates select="FieldComment"/></TD>
|
||||
<TD><xsl:apply-templates select="FieldType"/></TD>
|
||||
<TD><xsl:apply-templates select="FieldLen"/></TD>
|
||||
<TD><xsl:apply-templates select="FieldDec"/></TD>
|
||||
<TD><xsl:apply-templates select="FieldKey"/></TD>
|
||||
<xsl:if test="FieldNotnull">
|
||||
<TD ALIGN="CENTER"><xsl:apply-templates select="FieldNotnull"/></TD>
|
||||
</xsl:if>
|
||||
<TD ALIGN="CENTER"><xsl:apply-templates select="FieldRepeated"/></TD>
|
||||
<TD>
|
||||
<A HREF="{/Plan/PlanName}_Tables{$default_extension}#Table_{@TableName}">
|
||||
<xsl:value-of select="@TableName"/>
|
||||
</A>
|
||||
</TD>
|
||||
<TD><xsl:value-of select="@TablePhName"/></TD>
|
||||
</TR>
|
||||
</xsl:for-each>
|
||||
</TABLE>
|
||||
</P>
|
||||
<DIV ALIGN="CENTER">
|
||||
<A HREF="{PlanName}_Main{$default_extension}">Project overview</A>
|
||||
</DIV>
|
||||
</BODY>
|
||||
</HTML>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Gestione checkbox TRUE/FALSE -->
|
||||
|
||||
<xsl:template match="FieldNotnull | FieldRepeated">
|
||||
<xsl:call-template name="LogicalCheckBox"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Gestione celle vuote -->
|
||||
|
||||
<xsl:template match="FieldComment | FieldType | FieldLen | FieldDec | FieldKey">
|
||||
<xsl:call-template name="ValueOrNotAvailable"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
</xsl:stylesheet>
|
||||
BIN
Doc/Diagrams.gif
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
165
Doc/Diagrams.xsl
Normal file
@ -0,0 +1,165 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
|
||||
<xsl:output method="html" version="4.0" encoding="ISO-8859-1"/>
|
||||
|
||||
<xsl:param name="default_extension" select="'.xml'"/> <!-- usato nei link del tag Plan -->
|
||||
|
||||
<xsl:include href="common.xsl"/>
|
||||
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:apply-templates select="Plan"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Nodo principale -->
|
||||
|
||||
<xsl:template match="Plan">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<STYLE>
|
||||
BODY {font-family:Times New Roman; color:black; background:white; margin:20px}
|
||||
TABLE {font-family:Times New Roman; color:black; background:white}
|
||||
A:hover {color:red}
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<P ALIGN="CENTER"><FONT COLOR="#000080" SIZE="6"><B>Diagrams</B></FONT></P>
|
||||
<xsl:apply-templates select="PlanImagelist/JPG"/>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD ALIGN="CENTER" WIDTH="50%">
|
||||
<A HREF="{PlanName}_Main{$default_extension}">Project overview</A>
|
||||
</TD>
|
||||
<TD ALIGN="CENTER" WIDTH="50%">
|
||||
<A HREF="{PlanName}_EntitiesRecap{$default_extension}">Entities summary</A>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</BODY>
|
||||
</HTML>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="JPG">
|
||||
<xsl:variable name="name" select="normalize-space(text())"/>
|
||||
<xsl:variable name="level">
|
||||
<xsl:choose>
|
||||
<xsl:when test=".='TOP-LEVEL'"/>
|
||||
<xsl:otherwise><xsl:value-of select="$name"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="x" select="@x"/>
|
||||
<xsl:variable name="y" select="@y"/>
|
||||
<A NAME="{$name}">
|
||||
<FONT SIZE="5"><U><xsl:value-of select="$name"/></U></FONT>
|
||||
</A>
|
||||
<P>
|
||||
<TABLE BORDER="0" WIDTH="100%">
|
||||
<TR><TD>
|
||||
<TABLE BORDER="0" WIDTH="100%">
|
||||
<TR>
|
||||
<TD WIDTH="10%"> </TD>
|
||||
<TD WIDTH="80%">
|
||||
<xsl:apply-templates
|
||||
select="/Plan/PlanItemlist/PlanItem[ItemName=$name]/ItemGroupnote"/>
|
||||
</TD>
|
||||
<TD WIDTH="10%"> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD></TR>
|
||||
<TR>
|
||||
<TD ALIGN="CENTER">
|
||||
<xsl:variable name="punct">;: #&<>"'|\/*?</xsl:variable>
|
||||
<MAP NAME="Level_{$name}">
|
||||
<xsl:for-each select="/Plan/PlanItemlist/PlanItem[ItemGroup=$level and ItemObj!='String']">
|
||||
<xsl:variable name="link">
|
||||
<xsl:choose>
|
||||
<xsl:when test="ItemObj='Group'">Diagrams</xsl:when>
|
||||
<xsl:otherwise>Entities</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<AREA HREF="{/Plan/PlanName}_{$link}{$default_extension}#{ItemName}"
|
||||
SHAPE="RECT" TITLE="Go to '{ItemName}'"
|
||||
COORDS="{@x1 - $x},{@y1 - $y},{@x2 - $x},{@y2 - $y}"/>
|
||||
</xsl:for-each>
|
||||
</MAP>
|
||||
<IMG SRC="{/Plan/PlanName}_{translate($name,$punct,'')}.jpg"
|
||||
BORDER="0" ALIGN="MIDDLE" USEMAP="#Level_{$name}"/>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR><TD> </TD></TR>
|
||||
<TR>
|
||||
<TD ALIGN="CENTER">
|
||||
<TABLE BORDER="1" CELLPADDING="4" CELLSPACING="0">
|
||||
<TR BGCOLOR="#6495ED">
|
||||
<TD><FONT COLOR="WHITE"><B>Entity</B></FONT></TD>
|
||||
<TD><FONT COLOR="WHITE"><B>Class</B></FONT></TD>
|
||||
<TD><FONT COLOR="WHITE"><B>Program</B></FONT></TD>
|
||||
<TD><FONT COLOR="WHITE"><B>Created</B></FONT></TD>
|
||||
<TD><FONT COLOR="WHITE"><B>File</B></FONT></TD>
|
||||
<TD><FONT COLOR="WHITE"><B>Menu</B></FONT></TD>
|
||||
</TR>
|
||||
<xsl:for-each select="/Plan/PlanItemlist/PlanItem[ItemGroup=$level and ItemObj!='String']">
|
||||
<xsl:sort select="ItemObj"/>
|
||||
<xsl:sort select="ItemName"/>
|
||||
<xsl:variable name="link">
|
||||
<xsl:choose>
|
||||
<xsl:when test="ItemObj='Group'">Diagrams</xsl:when>
|
||||
<xsl:otherwise>Entities</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<TR BGCOLOR="#F4FBFF">
|
||||
<TD>
|
||||
<A HREF="{/Plan/PlanName}_{$link}{$default_extension}#{ItemName}">
|
||||
<xsl:value-of select="ItemName"/>
|
||||
</A>
|
||||
</TD>
|
||||
<TD><xsl:value-of select="ItemObj"/></TD>
|
||||
<TD><xsl:apply-templates select="ItemProcname"/></TD>
|
||||
<TD><xsl:apply-templates select="ItemDatecreate"/></TD>
|
||||
<TD>
|
||||
<xsl:if test="ItemTbl!=''">
|
||||
<A HREF="{/Plan/PlanName}_TablesSummary{$default_extension}#Table_{ItemTbl}">
|
||||
<xsl:value-of select="ItemTbl"/>
|
||||
</A>
|
||||
</xsl:if>
|
||||
<BR/>
|
||||
<xsl:if test="ItemMastertbl!=''">
|
||||
<A HREF="{/Plan/PlanName}_TablesSummary{$default_extension}#Table_{ItemMastertbl}">
|
||||
<xsl:value-of select="ItemMastertbl"/>
|
||||
</A>
|
||||
</xsl:if>
|
||||
</TD>
|
||||
<TD ALIGN="CENTER"><xsl:apply-templates select="ItemMenu"/></TD>
|
||||
</TR>
|
||||
</xsl:for-each>
|
||||
</TABLE>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<P/>
|
||||
</P>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Gestione checkbox TRUE/FALSE -->
|
||||
|
||||
<xsl:template match="ItemMenu">
|
||||
<xsl:call-template name="LogicalCheckBox"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Gestione celle vuote -->
|
||||
|
||||
<xsl:template match="ItemProcname | ItemDatecreate">
|
||||
<xsl:call-template name="ValueOrNotAvailable">
|
||||
<xsl:with-param name="NA" select="' '"/>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
</xsl:stylesheet>
|
||||
BIN
Doc/Entities.gif
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
301
Doc/Entities.xsl
Normal file
@ -0,0 +1,301 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
|
||||
<xsl:output method="html" version="4.0" encoding="ISO-8859-1"/>
|
||||
|
||||
<xsl:param name="default_extension" select="'.xml'"/> <!-- usato nei link dei tag PlanItem -->
|
||||
|
||||
<xsl:include href="common.xsl"/>
|
||||
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:apply-templates select="Plan"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Nodo principale -->
|
||||
|
||||
<xsl:template match="Plan">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<STYLE>
|
||||
BODY {font-family:Times New Roman; color:black; background:white; margin:20px}
|
||||
TABLE {font-family:Times New Roman; color:black; background:white}
|
||||
A:hover {color:red}
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<P ALIGN="CENTER"><FONT COLOR="#000080" SIZE="6"><B>Entities</B></FONT></P>
|
||||
<xsl:apply-templates select="PlanItemlist/PlanItem[ItemObj!='Group']">
|
||||
<xsl:sort select="ItemObj"/>
|
||||
<xsl:sort select="ItemName"/>
|
||||
</xsl:apply-templates>
|
||||
<DIV ALIGN="CENTER">
|
||||
<A HREF="{PlanName}_Main{$default_extension}">Project overview</A>
|
||||
</DIV>
|
||||
</BODY>
|
||||
</HTML>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="PlanItem[ItemDesc]">
|
||||
<P>
|
||||
<TABLE BORDER="0" CELLSPACING ="0">
|
||||
<xsl:variable name="table_link">
|
||||
<xsl:value-of select="/Plan/PlanName"/>
|
||||
<xsl:text>_TablesSummary</xsl:text>
|
||||
<xsl:value-of select="$default_extension"/>
|
||||
<xsl:text>#Table_</xsl:text>
|
||||
</xsl:variable>
|
||||
|
||||
<TR>
|
||||
<TD WIDTH="40" ALIGN="LEFT" VALIGN="MIDDLE">
|
||||
<xsl:choose>
|
||||
<xsl:when test="ItemObj='Table'">
|
||||
<A HREF="{$table_link}{ItemTable/TableName}">
|
||||
<IMG BORDER="0" SRC="ds_Tbl.gif"
|
||||
ALT="Show Table" WIDTH="40" HEIGHT="40"/>
|
||||
</A>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="ItemObj='DataTable'">
|
||||
<A HREF="{$table_link}{ItemTable/TableName}">
|
||||
<xsl:choose>
|
||||
<xsl:when test="ItemDesc/ItemDescLinkable='TRUE'">
|
||||
<IMG BORDER="0" SRC="ds_StorageExtLink.gif"
|
||||
ALT="Show Database Table" WIDTH="40" HEIGHT="40"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<IMG BORDER="0" SRC="ds_Storage.gif"
|
||||
ALT="Show Database Table" WIDTH="40" HEIGHT="40"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</A>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="ItemObj='Master'">
|
||||
<A HREF="{$table_link}{ItemTable/TableName}">
|
||||
<xsl:choose>
|
||||
<xsl:when test="ItemDesc/ItemDescLinkable='TRUE'">
|
||||
<IMG BORDER="0" SRC="ds_MstExtLink.gif"
|
||||
ALT="Show Master" WIDTH="40" HEIGHT="40"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<IMG BORDER="0" SRC="ds_Mst.gif"
|
||||
ALT="Show Master" WIDTH="40" HEIGHT="40"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</A>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="ItemObj='MasterDetail'">
|
||||
<A HREF="{$table_link}{ItemTable/TableName}">
|
||||
<xsl:choose>
|
||||
<xsl:when test="ItemDesc/ItemDescLinkable='TRUE'">
|
||||
<IMG BORDER="0" SRC="ds_MDtExtLink.gif"
|
||||
ALT="Show Master Detail" WIDTH="40" HEIGHT="40"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<IMG BORDER="0" SRC="ds_MDt.gif"
|
||||
ALT="Show Master Detail" WIDTH="40" HEIGHT="40"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</A>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="ItemObj='Detail'">
|
||||
<A HREF="{$table_link}{ItemTable/TableName}">
|
||||
<xsl:choose>
|
||||
<xsl:when test="ItemDesc/ItemDescLinkable='TRUE'">
|
||||
<IMG BORDER="0" SRC="ds_DtlExtLink.gif"
|
||||
ALT="Show Detail" WIDTH="40" HEIGHT="40"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<IMG BORDER="0" SRC="ds_Dtl.gif"
|
||||
ALT="Show Detail" WIDTH="40" HEIGHT="40"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</A>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="ItemObj='Batch'">
|
||||
<IMG BORDER="0" SRC="ds_Btc.gif" ALT="Routine" WIDTH="40" HEIGHT="40"/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="ItemObj='Mask'">
|
||||
<IMG BORDER="0" SRC="ds_Msk.gif" ALT="Mask" WIDTH="40" HEIGHT="40"/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="ItemObj='Report'">
|
||||
<IMG BORDER="0" SRC="ds_Rpt.gif" ALT="Report" WIDTH="40" HEIGHT="40"/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="ItemObj='Output'">
|
||||
<IMG BORDER="0" SRC="ds_Output.gif" ALT="Output" WIDTH="40" HEIGHT="40"/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="ItemObj='Page'">
|
||||
<IMG BORDER="0" SRC="ds_Page.gif" ALT="Page" WIDTH="40" HEIGHT="40"/>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</TD>
|
||||
|
||||
<TD ALIGN="LEFT" VALIGN="MIDDLE">
|
||||
<A>
|
||||
<xsl:if test="ItemObj='DataTable' or ItemObj='Master' or ItemObj='Detail' or ItemObj='Table'">
|
||||
<xsl:attribute name="HREF">
|
||||
<xsl:value-of select="$table_link"/>
|
||||
<xsl:value-of select="ItemTable/TableName"/>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<FONT SIZE="5"><B><xsl:value-of select="ItemDesc/ItemDescName"/></B></FONT>
|
||||
</A>
|
||||
</TD>
|
||||
|
||||
<xsl:if test="ItemDesc/ItemDescExternal='TRUE'">
|
||||
<TD VALIGN="MIDDLE"> (External entity)</TD>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="ItemObj='MasterDetail'">
|
||||
<TD>
|
||||
<TABLE BORDER="0" CELLSPACING="2">
|
||||
<TR><TD>
|
||||
<A HREF="{$table_link}{ItemTable/TableName[@Type='Master']}">Master</A>
|
||||
</TD></TR>
|
||||
<TR><TD>
|
||||
<A HREF="{$table_link}{ItemTable/TableName[@Type='Detail']}">Detail</A>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
</xsl:if>
|
||||
<A NAME="{ItemDesc/ItemDescName}"/>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<TABLE WIDTH="100%">
|
||||
<TR>
|
||||
<TD COLSPAN="3"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH="5%"> </TD>
|
||||
<TD><TABLE CELLSPACING="0">
|
||||
<TR>
|
||||
<TD WIDTH="16%" STYLE="BORDER-BOTTOM: 1px SOLID #000000;" ><B>Program</B></TD>
|
||||
<xsl:if test="ItemDesc/ItemDescTemplate!=''">
|
||||
<TD WIDTH="15%" STYLE="BORDER-BOTTOM: 1px SOLID #000000;"><B>Template</B></TD>
|
||||
</xsl:if>
|
||||
<TD WIDTH="13%" STYLE="BORDER-BOTTOM: 1px SOLID #000000;"><B>Created</B></TD>
|
||||
<TD WIDTH="13%" STYLE="BORDER-BOTTOM: 1px SOLID #000000;"><B>Revised</B></TD>
|
||||
<TD WIDTH="5%" STYLE="BORDER-BOTTOM: 1px SOLID #000000;" ALIGN="CENTER"><B>Menu</B></TD>
|
||||
<TD WIDTH="5%" STYLE="BORDER-BOTTOM: 1px SOLID #000000;" ALIGN="CENTER"><B>Prototype</B></TD>
|
||||
<xsl:if test="ItemDesc/ItemDescTmpTable!=''">
|
||||
<TD WIDTH="5%" STYLE="BORDER-BOTTOM: 1px SOLID #000000;" ALIGN="CENTER"><B>Tmp Table</B></TD>
|
||||
</xsl:if>
|
||||
<xsl:if test="ItemDesc/ItemDescPublic!=''">
|
||||
<TD WIDTH="5%" STYLE="BORDER-BOTTOM: 1px SOLID #000000;" ALIGN="CENTER"><B>Public</B></TD>
|
||||
</xsl:if>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH="16%"><xsl:value-of select="ItemDesc/ItemDescProcedure"/></TD>
|
||||
<xsl:if test="ItemDesc/ItemDescTemplate!=''">
|
||||
<TD WIDTH="15%"><xsl:value-of select="ItemDesc/ItemDescTemplate"/></TD>
|
||||
</xsl:if>
|
||||
<TD WIDTH="13%"><xsl:value-of select="ItemDesc/ItemDescCreated"/></TD>
|
||||
<TD WIDTH="13%"><xsl:value-of select="ItemDesc/ItemDescRevised"/></TD>
|
||||
<TD WIDTH="5%" ALIGN="CENTER"><xsl:apply-templates select="ItemDesc/ItemDescMenu"/></TD>
|
||||
<TD WIDTH="5%" ALIGN="CENTER"><xsl:apply-templates select="ItemDesc/ItemDescPrototype"/></TD>
|
||||
<xsl:if test="ItemDesc/ItemDescTmpTable!=''">
|
||||
<TD WIDTH="5%" ALIGN="CENTER"><xsl:apply-templates select="ItemDesc/ItemDescTmpTable"/></TD>
|
||||
</xsl:if>
|
||||
<xsl:if test="ItemDesc/ItemDescPublic!=''">
|
||||
<TD WIDTH="5%" ALIGN="CENTER"><xsl:apply-templates select="ItemDesc/ItemDescPublic"/></TD>
|
||||
</xsl:if>
|
||||
</TR>
|
||||
</TABLE></TD>
|
||||
<TD WIDTH="5%"> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<xsl:if test="ItemDesc/ItemDescNote!=''">
|
||||
<TABLE BORDER="0" WIDTH="100%">
|
||||
<TR>
|
||||
<TD COLSPAN="3"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH="5%"> </TD>
|
||||
<TD><TABLE WIDTH="100%">
|
||||
<TR>
|
||||
<TD ALIGN="CENTER"><B>Notes</B></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD STYLE="BORDER-TOP: 2px SOLID #000000;">
|
||||
<xsl:apply-templates select="ItemDesc/ItemDescNote"/>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE></TD>
|
||||
<TD WIDTH="5%"> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="ItemLinks/Link">
|
||||
<TABLE BORDER="0" WIDTH="100%">
|
||||
<TR>
|
||||
<TD COLSPAN="3"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH="5%"> </TD>
|
||||
<TD><TABLE CELLSPACING="0" BORDER="0" WIDTH="100%">
|
||||
<TR>
|
||||
<TD COLSPAN="4" ALIGN="CENTER" STYLE="BORDER-BOTTOM: 2px SOLID #000000;">
|
||||
<B>Relationships</B>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="TOP">
|
||||
<TABLE WIDTH="100%" BORDER="0" cellspacing="0" cellpadding="2">
|
||||
<xsl:for-each select="ItemLinks/Link">
|
||||
<xsl:sort select="Type"/>
|
||||
<xsl:if test="not(preceding-sibling::node()/Type=Type)">
|
||||
<TR><TD HEIGHT="25" COLSPAN="2" VALIGN="BOTTOM"
|
||||
STYLE="BORDER-BOTTOM: 1px SOLID #000000;">
|
||||
<B><xsl:value-of select="Type"/></B>
|
||||
</TD></TR>
|
||||
</xsl:if>
|
||||
<TR>
|
||||
<TD WIDTH="30%" VALIGN="MIDDLE">
|
||||
<xsl:variable name="linked"
|
||||
select="/Plan/PlanItemlist/PlanItem
|
||||
[ItemUID=current()/UID]/ItemName"/>
|
||||
<A HREF="#{$linked}">
|
||||
<xsl:value-of select="$linked"/>
|
||||
</A>
|
||||
</TD>
|
||||
<TD WIDTH="70%" VALIGN="MIDDLE"
|
||||
STYLE="BORDER-LEFT: 1px SOLID #000000;">
|
||||
<xsl:apply-templates select="Note"/>
|
||||
</TD>
|
||||
</TR>
|
||||
</xsl:for-each>
|
||||
</TABLE>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE></TD>
|
||||
<TD WIDTH="5%"> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</xsl:if>
|
||||
</P>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Gestione checkbox TRUE/FALSE -->
|
||||
|
||||
<xsl:template match="ItemDescMenu | ItemDescPrototype | ItemDescTmpTable | ItemDescPublic">
|
||||
<xsl:call-template name="LogicalCheckBox"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
</xsl:stylesheet>
|
||||
98
Doc/EntitiesRecap.xsl
Normal file
@ -0,0 +1,98 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
|
||||
<xsl:output method="html" version="4.0" encoding="ISO-8859-1"/>
|
||||
|
||||
<xsl:param name="default_extension" select="'.xml'"/> <!-- usato nei link del tag Plan -->
|
||||
|
||||
<xsl:include href="common.xsl"/>
|
||||
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:apply-templates select="Plan"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Nodo principale -->
|
||||
|
||||
<xsl:template match="Plan">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<STYLE>
|
||||
BODY {font-family:Times New Roman; color:black; background:white; margin:20px}
|
||||
TABLE {font-family:Times New Roman; color:black; background:white}
|
||||
A:hover {color:red}
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<P ALIGN="CENTER"><FONT COLOR="#000080" SIZE="6"><B>Entities summary</B></FONT></P>
|
||||
<P ALIGN="CENTER">
|
||||
<TABLE BORDER="1" CELLPADDING="4" CELLSPACING="0">
|
||||
<TR BGCOLOR="#6495ED">
|
||||
<TD><FONT COLOR="WHITE"><B>Entity</B></FONT></TD>
|
||||
<TD><FONT COLOR="WHITE"><B>Class</B></FONT></TD>
|
||||
<TD><FONT COLOR="WHITE"><B>Program</B></FONT></TD>
|
||||
<TD><FONT COLOR="WHITE"><B>Created</B></FONT></TD>
|
||||
<TD><FONT COLOR="WHITE"><B>Group</B></FONT></TD>
|
||||
</TR>
|
||||
<xsl:for-each select="PlanItemlist/PlanItem[ItemObj!='String']">
|
||||
<xsl:sort select="ItemGroup"/>
|
||||
<xsl:sort select="ItemObj"/>
|
||||
<xsl:sort select="ItemName"/>
|
||||
<xsl:variable name="link">
|
||||
<xsl:choose>
|
||||
<xsl:when test="ItemObj='Group'">Diagrams</xsl:when>
|
||||
<xsl:otherwise>Entities</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="group">
|
||||
<xsl:choose>
|
||||
<xsl:when test="ItemGroup=''">TOP-LEVEL</xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="ItemGroup"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<TR BGCOLOR="#F4FBFF">
|
||||
<TD>
|
||||
<A HREF="{/Plan/PlanName}_{$link}{$default_extension}#{ItemName}">
|
||||
<xsl:value-of select="ItemName"/>
|
||||
</A>
|
||||
</TD>
|
||||
<TD><xsl:value-of select="ItemObj"/></TD>
|
||||
<TD><xsl:apply-templates select="ItemProcname"/></TD>
|
||||
<TD><xsl:apply-templates select="ItemDatecreate"/></TD>
|
||||
<TD>
|
||||
<A HREF="{/Plan/PlanName}_Diagrams{$default_extension}#{$group}">
|
||||
<xsl:value-of select="$group"/>
|
||||
</A>
|
||||
</TD>
|
||||
</TR>
|
||||
</xsl:for-each>
|
||||
</TABLE>
|
||||
</P>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD ALIGN="CENTER" WIDTH="50%">
|
||||
<A HREF="{PlanName}_Main{$default_extension}">Project overview</A>
|
||||
</TD>
|
||||
<TD ALIGN="CENTER" WIDTH="50%">
|
||||
<A HREF="{PlanName}_Diagrams{$default_extension}">Diagrams</A>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</BODY>
|
||||
</HTML>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Gestione celle vuote -->
|
||||
|
||||
<xsl:template match="ItemProcname | ItemDatecreate">
|
||||
<xsl:call-template name="ValueOrNotAvailable">
|
||||
<xsl:with-param name="NA" select="' '"/>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
</xsl:stylesheet>
|
||||
BIN
Doc/Field.gif
Normal file
|
After Width: | Height: | Size: 171 B |
BIN
Doc/Key.gif
Normal file
|
After Width: | Height: | Size: 131 B |
BIN
Doc/LinkPC.gif
Normal file
|
After Width: | Height: | Size: 279 B |
291
Doc/Main.xsl
Normal file
@ -0,0 +1,291 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
|
||||
<xsl:output method="html" version="4.0" encoding="ISO-8859-1"/>
|
||||
|
||||
<xsl:param name="default_extension" select="'.xml'"/> <!-- usato nei link del tag Plan -->
|
||||
|
||||
<xsl:include href="common.xsl"/>
|
||||
|
||||
|
||||
<xsl:template match="/">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<STYLE>
|
||||
BODY {font-family:Times New Roman; color:black; background:white; margin:20px}
|
||||
TABLE {font-family:Times New Roman; color:black; background:white}
|
||||
A:hover {color:red}
|
||||
.Row1 {color:white; border-right-width:1px; border-right-style:solid; border-right-color:black;
|
||||
border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:black}
|
||||
.Row2 {border-right-width:1px; border-right-style:solid; border-right-color:black}
|
||||
.Row3 {border-top-width:1px; border-top-style:solid; border-top-color:black}
|
||||
.prjsum {font-family:Times New Roman; border-right: 1px solid rgb(0,0,0); background:#DBDBDB}
|
||||
.prjsum2 {font-family:Times New Roman; background:#DBDBDB}
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<xsl:apply-templates select="Plan"/>
|
||||
<xsl:apply-templates select="Plan/PlanTotalizer"/>
|
||||
<xsl:if test="Plan/PlanAddins">
|
||||
<P ALIGN="CENTER"><B>Other plans</B></P>
|
||||
</xsl:if>
|
||||
<xsl:if test="Plan/PlanMain">
|
||||
<P ALIGN="CENTER">
|
||||
<A HREF="{Plan/PlanMain}_Main{$default_extension}">
|
||||
<xsl:value-of select="Plan/PlanMain"/>
|
||||
</A>
|
||||
</P>
|
||||
</xsl:if>
|
||||
<xsl:for-each select="Plan/PlanAddins/Module[.!=/Plan/PlanName]">
|
||||
<P ALIGN="CENTER">
|
||||
<A HREF="{.}_Main{$default_extension}">
|
||||
<xsl:value-of select="."/>
|
||||
</A>
|
||||
</P>
|
||||
</xsl:for-each>
|
||||
</BODY>
|
||||
</HTML>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Nodo principale -->
|
||||
|
||||
<xsl:template match="Plan">
|
||||
<xsl:if test="PlanMain">
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLSPACING="0" CELLPADDING="4">
|
||||
<TR BGCOLOR="#6495ED">
|
||||
<TD class="Row1"><B>Design file</B></TD>
|
||||
<TD class="Row1"><B>Title</B></TD>
|
||||
<TD class="Row1"><B>Author</B></TD>
|
||||
<TD class="Row1"><B>User</B></TD>
|
||||
<TD class="Row1" WIDTH="6%"><B>Version</B></TD>
|
||||
<TD class="Row1" WIDTH="8%"><B>Created</B></TD>
|
||||
<TD class="Row1" WIDTH="10%" STYLE="BORDER-RIGHT: 0px"><B>Last revision</B></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="#E8FAFF">
|
||||
<TD class="Row2"><xsl:apply-templates select="PlanName"/></TD>
|
||||
<TD class="Row2"><xsl:apply-templates select="PlanSubtitle"/></TD>
|
||||
<TD class="Row2"><xsl:apply-templates select="PlanAuthor"/></TD>
|
||||
<TD class="Row2"><xsl:apply-templates select="PlanUser"/></TD>
|
||||
<TD class="Row2"><xsl:apply-templates select="PlanVersion"/></TD>
|
||||
<TD class="Row2"><xsl:apply-templates select="PlanCreated"/></TD>
|
||||
<TD class="Row2" STYLE="BORDER-RIGHT: 0px"><xsl:apply-templates select="PlanLastrevision"/></TD>
|
||||
</TR>
|
||||
<xsl:if test="PlanNote!=''">
|
||||
<TR>
|
||||
<TD class="Row3" ALIGN="RIGHT" VALIGN="TOP"><B><I>Description:</I></B></TD>
|
||||
<TD class="Row3" COLSPAN="5"><xsl:apply-templates select="PlanNote"/></TD>
|
||||
<TD class="Row3"> </TD>
|
||||
</TR>
|
||||
</xsl:if>
|
||||
</TABLE>
|
||||
</xsl:if>
|
||||
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLSPACING="0">
|
||||
<xsl:if test="not(PlanMain)">
|
||||
<xsl:if test="PlanTitle!=''">
|
||||
<TR>
|
||||
<TD WIDTH="100%" COLSPAN="10" HEIGHT="50" VALIGN="BOTTOM" ALIGN="CENTER">
|
||||
<FONT SIZE="7" COLOR="#000080"><B><xsl:value-of select="PlanTitle"/></B></FONT>
|
||||
</TD>
|
||||
</TR>
|
||||
</xsl:if>
|
||||
<xsl:if test="PlanSubtitle!=''">
|
||||
<TR>
|
||||
<TD WIDTH="100%" COLSPAN="10" HEIGHT="45" VALIGN="TOP" ALIGN="CENTER">
|
||||
<FONT SIZE="5" COLOR="#000080"><B><xsl:value-of select="PlanSubtitle"/></B></FONT>
|
||||
</TD>
|
||||
</TR>
|
||||
</xsl:if>
|
||||
<xsl:if test="PlanVersion!=''">
|
||||
<TR>
|
||||
<TD WIDTH="50%" COLSPAN="5" ALIGN="RIGHT" VALIGN="TOP" HEIGHT="25">
|
||||
<B>Version:</B>
|
||||
</TD>
|
||||
<TD WIDTH="50%" COLSPAN="5" ALIGN="LEFT" VALIGN="TOP">
|
||||
<xsl:value-of select="PlanVersion"/>
|
||||
</TD>
|
||||
</TR>
|
||||
</xsl:if>
|
||||
<xsl:if test="PlanAuthor!=''">
|
||||
<TR>
|
||||
<TD WIDTH="50%" COLSPAN="5" ALIGN="RIGHT" VALIGN="TOP" HEIGHT="25">
|
||||
<B>Author:</B>
|
||||
</TD>
|
||||
<TD WIDTH="50%" COLSPAN="5" ALIGN="LEFT" VALIGN="TOP">
|
||||
<xsl:value-of select="PlanAuthor"/>
|
||||
</TD>
|
||||
</TR>
|
||||
</xsl:if>
|
||||
<xsl:if test="PlanCreated!=''">
|
||||
<TR>
|
||||
<TD WIDTH="50%" COLSPAN="5" ALIGN="RIGHT" VALIGN="TOP" HEIGHT="25">
|
||||
<B>Created:</B>
|
||||
</TD>
|
||||
<TD WIDTH="50%" COLSPAN="5" ALIGN="LEFT" VALIGN="TOP">
|
||||
<xsl:value-of select="PlanCreated"/>
|
||||
</TD>
|
||||
</TR>
|
||||
</xsl:if>
|
||||
<xsl:if test="PlanLastrevision!=''">
|
||||
<TR>
|
||||
<TD WIDTH="50%" COLSPAN="5" ALIGN="RIGHT" VALIGN="TOP" HEIGHT="25">
|
||||
<B>Last modify:</B>
|
||||
</TD>
|
||||
<TD WIDTH="50%" COLSPAN="5" ALIGN="LEFT" VALIGN="TOP">
|
||||
<xsl:value-of select="PlanLastrevision"/>
|
||||
</TD>
|
||||
</TR>
|
||||
</xsl:if>
|
||||
<xsl:if test="PlanUser!=''">
|
||||
<TR>
|
||||
<TD WIDTH="50%" COLSPAN="5" ALIGN="RIGHT" VALIGN="TOP" HEIGHT="25">
|
||||
<B>User:</B>
|
||||
</TD>
|
||||
<TD WIDTH="50%" COLSPAN="5" ALIGN="LEFT" VALIGN="TOP">
|
||||
<xsl:value-of select="PlanUser"/>
|
||||
</TD>
|
||||
</TR>
|
||||
</xsl:if>
|
||||
<xsl:if test="PlanNote!=''">
|
||||
<TR><TD WIDTH="80%" COLSPAN="10">
|
||||
<TABLE BORDER="0" CELLSPACING="20" ALIGN="CENTER">
|
||||
<TR><TD xsl:use-attribute-sets="global-notes">
|
||||
<xsl:apply-templates select="PlanNote"/>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</TD></TR>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
|
||||
<TR><TD> </TD></TR>
|
||||
<TR>
|
||||
<TD WIDTH="10%" VALIGN="MIDDLE" ALIGN="RIGHT">
|
||||
<A HREF="{PlanName}_Diagrams{$default_extension}">
|
||||
<IMG BORDER="0" SRC="Diagrams.gif" ALT="Show main project plan" WIDTH="60" HEIGHT="60"/>
|
||||
</A>
|
||||
</TD>
|
||||
<TD WIDTH="10%" VALIGN="MIDDLE" ALIGN="LEFT">
|
||||
<A HREF="{PlanName}_Diagrams{$default_extension}">
|
||||
<FONT SIZE="5">Diagrams</FONT>
|
||||
</A>
|
||||
</TD>
|
||||
<TD WIDTH="10%" VALIGN="MIDDLE" ALIGN="RIGHT" >
|
||||
<A HREF="{PlanName}_Entities{$default_extension}">
|
||||
<IMG BORDER="0" SRC="Entities.gif" ALT="Show entities list" WIDTH="60" HEIGHT="60"/>
|
||||
</A>
|
||||
</TD>
|
||||
<TD WIDTH="10%" VALIGN="MIDDLE" ALIGN="LEFT">
|
||||
<A HREF="{PlanName}_Entities{$default_extension}">
|
||||
<FONT SIZE="5">Entities</FONT>
|
||||
</A>
|
||||
</TD>
|
||||
<TD WIDTH="10%" VALIGN="MIDDLE" ALIGN="RIGHT" >
|
||||
<A HREF="{PlanName}_TablesSummary{$default_extension}">
|
||||
<IMG BORDER="0" SRC="TablesSummary.gif" ALT="Show tables attributes" WIDTH="60" HEIGHT="60"/>
|
||||
</A>
|
||||
</TD>
|
||||
<TD WIDTH="10%" VALIGN="MIDDLE" ALIGN="LEFT">
|
||||
<A HREF="{PlanName}_TablesSummary{$default_extension}">
|
||||
<FONT SIZE="5">Tables summary</FONT>
|
||||
</A>
|
||||
</TD>
|
||||
<TD WIDTH="10%" VALIGN="MIDDLE" ALIGN="RIGHT" >
|
||||
<A HREF="{PlanName}_Tables{$default_extension}">
|
||||
<IMG BORDER="0" SRC="Tables.gif" ALT="Show table field details" WIDTH="60" HEIGHT="60"/>
|
||||
</A>
|
||||
</TD>
|
||||
<TD WIDTH="10%" VALIGN="MIDDLE" ALIGN="LEFT">
|
||||
<A HREF="{PlanName}_Tables{$default_extension}">
|
||||
<FONT SIZE="5">Tables</FONT>
|
||||
</A>
|
||||
</TD>
|
||||
|
||||
<TD WIDTH="10%" VALIGN="MIDDLE" ALIGN="RIGHT" >
|
||||
<A HREF="{PlanName}_DataDictionary{$default_extension}">
|
||||
<IMG BORDER="0" SRC="DataDictionary.gif" ALT="Show all project fields"/>
|
||||
</A>
|
||||
</TD>
|
||||
<TD WIDTH="10%" VALIGN="MIDDLE" ALIGN="LEFT">
|
||||
<A HREF="{PlanName}_DataDictionary{$default_extension}">
|
||||
<FONT SIZE="5">Data dictionary</FONT>
|
||||
</A>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="PlanTotalizer">
|
||||
<P align="center">
|
||||
<TABLE border="0" cellspacing="0" cellpadding="8">
|
||||
<TR>
|
||||
<TD bgcolor="#DBDBDB" colspan="4" align="center">
|
||||
<font color="#000080"><B>Project summary</B></font>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="20%" bgcolor="#DBDBDB"></TD>
|
||||
<TD width="40%" bgcolor="#000080" style="border-right: 1px solid rgb(0,0,0)" align="center">
|
||||
<SPAN style="color: rgb(255,255,255)"><B>Entities</B></SPAN>
|
||||
</TD>
|
||||
<TD width="20%" bgcolor="#000080" style="border-right: 1px solid rgb(0,0,0)" align="center">
|
||||
<SPAN style="color: rgb(255,255,255)"><B>Tables</B></SPAN>
|
||||
</TD>
|
||||
<TD width="20%" bgcolor="#000080" align="center">
|
||||
<SPAN style="color: rgb(255,255,255)"><B>Fields</B></SPAN>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD bgcolor="#FFFF00"><B>Total nr.</B></TD>
|
||||
<TD bgcolor="#FFFF00" style="border-right: 1px solid rgb(0,0,0)" align="center">
|
||||
<xsl:value-of select="TotEntities"/>
|
||||
</TD>
|
||||
<TD bgcolor="#FFFF00" style="border-right: 1px solid rgb(0,0,0)" align="center">
|
||||
<xsl:value-of select="TotTables"/>
|
||||
</TD>
|
||||
<TD bgcolor="#FFFF00" align="center">
|
||||
<xsl:value-of select="TotFields"/>
|
||||
</TD>
|
||||
</TR>
|
||||
<xsl:if test="Entities/*">
|
||||
<TR>
|
||||
<TD bgcolor="#DBDBDB"></TD>
|
||||
<TD bgcolor="#DBDBDB">
|
||||
<TABLE border="0" width="100%" cellspacing="0">
|
||||
<TR>
|
||||
<TD style="border-right: 1px solid rgb(0,0,0); border-bottom: 2px solid rgb(0,0,0)" bgcolor="#DBDBDB">
|
||||
<font face="Times New Roman" size="2"><B>Entity type</B></font>
|
||||
</TD>
|
||||
<TD style="border-bottom: 2px solid rgb(0,0,0)" bgcolor="#DBDBDB" align="right">
|
||||
<font face="Times New Roman" size="2"><B>Q.ty</B></font>
|
||||
</TD>
|
||||
</TR>
|
||||
<xsl:for-each select="Entities/*">
|
||||
<TR>
|
||||
<TD class="prjsum" align="left"><xsl:value-of select="local-name(.)"/></TD>
|
||||
<TD class="prjsum2" align="right"><xsl:value-of select="."/></TD>
|
||||
</TR>
|
||||
</xsl:for-each>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD bgcolor="#DBDBDB"></TD>
|
||||
<TD bgcolor="#DBDBDB"></TD>
|
||||
</TR>
|
||||
</xsl:if>
|
||||
</TABLE>
|
||||
</P>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Gestione celle vuote -->
|
||||
|
||||
<xsl:template match="PlanName | PlanSubtitle | PlanAuthor | PlanUser |
|
||||
PlanVersion | PlanCreated | PlanLastrevision">
|
||||
<xsl:call-template name="ValueOrNotAvailable"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
</xsl:stylesheet>
|
||||
BIN
Doc/No.gif
Normal file
|
After Width: | Height: | Size: 963 B |
BIN
Doc/Object.gif
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
573
Doc/Routine.xsl
Normal file
@ -0,0 +1,573 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
|
||||
<xsl:output method="html" version="4.0" encoding="ISO-8859-1"/>
|
||||
|
||||
<xsl:include href="common.xsl"/>
|
||||
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:apply-templates select="Routine"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Nodo principale -->
|
||||
|
||||
<xsl:template match="Routine">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<STYLE>
|
||||
.Item {font-family:Tahoma}
|
||||
BODY {font-family:Times New Roman; color:black; background:white; margin:20px}
|
||||
TABLE {font-family:Times New Roman; color:black; background:white}
|
||||
.FIELD_TABLE {border: 1px solid; margin-top:5px; margin-bottom:5px; background:moccasin}
|
||||
.FIELD_CELL {padding-left:10px; padding-right:10px}
|
||||
.ERROR_MSG {color:red; font-weight:normal; font-style:italic}
|
||||
A:hover {color:red}
|
||||
.BATCH_LINK:hover {color:DARKORANGE}
|
||||
.BATCH_LINK {color:DARKSLATEBLUE; font-weight:bold; text-decoration:none}
|
||||
.PLUS { }
|
||||
</STYLE>
|
||||
<SCRIPT language="JavaScript" type="text/javascript"><xsl:text disable-output-escaping='yes'><![CDATA[
|
||||
function swap_style(id) {
|
||||
var t = document.getElementById(id+'_h').style.display;
|
||||
document.getElementById(id+'_h').style.display = document.getElementById(id+'_s').style.display;
|
||||
document.getElementById(id+'_s').style.display = t;
|
||||
}
|
||||
]]></xsl:text></SCRIPT>
|
||||
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="#FFFFFF">
|
||||
<A NAME="top-of-file"/>
|
||||
|
||||
<!-- ********** Titolo ********** -->
|
||||
|
||||
<P ALIGN="CENTER">
|
||||
<FONT COLOR="#000080" SIZE="6"><B><xsl:value-of select="Title"/></B></FONT>
|
||||
</P>
|
||||
|
||||
<!-- ********** Dati globali ********** -->
|
||||
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLSPACING="0" STYLE="margin-top:10px; margin-bottom:30px">
|
||||
<xsl:if test="Version!=''">
|
||||
<TR>
|
||||
<TD WIDTH="50%" COLSPAN="5" ALIGN="RIGHT" VALIGN="TOP" HEIGHT="25">
|
||||
<B>Version:</B>
|
||||
</TD>
|
||||
<TD WIDTH="50%" COLSPAN="5" ALIGN="LEFT" VALIGN="TOP">
|
||||
<xsl:value-of select="Version"/>
|
||||
</TD>
|
||||
</TR>
|
||||
</xsl:if>
|
||||
<xsl:if test="Author!=''">
|
||||
<TR>
|
||||
<TD WIDTH="50%" COLSPAN="5" ALIGN="RIGHT" VALIGN="TOP" HEIGHT="25">
|
||||
<B>Author:</B>
|
||||
</TD>
|
||||
<TD WIDTH="50%" COLSPAN="5" ALIGN="LEFT" VALIGN="TOP">
|
||||
<xsl:value-of select="Author"/>
|
||||
</TD>
|
||||
</TR>
|
||||
</xsl:if>
|
||||
<xsl:if test="Created!=''">
|
||||
<TR>
|
||||
<TD WIDTH="50%" COLSPAN="5" ALIGN="RIGHT" VALIGN="TOP" HEIGHT="25">
|
||||
<B>Created:</B>
|
||||
</TD>
|
||||
<TD WIDTH="50%" COLSPAN="5" ALIGN="LEFT" VALIGN="TOP">
|
||||
<xsl:value-of select="Created"/>
|
||||
</TD>
|
||||
</TR>
|
||||
</xsl:if>
|
||||
<xsl:if test="Lastrevision!=''">
|
||||
<TR>
|
||||
<TD WIDTH="50%" COLSPAN="5" ALIGN="RIGHT" VALIGN="TOP" HEIGHT="25">
|
||||
<B>Last modify:</B>
|
||||
</TD>
|
||||
<TD WIDTH="50%" COLSPAN="5" ALIGN="LEFT" VALIGN="TOP">
|
||||
<xsl:value-of select="Lastrevision"/>
|
||||
</TD>
|
||||
</TR>
|
||||
</xsl:if>
|
||||
<xsl:if test="User!=''">
|
||||
<TR>
|
||||
<TD WIDTH="50%" COLSPAN="5" ALIGN="RIGHT" VALIGN="TOP" HEIGHT="25">
|
||||
<B>User:</B>
|
||||
</TD>
|
||||
<TD WIDTH="50%" COLSPAN="5" ALIGN="LEFT" VALIGN="TOP">
|
||||
<xsl:value-of select="User"/>
|
||||
</TD>
|
||||
</TR>
|
||||
</xsl:if>
|
||||
</TABLE>
|
||||
|
||||
<!-- ********** Visualizzazione delle note generali se presenti ********** -->
|
||||
|
||||
<xsl:if test="Note!=''">
|
||||
<TABLE BORDER="0" WIDTH="80%" CELLPADDING="3" CELLSPACING="3" ALIGN="CENTER">
|
||||
<TR><TD COLSPAN="8" xsl:use-attribute-sets="global-notes">
|
||||
<xsl:apply-templates select="Note"/>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</xsl:if>
|
||||
|
||||
<!-- ********** Indice delle pagine strutturato su 3 max pagine per riga ********** -->
|
||||
|
||||
<TABLE BORDER="0" ALIGN="CENTER" WIDTH="100%" CELLPADDING="4" CELLSPACING="0">
|
||||
<xsl:for-each select="Pag">
|
||||
<xsl:if test="position() mod 3 = 1">
|
||||
<TR>
|
||||
<xsl:call-template name="PageIndex">
|
||||
<xsl:with-param name="name" select="'Procedure'"/>
|
||||
<xsl:with-param name="page" select="."/>
|
||||
<xsl:with-param name="next" select="count(following-sibling::Pag[position() <= 2])"/>
|
||||
</xsl:call-template>
|
||||
</TR>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</TABLE>
|
||||
|
||||
<!-- ********** Elenco delle procedure ********** -->
|
||||
|
||||
<xsl:apply-templates select="Pag"/>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- ********** Gestione del tag "Pag" ********** -->
|
||||
|
||||
<xsl:template match="Pag">
|
||||
<TABLE BORDER="0" WIDTH="100%" ALIGN="CENTER">
|
||||
<TR><TD BGCOLOR="#B0C4DE" ALIGN="CENTER">
|
||||
<FONT COLOR="#000080" SIZE="4">
|
||||
<A NAME="{Title/@LinkID}">
|
||||
<xsl:call-template name="PageTitle">
|
||||
<xsl:with-param name="page" select="."/>
|
||||
<xsl:with-param name="name" select="'Procedure'"/>
|
||||
</xsl:call-template>
|
||||
</A>
|
||||
</FONT>
|
||||
</TD></TR>
|
||||
<TR><TD> </TD></TR>
|
||||
|
||||
<xsl:if test="Note!=''">
|
||||
<TR><TD>
|
||||
<TABLE ALIGN="CENTER" WIDTH="80%" BORDER="0" CELLPADDING="0" CELLSPACING="0">
|
||||
<TR><TD xsl:use-attribute-sets="page-notes">
|
||||
<xsl:apply-templates select="Note"/>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</TD></TR>
|
||||
<TR><TD> </TD></TR>
|
||||
</xsl:if>
|
||||
|
||||
<TR><TD>
|
||||
<xsl:apply-templates select="Item"/>
|
||||
</TD></TR>
|
||||
|
||||
<TR><TD>
|
||||
<TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="20">
|
||||
<TR><TD ALIGN="LEFT">
|
||||
<A HREF="#{Title/@LinkID}">Go to
|
||||
<xsl:call-template name="PageTitle">
|
||||
<xsl:with-param name="page" select="."/>
|
||||
<xsl:with-param name="name" select="'Procedure'"/>
|
||||
</xsl:call-template>
|
||||
</A>
|
||||
</TD>
|
||||
<TD ALIGN="RIGHT">
|
||||
<A HREF="#top-of-file">Go to top</A>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- ******** VAR ******** -->
|
||||
|
||||
<xsl:template match="Item[@type='var']">
|
||||
<TR CLASS="Item">
|
||||
<TD STYLE="padding-left:20px">
|
||||
<xsl:if test="Operation='def'">
|
||||
<xsl:choose>
|
||||
<xsl:when test="Parameter='TRUE'"><B>Parameter </B></xsl:when>
|
||||
<xsl:when test="Local='TRUE'"><B>Local Var </B></xsl:when>
|
||||
<xsl:when test="Global='TRUE'"><B>Global Var </B></xsl:when>
|
||||
<xsl:otherwise><B>Extern Var </B></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:if>
|
||||
<xsl:value-of select="Text"/>
|
||||
<xsl:if test="Comment!=''">
|
||||
: <SPAN STYLE="color:green"><xsl:value-of select="Comment"/></SPAN>
|
||||
</xsl:if>
|
||||
</TD>
|
||||
</TR>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- ******** EXEC ******** -->
|
||||
|
||||
<xsl:template match="Item[@type='exec']">
|
||||
<TR CLASS="Item">
|
||||
<TD STYLE="padding-left:20px">
|
||||
<xsl:if test="Check!='stm'">
|
||||
<B>Exec
|
||||
<xsl:choose>
|
||||
<xsl:when test="Check='bat'">Routine </xsl:when>
|
||||
<xsl:when test="Check='rep'">Report </xsl:when>
|
||||
<xsl:when test="Check='scr'">Dialog Window </xsl:when>
|
||||
<xsl:when test="Check='man'">Manual Block </xsl:when>
|
||||
<xsl:when test="Check='ext'">Program </xsl:when>
|
||||
<xsl:when test="Check='page'">Page </xsl:when>
|
||||
<xsl:when test="Check='utk'">UTK Object </xsl:when>
|
||||
</xsl:choose>
|
||||
</B>
|
||||
</xsl:if>
|
||||
<xsl:value-of select="Expression"/>
|
||||
</TD>
|
||||
</TR>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- ******** CREATE TEMPORARY TABLE ******** -->
|
||||
|
||||
<xsl:template match="Item[@type='temptable']">
|
||||
<TR CLASS="Item">
|
||||
<TD STYLE="padding-left:20px">
|
||||
<B>Create temporary table </B>
|
||||
<xsl:value-of select="TempTable"/>
|
||||
<xsl:if test="SelectType='query'">
|
||||
<B> from query </B><xsl:value-of select="TableName"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="SelectType='sql'">
|
||||
<B> from ( select </B><xsl:value-of select="Field"/>
|
||||
<B> from </B><xsl:value-of select="TableName"/>
|
||||
<xsl:if test="Where!='' or Order!='' or Group!=''">
|
||||
<BR/>
|
||||
</xsl:if>
|
||||
<xsl:if test="Where!=''">
|
||||
<B> where </B><xsl:value-of select="Where"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="Order!=''">
|
||||
<B> order by </B><xsl:value-of select="Order"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="Group!=''">
|
||||
<B> group by </B><xsl:value-of select="Group"/>
|
||||
</xsl:if>
|
||||
<B> )</B>
|
||||
</xsl:if>
|
||||
<xsl:if test="Comment!=''">
|
||||
: <SPAN STYLE="color:green"><xsl:value-of select="Comment"/></SPAN>
|
||||
</xsl:if>
|
||||
</TD>
|
||||
</TR>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- ******** DROP TEMPORARY TABLE ******** -->
|
||||
|
||||
<xsl:template match="Item[@type='droptemptable']">
|
||||
<TR CLASS="Item">
|
||||
<TD STYLE="padding-left:20px">
|
||||
<B>Drop temporary table </B><xsl:value-of select="TempTable"/>
|
||||
<xsl:if test="Comment!=''">
|
||||
: <SPAN STYLE="color:green"><xsl:value-of select="Comment"/></SPAN>
|
||||
</xsl:if>
|
||||
</TD>
|
||||
</TR>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- ******** IF CASE TRY-CATCH WHILE BEGIN ******** -->
|
||||
|
||||
<xsl:template match="Item[@type='if' or @type='case' or @type='try' or @type='while' or @type='begin']">
|
||||
<xsl:variable name="first">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@type='if'">If </xsl:when>
|
||||
<xsl:when test="@type='case'">Case </xsl:when>
|
||||
<xsl:when test="@type='try'">Try </xsl:when>
|
||||
<xsl:when test="@type='while'">While </xsl:when>
|
||||
<xsl:when test="@type='begin'">Begin </xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="middle">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@type='if'">Else If </xsl:when>
|
||||
<xsl:when test="@type='case'">Case </xsl:when>
|
||||
<xsl:when test="@type='try'">Catch </xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="last">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@type='if'">Else </xsl:when>
|
||||
<xsl:when test="@type='case'">Otherwise </xsl:when>
|
||||
<xsl:when test="@type='try'">Catch </xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<TR CLASS="Item">
|
||||
<TD STYLE="padding-left:20px">
|
||||
<xsl:for-each select="condition | else">
|
||||
<DIV ID="{concat(generate-id(), @number, '_h')}" STYLE="display:none">
|
||||
<A CLASS="BATCH_LINK" TITLE="Expand node" href="javascript:swap_style('{concat(generate-id(), @number)}')">
|
||||
<SPAN CLASS="PLUS">+</SPAN>
|
||||
<xsl:choose>
|
||||
<xsl:when test="position()=1"><xsl:value-of select="$first"/></xsl:when>
|
||||
<xsl:when test="position()=last()"><xsl:value-of select="$last"/></xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="$middle"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:choose>
|
||||
<xsl:when test="../@type='begin'"><xsl:value-of select="../Comment"/></xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="@value"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</A>
|
||||
<xsl:if test="Comment!=''">
|
||||
: <SPAN STYLE="color:green"><xsl:value-of select="Comment"/></SPAN>
|
||||
</xsl:if>
|
||||
</DIV>
|
||||
<DIV ID="{concat(generate-id(), @number, '_s')}" STYLE="display:block">
|
||||
<A CLASS="BATCH_LINK" TITLE="Collapse node" href="javascript:swap_style('{concat(generate-id(), @number)}')">
|
||||
<SPAN CLASS="PLUS">-</SPAN>
|
||||
<xsl:choose>
|
||||
<xsl:when test="position()=1"><xsl:value-of select="$first"/></xsl:when>
|
||||
<xsl:when test="position()=last()"><xsl:value-of select="$last"/></xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="$middle"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:choose>
|
||||
<xsl:when test="../@type='begin'"><xsl:value-of select="../Comment"/></xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="@value"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</A>
|
||||
<TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" CLASS="Item">
|
||||
<xsl:apply-templates select="Item"/>
|
||||
</TABLE>
|
||||
<xsl:if test="position()=last() and ../@type='begin'">
|
||||
End <xsl:value-of select="../Comment"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="position()=last() and ../@type!='begin'">
|
||||
End <xsl:value-of select="$first"/>
|
||||
</xsl:if>
|
||||
</DIV>
|
||||
</xsl:for-each>
|
||||
</TD>
|
||||
</TR>
|
||||
</xsl:template>
|
||||
|
||||
<!-- ******** WRITE READ DELETE INSERT ******** -->
|
||||
|
||||
<xsl:template match="Item[@type='write' or @type='read' or @type='delete' or @type='insert']">
|
||||
<xsl:variable name="instr">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@type='write'">Write into </xsl:when>
|
||||
<xsl:when test="@type='read'">Read from </xsl:when>
|
||||
<xsl:when test="@type='delete'">Delete from </xsl:when>
|
||||
<xsl:when test="@type='insert'">Insert into </xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<TR CLASS="Item">
|
||||
<TD STYLE="padding-left:20px">
|
||||
|
||||
<xsl:if test="Type='values' or @type='read'"> <!-- Read non ha l'elemento <Type> -->
|
||||
|
||||
<DIV ID="{concat(generate-id(), '_s')}" STYLE="display:block">
|
||||
<A CLASS="BATCH_LINK" TITLE="Expand node" href="javascript:swap_style('{generate-id()}')">
|
||||
<SPAN CLASS="PLUS">+</SPAN>
|
||||
<xsl:value-of select="$instr"/>
|
||||
<xsl:value-of select="TableName"/>
|
||||
</A>
|
||||
<xsl:if test="Comment!=''">
|
||||
: <SPAN STYLE="color:green"><xsl:value-of select="Comment"/></SPAN>
|
||||
</xsl:if>
|
||||
</DIV>
|
||||
<DIV ID="{concat(generate-id(), '_h')}" STYLE="display:none">
|
||||
<A CLASS="BATCH_LINK" TITLE="Collapse node" href="javascript:swap_style('{generate-id()}')">
|
||||
<SPAN CLASS="PLUS">-</SPAN>
|
||||
<xsl:value-of select="$instr"/>
|
||||
<xsl:value-of select="TableName"/>
|
||||
</A>
|
||||
<TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" CLASS="Item" STYLE="margin-bottom:5px">
|
||||
<TR><TD CLASS="FIELD_CELL">
|
||||
<TABLE FRAME="border" CELLSPACING="0" CLASS="FIELD_TABLE">
|
||||
<TR>
|
||||
<TH CLASS="FIELD_CELL">Key fields</TH>
|
||||
<xsl:if test="@type='delete' or @type='write'">
|
||||
<TH CLASS="FIELD_CELL">Relation</TH>
|
||||
</xsl:if>
|
||||
<TH CLASS="FIELD_CELL">Key values</TH>
|
||||
</TR>
|
||||
<xsl:for-each select="KeyFields/Field">
|
||||
<TR>
|
||||
<TD CLASS="FIELD_CELL"><xsl:value-of select="@name"/></TD>
|
||||
<xsl:if test="../../@type='delete' or ../../@type='write'">
|
||||
<TD CLASS="FIELD_CELL">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@operation!=''"><xsl:value-of select="@operation"/></xsl:when>
|
||||
<xsl:otherwise>=</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</TD>
|
||||
</xsl:if>
|
||||
<TD CLASS="FIELD_CELL"><xsl:value-of select="@value"/></TD>
|
||||
</TR>
|
||||
</xsl:for-each>
|
||||
</TABLE>
|
||||
</TD></TR>
|
||||
<xsl:if test="@type='write' or @type='read'">
|
||||
<TR><TD CLASS="FIELD_CELL">
|
||||
<TABLE FRAME="border" CELLSPACING="0" CLASS="FIELD_TABLE">
|
||||
<xsl:if test="@type='write'">
|
||||
<TR>
|
||||
<TH CLASS="FIELD_CELL">Write fields</TH>
|
||||
<TH CLASS="FIELD_CELL">Values to write</TH>
|
||||
<TH CLASS="FIELD_CELL">Operation</TH>
|
||||
</TR>
|
||||
<xsl:for-each select="WriteFields/Field">
|
||||
<TR>
|
||||
<TD CLASS="FIELD_CELL"><xsl:value-of select="@name"/></TD>
|
||||
<TD CLASS="FIELD_CELL"><xsl:value-of select="@value"/></TD>
|
||||
<TD CLASS="FIELD_CELL"><xsl:value-of select="@operation"/></TD>
|
||||
</TR>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
<xsl:if test="@type='read'">
|
||||
<TR>
|
||||
<TH CLASS="FIELD_CELL">Read fields</TH>
|
||||
<TH CLASS="FIELD_CELL">Into variables</TH>
|
||||
</TR>
|
||||
<xsl:for-each select="ReadFields/Field">
|
||||
<TR>
|
||||
<TD CLASS="FIELD_CELL"><xsl:value-of select="@name"/></TD>
|
||||
<TD CLASS="FIELD_CELL"><xsl:value-of select="@value"/></TD>
|
||||
</TR>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
</TABLE>
|
||||
</TD></TR>
|
||||
</xsl:if>
|
||||
<xsl:if test="Expression!=''">
|
||||
<TR><TD CLASS="FIELD_CELL">
|
||||
<FONT CLASS="ERROR_MSG">Error Message: <xsl:value-of select="Expression"/></FONT>
|
||||
</TD></TR>
|
||||
</xsl:if>
|
||||
</TABLE>
|
||||
End <xsl:value-of select="substring-before($instr,' ')"/>
|
||||
</DIV>
|
||||
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="Type='query' or Type='sql'">
|
||||
<B><xsl:value-of select="$instr"/></B>
|
||||
<xsl:value-of select="TableName"/>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="Type='query'">
|
||||
<B> from query </B><xsl:value-of select="SelectTable"/>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="Type='sql'">
|
||||
<B> from ( select </B><xsl:value-of select="Field"/>
|
||||
<B> from </B><xsl:value-of select="SelectTable"/>
|
||||
<xsl:if test="Where!=''">
|
||||
<B> where </B><xsl:value-of select="Where"/>
|
||||
</xsl:if>
|
||||
<B> )</B>
|
||||
</xsl:if>
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- ******** SELECT ******** -->
|
||||
|
||||
<xsl:template match="Item[@type='select']">
|
||||
<TR CLASS="Item">
|
||||
<TD STYLE="padding-left:20px">
|
||||
|
||||
<DIV ID="{concat(generate-id(), '_s')}" STYLE="display:block">
|
||||
<A CLASS="BATCH_LINK" TITLE="Expand node" href="javascript:swap_style('{generate-id()}')">
|
||||
<SPAN CLASS="PLUS">+</SPAN>
|
||||
Select from <xsl:value-of select="TableName"/>
|
||||
</A>
|
||||
<xsl:if test="condition[1]/Comment!=''">
|
||||
: <SPAN STYLE="color:green"><xsl:value-of select="condition[1]/Comment"/></SPAN>
|
||||
</xsl:if>
|
||||
</DIV>
|
||||
<DIV ID="{concat(generate-id(), '_h')}" STYLE="display:none">
|
||||
<A CLASS="BATCH_LINK" TITLE="Collapse node" href="javascript:swap_style('{generate-id()}')">
|
||||
<SPAN CLASS="PLUS">-</SPAN>
|
||||
Select <xsl:value-of select="Field"/> from
|
||||
<xsl:if test="Type!='fltb'">query </xsl:if>
|
||||
<xsl:value-of select="TableName"/>
|
||||
<xsl:if test="Start!='' or OrderKey!='' or While!='' or Filter!=''">
|
||||
<BR/>
|
||||
<xsl:if test="Start!=''">
|
||||
start <xsl:value-of select="Start"/>
|
||||
<xsl:if test="OrderKey!='' or While!='' or Filter!=''">;</xsl:if>
|
||||
</xsl:if>
|
||||
<xsl:if test="OrderKey!=''">
|
||||
order keys <xsl:value-of select="OrderKey"/>
|
||||
<xsl:if test="While!='' or Filter!=''">;</xsl:if>
|
||||
</xsl:if>
|
||||
<xsl:if test="While!=''">
|
||||
while <xsl:value-of select="While"/>
|
||||
<xsl:if test="Filter!=''">;</xsl:if>
|
||||
</xsl:if>
|
||||
<xsl:if test="Filter!=''">
|
||||
filter <xsl:value-of select="Filter"/>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
<xsl:if test="Where!='' or Order!='' or Group!=''">
|
||||
<BR/>
|
||||
<xsl:if test="Where!=''">
|
||||
where <xsl:value-of select="Where"/>
|
||||
<xsl:if test="Order!='' or Group!=''">;</xsl:if>
|
||||
</xsl:if>
|
||||
<xsl:if test="Order!=''">
|
||||
order by <xsl:value-of select="Order"/>
|
||||
<xsl:if test="Group!=''">;</xsl:if>
|
||||
</xsl:if>
|
||||
<xsl:if test="Group!=''">
|
||||
group by <xsl:value-of select="Group"/>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
</A>
|
||||
<TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" CLASS="Item">
|
||||
<xsl:apply-templates select="condition[1]/Item"/>
|
||||
</TABLE>
|
||||
End Select
|
||||
</DIV>
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- ********* REM ********* -->
|
||||
|
||||
<xsl:template match="Item[@type='remark']">
|
||||
<TR CLASS="Item">
|
||||
<TD STYLE="padding-left:20px; color:green">
|
||||
<xsl:value-of select="Text"/>
|
||||
</TD>
|
||||
</TR>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- ******** Other items ******** -->
|
||||
|
||||
<xsl:template match="Item">
|
||||
<TR CLASS="Item">
|
||||
<TD STYLE="padding-left:20px">
|
||||
<xsl:value-of select="Text"/>
|
||||
</TD>
|
||||
</TR>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
||||
BIN
Doc/Stop.gif
Normal file
|
After Width: | Height: | Size: 150 B |
BIN
Doc/Tables.gif
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
449
Doc/Tables.xsl
Normal file
@ -0,0 +1,449 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
|
||||
<xsl:output method="html" version="4.0" encoding="ISO-8859-1"/>
|
||||
|
||||
<xsl:param name="default_extension" select="'.xml'"/> <!-- usato nei link del tag Plan -->
|
||||
|
||||
<xsl:include href="common.xsl"/>
|
||||
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:apply-templates select="Plan"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Nodo principale -->
|
||||
|
||||
<xsl:template match="Plan">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<STYLE>
|
||||
BODY {font-family:Times New Roman; color:black; background:white; margin:20px}
|
||||
TABLE {font-family:Times New Roman; color:black; background:white}
|
||||
A:hover {color:red}
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<P ALIGN="CENTER"><FONT COLOR="#000080" SIZE="6"><B>Tables</B></FONT></P>
|
||||
<xsl:apply-templates select="PlanItemlist/PlanItem/ItemTable">
|
||||
<xsl:sort select="TableName"/>
|
||||
</xsl:apply-templates>
|
||||
<DIV ALIGN="CENTER">
|
||||
<A HREF="{PlanName}_Main{$default_extension}">Project overview</A>
|
||||
</DIV>
|
||||
</BODY>
|
||||
</HTML>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="ItemTable">
|
||||
<A NAME="Table_{TableName}">
|
||||
<FONT SIZE="5"><xsl:value-of select="TableName"/></FONT>
|
||||
</A>
|
||||
|
||||
<!-- Descrizione tabella -->
|
||||
|
||||
<BLOCKQUOTE>
|
||||
<TABLE BORDER="1" CELLPADDING="4" CELLSPACING="0">
|
||||
<TR BGCOLOR="#6495ED">
|
||||
<TD><FONT COLOR="WHITE"><B>Description</B></FONT></TD>
|
||||
<TD><FONT COLOR="WHITE"><B>Phname</B></FONT></TD>
|
||||
<TD><FONT COLOR="WHITE"><B>Company</B></FONT></TD>
|
||||
<xsl:if test="TableYear">
|
||||
<TD><FONT COLOR="WHITE"><B>Year</B></FONT></TD>
|
||||
</xsl:if>
|
||||
<xsl:if test="TableUser">
|
||||
<TD><FONT COLOR="WHITE"><B>User</B></FONT></TD>
|
||||
</xsl:if>
|
||||
<xsl:if test="TableCheck">
|
||||
<TD><FONT COLOR="WHITE"><B>Check</B></FONT></TD>
|
||||
</xsl:if>
|
||||
</TR>
|
||||
<TR BGCOLOR="#F4FBFF">
|
||||
<TD><xsl:apply-templates select="TableComment"/></TD>
|
||||
<TD><xsl:apply-templates select="TablePhname"/></TD>
|
||||
<TD ALIGN="CENTER"><xsl:apply-templates select="TableCompany"/></TD>
|
||||
<xsl:if test="TableYear">
|
||||
<TD ALIGN="CENTER"><xsl:apply-templates select="TableYear"/></TD>
|
||||
</xsl:if>
|
||||
<xsl:if test="TableUser">
|
||||
<TD ALIGN="CENTER"><xsl:apply-templates select="TableUser"/></TD>
|
||||
</xsl:if>
|
||||
<xsl:if test="TableCheck">
|
||||
<TD><xsl:apply-templates select="TableCheck"/></TD>
|
||||
</xsl:if>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</BLOCKQUOTE>
|
||||
|
||||
<!-- Descrizione indici -->
|
||||
|
||||
<xsl:if test="TableIndex">
|
||||
<BLOCKQUOTE>
|
||||
<TABLE BORDER="0" CELLPADDING="4" CELLSPACING="0">
|
||||
<TR BGCOLOR="#85ACDC">
|
||||
<TD COLSPAN="2" ALIGN="CENTER" STYLE="BORDER-BOTTOM: 1px SOLID #000000;">
|
||||
<B>INDEXES</B>
|
||||
</TD>
|
||||
</TR>
|
||||
<xsl:for-each select="TableIndex">
|
||||
<TR>
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000; BORDER-RIGHT: 1px SOLID #000000;" BGCOLOR="#B0C4DE">
|
||||
<B><xsl:value-of select="position()"/></B>
|
||||
</TD>
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000;" BGCOLOR="#EDFCFF">
|
||||
<xsl:value-of select="."/>
|
||||
</TD>
|
||||
</TR>
|
||||
</xsl:for-each>
|
||||
</TABLE>
|
||||
</BLOCKQUOTE>
|
||||
</xsl:if>
|
||||
|
||||
<!-- Descrizione autonumber -->
|
||||
|
||||
<xsl:if test="TableAutonum">
|
||||
<BLOCKQUOTE>
|
||||
<TABLE BORDER="0" CELLPADDING="4" CELLSPACING="0">
|
||||
<TR BGCOLOR="#85ACDC">
|
||||
<TD COLSPAN="3" ALIGN="CENTER" STYLE="BORDER-BOTTOM: 1px SOLID #000000;">
|
||||
<B>AUTONUMBERS</B>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="#B0C4DE">
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000; BORDER-RIGHT: 1px SOLID #000000;">
|
||||
<B>Field</B>
|
||||
</TD>
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000; BORDER-RIGHT: 1px SOLID #000000;">
|
||||
<B>Table</B>
|
||||
</TD>
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000;">
|
||||
<B>Condition</B>
|
||||
</TD>
|
||||
</TR>
|
||||
<xsl:for-each select="TableAutonum">
|
||||
<TR BGCOLOR="#EDFCFF">
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000; BORDER-RIGHT: 1px SOLID #000000;">
|
||||
<A HREF="#{../TableName}_{.}"><xsl:value-of select="."/></A>
|
||||
</TD>
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000; BORDER-RIGHT: 1px SOLID #000000;">
|
||||
<xsl:apply-templates select="@Tbl"/>
|
||||
</TD>
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000;">
|
||||
<xsl:apply-templates select="@Cnd"/>
|
||||
</TD>
|
||||
</TR>
|
||||
</xsl:for-each>
|
||||
</TABLE>
|
||||
</BLOCKQUOTE>
|
||||
</xsl:if>
|
||||
|
||||
<!-- Links -->
|
||||
|
||||
<xsl:if test="TableLink">
|
||||
<BLOCKQUOTE>
|
||||
<xsl:apply-templates select="TableLink">
|
||||
<xsl:sort select="@Type"/>
|
||||
</xsl:apply-templates>
|
||||
</BLOCKQUOTE>
|
||||
</xsl:if>
|
||||
|
||||
<!-- Foreign keys -->
|
||||
|
||||
<xsl:if test="TableForeignkeys/TableForeignkey">
|
||||
<BLOCKQUOTE>
|
||||
<xsl:apply-templates select="TableForeignkeys"/>
|
||||
</BLOCKQUOTE>
|
||||
</xsl:if>
|
||||
|
||||
<!-- Fields -->
|
||||
|
||||
<BLOCKQUOTE>
|
||||
<xsl:apply-templates select="TableFields"/>
|
||||
</BLOCKQUOTE>
|
||||
|
||||
<TABLE WIDTH="100%"><TR><TD ALIGN="RIGHT">
|
||||
<A HREF="#Table_{TableName}">Go to '<xsl:value-of select="TableName"/>'</A>
|
||||
</TD></TR></TABLE>
|
||||
<HR/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Descrizione link -->
|
||||
|
||||
<xsl:template match="TableLink">
|
||||
<xsl:variable name="table"
|
||||
select="/Plan/PlanItemlist/PlanItem[ItemUID=current()/LinkUID]/ItemTable/TableName"/>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN="5">
|
||||
<TABLE BORDER="0" CELLPADDING="4" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#85ACDC">
|
||||
<TD ALIGN="LEFT" STYLE="BORDER-BOTTOM: 1px SOLID #000000;">
|
||||
<B><xsl:value-of select="@Type"/> with </B>
|
||||
<A HREF="#Table_{$table}"><xsl:value-of select="$table"/></A>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="TOP">
|
||||
<TABLE BORDER="0" CELLPADDING="4" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#B0C4DE">
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000; BORDER-RIGHT: 1px SOLID #000000;">
|
||||
<B>Fk Key</B>
|
||||
</TD>
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000;">
|
||||
<B>Fk Ref</B>
|
||||
</TD>
|
||||
</TR>
|
||||
<xsl:for-each select="LinkFk">
|
||||
<TR BGCOLOR="#EDFCFF">
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000; BORDER-RIGHT: 1px SOLID #000000;">
|
||||
<A HREF="#{$table}_{@Key}"><xsl:value-of select="@Key"/></A>
|
||||
</TD>
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000;">
|
||||
<A HREF="#{../../TableName}_{@Ref}"><xsl:value-of select="@Ref"/></A>
|
||||
</TD>
|
||||
</TR>
|
||||
</xsl:for-each>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<xsl:if test="@Type='Relationship' and LinkWrite">
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000;"> </TD>
|
||||
<TD VALIGN="TOP">
|
||||
<TABLE BORDER="0" CELLPADDING="4" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#B0C4DE">
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000; BORDER-RIGHT: 1px SOLID #000000;">
|
||||
<B>Write from</B>
|
||||
</TD>
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000; BORDER-RIGHT: 1px SOLID #000000;">
|
||||
<B>To field</B>
|
||||
</TD>
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000;">
|
||||
<B>Oper.</B>
|
||||
</TD>
|
||||
</TR>
|
||||
<xsl:for-each select="LinkWrite">
|
||||
<TR BGCOLOR="#EDFCFF">
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000; BORDER-RIGHT: 1px SOLID #000000;">
|
||||
<A HREF="#{../../TableName}_{@From}"><xsl:value-of select="@From"/></A>
|
||||
</TD>
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000; BORDER-RIGHT: 1px SOLID #000000;">
|
||||
<A HREF="#{$table}_{@To}"><xsl:value-of select="@To"/></A>
|
||||
</TD>
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000;" ALIGN="CENTER">
|
||||
<xsl:apply-templates select="@Operation"/>
|
||||
</TD>
|
||||
</TR>
|
||||
</xsl:for-each>
|
||||
</TABLE>
|
||||
</TD>
|
||||
</xsl:if>
|
||||
<xsl:if test="@Type='Relationship' and LinkRead">
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000;"> </TD>
|
||||
<TD VALIGN="TOP">
|
||||
<TABLE BORDER="0" CELLPADDING="4" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#B0C4DE">
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000; BORDER-RIGHT: 1px SOLID #000000;">
|
||||
<B>Read from</B>
|
||||
</TD>
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000;">
|
||||
<B>To field</B>
|
||||
</TD>
|
||||
</TR>
|
||||
<xsl:for-each select="LinkRead">
|
||||
<TR BGCOLOR="#EDFCFF">
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000; BORDER-RIGHT: 1px SOLID #000000;">
|
||||
<A HREF="#{$table}_{@From}"><xsl:value-of select="@From"/></A>
|
||||
</TD>
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000;">
|
||||
<A HREF="#{../../TableName}_{@To}"><xsl:value-of select="@To"/></A>
|
||||
</TD>
|
||||
</TR>
|
||||
</xsl:for-each>
|
||||
</TABLE>
|
||||
</TD>
|
||||
</xsl:if>
|
||||
</TR>
|
||||
<xsl:if test="LinkCreate">
|
||||
<TR>
|
||||
<TD COLSPAN="5">
|
||||
<TABLE CELLPADDING="0" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD><xsl:apply-templates select="LinkCreate"/></TD>
|
||||
<TD VALIGN="TOP">Create record if it does not exist</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
</TR>
|
||||
</xsl:if>
|
||||
</TABLE>
|
||||
|
||||
<TABLE>
|
||||
<xsl:if test="LinkNote!=''">
|
||||
<TR>
|
||||
<TD STYLE="BORDER-BOTTOM: 1px SOLID #000000;"><I>Notes</I></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><xsl:apply-templates select="LinkNote"/></TD>
|
||||
</TR>
|
||||
</xsl:if>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Descrizione foreign keys -->
|
||||
|
||||
<xsl:template match="TableForeignkeys">
|
||||
<TABLE BORDER="0" CELLPADDING="4" CELLSPACING="0">
|
||||
<TR BGCOLOR="#85ACDC">
|
||||
<TD COLSPAN="4" ALIGN="CENTER" STYLE="BORDER-BOTTOM: 1px SOLID #000000;">
|
||||
<B>FOREIGN KEYS</B>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="#B0C4DE">
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000; BORDER-RIGHT: 1px SOLID #000000;">
|
||||
<B>Table</B>
|
||||
</TD>
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000; BORDER-RIGHT: 1px SOLID #000000;">
|
||||
<B>Weak entity</B>
|
||||
</TD>
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000; BORDER-RIGHT: 1px SOLID #000000;">
|
||||
<B>Key</B>
|
||||
</TD>
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000;">
|
||||
<B>Ref</B>
|
||||
</TD>
|
||||
</TR>
|
||||
<xsl:for-each select="TableForeignkey">
|
||||
<xsl:variable name="table" select="ForeignkeyTable"/>
|
||||
<TR BGCOLOR="#EDFCFF">
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000; BORDER-RIGHT: 1px SOLID #000000;">
|
||||
<A HREF="#Table_{$table}"><xsl:value-of select="$table"/></A>
|
||||
</TD>
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000; BORDER-RIGHT: 1px SOLID #000000;" ALIGN="CENTER">
|
||||
<xsl:apply-templates select="ForeignkeyWeakentity"/>
|
||||
</TD>
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000; BORDER-RIGHT: 1px SOLID #000000;">
|
||||
<xsl:for-each select="ForeignkeyKey">
|
||||
<A HREF="#{$table}_{.}"><xsl:value-of select="."/></A><BR/>
|
||||
</xsl:for-each>
|
||||
</TD>
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000;">
|
||||
<xsl:for-each select="ForeignkeyRef">
|
||||
<A HREF="#{../../../TableName}_{.}"><xsl:value-of select="."/></A><BR/>
|
||||
</xsl:for-each>
|
||||
</TD>
|
||||
</TR>
|
||||
</xsl:for-each>
|
||||
</TABLE>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Descrizione campi -->
|
||||
|
||||
<xsl:template match="TableFields">
|
||||
<TABLE BORDER="1" CELLPADDING="4" CELLSPACING="0">
|
||||
<TR BGCOLOR="#6495ED" VALIGN="TOP">
|
||||
<TD ROWSPAN="{1+number(TableField/FieldNote!='')}"><FONT COLOR="WHITE"><B>Field</B></FONT></TD>
|
||||
<TD><FONT COLOR="WHITE"><B>Description</B></FONT></TD>
|
||||
<TD><FONT COLOR="WHITE"><B>Type</B></FONT></TD>
|
||||
<TD><FONT COLOR="WHITE"><B>Len</B></FONT></TD>
|
||||
<TD><FONT COLOR="WHITE"><B>Dec</B></FONT></TD>
|
||||
<TD><FONT COLOR="WHITE"><B>Key</B></FONT></TD>
|
||||
<xsl:if test="TableField/FieldNotnull">
|
||||
<TD><FONT COLOR="WHITE"><B>Not null</B></FONT></TD>
|
||||
</xsl:if>
|
||||
<xsl:if test="TableField/FieldRepeated">
|
||||
<TD><FONT COLOR="WHITE"><B>Repeated</B></FONT></TD>
|
||||
</xsl:if>
|
||||
<xsl:if test="TableField/FieldDefaultval">
|
||||
<TD><FONT COLOR="WHITE"><B>Default</B></FONT></TD>
|
||||
</xsl:if>
|
||||
<xsl:if test="TableField/FieldCheck">
|
||||
<TD><FONT COLOR="WHITE"><B>Check</B></FONT></TD>
|
||||
</xsl:if>
|
||||
</TR>
|
||||
<xsl:if test="TableField/FieldNote!=''">
|
||||
<TR BGCOLOR="#6495ED">
|
||||
<TD COLSPAN="9">
|
||||
<FONT COLOR="WHITE"><B>Notes</B></FONT>
|
||||
<xsl:if test="TableField/FieldNote=''">
|
||||
<FONT COLOR="WHITE"><B> (when available)</B></FONT>
|
||||
</xsl:if>
|
||||
</TD>
|
||||
</TR>
|
||||
</xsl:if>
|
||||
<xsl:for-each select="TableField">
|
||||
<xsl:variable name="bgcolor">
|
||||
<xsl:choose><xsl:when test="position() mod 2">#F4FBFF</xsl:when>
|
||||
<xsl:otherwise>#E8FAFF</xsl:otherwise></xsl:choose>
|
||||
</xsl:variable>
|
||||
<TR BGCOLOR="{$bgcolor}" VALIGN="TOP">
|
||||
<TD ROWSPAN="{1+number(FieldNote!='')}">
|
||||
<A NAME="{../../TableName}_{FieldName}"/>
|
||||
<xsl:value-of select="FieldName"/>
|
||||
</TD>
|
||||
<TD><xsl:apply-templates select="FieldComment"/></TD>
|
||||
<TD><xsl:apply-templates select="FieldType"/></TD>
|
||||
<TD><xsl:apply-templates select="FieldLen"/></TD>
|
||||
<TD><xsl:apply-templates select="FieldDec"/></TD>
|
||||
<TD><xsl:apply-templates select="FieldKey"/></TD>
|
||||
<xsl:if test="FieldNotnull">
|
||||
<TD ALIGN="CENTER"><xsl:apply-templates select="FieldNotnull"/></TD>
|
||||
</xsl:if>
|
||||
<xsl:if test="FieldRepeated">
|
||||
<TD ALIGN="CENTER"><xsl:apply-templates select="FieldRepeated"/></TD>
|
||||
</xsl:if>
|
||||
<xsl:if test="FieldDefaultval">
|
||||
<TD><xsl:apply-templates select="FieldDefaultval"/></TD>
|
||||
</xsl:if>
|
||||
<xsl:if test="FieldCheck">
|
||||
<TD><xsl:apply-templates select="FieldCheck"/></TD>
|
||||
</xsl:if>
|
||||
</TR>
|
||||
<xsl:if test="FieldNote!=''">
|
||||
<TR BGCOLOR="{$bgcolor}">
|
||||
<TD COLSPAN="9"><xsl:apply-templates select="FieldNote"/></TD>
|
||||
</TR>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</TABLE>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Gestione checkbox TRUE/FALSE -->
|
||||
|
||||
<xsl:template match="FieldNotnull | FieldRepeated |
|
||||
TableUser | TableYear | TableCompany | ForeignkeyWeakentity |
|
||||
LinkBlinkedismaster | LinkBismaster | LinkCreate">
|
||||
<xsl:call-template name="LogicalCheckBox"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Gestione celle vuote -->
|
||||
|
||||
<xsl:template match="FieldDefaultval | FieldCheck |
|
||||
TableCheck | TableAutonum/@* |
|
||||
LinkWrite/@Operation">
|
||||
<xsl:call-template name="ValueOrNotAvailable">
|
||||
<xsl:with-param name="NA" select="' '"/>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="FieldComment | FieldType | FieldLen | FieldDec | FieldKey |
|
||||
TableComment | TablePhname">
|
||||
<xsl:call-template name="ValueOrNotAvailable"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
</xsl:stylesheet>
|
||||
BIN
Doc/TablesSummary.gif
Normal file
|
After Width: | Height: | Size: 1007 B |
256
Doc/TablesSummary.xsl
Normal file
@ -0,0 +1,256 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
|
||||
<xsl:output method="html" version="4.0" encoding="ISO-8859-1"/>
|
||||
|
||||
<xsl:param name="default_extension" select="'.xml'"/> <!-- usato nei link del tag Plan -->
|
||||
|
||||
<xsl:include href="common.xsl"/>
|
||||
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:apply-templates select="Plan"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Nodo principale -->
|
||||
|
||||
<xsl:template match="Plan">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<STYLE>
|
||||
BODY {font-family:Times New Roman; color:black; background:white; margin:20px}
|
||||
TABLE {font-family:Times New Roman; color:black; background:white}
|
||||
A:hover {color:red}
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<P ALIGN="CENTER"><FONT COLOR="#000080" SIZE="6"><B>Tables summary</B></FONT></P>
|
||||
<xsl:apply-templates select="PlanItemlist/PlanItem/ItemTable">
|
||||
<xsl:sort select="TableName"/>
|
||||
</xsl:apply-templates>
|
||||
<DIV ALIGN="CENTER">
|
||||
<A HREF="{PlanName}_Main{$default_extension}">Project overview</A>
|
||||
</DIV>
|
||||
</BODY>
|
||||
</HTML>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="ItemTable">
|
||||
<A NAME="Table_{TableName}"
|
||||
HREF="{/Plan/PlanName}_Tables{$default_extension}#Table_{TableName}">
|
||||
<FONT SIZE="5"><xsl:value-of select="TableName"/></FONT>
|
||||
</A>
|
||||
|
||||
<!-- Descrizione tabella -->
|
||||
|
||||
<BLOCKQUOTE>
|
||||
<TABLE BORDER="1" CELLPADDING="4" CELLSPACING="0">
|
||||
<TR BGCOLOR="#6495ED">
|
||||
<TD><FONT COLOR="WHITE"><B>Description</B></FONT></TD>
|
||||
<TD><FONT COLOR="WHITE"><B>Phname</B></FONT></TD>
|
||||
<TD><FONT COLOR="WHITE"><B>Company</B></FONT></TD>
|
||||
<xsl:if test="TableYear">
|
||||
<TD><FONT COLOR="WHITE"><B>Year</B></FONT></TD>
|
||||
</xsl:if>
|
||||
<xsl:if test="TableUser">
|
||||
<TD><FONT COLOR="WHITE"><B>User</B></FONT></TD>
|
||||
</xsl:if>
|
||||
<xsl:if test="TableCheck">
|
||||
<TD><FONT COLOR="WHITE"><B>Check</B></FONT></TD>
|
||||
</xsl:if>
|
||||
</TR>
|
||||
<TR BGCOLOR="#F4FBFF">
|
||||
<TD><xsl:apply-templates select="TableComment"/></TD>
|
||||
<TD><xsl:apply-templates select="TablePhname"/></TD>
|
||||
<TD ALIGN="CENTER"><xsl:apply-templates select="TableCompany"/></TD>
|
||||
<xsl:if test="TableYear">
|
||||
<TD ALIGN="CENTER"><xsl:apply-templates select="TableYear"/></TD>
|
||||
</xsl:if>
|
||||
<xsl:if test="TableUser">
|
||||
<TD ALIGN="CENTER"><xsl:apply-templates select="TableUser"/></TD>
|
||||
</xsl:if>
|
||||
<xsl:if test="TableCheck">
|
||||
<TD><xsl:apply-templates select="TableCheck"/></TD>
|
||||
</xsl:if>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</BLOCKQUOTE>
|
||||
|
||||
<!-- Descrizione indici -->
|
||||
|
||||
<xsl:if test="TableIndex">
|
||||
<BLOCKQUOTE>
|
||||
<TABLE BORDER="0" CELLPADDING="4" CELLSPACING="0">
|
||||
<TR BGCOLOR="#85ACDC">
|
||||
<TD COLSPAN="2" ALIGN="CENTER" STYLE="BORDER-BOTTOM: 1px SOLID #000000;">
|
||||
<B>INDEXES</B>
|
||||
</TD>
|
||||
</TR>
|
||||
<xsl:for-each select="TableIndex">
|
||||
<TR>
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000; BORDER-RIGHT: 1px SOLID #000000;" BGCOLOR="#B0C4DE">
|
||||
<B><xsl:value-of select="position()"/></B>
|
||||
</TD>
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000;" BGCOLOR="#EDFCFF">
|
||||
<xsl:value-of select="."/>
|
||||
</TD>
|
||||
</TR>
|
||||
</xsl:for-each>
|
||||
</TABLE>
|
||||
</BLOCKQUOTE>
|
||||
</xsl:if>
|
||||
|
||||
<!-- Foreign keys -->
|
||||
|
||||
<xsl:if test="TableForeignkeys/TableForeignkey">
|
||||
<BLOCKQUOTE>
|
||||
<xsl:apply-templates select="TableForeignkeys"/>
|
||||
</BLOCKQUOTE>
|
||||
</xsl:if>
|
||||
|
||||
<!-- Fields -->
|
||||
|
||||
<BLOCKQUOTE>
|
||||
<xsl:apply-templates select="TableFields"/>
|
||||
</BLOCKQUOTE>
|
||||
|
||||
<TABLE WIDTH="100%"><TR><TD ALIGN="RIGHT">
|
||||
<A HREF="#Table_{TableName}">Go to '<xsl:value-of select="TableName"/>'</A>
|
||||
</TD></TR></TABLE>
|
||||
<HR/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Descrizione foreign keys -->
|
||||
|
||||
<xsl:template match="TableForeignkeys">
|
||||
<TABLE BORDER="0" CELLPADDING="4" CELLSPACING="0">
|
||||
<TR BGCOLOR="#85ACDC">
|
||||
<TD COLSPAN="4" ALIGN="CENTER" STYLE="BORDER-BOTTOM: 1px SOLID #000000;">
|
||||
<B>FOREIGN KEYS</B>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="#B0C4DE">
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000; BORDER-RIGHT: 1px SOLID #000000;">
|
||||
<B>Table</B>
|
||||
</TD>
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000; BORDER-RIGHT: 1px SOLID #000000;">
|
||||
<B>Weak entity</B>
|
||||
</TD>
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000; BORDER-RIGHT: 1px SOLID #000000;">
|
||||
<B>Key</B>
|
||||
</TD>
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000;">
|
||||
<B>Ref</B>
|
||||
</TD>
|
||||
</TR>
|
||||
<xsl:for-each select="TableForeignkey">
|
||||
<xsl:variable name="table" select="ForeignkeyTable"/>
|
||||
<TR BGCOLOR="#EDFCFF">
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000; BORDER-RIGHT: 1px SOLID #000000;">
|
||||
<A HREF="#Table_{$table}"><xsl:value-of select="$table"/></A>
|
||||
</TD>
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000; BORDER-RIGHT: 1px SOLID #000000;" ALIGN="CENTER">
|
||||
<xsl:apply-templates select="ForeignkeyWeakentity"/>
|
||||
</TD>
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000; BORDER-RIGHT: 1px SOLID #000000;">
|
||||
<xsl:for-each select="ForeignkeyKey">
|
||||
<A HREF="#{$table}_{.}"><xsl:value-of select="."/></A><BR/>
|
||||
</xsl:for-each>
|
||||
</TD>
|
||||
<TD STYLE="BORDER-TOP: 1px SOLID #000000;">
|
||||
<xsl:for-each select="ForeignkeyRef">
|
||||
<A HREF="#{../../../TableName}_{.}"><xsl:value-of select="."/></A><BR/>
|
||||
</xsl:for-each>
|
||||
</TD>
|
||||
</TR>
|
||||
</xsl:for-each>
|
||||
</TABLE>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Descrizione campi -->
|
||||
|
||||
<xsl:template match="TableFields" >
|
||||
<TABLE BORDER="1" CELLPADDING="4" CELLSPACING="0">
|
||||
<TR BGCOLOR="#6495ED" VALIGN="TOP">
|
||||
<TD ROWSPAN="{1+number(TableField/FieldNote!='')}"><FONT COLOR="WHITE"><B>Field</B></FONT></TD>
|
||||
<TD><FONT COLOR="WHITE"><B>Description</B></FONT></TD>
|
||||
<TD><FONT COLOR="WHITE"><B>Type</B></FONT></TD>
|
||||
<TD><FONT COLOR="WHITE"><B>Len</B></FONT></TD>
|
||||
<TD><FONT COLOR="WHITE"><B>Dec</B></FONT></TD>
|
||||
<TD><FONT COLOR="WHITE"><B>Key</B></FONT></TD>
|
||||
<xsl:if test="TableField/FieldNotnull">
|
||||
<TD><FONT COLOR="WHITE"><B>Not null</B></FONT></TD>
|
||||
</xsl:if>
|
||||
<xsl:if test="TableField/FieldRepeated">
|
||||
<TD><FONT COLOR="WHITE"><B>Repeated</B></FONT></TD>
|
||||
</xsl:if>
|
||||
<xsl:if test="TableField/FieldDefaultval">
|
||||
<TD><FONT COLOR="WHITE"><B>Default</B></FONT></TD>
|
||||
</xsl:if>
|
||||
<xsl:if test="TableField/FieldCheck">
|
||||
<TD><FONT COLOR="WHITE"><B>Check</B></FONT></TD>
|
||||
</xsl:if>
|
||||
</TR>
|
||||
<xsl:for-each select="TableField">
|
||||
<xsl:variable name="bgcolor">
|
||||
<xsl:choose><xsl:when test="position() mod 2">#F4FBFF</xsl:when>
|
||||
<xsl:otherwise>#E8FAFF</xsl:otherwise></xsl:choose>
|
||||
</xsl:variable>
|
||||
<TR BGCOLOR="{$bgcolor}" VALIGN="TOP">
|
||||
<TD>
|
||||
<A NAME="{../../TableName}_{FieldName}"/>
|
||||
<xsl:value-of select="FieldName"/>
|
||||
</TD>
|
||||
<TD><xsl:apply-templates select="FieldComment"/></TD>
|
||||
<TD><xsl:apply-templates select="FieldType"/></TD>
|
||||
<TD><xsl:apply-templates select="FieldLen"/></TD>
|
||||
<TD><xsl:apply-templates select="FieldDec"/></TD>
|
||||
<TD><xsl:apply-templates select="FieldKey"/></TD>
|
||||
<xsl:if test="FieldNotnull">
|
||||
<TD ALIGN="CENTER"><xsl:apply-templates select="FieldNotnull"/></TD>
|
||||
</xsl:if>
|
||||
<xsl:if test="FieldRepeated">
|
||||
<TD ALIGN="CENTER"><xsl:apply-templates select="FieldRepeated"/></TD>
|
||||
</xsl:if>
|
||||
<xsl:if test="FieldDefaultval">
|
||||
<TD><xsl:apply-templates select="FieldDefaultval"/></TD>
|
||||
</xsl:if>
|
||||
<xsl:if test="FieldCheck">
|
||||
<TD><xsl:apply-templates select="FieldCheck"/></TD>
|
||||
</xsl:if>
|
||||
</TR>
|
||||
</xsl:for-each>
|
||||
</TABLE>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Gestione checkbox TRUE/FALSE -->
|
||||
|
||||
<xsl:template match="FieldNotnull | FieldRepeated |
|
||||
TableUser | TableYear | TableCompany | ForeignkeyWeakentity">
|
||||
<xsl:call-template name="LogicalCheckBox"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Gestione celle vuote -->
|
||||
|
||||
<xsl:template match="FieldDefaultval | FieldCheck | TableCheck">
|
||||
<xsl:call-template name="ValueOrNotAvailable">
|
||||
<xsl:with-param name="NA" select="' '"/>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="FieldComment | FieldType | FieldLen | FieldDec | FieldKey |
|
||||
TableComment | TablePhname">
|
||||
<xsl:call-template name="ValueOrNotAvailable"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
</xsl:stylesheet>
|
||||
218
Doc/User.xsl
Normal file
@ -0,0 +1,218 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
|
||||
<xsl:output method="html" version="4.0" encoding="ISO-8859-1"/>
|
||||
|
||||
<xsl:param name="default_extension" select="'.xml'"/> <!-- usato nel tag File -->
|
||||
|
||||
<xsl:include href="common.xsl"/>
|
||||
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:apply-templates select="Codify"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Nodo principale -->
|
||||
|
||||
<xsl:template match="Codify">
|
||||
<HTML>
|
||||
<HEAD><STYLE>
|
||||
BODY {font-family:Times New Roman; color:black; background:white; margin:20px}
|
||||
TABLE {font-family:Times New Roman; color:black; background:white}
|
||||
A:hover {color:red;}
|
||||
</STYLE></HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF">
|
||||
<A NAME="top-of-file"/>
|
||||
<P ALIGN="CENTER">
|
||||
<FONT COLOR="#000080" SIZE="6"><B><xsl:value-of select="Title"/></B></FONT>
|
||||
</P>
|
||||
<TABLE ALIGN="CENTER" BORDER="0" CELLPADDING="4" CELLSPACING="0">
|
||||
<xsl:if test="Note!=''">
|
||||
<TR><TD COLSPAN="8" xsl:use-attribute-sets="global-notes">
|
||||
<xsl:apply-templates select="Note"/>
|
||||
</TD></TR>
|
||||
</xsl:if>
|
||||
<TR><TD COLSPAN="8">
|
||||
<DL>
|
||||
<xsl:apply-templates select="Include/File"/>
|
||||
</DL>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
<TABLE BORDER="0" ALIGN="CENTER" WIDTH="100%" CELLPADDING="4" CELLSPACING="0">
|
||||
<TR><TD COLSPAN="8" HEIGHT="30"></TD></TR> <!-- RIGA SPAZIATRICE -->
|
||||
<xsl:for-each select="Pag">
|
||||
<xsl:if test="position() mod 3 = 1">
|
||||
<TR>
|
||||
<xsl:call-template name="PageIndex">
|
||||
<xsl:with-param name="page" select="."/>
|
||||
<xsl:with-param name="next" select="count(following-sibling::Pag[position() <= 2])"/>
|
||||
</xsl:call-template>
|
||||
</TR>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</TABLE>
|
||||
<xsl:apply-templates select="Pag"/>
|
||||
</BODY>
|
||||
</HTML>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Gestione del tag "File": link a un file XML o HTML -->
|
||||
|
||||
<xsl:template match="File">
|
||||
<xsl:variable name="link" select="concat(substring-before(@src,'.xml'),$default_extension)"/>
|
||||
<DT STYLE="margin-top:10px">
|
||||
<A HREF="{$link}">
|
||||
<xsl:choose>
|
||||
<xsl:when test="Title!=''"><xsl:value-of select="Title"/></xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="$link"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</A>
|
||||
<xsl:if test="Note!=''">
|
||||
<DD><xsl:apply-templates select="Note"/></DD>
|
||||
</xsl:if>
|
||||
</DT>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Gestione dell'immagine delle maschere e delle aree linkate ai vari oggetti contenuti -->
|
||||
|
||||
<xsl:template match="Pag">
|
||||
<P>
|
||||
<TABLE BORDER="0" WIDTH="100%" ALIGN="CENTER">
|
||||
<TR><TD BGCOLOR="#B0C4DE" ALIGN="CENTER">
|
||||
<FONT COLOR="#000080" SIZE="4">
|
||||
<A NAME="{Title/@LinkID}">
|
||||
<xsl:call-template name="PageTitle">
|
||||
<xsl:with-param name="page" select="."/>
|
||||
</xsl:call-template>
|
||||
</A>
|
||||
</FONT>
|
||||
</TD></TR>
|
||||
<TR><TD> </TD></TR>
|
||||
|
||||
<xsl:if test="Note!=''">
|
||||
<TR><TD>
|
||||
<TABLE ALIGN="CENTER" WIDTH="80%" BORDER="0" CELLPADDING="0" CELLSPACING="0">
|
||||
<TR><TD xsl:use-attribute-sets="page-notes">
|
||||
<xsl:apply-templates select="Note"/>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</TD></TR>
|
||||
<TR><TD> </TD></TR>
|
||||
</xsl:if>
|
||||
|
||||
<TR><TD>
|
||||
<TABLE BORDER="0" ALIGN="CENTER">
|
||||
<TR><TD ALIGN="CENTER">
|
||||
<xsl:variable name="pag_num" select="@number"/>
|
||||
<xsl:variable name="x" select="JPG/@x"/>
|
||||
<xsl:variable name="y" select="JPG/@y"/>
|
||||
<MAP NAME="Pag{$pag_num}">
|
||||
<xsl:for-each select="Item">
|
||||
<AREA HREF="#{Name/@LinkID}" SHAPE="RECT" TITLE="Go to '{Name}'"
|
||||
COORDS="{@x1 - $x},{@y1 - $y},{@x2 - $x},{@y2 - $y}"/>
|
||||
</xsl:for-each>
|
||||
</MAP>
|
||||
<IMG BORDER="0" SRC="{JPG}.jpg" ALIGN="CENTER" VALIGN="MIDDLE" USEMAP="#Pag{$pag_num}"/>
|
||||
</TD></TR>
|
||||
<TR><TD> </TD></TR>
|
||||
<TR><TD>
|
||||
<xsl:apply-templates select="Item"/>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</TD></TR>
|
||||
<TR><TD ALIGN="RIGHT">
|
||||
<A HREF="#top-of-file">Go to top</A>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- ************ Gestione di tutti gli oggetti nell'ordine in cui si presentano nel file XML **************** -->
|
||||
|
||||
<xsl:template match="Item">
|
||||
<TABLE BORDER="0">
|
||||
<TR><TD>
|
||||
<TABLE BORDER="0" CELLPADDING="4" CELLSPACING="0">
|
||||
<THEAD><TR><TD ALIGN="LEFT"><TABLE><TR>
|
||||
<TD><A NAME="{Name/@LinkID}"><B><FONT COLOR="BLACK">
|
||||
<xsl:choose>
|
||||
<xsl:when test="Comment!=''"><xsl:value-of select="Comment"/></xsl:when>
|
||||
<xsl:when test="Name!=''"><xsl:value-of select="Name"/></xsl:when>
|
||||
<xsl:when test="@type='stringa'">Empty string with Hyperlink property</xsl:when>
|
||||
<xsl:when test="@type='espressione'">Empty expression with Hyperlink property</xsl:when>
|
||||
</xsl:choose>
|
||||
</FONT></B></A></TD>
|
||||
<xsl:if test="Key='key1'">
|
||||
<TD VALIGN="MIDDLE" WIDTH="30"><IMG SRC="Key.gif" TITLE="Primary key"/></TD>
|
||||
</xsl:if>
|
||||
<xsl:if test="Zoom">
|
||||
<TD VALIGN="MIDDLE" WIDTH="30"><IMG SRC="Zoom.gif" TITLE="{Zoom} zoom"/></TD>
|
||||
</xsl:if>
|
||||
<xsl:if test="Obligatory='TRUE'">
|
||||
<TD VALIGN="MIDDLE" WIDTH="30"><IMG SRC="Stop.gif" TITLE="Obligatory"/></TD>
|
||||
</xsl:if>
|
||||
</TR></TABLE></TD></TR></THEAD>
|
||||
<TR>
|
||||
<TD xsl:use-attribute-sets="first-top-table"><FONT COLOR="WHITE"><B>Notes</B></FONT></TD>
|
||||
<xsl:if test="Class!=''">
|
||||
<TD xsl:use-attribute-sets="top-table"><FONT COLOR="WHITE"><B>Class</B></FONT></TD>
|
||||
</xsl:if>
|
||||
<xsl:if test="Bitmap!=''">
|
||||
<TD xsl:use-attribute-sets="top-table"><FONT COLOR="WHITE"><B>Bitmap</B></FONT></TD>
|
||||
</xsl:if>
|
||||
<xsl:if test="Help!=''">
|
||||
<TD xsl:use-attribute-sets="top-table"><FONT COLOR="WHITE"><B>Tooltip</B></FONT></TD>
|
||||
</xsl:if>
|
||||
<xsl:if test="Hyperlink!=''">
|
||||
<TD xsl:use-attribute-sets="top-table"><FONT COLOR="WHITE"><B>Hyperlink</B></FONT></TD>
|
||||
</xsl:if>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD xsl:use-attribute-sets="first-bottom-table">
|
||||
<xsl:apply-templates select="Note"/>
|
||||
</TD>
|
||||
<xsl:if test="Class!=''">
|
||||
<TD xsl:use-attribute-sets="bottom-table">
|
||||
<xsl:value-of select="Class"/>
|
||||
</TD>
|
||||
</xsl:if>
|
||||
<xsl:if test="Bitmap!=''">
|
||||
<TD xsl:use-attribute-sets="bottom-table">
|
||||
<xsl:value-of select="Bitmap"/>
|
||||
</TD>
|
||||
</xsl:if>
|
||||
<xsl:if test="Help!=''">
|
||||
<TD xsl:use-attribute-sets="bottom-table">
|
||||
<xsl:value-of select="Help"/>
|
||||
</TD>
|
||||
</xsl:if>
|
||||
<xsl:if test="Hyperlink!=''">
|
||||
<TD xsl:use-attribute-sets="bottom-table">
|
||||
<xsl:value-of select="Hyperlink"/>
|
||||
</TD>
|
||||
</xsl:if>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD></TR>
|
||||
<TR><TD ROWSPAN="2" ALIGN="LEFT" VALIGN="MIDDLE">
|
||||
<A HREF="#{../Title/@LinkID}">Go to <xsl:call-template name="PageTitle"/></A>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Gestione celle vuote -->
|
||||
|
||||
<xsl:template match="Item/Note">
|
||||
<xsl:call-template name="ValueOrNotAvailable"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
</xsl:stylesheet>
|
||||
BIN
Doc/Variable.gif
Normal file
|
After Width: | Height: | Size: 202 B |
BIN
Doc/Yes.gif
Normal file
|
After Width: | Height: | Size: 976 B |
BIN
Doc/Zoom.gif
Normal file
|
After Width: | Height: | Size: 968 B |
230
Doc/common.xsl
Normal file
@ -0,0 +1,230 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
|
||||
|
||||
<xsl:attribute-set name="global-notes">
|
||||
<xsl:attribute name="ALIGN">LEFT</xsl:attribute>
|
||||
<xsl:attribute name="BGCOLOR">#F5F5F5</xsl:attribute>
|
||||
<xsl:attribute name="STYLE">border: 1px #000000 solid;</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="page-notes" use-attribute-sets="global-notes">
|
||||
<xsl:attribute name="BGCOLOR">#DCDCDC</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
|
||||
<xsl:attribute-set name="top-table">
|
||||
<xsl:attribute name="ALIGN">CENTER</xsl:attribute>
|
||||
<xsl:attribute name="BGCOLOR">#6495ED</xsl:attribute>
|
||||
<xsl:attribute name="STYLE">border: 1px #000000 solid;
|
||||
border-left: none;</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="first-top-table" use-attribute-sets="top-table">
|
||||
<xsl:attribute name="STYLE">border: 1px #000000 solid;</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
|
||||
<xsl:attribute-set name="bottom-table">
|
||||
<xsl:attribute name="ALIGN">CENTER</xsl:attribute>
|
||||
<xsl:attribute name="BGCOLOR">#F5F5F5</xsl:attribute>
|
||||
<xsl:attribute name="STYLE">border-bottom: 1px #000000 solid;
|
||||
border-right: 1px #000000 solid;</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="first-bottom-table" use-attribute-sets="bottom-table">
|
||||
<xsl:attribute name="STYLE">border: 1px #000000 solid;
|
||||
border-top: none;</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
|
||||
<xsl:template name="PageTitle">
|
||||
<xsl:param name="page" select=".."/>
|
||||
<xsl:param name="name" select="'Page'"/>
|
||||
<B>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$page/Title!=''">
|
||||
<xsl:value-of select="$page/Title"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$name"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="$page/@number"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</B>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template name="PageIndex">
|
||||
<xsl:param name="name" select="'Page'"/>
|
||||
<xsl:param name="page"/>
|
||||
<xsl:param name="next"/>
|
||||
<TD WIDTH="20%" VALIGN="TOP" ALIGN="CENTER">
|
||||
<TABLE>
|
||||
<TR><TD ALIGN="CENTER"><FONT SIZE="2">
|
||||
<A HREF="#{$page/Title/@LinkID}">
|
||||
<xsl:value-of select="$name"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="$page/@number"/>
|
||||
</A>
|
||||
</FONT></TD></TR>
|
||||
<TR><TD ALIGN="CENTER"><FONT SIZE="2">
|
||||
<B><xsl:value-of select="$page/Title"/></B>
|
||||
</FONT></TD></TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<xsl:if test="$next > 0">
|
||||
<xsl:for-each select="following-sibling::Pag[1]">
|
||||
<xsl:call-template name="PageIndex">
|
||||
<xsl:with-param name="name" select="$name"/>
|
||||
<xsl:with-param name="page" select="."/>
|
||||
<xsl:with-param name="next" select="number($next)-1"/>
|
||||
</xsl:call-template>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template name="ValueOrNotAvailable">
|
||||
<xsl:param name="NA" select="'N/A'"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test=".=../@* and .!=''"><xsl:value-of select="."/></xsl:when>
|
||||
<xsl:when test="text()!=''"><xsl:apply-templates/></xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="$NA"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template name="LogicalCheckBox">
|
||||
<xsl:choose>
|
||||
<xsl:when test=".='FALSE'"><IMG SRC="No.gif"/></xsl:when>
|
||||
<xsl:when test=".='TRUE'"><IMG SRC="Yes.gif"/></xsl:when>
|
||||
<xsl:otherwise><B>?</B></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- User documentation tags -->
|
||||
|
||||
<xsl:template match="Book">
|
||||
<DIV ALIGN="CENTER">
|
||||
<H1><xsl:value-of select="@title"/></H1>
|
||||
<IMG SRC="{@bookcover}"/>
|
||||
<xsl:apply-templates/>
|
||||
</DIV>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="Chapter">
|
||||
<H1><A NAME="{@anchor}"><xsl:value-of select="@title"/></A></H1>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="Sect">
|
||||
<H2><A NAME="{@anchor}"><xsl:value-of select="@title"/></A></H2>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="SubSect">
|
||||
<H3><A NAME="{@anchor}"><xsl:value-of select="@title"/></A></H3>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="Paragraph">
|
||||
<P><H4><A NAME="{@anchor}"><xsl:value-of select="@title"/></A></H4></P>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="SubParagraph">
|
||||
<P><H5><A NAME="{@anchor}"><xsl:value-of select="@title"/></A></H5></P>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="H6">
|
||||
<P><H6><A NAME="{@anchor}"><xsl:value-of select="@title"/></A></H6></P>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="Code">
|
||||
<P/>
|
||||
<TABLE WIDTH="100%">
|
||||
<TR><TD STYLE="font-size:14pt; color:white; background-color:#888888">
|
||||
<xsl:value-of select="@title"/>
|
||||
</TD></TR>
|
||||
<TR><TD> </TD></TR>
|
||||
<TR><TD><PRE>
|
||||
<xsl:apply-templates/>
|
||||
</PRE></TD></TR>
|
||||
<TR><TD STYLE="border-bottom: 2pt SOLID #888888;"> </TD></TR>
|
||||
</TABLE>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="LineCode">
|
||||
<P><SPAN STYLE="font-family: Courier New">
|
||||
<xsl:value-of select='.'/>
|
||||
</SPAN></P>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="Example">
|
||||
<P/>
|
||||
<TABLE WIDTH="100%">
|
||||
<TR><TD STYLE="font-size:14pt; color:red; font-style:italic; font-weight:bold;">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@title"><xsl:value-of select="@title"/></xsl:when>
|
||||
<xsl:otherwise>Esempio</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</TD></TR>
|
||||
<TR><TD> </TD></TR>
|
||||
<TR><TD>
|
||||
<xsl:apply-templates/>
|
||||
</TD></TR>
|
||||
<TR><TD STYLE="border-bottom: 2pt SOLID red;"> </TD></TR>
|
||||
</TABLE>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="Notes">
|
||||
<P/>
|
||||
<TABLE WIDTH="100%" BORDER="2" STYLE="Border-color:yellow">
|
||||
<TR><TD STYLE="font-size:14pt; background-color:yellow;">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@title"><xsl:value-of select="@title"/></xsl:when>
|
||||
<xsl:otherwise>Nota bene</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</TD></TR>
|
||||
<TR><TD>
|
||||
<xsl:apply-templates/>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="Image">
|
||||
<P/>
|
||||
<IMG BORDER="0" SRC="{@file}" ALIGN="CENTER"/>
|
||||
<P><SPAN STYLE="font-size:8pt; text-align:center;">
|
||||
<xsl:value-of select="@caption"/>
|
||||
</SPAN></P>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="@*|node()">
|
||||
<xsl:copy>
|
||||
<xsl:copy-of select="@*"/>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
</xsl:stylesheet>
|
||||
BIN
Doc/ds_Btc.gif
Normal file
|
After Width: | Height: | Size: 474 B |
BIN
Doc/ds_Des.gif
Normal file
|
After Width: | Height: | Size: 482 B |
BIN
Doc/ds_Dtl.gif
Normal file
|
After Width: | Height: | Size: 451 B |
BIN
Doc/ds_DtlExtLink.gif
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
Doc/ds_Mdt.gif
Normal file
|
After Width: | Height: | Size: 527 B |
BIN
Doc/ds_MdtExtLink.gif
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
Doc/ds_Msk.gif
Normal file
|
After Width: | Height: | Size: 365 B |
BIN
Doc/ds_Mst.gif
Normal file
|
After Width: | Height: | Size: 407 B |
BIN
Doc/ds_MstExtLink.gif
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
Doc/ds_Output.gif
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
Doc/ds_Rpt.gif
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
Doc/ds_Storage.gif
Normal file
|
After Width: | Height: | Size: 343 B |
BIN
Doc/ds_StorageExtLink.gif
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
Doc/ds_Tbl.gif
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
Doc/ds_page.gif
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
542
Doc/technical.xsl
Normal file
@ -0,0 +1,542 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
|
||||
<xsl:output method="html" version="4.0" encoding="ISO-8859-1"/>
|
||||
|
||||
<xsl:include href="common.xsl"/>
|
||||
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:apply-templates select="Codify"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Nodo principale -->
|
||||
|
||||
<xsl:template match="Codify">
|
||||
<HTML>
|
||||
<BODY BGCOLOR="#FFFFFF">
|
||||
<A NAME="top-of-file"/>
|
||||
<P ALIGN="CENTER">
|
||||
<FONT COLOR="#000080" SIZE="6"><B><xsl:value-of select="Title"/></B></FONT>
|
||||
</P>
|
||||
<TABLE ALIGN="CENTER" BORDER="0" CELLPADDING="4" CELLSPACING="0">
|
||||
<xsl:if test="Note!=''">
|
||||
<TR><TD COLSPAN="8" xsl:use-attribute-sets="global-notes">
|
||||
<xsl:apply-templates select="Note"/>
|
||||
</TD></TR>
|
||||
</xsl:if>
|
||||
<TR><TD COLSPAN="8" HEIGHT="30"></TD></TR> <!-- RIGA SPAZIATRICE -->
|
||||
<TR>
|
||||
<TD xsl:use-attribute-sets="first-top-table"><FONT COLOR="WHITE" SIZE="3"><B>Name</B></FONT></TD>
|
||||
<TD xsl:use-attribute-sets="top-table"><FONT COLOR="WHITE" SIZE="3"><B>Title</B></FONT></TD>
|
||||
<TD xsl:use-attribute-sets="top-table"><FONT COLOR="WHITE" SIZE="3"><B>Template</B></FONT></TD>
|
||||
<TD xsl:use-attribute-sets="top-table"><FONT COLOR="WHITE" SIZE="3"><B>Author</B></FONT></TD>
|
||||
<TD xsl:use-attribute-sets="top-table"><FONT COLOR="WHITE" SIZE="3"><B>User</B></FONT></TD>
|
||||
<TD xsl:use-attribute-sets="top-table"><FONT COLOR="WHITE" SIZE="3"><B>Version</B></FONT></TD>
|
||||
<TD xsl:use-attribute-sets="top-table"><FONT COLOR="WHITE" SIZE="3"><B>Created</B></FONT></TD>
|
||||
<TD xsl:use-attribute-sets="top-table"><FONT COLOR="WHITE" SIZE="3"><B>Revised</B></FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD xsl:use-attribute-sets="first-bottom-table">
|
||||
<xsl:apply-templates select="Name"/>
|
||||
</TD>
|
||||
<TD xsl:use-attribute-sets="bottom-table">
|
||||
<xsl:apply-templates select="Title"/>
|
||||
</TD>
|
||||
<TD xsl:use-attribute-sets="bottom-table">
|
||||
<xsl:apply-templates select="Template"/>
|
||||
</TD>
|
||||
<TD xsl:use-attribute-sets="bottom-table">
|
||||
<xsl:apply-templates select="Author"/>
|
||||
</TD>
|
||||
<TD xsl:use-attribute-sets="bottom-table">
|
||||
<xsl:apply-templates select="User"/>
|
||||
</TD>
|
||||
<TD xsl:use-attribute-sets="bottom-table">
|
||||
<xsl:apply-templates select="Version"/>
|
||||
</TD>
|
||||
<TD xsl:use-attribute-sets="bottom-table">
|
||||
<xsl:apply-templates select="Created"/>
|
||||
</TD>
|
||||
<TD xsl:use-attribute-sets="bottom-table">
|
||||
<xsl:apply-templates select="Lastrevision"/>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<xsl:if test="AtEndAction/EntityName!=''">
|
||||
<TR><TD COLSPAN="8" HEIGHT="10"></TD></TR> <!-- RIGA SPAZIATRICE -->
|
||||
<TR><TD ALIGN="LEFT" COLSPAN="8">
|
||||
<FONT COLOR="DARKBLUE" SIZE="4"><B>"At end" Action</B></FONT>
|
||||
</TD></TR>
|
||||
<TR>
|
||||
<TD xsl:use-attribute-sets="first-top-table"><FONT COLOR="WHITE" SIZE="3"><B>Entity</B></FONT></TD>
|
||||
<TD xsl:use-attribute-sets="top-table"><FONT COLOR="WHITE" SIZE="3"><B>Type</B></FONT></TD>
|
||||
<TD xsl:use-attribute-sets="top-table"><FONT COLOR="WHITE" SIZE="3"><B>Open On</B></FONT></TD>
|
||||
<TD xsl:use-attribute-sets="top-table"><FONT COLOR="WHITE" SIZE="3"><B>Open Mode</B></FONT></TD>
|
||||
<xsl:if test="AtEndAction/EntityParam!=''">
|
||||
<TD xsl:use-attribute-sets="top-table" COLSPAN="4"><FONT COLOR="WHITE" SIZE="3"><B>Parameters</B></FONT></TD>
|
||||
</xsl:if>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD xsl:use-attribute-sets="first-bottom-table">
|
||||
<FONT SIZE="2"><xsl:value-of select="AtEndAction/EntityName"/></FONT>
|
||||
</TD>
|
||||
<TD xsl:use-attribute-sets="bottom-table">
|
||||
<FONT SIZE="2"><xsl:value-of select="AtEndAction/EntityType"/></FONT>
|
||||
</TD>
|
||||
<TD xsl:use-attribute-sets="bottom-table">
|
||||
<FONT SIZE="2"><xsl:value-of select="AtEndAction/EntityOpenOn"/></FONT>
|
||||
</TD>
|
||||
<TD xsl:use-attribute-sets="bottom-table">
|
||||
<FONT SIZE="2"><xsl:value-of select="AtEndAction/EntityOpenMode"/></FONT>
|
||||
</TD>
|
||||
<xsl:if test="AtEndAction/EntityParam!=''">
|
||||
<TD xsl:use-attribute-sets="bottom-table" COLSPAN="4"><FONT SIZE="2">
|
||||
<xsl:for-each select="AtEndAction/EntityParam">
|
||||
<xsl:value-of select="."/>
|
||||
<xsl:if test="position() < last()">; </xsl:if>
|
||||
</xsl:for-each>
|
||||
</FONT></TD>
|
||||
</xsl:if>
|
||||
</TR>
|
||||
</xsl:if>
|
||||
</TABLE>
|
||||
|
||||
<TABLE BORDER="0" ALIGN="CENTER" WIDTH="100%" CELLPADDING="4" CELLSPACING="0">
|
||||
<TR><TD COLSPAN="8" HEIGHT="30"></TD></TR> <!-- RIGA SPAZIATRICE -->
|
||||
<xsl:for-each select="Pag">
|
||||
<xsl:if test="position() mod 3 = 1">
|
||||
<TR>
|
||||
<xsl:call-template name="PageIndex">
|
||||
<xsl:with-param name="page" select="."/>
|
||||
<xsl:with-param name="next" select="count(following-sibling::Pag[position() <= 2])"/>
|
||||
</xsl:call-template>
|
||||
</TR>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</TABLE>
|
||||
<xsl:apply-templates select="Pag"/>
|
||||
</BODY>
|
||||
</HTML>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Gestione dell'immagine delle maschere e delle aree linkate ai vari oggetti contenuti -->
|
||||
|
||||
<xsl:template match="Pag">
|
||||
<P>
|
||||
<TABLE BORDER="0" WIDTH="100%" ALIGN="CENTER">
|
||||
<TR><TD BGCOLOR="#B0C4DE" ALIGN="CENTER">
|
||||
<FONT COLOR="#000080" SIZE="4">
|
||||
<A NAME="{Title/@LinkID}">
|
||||
<xsl:call-template name="PageTitle">
|
||||
<xsl:with-param name="page" select="."/>
|
||||
</xsl:call-template>
|
||||
</A>
|
||||
</FONT>
|
||||
</TD></TR>
|
||||
<TR><TD> </TD></TR>
|
||||
|
||||
<xsl:if test="Note!=''">
|
||||
<TR><TD>
|
||||
<TABLE ALIGN="CENTER" WIDTH="80%" BORDER="0" CELLPADDING="0" CELLSPACING="0">
|
||||
<TR><TD xsl:use-attribute-sets="page-notes">
|
||||
<xsl:apply-templates select="Note"/>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</TD></TR>
|
||||
<TR><TD> </TD></TR>
|
||||
</xsl:if>
|
||||
|
||||
<TR><TD>
|
||||
<TABLE BORDER="0" ALIGN="CENTER">
|
||||
<TR><TD ALIGN="CENTER">
|
||||
<xsl:variable name="pag_num" select="@number"/>
|
||||
<xsl:variable name="x" select="JPG/@x"/>
|
||||
<xsl:variable name="y" select="JPG/@y"/>
|
||||
<MAP NAME="Pag{$pag_num}">
|
||||
<xsl:for-each select="Item">
|
||||
<AREA HREF="#{Name/@LinkID}" SHAPE="RECT" TITLE="Go to '{Name}'"
|
||||
COORDS="{@x1 - $x},{@y1 - $y},{@x2 - $x},{@y2 - $y}"/>
|
||||
</xsl:for-each>
|
||||
</MAP>
|
||||
<IMG BORDER="0" SRC="{JPG}.jpg" ALIGN="CENTER" VALIGN="MIDDLE" USEMAP="#Pag{$pag_num}"/>
|
||||
</TD></TR>
|
||||
<TR><TD> </TD></TR>
|
||||
<TR><TD>
|
||||
<xsl:apply-templates select="Item"/>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</TD></TR>
|
||||
<TR><TD ALIGN="RIGHT">
|
||||
<A HREF="#top-of-file">Go to top</A>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Gestione degli oggetti di tipo 'campo' o 'variabile' -->
|
||||
|
||||
<xsl:template match="Item[@type='campo' or @type='variabile']">
|
||||
<TABLE BORDER="0">
|
||||
<TR><TD>
|
||||
<TABLE BORDER="0" CELLPADDING="4" CELLSPACING="0">
|
||||
<THEAD><TR><TD ALIGN="LEFT" COLSPAN="5">
|
||||
<A NAME="{Name/@LinkID}"><B><xsl:value-of select="Name"/></B></A>
|
||||
</TD></TR></THEAD>
|
||||
<TR>
|
||||
<TD xsl:use-attribute-sets="first-top-table"><FONT COLOR="WHITE" SIZE="3"><B>Type</B></FONT></TD>
|
||||
<TD xsl:use-attribute-sets="top-table"><FONT COLOR="WHITE" SIZE="3"><B>Comment</B></FONT></TD>
|
||||
<TD xsl:use-attribute-sets="top-table"><FONT COLOR="WHITE" SIZE="3"><B>Notes</B></FONT></TD>
|
||||
<xsl:if test="Hyperlink!=''">
|
||||
<TD xsl:use-attribute-sets="top-table"><FONT COLOR="WHITE" SIZE="3"><B>Hyperlink</B></FONT></TD>
|
||||
</xsl:if>
|
||||
<TD xsl:use-attribute-sets="top-table"><FONT COLOR="WHITE" SIZE="3"><B>Help</B></FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD xsl:use-attribute-sets="first-bottom-table">
|
||||
<FONT COLOR="RED" SIZE="2">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@type='variabile'">Variable</xsl:when>
|
||||
<xsl:when test="@type='campo'">Field</xsl:when>
|
||||
</xsl:choose>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD xsl:use-attribute-sets="bottom-table">
|
||||
<xsl:apply-templates select="Comment"/>
|
||||
</TD>
|
||||
<TD xsl:use-attribute-sets="bottom-table" ALIGN="LEFT">
|
||||
<xsl:apply-templates select="Note"/>
|
||||
</TD>
|
||||
<!--** Solo i Field Writer hanno la possibilita di Hyperlink (Update Row Action) **-->
|
||||
<xsl:if test="Hyperlink!=''">
|
||||
<TD xsl:use-attribute-sets="bottom-table">
|
||||
<FONT SIZE="2"><xsl:value-of select="Hyperlink"/></FONT>
|
||||
</TD>
|
||||
</xsl:if>
|
||||
<TD xsl:use-attribute-sets="bottom-table">
|
||||
<xsl:apply-templates select="Help"/>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD></TR>
|
||||
<TR><TD ROWSPAN="2" ALIGN="LEFT" VALIGN="MIDDLE">
|
||||
<A HREF="#{../Title/@LinkID}">
|
||||
<FONT SIZE="2">Go to <xsl:call-template name="PageTitle"/></FONT>
|
||||
</A>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Gestione degli oggetti di tipo 'stringa' o 'espressione' -->
|
||||
|
||||
<xsl:template match="Item[@type='stringa' or @type='espressione']">
|
||||
<TABLE BORDER="0">
|
||||
<TR><TD>
|
||||
<TABLE BORDER="0" CELLPADDING="4" CELLSPACING="0">
|
||||
<THEAD><TR><TD ALIGN="LEFT" COLSPAN="3">
|
||||
<A NAME="{Name/@LinkID}"><B>
|
||||
<xsl:choose>
|
||||
<xsl:when test="Name!=''"><xsl:value-of select="Name"/></xsl:when>
|
||||
<xsl:when test="@type='stringa'">Empty string with Hyperlink property</xsl:when>
|
||||
<xsl:when test="@type='espressione'">Empty expression with Hyperlink property</xsl:when>
|
||||
</xsl:choose>
|
||||
</B></A>
|
||||
</TD></TR></THEAD>
|
||||
<TR>
|
||||
<TD xsl:use-attribute-sets="first-top-table"><FONT COLOR="WHITE" SIZE="3"><B>Type</B></FONT></TD>
|
||||
<TD xsl:use-attribute-sets="top-table"><FONT COLOR="WHITE" SIZE="3"><B>Hyperlink</B></FONT></TD>
|
||||
<TD xsl:use-attribute-sets="top-table"><FONT COLOR="WHITE" SIZE="3"><B>Open On</B></FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD xsl:use-attribute-sets="first-bottom-table">
|
||||
<FONT COLOR="RED" SIZE="2">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@type='stringa'">String</xsl:when>
|
||||
<xsl:when test="@type='espressione'">Expression</xsl:when>
|
||||
</xsl:choose>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD xsl:use-attribute-sets="bottom-table">
|
||||
<xsl:apply-templates select="Hyperlink"/>
|
||||
</TD>
|
||||
<TD xsl:use-attribute-sets="bottom-table">
|
||||
<FONT SIZE="2">
|
||||
<xsl:value-of select="HyperlinkOpenOn"/>
|
||||
</FONT>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD></TR>
|
||||
<TR><TD ROWSPAN="2" ALIGN="LEFT" VALIGN="MIDDLE">
|
||||
<A HREF="#{../Title/@LinkID}">
|
||||
<FONT SIZE="2">Go to <xsl:call-template name="PageTitle"/></FONT>
|
||||
</A>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Gestione degli oggetti di tipo 'oggetto' -->
|
||||
|
||||
<xsl:template match="Item[@type='oggetto']">
|
||||
<TABLE BORDER="0">
|
||||
<TR><TD>
|
||||
<TABLE BORDER="0" CELLPADDING="4" CELLSPACING="0">
|
||||
<THEAD><TR><TD ALIGN="LEFT" COLSPAN="7">
|
||||
<A NAME="{Name/@LinkID}"><B><xsl:value-of select="Name"/></B></A>
|
||||
</TD></TR></THEAD>
|
||||
<TR>
|
||||
<TD xsl:use-attribute-sets="first-top-table"><FONT COLOR="WHITE" SIZE="3"><B>Class</B></FONT></TD>
|
||||
<TD xsl:use-attribute-sets="top-table"><FONT COLOR="WHITE" SIZE="3"><B>Comment</B></FONT></TD>
|
||||
<TD xsl:use-attribute-sets="top-table"><FONT COLOR="WHITE" SIZE="3"><B>Bitmap</B></FONT></TD>
|
||||
<TD xsl:use-attribute-sets="top-table"><FONT COLOR="WHITE" SIZE="3"><B>Properties</B></FONT></TD>
|
||||
<TD xsl:use-attribute-sets="top-table"><FONT COLOR="WHITE" SIZE="3"><B>Ref</B></FONT></TD>
|
||||
<TD xsl:use-attribute-sets="top-table"><FONT COLOR="WHITE" SIZE="3"><B>Notes</B></FONT></TD>
|
||||
<TD xsl:use-attribute-sets="top-table"><FONT COLOR="WHITE" SIZE="3"><B>Help</B></FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD xsl:use-attribute-sets="first-bottom-table">
|
||||
<xsl:apply-templates select="Class"/>
|
||||
</TD>
|
||||
<TD xsl:use-attribute-sets="bottom-table">
|
||||
<xsl:apply-templates select="Comment"/>
|
||||
</TD>
|
||||
<TD xsl:use-attribute-sets="bottom-table">
|
||||
<xsl:apply-templates select="Bitmap"/>
|
||||
</TD>
|
||||
<TD xsl:use-attribute-sets="bottom-table">
|
||||
<xsl:apply-templates select="Property"/>
|
||||
</TD>
|
||||
<TD xsl:use-attribute-sets="bottom-table">
|
||||
<xsl:apply-templates select="Ref"/>
|
||||
</TD>
|
||||
<TD xsl:use-attribute-sets="bottom-table" ALIGN="LEFT">
|
||||
<xsl:apply-templates select="Note"/>
|
||||
</TD>
|
||||
<TD xsl:use-attribute-sets="bottom-table">
|
||||
<xsl:apply-templates select="Help"/>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD></TR>
|
||||
<TR><TD ROWSPAN="2" ALIGN="LEFT" VALIGN="MIDDLE">
|
||||
<A HREF="#{../Title/@LinkID}">
|
||||
<FONT SIZE="2">Go to <xsl:call-template name="PageTitle"/></FONT>
|
||||
</A>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Gestione degli oggetti di tipo 'Link_pc' -->
|
||||
|
||||
<xsl:template match="Item[@type='link_pc']">
|
||||
<TABLE BORDER="0">
|
||||
<TR><TD>
|
||||
<TABLE BORDER="0" CELLPADDING="4" CELLSPACING="0">
|
||||
<THEAD><TR><TD ALIGN="LEFT" COLSPAN="4">
|
||||
<A NAME="{Name/@LinkID}"><B><xsl:value-of select="Name"/></B></A>
|
||||
</TD></TR></THEAD>
|
||||
<TR>
|
||||
<TD xsl:use-attribute-sets="first-top-table"><FONT COLOR="WHITE" SIZE="3"><B>Edit</B></FONT></TD>
|
||||
<TD xsl:use-attribute-sets="top-table"><FONT COLOR="WHITE" SIZE="3"><B>Program</B></FONT></TD>
|
||||
<TD xsl:use-attribute-sets="top-table"><FONT COLOR="WHITE" SIZE="3"><B>Notes</B></FONT></TD>
|
||||
<TD xsl:use-attribute-sets="top-table"><FONT COLOR="WHITE" SIZE="3"><B>Help</B></FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD xsl:use-attribute-sets="first-bottom-table">
|
||||
<xsl:choose>
|
||||
<xsl:when test="Edit='E'">Edit</xsl:when>
|
||||
<xsl:when test="Edit='P'">Paint</xsl:when>
|
||||
<xsl:when test="Edit='N'">Hide/No</xsl:when>
|
||||
</xsl:choose>
|
||||
</TD>
|
||||
<TD xsl:use-attribute-sets="bottom-table">
|
||||
<xsl:apply-templates select="Program"/>
|
||||
</TD>
|
||||
<TD xsl:use-attribute-sets="bottom-table" ALIGN="LEFT">
|
||||
<xsl:apply-templates select="Note"/>
|
||||
</TD>
|
||||
<TD xsl:use-attribute-sets="bottom-table">
|
||||
<xsl:apply-templates select="Help"/>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD></TR>
|
||||
<TR><TD ROWSPAN="2" ALIGN="LEFT" VALIGN="MIDDLE">
|
||||
<A HREF="#{../Title/@LinkID}">
|
||||
<FONT SIZE="2">Go to <xsl:call-template name="PageTitle"/></FONT>
|
||||
</A>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Gestione degli oggetti di tipo 'calcolo' -->
|
||||
|
||||
<xsl:template match="Item[@type='calcolo']">
|
||||
<TABLE BORDER="0">
|
||||
<TR><TD>
|
||||
<TABLE BORDER="0" CELLPADDING="4" CELLSPACING="0">
|
||||
<THEAD><TR><TD ALIGN="LEFT" COLSPAN="3">
|
||||
<A NAME="{Name/@LinkID}"><B><xsl:value-of select="Name"/></B></A>
|
||||
</TD></TR></THEAD>
|
||||
<TR>
|
||||
<TD xsl:use-attribute-sets="first-top-table"><FONT COLOR="WHITE" SIZE="3"><B>Execute</B></FONT></TD>
|
||||
<TD xsl:use-attribute-sets="top-table"><FONT COLOR="WHITE" SIZE="3"><B>Depends On</B></FONT></TD>
|
||||
<TD xsl:use-attribute-sets="top-table"><FONT COLOR="WHITE" SIZE="3"><B>Notes</B></FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD xsl:use-attribute-sets="first-bottom-table">
|
||||
<xsl:choose>
|
||||
<xsl:when test="Calc_routine | Calc_var">
|
||||
<TABLE>
|
||||
<xsl:for-each select="Calc_routine">
|
||||
<TR><TD NOWRAP="NOWRAP"><FONT SIZE="2">
|
||||
<xsl:value-of select="./Name"/>(<xsl:text/>
|
||||
<xsl:for-each select="./Param">
|
||||
<xsl:value-of select="."/>
|
||||
<xsl:if test="position() < last()">; </xsl:if>
|
||||
</xsl:for-each>)<xsl:text/>
|
||||
</FONT></TD></TR>
|
||||
</xsl:for-each>
|
||||
<xsl:for-each select="Calc_var">
|
||||
<TR><TD><FONT SIZE="2">
|
||||
<xsl:value-of select="."/>
|
||||
</FONT></TD></TR>
|
||||
</xsl:for-each>
|
||||
</TABLE>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>Nothing</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</TD>
|
||||
<TD xsl:use-attribute-sets="bottom-table">
|
||||
<xsl:choose>
|
||||
<xsl:when test="DependsOnVar | DependsOnEvent | DependsOnMB">
|
||||
<TABLE>
|
||||
<xsl:for-each select="DependsOnVar | DependsOnEvent | DependsOnMB">
|
||||
<TR><TD NOWRAP="NOWRAP"><FONT SIZE="2">
|
||||
<xsl:value-of select="."/>
|
||||
</FONT></TD></TR>
|
||||
</xsl:for-each>
|
||||
</TABLE>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>Nothing</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</TD>
|
||||
<TD xsl:use-attribute-sets="bottom-table" ALIGN="LEFT">
|
||||
<xsl:apply-templates select="Note"/>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD></TR>
|
||||
<TR><TD ROWSPAN="2" ALIGN="LEFT" VALIGN="MIDDLE">
|
||||
<A HREF="#{../Title/@LinkID}">
|
||||
<FONT SIZE="2">Go to <xsl:call-template name="PageTitle"/></FONT>
|
||||
</A>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Gestione degli oggetti di tipo 'bottone' -->
|
||||
|
||||
<xsl:template match="Item[@type='bottone']">
|
||||
<TABLE BORDER="0">
|
||||
<TR><TD>
|
||||
<TABLE BORDER="0" CELLPADDING="4" CELLSPACING="0">
|
||||
<THEAD><TR><TD ALIGN="LEFT" COLSPAN="4">
|
||||
<A NAME="{Name/@LinkID}"><B><xsl:value-of select="Name"/></B></A>
|
||||
</TD></TR></THEAD>
|
||||
<TR>
|
||||
<TD xsl:use-attribute-sets="first-top-table"><FONT COLOR="WHITE" SIZE="3"><B>Bitmap</B></FONT></TD>
|
||||
<TD xsl:use-attribute-sets="top-table"><FONT COLOR="WHITE" SIZE="3"><B>Execute</B></FONT></TD>
|
||||
<TD xsl:use-attribute-sets="top-table"><FONT COLOR="WHITE" SIZE="3"><B>Notes</B></FONT></TD>
|
||||
<TD xsl:use-attribute-sets="top-table"><FONT COLOR="WHITE" SIZE="3"><B>Help</B></FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD xsl:use-attribute-sets="first-bottom-table">
|
||||
<xsl:apply-templates select="Bitmap"/>
|
||||
</TD>
|
||||
<TD xsl:use-attribute-sets="bottom-table">
|
||||
<xsl:apply-templates select="Execute"/>
|
||||
</TD>
|
||||
<TD xsl:use-attribute-sets="bottom-table" ALIGN="LEFT">
|
||||
<xsl:apply-templates select="Note"/>
|
||||
</TD>
|
||||
<TD xsl:use-attribute-sets="bottom-table">
|
||||
<xsl:apply-templates select="Help"/>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD></TR>
|
||||
<TR><TD ROWSPAN="2" ALIGN="LEFT" VALIGN="MIDDLE">
|
||||
<A HREF="#{../Title/@LinkID}">
|
||||
<FONT SIZE="2">Go to <xsl:call-template name="PageTitle"/></FONT>
|
||||
</A>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Gestione degli oggetti di tipo 'immagine' -->
|
||||
|
||||
<xsl:template match="Item[@type='immagine']">
|
||||
<TABLE BORDER="0">
|
||||
<TR><TD>
|
||||
<TABLE BORDER="0" CELLPADDING="4" CELLSPACING="0">
|
||||
<THEAD><TR><TD ALIGN="LEFT" COLSPAN="4">
|
||||
<A NAME="{Name/@LinkID}"><B>Image</B></A>
|
||||
</TD></TR></THEAD>
|
||||
<TR>
|
||||
<TD xsl:use-attribute-sets="first-top-table"><FONT COLOR="WHITE" SIZE="3"><B>Name</B></FONT></TD>
|
||||
<TD xsl:use-attribute-sets="top-table"><FONT COLOR="WHITE" SIZE="3"><B>Hyperlink</B></FONT></TD>
|
||||
<TD xsl:use-attribute-sets="top-table"><FONT COLOR="WHITE" SIZE="3"><B>Open On</B></FONT></TD>
|
||||
<TD xsl:use-attribute-sets="top-table"><FONT COLOR="WHITE" SIZE="3"><B>Help</B></FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD xsl:use-attribute-sets="first-bottom-table">
|
||||
<xsl:apply-templates select="Name"/>
|
||||
</TD>
|
||||
<TD xsl:use-attribute-sets="bottom-table">
|
||||
<xsl:apply-templates select="Hyperlink"/>
|
||||
</TD>
|
||||
<TD xsl:use-attribute-sets="bottom-table">
|
||||
<FONT SIZE="2">
|
||||
<xsl:value-of select="HyperlinkOpenOn"/>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD xsl:use-attribute-sets="bottom-table">
|
||||
<xsl:apply-templates select="Help"/>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD></TR>
|
||||
<TR><TD ROWSPAN="2" ALIGN="LEFT" VALIGN="MIDDLE">
|
||||
<A HREF="#{../Title/@LinkID}">
|
||||
<FONT SIZE="2">Go to <xsl:call-template name="PageTitle"/></FONT>
|
||||
</A>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Gestione celle vuote -->
|
||||
|
||||
<xsl:template match="Name | Title | Template | Author | User |
|
||||
Version | Created | Lastrevised |
|
||||
Comment | Note | Help | Hyperlink |
|
||||
Class | Bitmap | Property | Ref |
|
||||
Program | Execute">
|
||||
<xsl:call-template name="ValueOrNotAvailable"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
||||
91
JavaServletSrc/MemoryCursorRow_pi_qord_mast_vqr.java
Normal file
@ -0,0 +1,91 @@
|
||||
public class MemoryCursorRow_pi_qord_mast_vqr extends CPMemoryCursorRow {
|
||||
public MemoryCursorRow_pi_qord_mast_vqr() {
|
||||
}
|
||||
public MemoryCursorRow_pi_qord_mast_vqr(java.util.Properties p,CPContext p_Ctx) {
|
||||
MemoryCursor_pi_qord_mast_vqr toBuild = new MemoryCursor_pi_qord_mast_vqr(p,p_Ctx);
|
||||
Copy(toBuild.row);
|
||||
}
|
||||
public CPMemoryCursor AsMemoryCursor() {
|
||||
MemoryCursor_pi_qord_mast_vqr toBuild = new MemoryCursor_pi_qord_mast_vqr();
|
||||
// Utilizza Append per preservare l'identita' del valore di ritorno di una funzione che e' anche parametro
|
||||
toBuild.Append(this);
|
||||
return toBuild;
|
||||
}
|
||||
String AZIENDA = "";
|
||||
String MVSERIAL = "";
|
||||
String MVTIPDOC = "";
|
||||
java.sql.Date MVDATDOC = CPLib.NullDate();
|
||||
double MVNUMDOC = 0;
|
||||
String MVALFDOC = "";
|
||||
String MVCODCON = "";
|
||||
String ANDESCRI = "";
|
||||
double TOTIMP = 0;
|
||||
String MVFLPROV = "";
|
||||
String STATO = "";
|
||||
public boolean IsEmpty() {
|
||||
if ( ! (CPLib.Empty(AZIENDA))) {
|
||||
return false;
|
||||
}
|
||||
if ( ! (CPLib.Empty(MVSERIAL))) {
|
||||
return false;
|
||||
}
|
||||
if ( ! (CPLib.Empty(MVTIPDOC))) {
|
||||
return false;
|
||||
}
|
||||
if ( ! (CPLib.Empty(MVDATDOC))) {
|
||||
return false;
|
||||
}
|
||||
if ( ! (CPLib.Empty(MVNUMDOC))) {
|
||||
return false;
|
||||
}
|
||||
if ( ! (CPLib.Empty(MVALFDOC))) {
|
||||
return false;
|
||||
}
|
||||
if ( ! (CPLib.Empty(MVCODCON))) {
|
||||
return false;
|
||||
}
|
||||
if ( ! (CPLib.Empty(ANDESCRI))) {
|
||||
return false;
|
||||
}
|
||||
if ( ! (CPLib.Empty(TOTIMP))) {
|
||||
return false;
|
||||
}
|
||||
if ( ! (CPLib.Empty(MVFLPROV))) {
|
||||
return false;
|
||||
}
|
||||
if ( ! (CPLib.Empty(STATO))) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
void Copy(MemoryCursorRow_pi_qord_mast_vqr p_row) {
|
||||
if ( ! (CPLib.IsNull(p_row) || p_row.equals(this))) {
|
||||
MemoryCursorRow_pi_qord_mast_vqr.this.AZIENDA = copyAndCast(p_row.AZIENDA);
|
||||
MemoryCursorRow_pi_qord_mast_vqr.this.MVSERIAL = copyAndCast(p_row.MVSERIAL);
|
||||
MemoryCursorRow_pi_qord_mast_vqr.this.MVTIPDOC = copyAndCast(p_row.MVTIPDOC);
|
||||
MemoryCursorRow_pi_qord_mast_vqr.this.MVDATDOC = copyAndCast(p_row.MVDATDOC);
|
||||
MemoryCursorRow_pi_qord_mast_vqr.this.MVNUMDOC = copyAndCast(p_row.MVNUMDOC);
|
||||
MemoryCursorRow_pi_qord_mast_vqr.this.MVALFDOC = copyAndCast(p_row.MVALFDOC);
|
||||
MemoryCursorRow_pi_qord_mast_vqr.this.MVCODCON = copyAndCast(p_row.MVCODCON);
|
||||
MemoryCursorRow_pi_qord_mast_vqr.this.ANDESCRI = copyAndCast(p_row.ANDESCRI);
|
||||
MemoryCursorRow_pi_qord_mast_vqr.this.TOTIMP = copyAndCast(p_row.TOTIMP);
|
||||
MemoryCursorRow_pi_qord_mast_vqr.this.MVFLPROV = copyAndCast(p_row.MVFLPROV);
|
||||
MemoryCursorRow_pi_qord_mast_vqr.this.STATO = copyAndCast(p_row.STATO);
|
||||
}
|
||||
}
|
||||
public String[] GetColumnNames() {
|
||||
String[] l_names;
|
||||
l_names=new String[]{"AZIENDA","MVSERIAL","MVTIPDOC","MVDATDOC","MVNUMDOC","MVALFDOC","MVCODCON","ANDESCRI","TOTIMP","MVFLPROV","STATO"};
|
||||
return l_names;
|
||||
}
|
||||
public String[] GetColumnTypes() {
|
||||
String[] l_names;
|
||||
l_names=new String[]{"C","C","C","D","N","C","C","C","N","C","C"};
|
||||
return l_names;
|
||||
}
|
||||
public String[] GetColumnDescriptions() {
|
||||
String[] l_names;
|
||||
l_names=new String[]{"Codice azienda","Seriale ordine","Causale","Data ordine","Numero ordine","Alfa","Codice Fornitore","Descrizione Fornitore","Totale Imponibile","Flag provvisorio","Flag provvisorio"};
|
||||
return l_names;
|
||||
}
|
||||
}
|
||||
285
JavaServletSrc/MemoryCursor_pi_qord_mast_vqr.java
Normal file
@ -0,0 +1,285 @@
|
||||
// Definition generated from query pi_qord_mast_vqr
|
||||
public class MemoryCursor_pi_qord_mast_vqr extends CPMemoryCursor {
|
||||
MemoryCursorRow_pi_qord_mast_vqr row;
|
||||
MemoryCursorRow_pi_qord_mast_vqr empty_row;
|
||||
public MemoryCursor_pi_qord_mast_vqr() {
|
||||
empty_row = new MemoryCursorRow_pi_qord_mast_vqr();
|
||||
row = empty_row;
|
||||
}
|
||||
public MemoryCursor_pi_qord_mast_vqr(java.util.Properties p,CPContext p_Ctx) {
|
||||
AppendData(p,p_Ctx);
|
||||
}
|
||||
public void AppendData(java.util.Properties p,CPContext p_Ctx) {
|
||||
int i = 0;
|
||||
double Rows = 0;
|
||||
Rows = CPLib.Val(p.getProperty("Rows"));
|
||||
java.util.Properties p_AZIENDA;
|
||||
p_AZIENDA = new java.util.Properties();
|
||||
java.util.Properties p_MVSERIAL;
|
||||
p_MVSERIAL = new java.util.Properties();
|
||||
java.util.Properties p_MVTIPDOC;
|
||||
p_MVTIPDOC = new java.util.Properties();
|
||||
java.util.Properties p_MVDATDOC;
|
||||
p_MVDATDOC = new java.util.Properties();
|
||||
java.util.Properties p_MVNUMDOC;
|
||||
p_MVNUMDOC = new java.util.Properties();
|
||||
java.util.Properties p_MVALFDOC;
|
||||
p_MVALFDOC = new java.util.Properties();
|
||||
java.util.Properties p_MVCODCON;
|
||||
p_MVCODCON = new java.util.Properties();
|
||||
java.util.Properties p_ANDESCRI;
|
||||
p_ANDESCRI = new java.util.Properties();
|
||||
java.util.Properties p_TOTIMP;
|
||||
p_TOTIMP = new java.util.Properties();
|
||||
java.util.Properties p_MVFLPROV;
|
||||
p_MVFLPROV = new java.util.Properties();
|
||||
java.util.Properties p_STATO;
|
||||
p_STATO = new java.util.Properties();
|
||||
java.util.Properties l_Key;
|
||||
l_Key = new java.util.Properties();
|
||||
java.util.Enumeration e = p.propertyNames();
|
||||
String key;
|
||||
while (e.hasMoreElements()) {
|
||||
key = (String)e.nextElement();
|
||||
if ("Key".equalsIgnoreCase(key)) {
|
||||
l_Key = CPLib.GetProperties(p.getProperty(key));
|
||||
}
|
||||
if ("AZIENDA".equalsIgnoreCase(key)) {
|
||||
p_AZIENDA = CPLib.GetProperties(p.getProperty(key));
|
||||
}
|
||||
if ("MVSERIAL".equalsIgnoreCase(key)) {
|
||||
p_MVSERIAL = CPLib.GetProperties(p.getProperty(key));
|
||||
}
|
||||
if ("MVTIPDOC".equalsIgnoreCase(key)) {
|
||||
p_MVTIPDOC = CPLib.GetProperties(p.getProperty(key));
|
||||
}
|
||||
if ("MVDATDOC".equalsIgnoreCase(key)) {
|
||||
p_MVDATDOC = CPLib.GetProperties(p.getProperty(key));
|
||||
}
|
||||
if ("MVNUMDOC".equalsIgnoreCase(key)) {
|
||||
p_MVNUMDOC = CPLib.GetProperties(p.getProperty(key));
|
||||
}
|
||||
if ("MVALFDOC".equalsIgnoreCase(key)) {
|
||||
p_MVALFDOC = CPLib.GetProperties(p.getProperty(key));
|
||||
}
|
||||
if ("MVCODCON".equalsIgnoreCase(key)) {
|
||||
p_MVCODCON = CPLib.GetProperties(p.getProperty(key));
|
||||
}
|
||||
if ("ANDESCRI".equalsIgnoreCase(key)) {
|
||||
p_ANDESCRI = CPLib.GetProperties(p.getProperty(key));
|
||||
}
|
||||
if ("TOTIMP".equalsIgnoreCase(key)) {
|
||||
p_TOTIMP = CPLib.GetProperties(p.getProperty(key));
|
||||
}
|
||||
if ("MVFLPROV".equalsIgnoreCase(key)) {
|
||||
p_MVFLPROV = CPLib.GetProperties(p.getProperty(key));
|
||||
}
|
||||
if ("STATO".equalsIgnoreCase(key)) {
|
||||
p_STATO = CPLib.GetProperties(p.getProperty(key));
|
||||
}
|
||||
}
|
||||
for ( i = 1; CPLib.le(i,Rows); i = i + (1)) {
|
||||
AppendBlank();
|
||||
String l_cKeyValue = null;
|
||||
l_cKeyValue = CPLib.GetProperty(l_Key,"",l_cKeyValue,i);
|
||||
Object l_KeyValue = l_cKeyValue;
|
||||
if ( ! (CPLib.IsNull(l_KeyValue))) {
|
||||
SetKey(l_KeyValue);
|
||||
}
|
||||
row.AZIENDA = CPLib.GetProperty(p_AZIENDA,"","",i);
|
||||
row.MVSERIAL = CPLib.GetProperty(p_MVSERIAL,"","",i);
|
||||
row.MVTIPDOC = CPLib.GetProperty(p_MVTIPDOC,"","",i);
|
||||
row.MVDATDOC = CPLib.GetProperty(p_MVDATDOC,"",CPLib.NullDate(),i);
|
||||
row.MVNUMDOC = CPLib.GetProperty(p_MVNUMDOC,"",0,i);
|
||||
row.MVALFDOC = CPLib.GetProperty(p_MVALFDOC,"","",i);
|
||||
row.MVCODCON = CPLib.GetProperty(p_MVCODCON,"","",i);
|
||||
row.ANDESCRI = CPLib.GetProperty(p_ANDESCRI,"","",i);
|
||||
row.TOTIMP = CPLib.GetProperty(p_TOTIMP,"",0,i);
|
||||
row.MVFLPROV = CPLib.GetProperty(p_MVFLPROV,"","",i);
|
||||
row.STATO = CPLib.GetProperty(p_STATO,"","",i);
|
||||
}
|
||||
if (CPLib.IsNull(p.getProperty("AtRow"))) {
|
||||
GoTop();
|
||||
} else {
|
||||
GoTo(CPLib.Val(p.getProperty("AtRow")));
|
||||
}
|
||||
}
|
||||
protected void SetCurrentRow(Object p_Row) {
|
||||
row = (MemoryCursorRow_pi_qord_mast_vqr)p_Row;
|
||||
}
|
||||
protected void SaveOnRow(Object p_Row) {
|
||||
}
|
||||
protected Object NewBlankRow() {
|
||||
return new MemoryCursorRow_pi_qord_mast_vqr();
|
||||
}
|
||||
protected String[] GetColumnNames() {
|
||||
return row.GetColumnNames();
|
||||
}
|
||||
protected String[] GetColumnTypes() {
|
||||
return row.GetColumnTypes();
|
||||
}
|
||||
public CPMemoryCursorRow CurrentRow() {
|
||||
return row;
|
||||
}
|
||||
@SuppressWarnings("unchecked")
|
||||
public MemoryCursorRow_pi_qord_mast_vqr _slice_(double p_nRow) {
|
||||
return super._slice_(p_nRow);
|
||||
}
|
||||
@SuppressWarnings("unchecked")
|
||||
public MemoryCursorRow_pi_qord_mast_vqr _get_(Object p_Key) {
|
||||
return super._get_(p_Key);
|
||||
}
|
||||
@SuppressWarnings("unchecked")
|
||||
public Iterable<MemoryCursorRow_pi_qord_mast_vqr> _iterable_() {
|
||||
return _iterable_(null,null);
|
||||
}
|
||||
public boolean AppendRow(MemoryCursorRow_pi_qord_mast_vqr p_Row) {
|
||||
MemoryCursorRow_pi_qord_mast_vqr l_Row;
|
||||
if (CPLib.IsNull(p_Row)) {
|
||||
l_Row = null;
|
||||
} else {
|
||||
l_Row = new MemoryCursorRow_pi_qord_mast_vqr();
|
||||
l_Row.Copy(p_Row);
|
||||
}
|
||||
return Append(l_Row);
|
||||
}
|
||||
public boolean AppendRowWithKey(boolean p_Key,MemoryCursorRow_pi_qord_mast_vqr p_Row) {
|
||||
MemoryCursorRow_pi_qord_mast_vqr l_Row;
|
||||
if (CPLib.IsNull(p_Row)) {
|
||||
l_Row = null;
|
||||
} else {
|
||||
l_Row = new MemoryCursorRow_pi_qord_mast_vqr();
|
||||
l_Row.Copy(p_Row);
|
||||
}
|
||||
return super.AppendWithKey(p_Key,l_Row);
|
||||
}
|
||||
public boolean InsertRowWithKey(boolean p_Key,MemoryCursorRow_pi_qord_mast_vqr p_Row) {
|
||||
MemoryCursorRow_pi_qord_mast_vqr l_Row;
|
||||
if (CPLib.IsNull(p_Row)) {
|
||||
l_Row = null;
|
||||
} else {
|
||||
l_Row = new MemoryCursorRow_pi_qord_mast_vqr();
|
||||
l_Row.Copy(p_Row);
|
||||
}
|
||||
return super.InsertWithKey(p_Key,l_Row);
|
||||
}
|
||||
public boolean AppendRowWithKey(String p_Key,MemoryCursorRow_pi_qord_mast_vqr p_Row) {
|
||||
MemoryCursorRow_pi_qord_mast_vqr l_Row;
|
||||
if (CPLib.IsNull(p_Row)) {
|
||||
l_Row = null;
|
||||
} else {
|
||||
l_Row = new MemoryCursorRow_pi_qord_mast_vqr();
|
||||
l_Row.Copy(p_Row);
|
||||
}
|
||||
return super.AppendWithKey(p_Key,l_Row);
|
||||
}
|
||||
public boolean InsertRowWithKey(String p_Key,MemoryCursorRow_pi_qord_mast_vqr p_Row) {
|
||||
MemoryCursorRow_pi_qord_mast_vqr l_Row;
|
||||
if (CPLib.IsNull(p_Row)) {
|
||||
l_Row = null;
|
||||
} else {
|
||||
l_Row = new MemoryCursorRow_pi_qord_mast_vqr();
|
||||
l_Row.Copy(p_Row);
|
||||
}
|
||||
return super.InsertWithKey(p_Key,l_Row);
|
||||
}
|
||||
public boolean AppendRowWithKey(double p_Key,MemoryCursorRow_pi_qord_mast_vqr p_Row) {
|
||||
MemoryCursorRow_pi_qord_mast_vqr l_Row;
|
||||
if (CPLib.IsNull(p_Row)) {
|
||||
l_Row = null;
|
||||
} else {
|
||||
l_Row = new MemoryCursorRow_pi_qord_mast_vqr();
|
||||
l_Row.Copy(p_Row);
|
||||
}
|
||||
return super.AppendWithKey(p_Key,l_Row);
|
||||
}
|
||||
public boolean InsertRowWithKey(double p_Key,MemoryCursorRow_pi_qord_mast_vqr p_Row) {
|
||||
MemoryCursorRow_pi_qord_mast_vqr l_Row;
|
||||
if (CPLib.IsNull(p_Row)) {
|
||||
l_Row = null;
|
||||
} else {
|
||||
l_Row = new MemoryCursorRow_pi_qord_mast_vqr();
|
||||
l_Row.Copy(p_Row);
|
||||
}
|
||||
return super.InsertWithKey(p_Key,l_Row);
|
||||
}
|
||||
public boolean AppendRowWithKey(java.sql.Date p_Key,MemoryCursorRow_pi_qord_mast_vqr p_Row) {
|
||||
MemoryCursorRow_pi_qord_mast_vqr l_Row;
|
||||
if (CPLib.IsNull(p_Row)) {
|
||||
l_Row = null;
|
||||
} else {
|
||||
l_Row = new MemoryCursorRow_pi_qord_mast_vqr();
|
||||
l_Row.Copy(p_Row);
|
||||
}
|
||||
return super.AppendWithKey(p_Key,l_Row);
|
||||
}
|
||||
public boolean InsertRowWithKey(java.sql.Date p_Key,MemoryCursorRow_pi_qord_mast_vqr p_Row) {
|
||||
MemoryCursorRow_pi_qord_mast_vqr l_Row;
|
||||
if (CPLib.IsNull(p_Row)) {
|
||||
l_Row = null;
|
||||
} else {
|
||||
l_Row = new MemoryCursorRow_pi_qord_mast_vqr();
|
||||
l_Row.Copy(p_Row);
|
||||
}
|
||||
return super.InsertWithKey(p_Key,l_Row);
|
||||
}
|
||||
public boolean AppendRowWithKey(java.sql.Timestamp p_Key,MemoryCursorRow_pi_qord_mast_vqr p_Row) {
|
||||
MemoryCursorRow_pi_qord_mast_vqr l_Row;
|
||||
if (CPLib.IsNull(p_Row)) {
|
||||
l_Row = null;
|
||||
} else {
|
||||
l_Row = new MemoryCursorRow_pi_qord_mast_vqr();
|
||||
l_Row.Copy(p_Row);
|
||||
}
|
||||
return super.AppendWithKey(p_Key,l_Row);
|
||||
}
|
||||
public boolean InsertRowWithKey(java.sql.Timestamp p_Key,MemoryCursorRow_pi_qord_mast_vqr p_Row) {
|
||||
MemoryCursorRow_pi_qord_mast_vqr l_Row;
|
||||
if (CPLib.IsNull(p_Row)) {
|
||||
l_Row = null;
|
||||
} else {
|
||||
l_Row = new MemoryCursorRow_pi_qord_mast_vqr();
|
||||
l_Row.Copy(p_Row);
|
||||
}
|
||||
return super.InsertWithKey(p_Key,l_Row);
|
||||
}
|
||||
public boolean AppendRowWithKey(Object p_Key,MemoryCursorRow_pi_qord_mast_vqr p_Row) {
|
||||
MemoryCursorRow_pi_qord_mast_vqr l_Row;
|
||||
if (CPLib.IsNull(p_Row)) {
|
||||
l_Row = null;
|
||||
} else {
|
||||
l_Row = new MemoryCursorRow_pi_qord_mast_vqr();
|
||||
l_Row.Copy(p_Row);
|
||||
}
|
||||
return AppendWithKey(p_Key,l_Row);
|
||||
}
|
||||
public boolean InsertRowWithKey(Object p_Key,MemoryCursorRow_pi_qord_mast_vqr p_Row) {
|
||||
MemoryCursorRow_pi_qord_mast_vqr l_Row;
|
||||
if (CPLib.IsNull(p_Row)) {
|
||||
l_Row = null;
|
||||
} else {
|
||||
l_Row = new MemoryCursorRow_pi_qord_mast_vqr();
|
||||
l_Row.Copy(p_Row);
|
||||
}
|
||||
return InsertWithKey(p_Key,l_Row);
|
||||
}
|
||||
public boolean InsertRow(MemoryCursorRow_pi_qord_mast_vqr p_Row) {
|
||||
MemoryCursorRow_pi_qord_mast_vqr l_Row;
|
||||
if (CPLib.IsNull(p_Row)) {
|
||||
l_Row = null;
|
||||
} else {
|
||||
l_Row = new MemoryCursorRow_pi_qord_mast_vqr();
|
||||
l_Row.Copy(p_Row);
|
||||
}
|
||||
return Insert(l_Row);
|
||||
}
|
||||
public boolean CopyRow(MemoryCursorRow_pi_qord_mast_vqr p_Row) {
|
||||
if (CPLib.IsNull(p_Row)) {
|
||||
return false;
|
||||
} else if (CPLib.IsNull(this.row)) {
|
||||
this.row = new MemoryCursorRow_pi_qord_mast_vqr();
|
||||
}
|
||||
this.row.Copy(p_Row);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
619
JavaServletSrc/Utilities.java
Normal file
@ -0,0 +1,619 @@
|
||||
import com.zucchetti.sitepainter.Library;
|
||||
import static com.zucchetti.sitepainter.Library.Date;
|
||||
import static com.zucchetti.sitepainter.Library.DateTimeToChar;
|
||||
import static com.zucchetti.sitepainter.Library.NullDateTime;
|
||||
import static com.zucchetti.sitepainter.Library.Val;
|
||||
import java.lang.reflect.InvocationHandler;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Proxy;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.Calendar;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
public class Utilities {
|
||||
|
||||
//---Start function: UTILITIES_LIBRARY_CODE
|
||||
CPContext m_Ctx;
|
||||
Caller m_Caller;
|
||||
private static AtomicBoolean m_OneSignal = new AtomicBoolean();
|
||||
public static Utilities Make(CPContext ctx) {
|
||||
Utilities l_Utilities = new Utilities();
|
||||
l_Utilities.m_Ctx = ctx;
|
||||
l_Utilities.m_Caller = CallerImpl.EMPTY_CALLER;
|
||||
return l_Utilities;
|
||||
}
|
||||
public static Utilities Make(CPContext ctx,Caller c) {
|
||||
Utilities l_Utilities = Make(ctx);
|
||||
l_Utilities.m_Caller = c;
|
||||
return l_Utilities;
|
||||
}
|
||||
int _AtSpace_(String p_cStr,int cnt) {
|
||||
int l=0;
|
||||
int pos=-1;
|
||||
while (l<cnt) {
|
||||
pos=p_cStr.indexOf(" ", pos+1) ;
|
||||
l++;
|
||||
}
|
||||
return pos+1;
|
||||
}
|
||||
public void SetTheme(String theme) {
|
||||
SetSkin(theme);
|
||||
}
|
||||
public String GetTheme() {
|
||||
return GetSkin();
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: AddToGroup
|
||||
public void AddToGroup(double groupcode) {
|
||||
m_Ctx.GetAuthority().GetCurrentAssignement().AddToGroup(groupcode);
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: AddToRole
|
||||
public void AddToRole(String rolename) {
|
||||
m_Ctx.GetAuthority().GetCurrentAssignement().AddToRole(rolename);
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: AskTableProg
|
||||
public void AskTableProg(Caller obj, String dbserverlocator, String tablename, String autonumber) {
|
||||
CPSql l_sql=m_Ctx.GetSql();
|
||||
l_sql.AskTableProg(obj,
|
||||
tablename,
|
||||
autonumber,
|
||||
m_Ctx.GetServer(dbserverlocator),
|
||||
m_Ctx.GetCompany());
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: BeginForceMasterDB
|
||||
public void BeginForceMasterDB() {
|
||||
m_Ctx.GetSql().ForceMasterDB(true);
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: BeginWritingIgnoringSlaveDB
|
||||
public void BeginWritingIgnoringSlaveDB() {
|
||||
m_Ctx.GetSql().UpdateServerUsed(false);
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: DateTimeBO
|
||||
public java.sql.Timestamp DateTimeBO() {
|
||||
CPRegionalSettings rs = SPLib.GetRegionalSettings(m_Ctx);
|
||||
if (rs==null && m_Ctx instanceof SPContext && !"YES".equals(cp_login.m_cRegionalSettingsInterstitial) && m_OneSignal.compareAndSet(false,true))
|
||||
Library.error(new Error("I regional settings non sono disponibili in quanto cp_login.m_cRegionalSettingsInterstitial<>\"YES\""));
|
||||
if (rs == null)
|
||||
return NullDateTime();
|
||||
Long[] tzClientServerDateTime = rs.getTzClientServerDateTime();
|
||||
if (tzClientServerDateTime[0] == com.zucchetti.sitepainter.SPRegionalSettings.TIMEZONE_NOT_SET) {
|
||||
Error trackCallingSite = new Error("SPRegionalSettings.clientTimeZoneOffset non ancora impostato, la causa dell'eccezione è il punto in cui sono stati impostati l'ultima volta");
|
||||
trackCallingSite.initCause(rs.tzSet);
|
||||
Library.error(trackCallingSite);
|
||||
return NullDateTime();
|
||||
}
|
||||
//16:49
|
||||
Calendar now = Calendar.getInstance();
|
||||
//9:49 - 16:49 = -7 * 60 * 60 * 1000 (America centrale)
|
||||
long delta = tzClientServerDateTime[1];
|
||||
//...
|
||||
long millisecond = delta % 1000;
|
||||
now.add(Calendar.MILLISECOND, (int)millisecond );
|
||||
delta /= 1000;
|
||||
//0
|
||||
long second = delta % 60;
|
||||
now.add(Calendar.SECOND, (int)second );
|
||||
delta /= 60;
|
||||
//0
|
||||
long minute = delta % 60;
|
||||
now.add(Calendar.MINUTE, (int)minute );
|
||||
//-7
|
||||
delta /= 60;
|
||||
now.add(Calendar.HOUR, (int)delta );
|
||||
//6 * 60
|
||||
now.add(Calendar.MINUTE, tzClientServerDateTime[0].intValue() );
|
||||
//60*60*1000 (Italia)
|
||||
int localDelta = java.util.TimeZone.getDefault().getOffset(now.getTimeInMillis());
|
||||
now.add(Calendar.MILLISECOND, localDelta);
|
||||
//vedi CPLib.DateTime
|
||||
now.set(Calendar.MILLISECOND,0);
|
||||
return new java.sql.Timestamp(now.getTimeInMillis());
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: DateTimeUI
|
||||
public java.sql.Timestamp DateTimeUI() {
|
||||
CPRegionalSettings rs = SPLib.GetRegionalSettings(m_Ctx);
|
||||
if (rs==null && m_Ctx instanceof SPContext && !"YES".equals(cp_login.m_cRegionalSettingsInterstitial) && m_OneSignal.compareAndSet(false,true))
|
||||
Library.error(new Error("I regional settings non sono disponibili in quanto cp_login.m_cRegionalSettingsInterstitial<>\"YES\""));
|
||||
if (rs==null)
|
||||
return NullDateTime();
|
||||
Long[] tzClientServerDateTime = rs.getTzClientServerDateTime();
|
||||
if (tzClientServerDateTime[0] == com.zucchetti.sitepainter.SPRegionalSettings.TIMEZONE_NOT_SET) {
|
||||
Error trackCallingSite = new Error("SPRegionalSettings.clientTimeZoneOffset non ancora impostato, la causa dell'eccezione è il punto in cui sono stati impostati l'ultima volta");
|
||||
trackCallingSite.initCause(rs.tzSet);
|
||||
Library.error(trackCallingSite);
|
||||
return NullDateTime();
|
||||
}
|
||||
Calendar now = Calendar.getInstance();
|
||||
now.add(Calendar.MINUTE, -tzClientServerDateTime[0].intValue() );
|
||||
int localDelta = java.util.TimeZone.getDefault().getOffset(now.getTimeInMillis());
|
||||
now.add(Calendar.MILLISECOND, -localDelta);
|
||||
//vedi CPLib.DateTime
|
||||
now.set(Calendar.MILLISECOND,0);
|
||||
return new java.sql.Timestamp(now.getTimeInMillis());
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: DefineConnection
|
||||
public void DefineConnection(String connectionname, String serverurl) {
|
||||
m_Ctx.DefineConnection(connectionname,serverurl);
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: EndForceMasterDB
|
||||
public void EndForceMasterDB() {
|
||||
m_Ctx.GetSql().ForceMasterDB(false);
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: EndWritingIgnoringSlaveDB
|
||||
public void EndWritingIgnoringSlaveDB() {
|
||||
m_Ctx.GetSql().UpdateServerUsed(true);
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: ForceTableProg
|
||||
public void ForceTableProg(Caller obj, String dbserverlocator, String tablename, String autonumber) {
|
||||
CPSql l_sql=m_Ctx.GetSql();
|
||||
l_sql.RequireTransaction();
|
||||
l_sql.ForceTableProg(obj,
|
||||
tablename,
|
||||
autonumber,
|
||||
m_Ctx.GetServer(dbserverlocator),
|
||||
m_Ctx.GetCompany());
|
||||
l_sql.CompleteTransaction();
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: FormatEx
|
||||
public String FormatEx(String expression, double length, double decimals, String picture) {
|
||||
return CPLib.Format(expression, picture);
|
||||
}
|
||||
public String FormatEx(double expression, double length, double decimals, String picture) {
|
||||
return CPLib.Format(expression, picture);
|
||||
}
|
||||
public String FormatEx(java.sql.Date expression, double length, double decimals, String picture) {
|
||||
return CPLib.Format(expression, picture);
|
||||
}
|
||||
public String FormatEx(java.sql.Timestamp expression, double length, double decimals, String picture) {
|
||||
return CPLib.Format(expression, picture);
|
||||
}
|
||||
public String FormatEx(boolean expression, double length, double decimals, String picture) {
|
||||
return CPLib.Format(expression, picture);
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: GetAutonumber
|
||||
public String GetAutonumber(String key, String workVar,int len) {
|
||||
CPSql l_sql=m_Ctx.GetSql();
|
||||
l_sql.RequireTransaction();
|
||||
String r=m_Ctx.NextTableProg(workVar,
|
||||
len,
|
||||
"",
|
||||
key,
|
||||
m_Ctx.GetServer("cpwarn",
|
||||
true));
|
||||
l_sql.CompleteTransaction();
|
||||
return r;
|
||||
}
|
||||
public double GetAutonumber(String key, double workVar) {
|
||||
return GetAutonumber(key, workVar, 0);
|
||||
}
|
||||
public double GetAutonumber(String key, double workVar, int len) {
|
||||
CPSql l_sql=m_Ctx.GetSql();
|
||||
l_sql.RequireTransaction();
|
||||
double r=m_Ctx.NextTableProg(workVar,
|
||||
len,
|
||||
0,
|
||||
key,
|
||||
m_Ctx.GetServer("cpwarn",
|
||||
true));
|
||||
l_sql.CompleteTransaction();
|
||||
return r;
|
||||
}
|
||||
public String GetAutonumber(String key, String workVar) {
|
||||
return GetAutonumber(key, workVar, 0);
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: GetCallerBO
|
||||
public CallerBRImpl GetCallerBO() {
|
||||
//implementare '<T extends CallerBRImpl> GetCallerBO()' espone l'utilizzatore ad eccezioni di cast giudicate poco intuitive
|
||||
if (m_Caller instanceof CallerBRImpl)
|
||||
return (CallerBRImpl)m_Caller;
|
||||
CallerWithObjsImpl wrapped = null;
|
||||
if (m_Caller instanceof CallerWithObjsImpl)
|
||||
wrapped = (CallerWithObjsImpl)m_Caller;
|
||||
if (wrapped != null && wrapped.m_Caller instanceof CallerBRImpl)
|
||||
return (CallerBRImpl)wrapped.m_Caller;
|
||||
return CallerBRImpl.EMPTY;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: GetCallerDate
|
||||
public java.sql.Date GetCallerDate(String name) {
|
||||
return m_Caller.GetDate(name,"D",0,0);
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: GetCallerDateTime
|
||||
public java.sql.Timestamp GetCallerDateTime(String name) {
|
||||
return m_Caller.GetDateTime(name,"T",0,0);
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: GetCallerLogic
|
||||
public boolean GetCallerLogic(String name) {
|
||||
return m_Caller.GetLogic(name,"L",0,0);
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: GetCallerNumber
|
||||
public double GetCallerNumber(String name) {
|
||||
return m_Caller.GetNumber(name,"N",0,0);
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: GetCallerString
|
||||
public String GetCallerString(String name) {
|
||||
return m_Caller.GetString(name,"C",0,0);
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: GetCompany
|
||||
public String GetCompany() {
|
||||
return m_Ctx.GetCompany();
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: GetFullName
|
||||
public String GetFullName() {
|
||||
return m_Ctx.GetFullName();
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: GetInstance
|
||||
public String GetInstance() {
|
||||
return m_Ctx.GetInstance();
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: GetLanguage
|
||||
public String GetLanguage() {
|
||||
return m_Ctx.GetLanguage();
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: GetSkin
|
||||
public String GetSkin() {
|
||||
return SPLib.GetSkin(m_Ctx);
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: GetSkinList
|
||||
public String GetSkinList() {
|
||||
return com.zucchetti.sitepainter.DefaultApplicationSkin.m_cInstalledApplicationSkin;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: GetTimeout
|
||||
public double GetTimeout() {
|
||||
return m_Ctx.GetDuration()/(1000*60);
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: GetViewType
|
||||
public double GetViewType() {
|
||||
double res = SPLib.GetViewType(m_Ctx);
|
||||
return res;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: IsAdministrator
|
||||
public boolean IsAdministrator() {
|
||||
return IsInGroup(1);
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: IsGuest
|
||||
public boolean IsGuest() {
|
||||
return m_Ctx.IsGuest();
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: IsInGroup
|
||||
public boolean IsInGroup(double p_nGroup) {
|
||||
return m_Ctx.GetGroupsList().indexOf(CPLib.ToSQL(p_nGroup,"N",6,0))!=-1;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: IsInRole
|
||||
public boolean IsInRole(String p_cRole) {
|
||||
return m_Ctx.GetAuthority().GetCurrentAssignement().IsInRole(CPLib.Lower(p_cRole));
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: IsMobile
|
||||
public boolean IsMobile() {
|
||||
boolean res = SPLib.IsMobile(m_Ctx);
|
||||
return res;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: IsUserReadingOnSlaveDB
|
||||
public boolean IsUserReadingOnSlaveDB() {
|
||||
return m_Ctx.IsUserOnSecondaryDB();
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: Logout
|
||||
public void Logout() throws Forward {
|
||||
if (CPLib.AL_APPLICATION.equals(CPLib.AfterloginPhase(m_Ctx))) {
|
||||
m_Ctx.SetDuration(0);
|
||||
throw CPLib.PROGRAMMATIC_LOGOUT;
|
||||
} else {
|
||||
if (!CPLib.AL_MODULE.equals(CPLib.AfterloginPhase(m_Ctx)))
|
||||
CPStdCounter.Error(new Error("Revise your application, Utilities.Logout should be called only from afterlogin routines.\nUse Utilities.SetTimeout(0) outside of afterlogin routines."));
|
||||
m_Ctx.DoLogout();
|
||||
}
|
||||
}
|
||||
public void Logout(String p_cName,double p_nValue) {
|
||||
CPContext.Logout(p_cName,p_nValue);
|
||||
}
|
||||
public void Logout(String p_cName,String p_cValue) {
|
||||
CPContext.Logout(p_cName,p_cValue);
|
||||
}
|
||||
public void Logout(String p_cName,java.sql.Date p_dValue) {
|
||||
CPContext.Logout(p_cName,p_dValue);
|
||||
}
|
||||
public void Logout(String p_cName,boolean p_lValue) {
|
||||
CPContext.Logout(p_cName,p_lValue);
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: NextTableProg
|
||||
public void NextTableProg(Caller obj, String dbserverlocator, String tablename, String autonumber) {
|
||||
CPSql l_sql=m_Ctx.GetSql();
|
||||
l_sql.RequireTransaction();
|
||||
l_sql.NextTableProg(obj,
|
||||
tablename,
|
||||
autonumber,
|
||||
m_Ctx.GetServer(dbserverlocator),
|
||||
m_Ctx.GetCompany());
|
||||
l_sql.CompleteTransaction();
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: PullFromGroup
|
||||
public void PullFromGroup(double groupcode) {
|
||||
m_Ctx.GetAuthority().GetCurrentAssignement().PullFromGroup(groupcode);
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: PullFromRole
|
||||
public void PullFromRole(String rolename) {
|
||||
m_Ctx.GetAuthority().GetCurrentAssignement().PullFromRole(rolename);
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: ResetAlternativeServer
|
||||
public void ResetAlternativeServer(String queryname,String tablename) {
|
||||
if (!CPLib.Empty(queryname)) {
|
||||
VQRHolder l_holder=new VQRHolder(queryname, new SPVQRReaderFactory(m_Ctx.GetInstance()),CallerImpl.EMPTY_CALLER);
|
||||
l_holder.ql.SetContext(m_Ctx);
|
||||
java.util.Map<String,String> tables=l_holder.ql.GetTablesMap();
|
||||
for(java.util.Iterator it = tables.values().iterator(); it.hasNext(); ){
|
||||
m_Ctx.RemoveRedefinedServer(
|
||||
l_holder.ql.GetTable((String)(it.next()))
|
||||
);
|
||||
}
|
||||
}
|
||||
if (!CPLib.Empty(tablename)) {
|
||||
m_Ctx.RemoveRedefinedServer(tablename);
|
||||
}
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: ServerSetUITierSettings
|
||||
public void ServerSetUITierSettings(String UITimeZone, String UIDateTime) {
|
||||
CPRegionalSettings rs = SPLib.GetRegionalSettings(m_Ctx);
|
||||
if (rs == null)
|
||||
rs = new CPRegionalSettings();
|
||||
SPLib.SetRegionalSettings(m_Ctx,
|
||||
rs.decimalSeparator,
|
||||
rs.thousandSeparator,
|
||||
rs.datePattern,
|
||||
rs.dateTimePattern,
|
||||
UITimeZone,
|
||||
UIDateTime,
|
||||
DateTimeToChar(CPLib.DateTime()));
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: ServerSetUnspecifiedPictureSettings
|
||||
public String ServerSetUnspecifiedPictureSettings(String decimal_separator, String thousand_separator, String date_pattern, String datetime_pattern) {
|
||||
if (m_Ctx instanceof SPContext && "NO".equals(m_Ctx.GetGlobalObject("i_SendHttpRegionalSettings",null))) {
|
||||
HttpServletRequest[] l_Request={null};
|
||||
HttpServletResponse[] l_Response={null};
|
||||
class NoOp implements InvocationHandler {
|
||||
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
l_Request[0] = (HttpServletRequest)Proxy.newProxyInstance(getClass().getClassLoader(), new Class[]{HttpServletRequest.class}, new NoOp());
|
||||
l_Response[0] = (HttpServletResponse)Proxy.newProxyInstance(getClass().getClassLoader(), new Class[]{HttpServletResponse.class}, new NoOp());
|
||||
Library.SetRequestResponse(l_Request, l_Response);
|
||||
try {return SPLib.SetUnspecifiedPictureSettings(m_Ctx, decimal_separator, thousand_separator, date_pattern, datetime_pattern);}
|
||||
finally{Library.SetRequestResponse(l_Request, l_Response);}
|
||||
}
|
||||
return SPLib.SetUnspecifiedPictureSettings(m_Ctx, decimal_separator, thousand_separator, date_pattern, datetime_pattern);
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: ServerTime
|
||||
public String ServerTime() {
|
||||
return CPLib.Time();
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: SetAlternativeServer
|
||||
public void SetAlternativeServer(String queryname, String tablename, String serverurl) {
|
||||
if (!CPLib.Empty(queryname)) {
|
||||
VQRHolder l_holder=new VQRHolder(queryname, new SPVQRReaderFactory(m_Ctx.GetInstance()),CallerImpl.EMPTY_CALLER);
|
||||
l_holder.ql.SetContext(m_Ctx);
|
||||
java.util.Map<String,String> tables=l_holder.ql.GetTablesMap();
|
||||
for(java.util.Iterator it = tables.values().iterator(); it.hasNext(); ){
|
||||
m_Ctx.RedefineServer(
|
||||
l_holder.ql.GetTable((String)(it.next())),
|
||||
serverurl
|
||||
);
|
||||
}
|
||||
}
|
||||
if(!CPLib.Empty(tablename)) {
|
||||
m_Ctx.RedefineServer(tablename,serverurl);
|
||||
}
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: SetCompany
|
||||
public boolean SetCompany(String p_cCompany) {
|
||||
return m_Ctx.SetCompany(p_cCompany);
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: SetLanguage
|
||||
public void SetLanguage(String p_cLanguage) {
|
||||
m_Ctx.SetLanguage(p_cLanguage);
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: SetSkin
|
||||
public void SetSkin(String skin) {
|
||||
SPLib.SetSkin(m_Ctx, skin);
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: SetTimeout
|
||||
public void SetTimeout(double duration) {
|
||||
m_Ctx.SetDuration(((long)duration)*1000*60);
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: SetUserCode
|
||||
public void SetUserCode(double p_nUserCode) {
|
||||
m_Ctx.SetUserCode(p_nUserCode);
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: ShowHistoricalTodate
|
||||
public java.sql.Date ShowHistoricalTodate(java.sql.Date cptodate) {
|
||||
if (CPSql.IsToDateCurrentlyValid(cptodate))
|
||||
return CPLib.NullDate();
|
||||
else
|
||||
return cptodate;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: SkipTableProg
|
||||
public void SkipTableProg(Caller obj, String dbserverlocator, String tablename,String autonumber, double skip) {
|
||||
CPSql l_sql=m_Ctx.GetSql();
|
||||
l_sql.RequireTransaction();
|
||||
l_sql.SkipTableProg(obj,
|
||||
tablename,
|
||||
autonumber,
|
||||
m_Ctx.GetServer(dbserverlocator),
|
||||
m_Ctx.GetCompany(),
|
||||
skip);
|
||||
l_sql.CompleteTransaction();
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: ToHTML
|
||||
public String ToHTML(String p_cString) {
|
||||
return SPLib.ToHTML(p_cString,"C",0,0);
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: ToSQL
|
||||
public String ToSQL(boolean workingVariable,String type, int length, int decimals) {
|
||||
return CPLib.ToSQL(workingVariable, type, length, decimals);
|
||||
}
|
||||
public String ToSQL(String workingVariable,String type, int length, int decimals) {
|
||||
return CPLib.ToSQL(workingVariable, type, length, decimals);
|
||||
}
|
||||
public String ToSQL(double workingVariable,String type, int length, int decimals) {
|
||||
return CPLib.ToSQL(workingVariable, type, length, decimals);
|
||||
}
|
||||
public String ToSQL(java.sql.Date workingVariable,String type, int length, int decimals) {
|
||||
return CPLib.ToSQL(workingVariable, type, length, decimals);
|
||||
}
|
||||
public String ToSQL(java.sql.Timestamp workingVariable,String type, int length, int decimals) {
|
||||
return CPLib.ToSQL(workingVariable, type, length, decimals);
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: Translate
|
||||
public String Translate(String p_cMessage, String p_cFirstParameter, String p_cSecondParameter) {
|
||||
String res = "";
|
||||
res=m_Ctx.Translate(p_cMessage,p_cFirstParameter,p_cSecondParameter);
|
||||
return res;
|
||||
}
|
||||
public String Translate(String p_cMessage, String p_cFirstParameter) {
|
||||
return Translate(p_cMessage,p_cFirstParameter,"%2");
|
||||
}
|
||||
public String Translate(String p_cMessage) {
|
||||
return Translate(p_cMessage,"%1","%2");
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: UndefineConnection
|
||||
public void UndefineConnection(String connectionname) {
|
||||
m_Ctx.UndefineConnection(connectionname);
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: UserCode
|
||||
public double UserCode(){
|
||||
return m_Ctx.UserCode();
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: UserName
|
||||
public String UserName(){
|
||||
return m_Ctx.UserName();
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: Word
|
||||
public String Word(String str, int idx) {
|
||||
int p=_AtSpace_(str,idx),p1;
|
||||
if (idx==1) {
|
||||
if (p==0)
|
||||
return str;
|
||||
else
|
||||
return CPLib.Substr(str,1,p-1);
|
||||
} else {
|
||||
p1=_AtSpace_(str,idx-1);
|
||||
if (p==0)
|
||||
return CPLib.Substr(str,p1+1);
|
||||
else
|
||||
return CPLib.Substr(str,p1+1,p-p1);
|
||||
}
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start attributes
|
||||
//---End attributes
|
||||
}
|
||||
463
JavaServletSrc/Utilities.js
Normal file
@ -0,0 +1,463 @@
|
||||
(function() {//MakeUtilities
|
||||
function _AtSpace_(p_cStr,cnt) {
|
||||
var l=0
|
||||
var pos=-1;
|
||||
while (l<cnt) {
|
||||
pos=p_cStr.indexOf(" ", pos+1) ;
|
||||
l++;
|
||||
}
|
||||
return pos+1;
|
||||
}
|
||||
function utilities_Make(p_ctx,p_caller){
|
||||
if(p_caller==null){
|
||||
if(parent!=null)p_caller=parent;
|
||||
if(opener!=null)p_caller=opener;
|
||||
}
|
||||
this.m_Caller=p_caller
|
||||
this.GetTheme=function(){return m_cThemePath}
|
||||
this.SetTheme=function(){}
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
//---Start function: AddToGroup
|
||||
function utilities_AddToGroup(groupcode) {
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: AddToRole
|
||||
function utilities_AddToRole(rolename) {
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: AskTableProg
|
||||
function utilities_AskTableProg() {
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: BeginForceMasterDB
|
||||
function utilities_BeginForceMasterDB() {
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: BeginWritingIgnoringSlaveDB
|
||||
function utilities_BeginWritingIgnoringSlaveDB() {
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: DateTimeBO
|
||||
function utilities_DateTimeBO() {
|
||||
var serverTZ = DateTime.tzData()
|
||||
if (serverTZ.lenght<2)
|
||||
return NullDateTime()
|
||||
return new Date(DateTime().getTime() + Val(serverTZ[1]))
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: DateTimeUI
|
||||
function utilities_DateTimeUI() {
|
||||
var delta = DateTime.tzData()
|
||||
if (delta.lenght<1)
|
||||
return NullDateTime()
|
||||
return new Date(DateTime().getTime() + Val(delta[0]) - new Date().getTimezoneOffset() * 60 * 1000)
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: DefineConnection
|
||||
function utilities_DefineConnection(connectionname, serverurl) {
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: EndForceMasterDB
|
||||
function utilities_EndForceMasterDB() {
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: EndWritingIgnoringSlaveDB
|
||||
function utilities_EndWritingIgnoringSlaveDB() {
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: ForceTableProg
|
||||
function utilities_ForceTableProg(obj, dbserverlocator, tablename, autonumber) {
|
||||
var res = "";
|
||||
return res;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: FormatEx
|
||||
function utilities_FormatEx(expression, length, decimals, picture) {
|
||||
return Format(expression, length, decimals, picture);
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: GetAutonumber
|
||||
function utilities_GetAutonumber(key, workVar, len, p_MethodCallback) {
|
||||
if ('SPOfflineLib' in window) {
|
||||
CPPooler.connect(SPOfflineLib.getDataBaseName(), null, function () {
|
||||
CPPooler.RequireTransaction(next1);
|
||||
} );
|
||||
function next1() {
|
||||
CPSql.NextTableProgWithoutObj(workVar, len, (IsA(workVar, 'C') ? "": 0 ), key, next2);
|
||||
function next2(r) {
|
||||
CPPooler.CompleteTransaction(next3);
|
||||
function next3() {
|
||||
p_MethodCallback(r);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//online not implemented
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: GetCallerBO
|
||||
function utilities_GetCallerBO() {
|
||||
if (this.m_Caller == window)
|
||||
return window
|
||||
else
|
||||
return new Caller()
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: GetCallerDate
|
||||
function utilities_GetCallerDate(name) {
|
||||
return this.GetCallerDateTime(name)
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: GetCallerDateTime
|
||||
function utilities_GetCallerDateTime(name) {
|
||||
var o
|
||||
if(this.m_Caller!=null)o=this.m_Caller['w_'+name];
|
||||
if(o==null)o=NullDateTime();else{
|
||||
if(o.getFullYear && o.getMonth && o.getDate && o.getHours && o.getMinutes && o.getSeconds && o.getMilliseconds)
|
||||
o=new Date(o.getFullYear(),o.getMonth(),o.getDate(),o.getHours(),o.getMinutes(),o.getSeconds(),o.getMilliseconds());
|
||||
else o=NullDateTime()
|
||||
}
|
||||
return o
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: GetCallerLogic
|
||||
function utilities_GetCallerLogic(name) {
|
||||
var res
|
||||
if(this.m_Caller!=null)res=this.m_Caller['w_'+name];
|
||||
if(res==null || typeof res!='boolean')res=false;
|
||||
return res;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: GetCallerNumber
|
||||
function utilities_GetCallerNumber(name) {
|
||||
var res
|
||||
if(this.m_Caller!=null)res=this.m_Caller['w_'+name];
|
||||
if(res==null || typeof res!='number')res=0;
|
||||
return res;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: GetCallerString
|
||||
function utilities_GetCallerString(name) {
|
||||
var res
|
||||
if(this.m_Caller!=null)res=this.m_Caller['w_'+name];
|
||||
if(res==null || typeof res!='string')res='';
|
||||
return res;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: GetCompany
|
||||
function utilities_GetCompany() {
|
||||
return m_cCompany;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: GetFullName
|
||||
function utilities_GetFullName() {
|
||||
var res = "";
|
||||
return res;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: GetInstance
|
||||
function utilities_GetInstance() {
|
||||
var res = "";
|
||||
return res;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: GetLanguage
|
||||
function utilities_GetLanguage() {
|
||||
return m_cLanguage;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: GetSkin
|
||||
function utilities_GetSkin() {
|
||||
return m_cThemePath;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: GetSkinList
|
||||
function utilities_GetSkinList() {
|
||||
return "";
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: GetViewType
|
||||
function utilities_GetViewType() {
|
||||
var wnd = window;
|
||||
while (!wnd.ZtVWeb && wnd!=wnd.parent) {
|
||||
wnd = wnd.parent;
|
||||
}
|
||||
var res = (wnd.ZtVWeb ? wnd.ZtVWeb.ViewType() : 0);
|
||||
return res;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: IsAdministrator
|
||||
function utilities_IsAdministrator() {
|
||||
return this.IsInGroup(1);
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: IsGuest
|
||||
function utilities_IsGuest(){
|
||||
return m_nUserCode==-1;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: IsInGroup
|
||||
function utilities_IsInGroup(p_nGroup){
|
||||
if (typeof(m_GroupsList)=='undefined') {
|
||||
return false
|
||||
}
|
||||
for(var i=0;i<m_GroupsList.length;i++) {
|
||||
if (m_GroupsList[i]==p_nGroup) return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: IsInRole
|
||||
function utilities_IsInRole(p_cRole) {
|
||||
if (typeof(m_RolesList)=='undefined') {
|
||||
return false
|
||||
}
|
||||
for(var i=0;i<m_RolesList.length;i++) {
|
||||
if (Trim(m_RolesList[i])==Lower(p_cRole)) return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: IsMobile
|
||||
function utilities_IsMobile() {
|
||||
var wnd = window;
|
||||
while (!wnd.ZtVWeb && wnd!=wnd.parent) {
|
||||
wnd = wnd.parent;
|
||||
}
|
||||
var res = (wnd.ZtVWeb ? wnd.ZtVWeb.IsMobile() : false);
|
||||
return res;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: IsUserReadingOnSlaveDB
|
||||
function utilities_IsUserReadingOnSlaveDB() {
|
||||
var res = false;
|
||||
return res;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: NextTableProg
|
||||
function utilities_NextTableProg(valorize, dbserverlocator, tablename, autonumber) {
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: PullFromGroup
|
||||
function utilities_PullFromGroup(groupcode) {
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: PullFromRole
|
||||
function utilities_PullFromRole(rolename) {
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: ResetAlternativeServer
|
||||
function utilities_ResetAlternativeServer() {
|
||||
var res = "";
|
||||
return res;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: ServerSetUITierSettings
|
||||
function utilities_ServerSetUITierSettings(UITimeZone, UIDateTime) {
|
||||
alert("ServerSetUITierSettings can be called only server side")
|
||||
return "ServerSetUITierSettings can be called only server side"
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: ServerSetUnspecifiedPictureSettings
|
||||
function utilities_ServerSetUnspecifiedPictureSettings(decimal_separator, thousand_separator, date_pattern, datetime_pattern) {
|
||||
alert("ServerSetUnspecifiedPictureSettings can be called only server side")
|
||||
return "ServerSetUnspecifiedPictureSettings can be called only server side"
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: SetAlternativeServer
|
||||
function utilities_SetAlternativeServer(queryname, serverurl) {
|
||||
var res = "";
|
||||
return res;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: SetCompany
|
||||
function utilities_SetCompany() {
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: SetLanguage
|
||||
function utilities_SetLanguage() {
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: SetSkin
|
||||
function utilities_SetSkin() {
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: SetUserCode
|
||||
function utilities_SetUserCode(p_nUserCode) {
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: ShowHistoricalTodate
|
||||
function utilities_ShowHistoricalTodate(cptodate) {
|
||||
return _ShowHistoricalTodate(cptodate)
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: SkipTableProg
|
||||
function utilities_SkipTableProg(obj, dbserverlocator, autonumber, skip) {
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: ToHTML
|
||||
function utilities_ToHTML(p_cString) {
|
||||
return ToHTML(p_cString);
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: ToSQL
|
||||
function utilities_ToSQL() {
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: Translate
|
||||
function utilities_Translate(p_cMessage, p_cFirstParameter, p_cSecondMessage) {
|
||||
var res = "";
|
||||
return res;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: UndefineConnection
|
||||
function utilities_UndefineConnection() {
|
||||
var res = "";
|
||||
return res;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: UserCode
|
||||
function utilities_UserCode(){
|
||||
return m_nUserCode;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: UserName
|
||||
function utilities_UserName(){
|
||||
return m_cUserName;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: Word
|
||||
function utilities_Word(s,idx) {
|
||||
var p=_AtSpace_(s,idx),p1;
|
||||
if (idx==1) {
|
||||
if (p==0)
|
||||
return s;
|
||||
else
|
||||
return Substr(s,1,p-1);
|
||||
} else {
|
||||
p1=_AtSpace_(s,idx-1);
|
||||
if (p1==0)
|
||||
return "";
|
||||
if (p==0)
|
||||
return Substr(s,p1+1);
|
||||
else
|
||||
return Substr(s,p1+1,p-p1-1);
|
||||
}
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: MakeUtilities
|
||||
function MakeUtilities() {
|
||||
this.AddToGroup=utilities_AddToGroup
|
||||
this.AddToRole=utilities_AddToRole
|
||||
this.AskTableProg=utilities_AskTableProg
|
||||
this.BeginForceMasterDB=utilities_BeginForceMasterDB
|
||||
this.BeginWritingIgnoringSlaveDB=utilities_BeginWritingIgnoringSlaveDB
|
||||
this.DateTimeBO=utilities_DateTimeBO
|
||||
this.DateTimeUI=utilities_DateTimeUI
|
||||
this.DefineConnection=utilities_DefineConnection
|
||||
this.EndForceMasterDB=utilities_EndForceMasterDB
|
||||
this.EndWritingIgnoringSlaveDB=utilities_EndWritingIgnoringSlaveDB
|
||||
this.ForceTableProg=utilities_ForceTableProg
|
||||
this.FormatEx=utilities_FormatEx
|
||||
this.GetAutonumber=utilities_GetAutonumber
|
||||
this.GetCallerBO=utilities_GetCallerBO
|
||||
this.GetCallerDate=utilities_GetCallerDate
|
||||
this.GetCallerDateTime=utilities_GetCallerDateTime
|
||||
this.GetCallerLogic=utilities_GetCallerLogic
|
||||
this.GetCallerNumber=utilities_GetCallerNumber
|
||||
this.GetCallerString=utilities_GetCallerString
|
||||
this.GetCompany=utilities_GetCompany
|
||||
this.GetFullName=utilities_GetFullName
|
||||
this.GetInstance=utilities_GetInstance
|
||||
this.GetLanguage=utilities_GetLanguage
|
||||
this.GetSkin=utilities_GetSkin
|
||||
this.GetSkinList=utilities_GetSkinList
|
||||
this.GetViewType=utilities_GetViewType
|
||||
this.IsAdministrator=utilities_IsAdministrator
|
||||
this.IsGuest=utilities_IsGuest
|
||||
this.IsInGroup=utilities_IsInGroup
|
||||
this.IsInRole=utilities_IsInRole
|
||||
this.IsMobile=utilities_IsMobile
|
||||
this.IsUserReadingOnSlaveDB=utilities_IsUserReadingOnSlaveDB
|
||||
this.NextTableProg=utilities_NextTableProg
|
||||
this.PullFromGroup=utilities_PullFromGroup
|
||||
this.PullFromRole=utilities_PullFromRole
|
||||
this.ResetAlternativeServer=utilities_ResetAlternativeServer
|
||||
this.ServerSetUITierSettings=utilities_ServerSetUITierSettings
|
||||
this.ServerSetUnspecifiedPictureSettings=utilities_ServerSetUnspecifiedPictureSettings
|
||||
this.SetAlternativeServer=utilities_SetAlternativeServer
|
||||
this.SetCompany=utilities_SetCompany
|
||||
this.SetLanguage=utilities_SetLanguage
|
||||
this.SetSkin=utilities_SetSkin
|
||||
this.SetUserCode=utilities_SetUserCode
|
||||
this.ShowHistoricalTodate=utilities_ShowHistoricalTodate
|
||||
this.SkipTableProg=utilities_SkipTableProg
|
||||
this.ToHTML=utilities_ToHTML
|
||||
this.ToSQL=utilities_ToSQL
|
||||
this.Translate=utilities_Translate
|
||||
this.UndefineConnection=utilities_UndefineConnection
|
||||
this.UserCode=utilities_UserCode
|
||||
this.UserName=utilities_UserName
|
||||
this.Word=utilities_Word
|
||||
this.Make=utilities_Make
|
||||
this.Make()
|
||||
}
|
||||
//---End function
|
||||
|
||||
arguments[0].Utilities = new MakeUtilities()
|
||||
})(window);//MakeUtilities
|
||||
14
JavaServletSrc/cp__logo.htm
Normal file
@ -0,0 +1,14 @@
|
||||
<HTML>
|
||||
<body>
|
||||
<center>
|
||||
<H1>
|
||||
plan
|
||||
</H1>
|
||||
<Table border=1>
|
||||
<TR><TD>Author<TD>
|
||||
<TR><TD>Client<TD>
|
||||
<TR><TD>Version<TD>1.0 - 2025-03-14
|
||||
</Table>
|
||||
</center>
|
||||
</body>
|
||||
</HTML>
|
||||
11
JavaServletSrc/cp_login.htm
Normal file
@ -0,0 +1,11 @@
|
||||
<script>
|
||||
var sub = sessionStorage.getItem('i_cEntryPoint') || 'jsp',
|
||||
landing = '../' + sub + '/index.jsp',
|
||||
wnd = window.frameElement ? window.parent : window;
|
||||
try {
|
||||
wnd.location.href = landing;
|
||||
} catch (o_O) {
|
||||
console.error(o_O);
|
||||
location.href = landing;
|
||||
}
|
||||
</script>
|
||||
11
JavaServletSrc/cp_logout.htm
Normal file
@ -0,0 +1,11 @@
|
||||
<script>
|
||||
var sub = sessionStorage.getItem('i_cEntryPoint') || 'jsp',
|
||||
landing = '../' + sub + '/index.jsp',
|
||||
wnd = window.frameElement ? window.parent : window;
|
||||
try {
|
||||
wnd.location.href = landing;
|
||||
} catch (o_O) {
|
||||
console.error(o_O);
|
||||
location.href = landing;
|
||||
}
|
||||
</script>
|
||||
5
JavaServletSrc/index.htm
Normal file
@ -0,0 +1,5 @@
|
||||
<HTML>
|
||||
<SCRIPT type='text/javascript'>
|
||||
window.location="jsp/index.jsp"
|
||||
</SCRIPT>
|
||||
</HTML>
|
||||
5
JavaServletSrc/index.html
Normal file
@ -0,0 +1,5 @@
|
||||
<HTML>
|
||||
<SCRIPT type='text/javascript'>
|
||||
window.location="jsp/index.jsp"
|
||||
</SCRIPT>
|
||||
</HTML>
|
||||
10
JavaServletSrc/pi_adocmast.css
Normal file
@ -0,0 +1,10 @@
|
||||
.FormDefault {margin:0;position:relative;font-family:Arial;font-size:9pt;}
|
||||
INPUT {font-family:Arial;font-size:9pt;}
|
||||
SELECT {font-family:Arial;font-size:9pt;}
|
||||
TEXTAREA {font-family:Arial;font-size:9pt;}
|
||||
IMG {border:0;}
|
||||
#DCPCUVJOFL {top:47px;position:absolute;left:80px;height:22px;width:48px;z-index:1; }
|
||||
#UMGBGSQJYH {top:70px;position:absolute;left:80px;height:22px;width:83px;z-index:1; }
|
||||
#DJAHUICCZV {top:93px;position:absolute;left:80px;height:22px;width:69px;text-align:right;z-index:1; }
|
||||
#DJAHUICCZV_ZOOM { position:absolute;top:93px;left:150px;height:22px;width:17px;z-index:1;}
|
||||
#DCPCUVJOFL, #UMGBGSQJYH, #DJAHUICCZV {box-sizing : border-box;}
|
||||
1453
JavaServletSrc/pi_adocmast.java
Normal file
412
JavaServletSrc/pi_adocmastBL.java
Normal file
@ -0,0 +1,412 @@
|
||||
import java.util.*;
|
||||
|
||||
public class pi_adocmastBL extends pi_adocmastWV implements CPLib.QueryFilterFromApplication {
|
||||
// Variabile che indica se il record è stato caricato
|
||||
public boolean m_bLoaded;
|
||||
// Variabile che indica se il record è stato variato
|
||||
public boolean m_bUpdated;
|
||||
// Variabile che memorizza lo stato subito dopo una Load o una Save
|
||||
public String m_cPreviousState;
|
||||
// Variabile che mantiene il vecchio timestamp
|
||||
public String m_cOldCPCCCHK;
|
||||
public java.util.List<String> m_oParameters;
|
||||
protected String m_cPassword;
|
||||
protected String m_cOTP;
|
||||
// Variabile che indica il tipo dell'ultimo
|
||||
// errore, o messaggio da comunicare all'interfaccia,
|
||||
// che si è verificato impostando una variabile di work.
|
||||
// I valori ammessi sono:
|
||||
// - 1 : errore di campo obbligatorio
|
||||
// - 2 : errore di check
|
||||
// - 3 : valore non ammesso nel link
|
||||
// - 4 : richiesta password
|
||||
// - 5 : richiesto otp
|
||||
public int m_nLastError;
|
||||
public String m_cLastMsgError;
|
||||
public String m_cLastWorkVarError;
|
||||
// m_bCalculating==true la Calculate e' in esecuzione
|
||||
public boolean m_bCalculating = false;
|
||||
public static final String i_EntityName = "pi_adocmast";
|
||||
public static final String i_EntityType = "master";
|
||||
public static final boolean i_IsSon = false;
|
||||
public boolean m_bSkipCheckOTPSecurity = true;
|
||||
// Variabile di collegamento con il database: passata nel costruttore
|
||||
public CPSql m_Sql;
|
||||
// Variabile di contesto (variabili globali): passata nel costruttore
|
||||
public CPContext m_Ctx;
|
||||
// Variabili che contengono il nome fisico e la connessione per la tabella collegata
|
||||
public String m_cPhName_DOCMAST;
|
||||
public String m_cServer_DOCMAST;
|
||||
public CPPhTableWrInfo m_oWrInfo_DOCMAST;
|
||||
// Variabile che contiene il nome virtuale della tabella
|
||||
public String m_cVirtName_DOCMAST;
|
||||
// gestori eventi esterni al business object sono collegati inserendoli nella coppia di strutture dati seguenti
|
||||
// gestori associati a particolari eventi ('Blank')
|
||||
public static volatile HashMap specificEventsHandlers;
|
||||
// gestori associati a tutti gli eventi
|
||||
public static volatile ArrayList allEventsHandlers;
|
||||
// metadati resi disponibili ai gestori di eventi
|
||||
public static String[] m_EntityTables = {"DOCMAST"};
|
||||
// codice secondo sintassi delle business rules per produrre i dati da usare in un ideale documento che li rappresenti
|
||||
public static final String i_StateStructure = "{'AZIENDA':AZIENDA,'MVSERIAL':MVSERIAL,'MVDATREG':MVDATREG"+FoundlingChildrenList("pi_adocmast",true)+"}";
|
||||
public static final String i_CompleteStateStructure = "{'AZIENDA':AZIENDA,'MVSERIAL':MVSERIAL,'MVDATREG':MVDATREG"+FoundlingChildrenList("pi_adocmast",true)+"}";
|
||||
public static final String i_ItemSequence = "AZIENDA,MVSERIAL,MVDATREG"+FoundlingChildrenList("pi_adocmast",false)+"";
|
||||
public static final com.zucchetti.sitepainter.EntityItem[] i_EditableEntityItems = com.zucchetti.sitepainter.EntityItem.buildEditableItemsForEntity(GetLinkDef(),FoundlingChildrenList("pi_adocmast"),new String[][]{new String[]{"AZIENDA","","C","5","0","campo","key1","false","false"},new String[]{"MVSERIAL","","C","10","0","campo","key1","false","false"},new String[]{"MVDATREG","","D","8","0","campo","nokey","false","false"}});
|
||||
// dati usati internamente dai metodi BRxxx di BRCallerImpl
|
||||
private static boolean _involved=true;
|
||||
protected void _setInvolvedInBR(boolean involved) {
|
||||
_involved=involved;
|
||||
}
|
||||
protected boolean _involvedInBR() {
|
||||
return _involved;
|
||||
}
|
||||
public pi_adocmastBL (CPContext p_ContextObject) {
|
||||
/* Impostazione dell'ambiente globale: il businness object si collega
|
||||
all'oggetto globale (unico per più istanze di una stessa applicazione)
|
||||
per recuperare informazioni sul:
|
||||
1) nome fisico della tabella di gestione;
|
||||
2) nome fisico delle tabelle collegate nei link;
|
||||
3) stringa di connessione.
|
||||
L'azienda è contenuta nel global object. */
|
||||
// Assegnazione delle variabili che contengono il nome fisico, il nome virtuale, e la connessione per la tabella collegata
|
||||
m_cPhName_DOCMAST = p_ContextObject.GetPhName("DOCMAST",p_ContextObject.GetCompany(),false);
|
||||
m_cServer_DOCMAST = p_ContextObject.GetServer("DOCMAST");
|
||||
m_oWrInfo_DOCMAST = CPPhTableWrInfo.GetCPPhTableWrInfo(p_ContextObject,"DOCMAST",p_ContextObject.GetCompany());
|
||||
m_cVirtName_DOCMAST = CPSql.ManipulateTablePhName("DOCMAST",m_cServer_DOCMAST);
|
||||
// Assegnazione della variabile di collegamento con il database
|
||||
m_Sql = p_ContextObject.GetSql();
|
||||
m_Ctx = p_ContextObject;
|
||||
// Istanziazione dei business object dei figli
|
||||
m_MNTs = CPLib.MNTChilds("pi_adocmast",p_ContextObject);
|
||||
}
|
||||
public void Blank() {
|
||||
BlankStatusVariables();
|
||||
// * --- Area Manuale = BO - Blank Record Init
|
||||
// * --- Fine Area Manuale
|
||||
w_AZIENDA = "";
|
||||
w_MVSERIAL = "";
|
||||
w_MVDATREG = CPLib.NullDate();
|
||||
CPExtenderLib.BlankExtendedFields(extendedFields);
|
||||
SaveDependsOn();
|
||||
NotifyEvent("Blank");
|
||||
// * --- Area Manuale = BO - Blank Record End
|
||||
// * --- Fine Area Manuale
|
||||
}
|
||||
public boolean IsUpdated() {
|
||||
boolean l_bResult;
|
||||
l_bResult = m_bUpdated;
|
||||
return l_bResult;
|
||||
}
|
||||
public boolean IsLoaded() {
|
||||
return m_bLoaded;
|
||||
}
|
||||
public boolean IsNew() {
|
||||
return IsUpdated() && ! (IsLoaded());
|
||||
}
|
||||
public void SaveDependsOn() {
|
||||
}
|
||||
public void NotifyEvent(String p_cEvent) {
|
||||
CPLib.NotifyEvent(p_cEvent,this,m_Ctx,specificEventsHandlers,allEventsHandlers);
|
||||
}
|
||||
// Funzioni di link legate alle variabili ed ai campi.
|
||||
/* Gestione dei metodi per l'impostazione delle variabili di work.
|
||||
I seguenti metodi sono pubblici perchè vengono chiamati dalla UI che
|
||||
ha creato il business object o da batch.
|
||||
*/
|
||||
public boolean Set_AZIENDA(String p_workVariableValue) {
|
||||
boolean l_bResult;
|
||||
l_bResult = true;
|
||||
// Variabile temporanea che conterrà il risultato della funzione di link se l'item corrente è parte di una chiave composta
|
||||
boolean l_bTmpRes;
|
||||
SetUpdated();
|
||||
w_AZIENDA = p_workVariableValue;
|
||||
// Esecuzione dei calcoli
|
||||
Calculate();
|
||||
SaveDependsOn();
|
||||
return l_bResult;
|
||||
}
|
||||
public boolean Set_MVSERIAL(String p_workVariableValue) {
|
||||
boolean l_bResult;
|
||||
l_bResult = true;
|
||||
// Variabile temporanea che conterrà il risultato della funzione di link se l'item corrente è parte di una chiave composta
|
||||
boolean l_bTmpRes;
|
||||
SetUpdated();
|
||||
w_MVSERIAL = p_workVariableValue;
|
||||
// Esecuzione dei calcoli
|
||||
Calculate();
|
||||
SaveDependsOn();
|
||||
return l_bResult;
|
||||
}
|
||||
public boolean Set_MVDATREG(java.sql.Date p_workVariableValue) {
|
||||
boolean l_bResult;
|
||||
l_bResult = true;
|
||||
// Variabile temporanea che conterrà il risultato della funzione di link se l'item corrente è parte di una chiave composta
|
||||
boolean l_bTmpRes;
|
||||
SetUpdated();
|
||||
w_MVDATREG = p_workVariableValue;
|
||||
// Esecuzione dei calcoli
|
||||
Calculate();
|
||||
SaveDependsOn();
|
||||
return l_bResult;
|
||||
}
|
||||
/* Gestione delle funzioni che rispondono lo stato delle variabili di work.
|
||||
Vengono chiamate dalla UI per valutare la condizione di visibilità e di
|
||||
abilitazione di un control.
|
||||
*/
|
||||
public boolean Set_Password(String p_pwd) {
|
||||
m_cPassword = p_pwd;
|
||||
return true;
|
||||
}
|
||||
public boolean Set_OTP(String p_otp) {
|
||||
m_cOTP = p_otp;
|
||||
return true;
|
||||
}
|
||||
public boolean Calculate() {
|
||||
boolean l_bTmpRes;
|
||||
l_bTmpRes = true;
|
||||
boolean l_bResult;
|
||||
l_bResult = true;
|
||||
m_bCalculating = true;
|
||||
// * --- Area Manuale = BO - Calculate
|
||||
// * --- Fine Area Manuale
|
||||
for (int l_i = 0; CPLib.lt(l_i,m_MNTs.length); l_i = l_i + (1)) {
|
||||
m_MNTs[l_i].m_child.FoundlingCopyWorkVar(this,true);
|
||||
}
|
||||
m_bCalculating = false;
|
||||
return l_bResult;
|
||||
}
|
||||
protected void BlankStatusVariables() {
|
||||
m_bLoaded = false;
|
||||
m_bUpdated = false;
|
||||
m_cPreviousState = CPSecurity.UNKNOWN_STATE;
|
||||
}
|
||||
public void CalledBatchEnd() {
|
||||
if ( ! (m_bCalculating)) {
|
||||
// Esecuzione dei calcoli
|
||||
Calculate();
|
||||
}
|
||||
}
|
||||
public final static String[] m_KeyColumns = {"AZIENDA","MVSERIAL"};
|
||||
public static String QueryFilter(CPContext m_Ctx) {
|
||||
String l_cFilter;
|
||||
l_cFilter = CPLib.ApplicationQueryFilter("pi_adocmast","DOCMAST",m_KeyColumns,m_Ctx);
|
||||
return l_cFilter;
|
||||
}
|
||||
public void SetFromContext(String s) {
|
||||
SetFromContext(s,null);
|
||||
}
|
||||
public void SetFromContext(java.util.Properties p) {
|
||||
SetFromContext("_dummy_",p);
|
||||
}
|
||||
public void SetFromContext(String s,java.util.Properties p) {
|
||||
BlankStatusVariables();
|
||||
w_AZIENDA = "";
|
||||
w_MVSERIAL = "";
|
||||
w_MVDATREG = CPLib.NullDate();
|
||||
CPExtenderLib.BlankExtendedFields(extendedFields);
|
||||
SaveDependsOn();
|
||||
if ( ! (CPLib.Empty(s))) {
|
||||
if (CPLib.IsNull(p)) {
|
||||
p = CPLib.GetProperties(s);
|
||||
}
|
||||
boolean l_bFromHyperlink = CPLib.ne("_not_found_",CPLib.GetProperty(p,"m_cParameterSequence","_not_found_"));
|
||||
w_AZIENDA = CPLib.GetProperty(p,"AZIENDA",w_AZIENDA,0);
|
||||
w_MVSERIAL = CPLib.GetProperty(p,"MVSERIAL",w_MVSERIAL,0);
|
||||
w_MVDATREG = CPLib.GetProperty(p,"MVDATREG",w_MVDATREG,0);
|
||||
CPLib.SetFromContextMNTs(p,m_MNTs);
|
||||
SPExtenderLib.SetExtendedFromContext(p,extendedFields);
|
||||
m_bLoaded = CPLib.GetProperty(p,"m_bLoaded",false,0);
|
||||
m_bUpdated = CPLib.GetProperty(p,"m_bUpdated",false,0);
|
||||
m_cOldCPCCCHK = CPLib.GetProperty(p,"m_cOldCPCCCHK","",0);
|
||||
m_cPreviousState = CPLib.GetProperty(p,"m_cPrvsStt","",0);
|
||||
m_cPassword = CPLib.GetProperty(p,"m_cPwd","",0);
|
||||
m_cOTP = CPLib.GetProperty(p,"m_cOTP","",0);
|
||||
m_lCtxLoaded = true;
|
||||
if ( ! (l_bFromHyperlink)) {
|
||||
SaveDependsOn();
|
||||
}
|
||||
}
|
||||
}
|
||||
public void SetUpdated() {
|
||||
m_bUpdated = true;
|
||||
}
|
||||
public String EntityStatus() {
|
||||
return (m_bLoaded?"E":"N");
|
||||
}
|
||||
public String LastErrorMessage() {
|
||||
return m_cLastMsgError;
|
||||
}
|
||||
static void GetLinkDef0(Map<String,List<Map<String,String[]>>> tables) {
|
||||
java.util.regex.Pattern zeroSplit;
|
||||
zeroSplit = java.util.regex.Pattern.compile("\\x00");
|
||||
Map<String,String[]> map;
|
||||
List<Map<String,String[]>> items;
|
||||
}
|
||||
public static Map<String,List<Map<String,String[]>>> GetLinkDef() {
|
||||
java.util.regex.Pattern zeroSplit;
|
||||
zeroSplit = java.util.regex.Pattern.compile("\\x00");
|
||||
Map<String,List<Map<String,String[]>>> tables;
|
||||
tables = new HashMap<String,List<Map<String,String[]>>>();
|
||||
Map<String,String[]> map;
|
||||
List<Map<String,String[]>> items;
|
||||
GetLinkDef0(tables);
|
||||
for(String child : CPLib.LoadableMNTs("pi_adocmast",false)) {
|
||||
map = new HashMap<String,String[]>();
|
||||
items = tables.get(com.zucchetti.sitepainter.Library.getEntityTables(child)[0]);
|
||||
if (CPLib.IsNull(items)) {
|
||||
items = new ArrayList<Map<String,String[]>>();
|
||||
tables.put(com.zucchetti.sitepainter.Library.getEntityTables(child)[0],items);
|
||||
}
|
||||
map.put("link_PC",new String[]{});
|
||||
map.put("rd_kvar",new String[]{});
|
||||
map.put("rd_kfield",new String[]{});
|
||||
map.put("rd_field",new String[]{});
|
||||
map.put("rd_var",new String[]{});
|
||||
String[][] definitions = CPMNTChild.GetM_Fkd("pi_adocmast",child);
|
||||
// Informazione usata per risolvere la sintassi BO->tabella nelle VQR
|
||||
map.put("rd_var",definitions[0]);
|
||||
map.put("rd_field",definitions[1]);
|
||||
// Definizione delle coppie padre/figlio
|
||||
map.put("wr_var",definitions[0]);
|
||||
map.put("wr_field",definitions[1]);
|
||||
map.put("wr_op",new String[]{});
|
||||
map.put("rd_var.obj_type",new String[]{});
|
||||
map.put("rd_var.len",new String[]{});
|
||||
map.put("rd_var.dec",new String[]{});
|
||||
map.put("rd_var.comment",new String[]{});
|
||||
map.put("property.name",new String[]{"arch","foundling","","","","prg_zoom"});
|
||||
map.put("property.value",new String[]{com.zucchetti.sitepainter.Library.getEntityTables(child)[0],"true","","","",child});
|
||||
items.add(map);
|
||||
}
|
||||
return tables;
|
||||
}
|
||||
public void Initialize() {
|
||||
// Inizializzazione delle variabili di work
|
||||
Blank();
|
||||
// Inizializzazione delle variabili di progressivo e legate alle operazioni a saldo
|
||||
BlankAutonumberAndTransactionVars();
|
||||
m_MNTs = CPLib.MNTChilds("pi_adocmast",m_Ctx);
|
||||
m_cPreviousState = GetCurrentState();
|
||||
}
|
||||
public boolean Check() {
|
||||
boolean l_bResult;
|
||||
l_bResult = true;
|
||||
ResetErrorMessage();
|
||||
// * --- Area Manuale = BO - Check Form
|
||||
// * --- Fine Area Manuale
|
||||
return l_bResult;
|
||||
}
|
||||
void ResetErrorMessage() {
|
||||
m_nLastError = 0;
|
||||
m_cLastMsgError = "";
|
||||
m_cLastWorkVarError = "";
|
||||
}
|
||||
public String GetCurrentState() {
|
||||
String l_bResult;
|
||||
l_bResult = CPSecurity.UNKNOWN_STATE;
|
||||
return l_bResult;
|
||||
}
|
||||
/** @deprecated Will be removed in a future version **/
|
||||
@Deprecated
|
||||
public String GetStateSecurityKey(String p_cState) {
|
||||
return GetStateSecurityKeyRoles(p_cState)[0];
|
||||
}
|
||||
public String[] GetStateSecurityKeyRoles(String p_cState) {
|
||||
String[] l_Keys = {};
|
||||
if (CPLib.eq(p_cState,CPSecurity.UNKNOWN_STATE)) {
|
||||
l_Keys = new String[]{"pi_adocmast"};
|
||||
}
|
||||
if (CPLib.eq(l_Keys.length,0)) {
|
||||
l_Keys = new String[]{"pi_adocmast\\"+p_cState};
|
||||
}
|
||||
return l_Keys;
|
||||
}
|
||||
public boolean CanView() {
|
||||
boolean l_bResult;
|
||||
l_bResult = true;
|
||||
ResetErrorMessage();
|
||||
l_bResult = l_bResult && BRCanView();
|
||||
if ( ! (l_bResult)) {
|
||||
String o_cLastMsgError = m_cLastMsgError;
|
||||
Blank();
|
||||
// Evita che un errore segnalato alla Blank, ad esempio link fallito, sovrascriva l'errore di accesso bloccato
|
||||
m_cLastMsgError = o_cLastMsgError;
|
||||
}
|
||||
return l_bResult;
|
||||
}
|
||||
public boolean CanEdit() {
|
||||
return CanEdit(GetCurrentState());
|
||||
}
|
||||
public boolean CanEdit(String p_cState) {
|
||||
boolean l_bResult = true;
|
||||
ResetErrorMessage();
|
||||
l_bResult = l_bResult && BRCanEdit();
|
||||
return l_bResult;
|
||||
}
|
||||
public boolean CanDelete() {
|
||||
boolean l_bResult;
|
||||
l_bResult = true;
|
||||
ResetErrorMessage();
|
||||
l_bResult = l_bResult && BRCanDelete();
|
||||
return l_bResult;
|
||||
}
|
||||
public boolean CanAdd() {
|
||||
return CanAdd(GetCurrentState());
|
||||
}
|
||||
public boolean CanAdd(String p_cState) {
|
||||
boolean l_bResult = true;
|
||||
ResetErrorMessage();
|
||||
l_bResult = l_bResult && BRCanAdd();
|
||||
return l_bResult;
|
||||
}
|
||||
void BlankAutonumberAndTransactionVars() {
|
||||
// Inizializzazione dei progressivi
|
||||
// Inizializzazione delle variabili per DependsOn
|
||||
// Inizializzazione delle variabili per la gestione dello storno delle operazioni di saldo
|
||||
}
|
||||
public String GetContext() {
|
||||
return GetContext(true);
|
||||
}
|
||||
public String GetContext(boolean p_bGetChildren) {
|
||||
Properties p;
|
||||
p = new Properties();
|
||||
GetContext(p_bGetChildren,p);
|
||||
return CPLib.ToProperties(p);
|
||||
}
|
||||
public void GetContext(java.util.Properties p_oProperties) {
|
||||
GetContext(true,p_oProperties);
|
||||
}
|
||||
public void GetContext(boolean p_bGetChildren,java.util.Properties p) {
|
||||
CPLib.PutProperty(p,"AZIENDA",w_AZIENDA,0);
|
||||
CPLib.PutProperty(p,"MVSERIAL",w_MVSERIAL,0);
|
||||
CPLib.PutProperty(p,"MVDATREG",w_MVDATREG,0);
|
||||
if (p_bGetChildren) {
|
||||
CPLib.PutProperty(p,m_MNTs);
|
||||
}
|
||||
SPExtenderLib.PutExtendedProperies(p,extendedFields);
|
||||
CPLib.PutProperty(p,"m_bLoaded",m_bLoaded);
|
||||
CPLib.PutProperty(p,"m_bUpdated",m_bUpdated);
|
||||
CPLib.PutProperty(p,"m_cOldCPCCCHK",m_cOldCPCCCHK);
|
||||
CPLib.PutProperty(p,"m_cPrvsStt",m_cPreviousState);
|
||||
}
|
||||
public String i_PrimaryKey() {
|
||||
return PrimaryKey(this);
|
||||
}
|
||||
public static String PrimaryKey(Caller p_Caller) {
|
||||
return "DOCMAST"+"\\"+CPLib.ToCPStr(p_Caller.GetString("AZIENDA","C",5,0))+"\\"+CPLib.ToCPStr(p_Caller.GetString("MVSERIAL","C",10,0));
|
||||
}
|
||||
public List<List<String>> AutonumDefinition() {
|
||||
return StaticAutonumDefinition();
|
||||
}
|
||||
public static List<List<String>> StaticAutonumDefinition() {
|
||||
List<List<String>> autonums;
|
||||
autonums = new ArrayList<List<String>>();
|
||||
List<String> oneAutoNum;
|
||||
return autonums;
|
||||
}
|
||||
CallerBRImpl GetChild(String p_cName) {
|
||||
return GetMNTChild(false,m_MNTs,p_cName);
|
||||
}
|
||||
// * --- Area Manuale = BL - Methods
|
||||
// * --- Fine Area Manuale
|
||||
}
|
||||
318
JavaServletSrc/pi_adocmastBO.java
Normal file
@ -0,0 +1,318 @@
|
||||
// * --- Area Manuale = BO - Header
|
||||
// * --- Fine Area Manuale
|
||||
public class pi_adocmastBO extends pi_adocmastBL {
|
||||
class SqlLoader {
|
||||
double m_nColumns = 0;
|
||||
CPSql m_Sql;
|
||||
String m_cServer;
|
||||
String m_cMainTable;
|
||||
String m_cSelect;
|
||||
String m_cFrom;
|
||||
String m_cAlias;
|
||||
String m_cWhere;
|
||||
String m_cOrderBy;
|
||||
public SqlLoader(CPSql sql,String server,String from,String alias,String where,String orderby) {
|
||||
m_cAlias = alias;
|
||||
m_Sql = sql;
|
||||
m_cServer = server;
|
||||
m_cMainTable = alias;
|
||||
m_cSelect = m_cAlias+".*";
|
||||
m_cFrom = from+" "+m_cAlias;
|
||||
m_cWhere = where;
|
||||
m_cOrderBy = orderby;
|
||||
}
|
||||
public CPResultSet Query() {
|
||||
String l_cWhere = QueryFilter(m_Ctx);
|
||||
if (CPLib.Empty(l_cWhere)) {
|
||||
l_cWhere = m_cWhere;
|
||||
} else {
|
||||
if ( ! (CPLib.Empty(m_cWhere))) {
|
||||
l_cWhere = "("+m_cWhere+") and ("+l_cWhere+")";
|
||||
}
|
||||
}
|
||||
return m_Sql.Query(m_cServer,CPSql.BuildSQLPhrase(m_cSelect,m_cFrom,l_cWhere,m_cOrderBy));
|
||||
}
|
||||
}
|
||||
// * --- Area Manuale = BO - Properties
|
||||
// * --- Fine Area Manuale
|
||||
public pi_adocmastBO (CPContext p_ContextObject) {
|
||||
super(p_ContextObject);
|
||||
}
|
||||
public boolean CheckOTPSecurity() {
|
||||
boolean l_bResult;
|
||||
l_bResult = true;
|
||||
int accessType;
|
||||
boolean requiredOTP;
|
||||
boolean requiredPwd;
|
||||
requiredOTP = (m_bLoaded?false:false);
|
||||
requiredPwd = (m_bLoaded?false:false);
|
||||
if (requiredOTP) {
|
||||
accessType = 3;
|
||||
} else if (requiredPwd) {
|
||||
accessType = 2;
|
||||
} else {
|
||||
accessType = SPLib.AccessType((m_bLoaded?"edit":"insert"),"pi_adocmast");
|
||||
}
|
||||
if (CPLib.eq(accessType,2)) {
|
||||
// richiesta password
|
||||
if ( ! (CPLib.CheckPwd(m_Ctx,m_cPassword))) {
|
||||
l_bResult = false;
|
||||
m_nLastError = 4;
|
||||
m_cLastMsgError = (CPLib.Empty(m_cPassword)?"MSG_NEED_PWD":"MSG_WRONG_PWD");
|
||||
}
|
||||
} else if (CPLib.eq(accessType,3)) {
|
||||
// richiesto otp
|
||||
if (CPLib.Empty(m_cOTP) || ! (CPLib.CheckOTP(m_Ctx.UserCode(),m_cOTP))) {
|
||||
l_bResult = false;
|
||||
m_nLastError = 5;
|
||||
m_cLastMsgError = (CPLib.Empty(m_cOTP)?"MSG_NEED_OTP":"MSG_WRONG_OTP");
|
||||
}
|
||||
}
|
||||
return l_bResult;
|
||||
}
|
||||
public boolean CanSave() {
|
||||
ResetErrorMessage();
|
||||
boolean l_bResult;
|
||||
l_bResult = true;
|
||||
if (l_bResult) {
|
||||
l_bResult = CanSaveMNTs(m_MNTs,true) && CanSaveMNTs(m_MNTs,false);
|
||||
}
|
||||
return l_bResult;
|
||||
}
|
||||
public static String[] m_cSaveParameterNames = {"AlreadyAccepted"};
|
||||
public boolean Save() {
|
||||
return Save(false);
|
||||
}
|
||||
public boolean Save(boolean p_bAlreadyAccepted) {
|
||||
boolean l_bResult;
|
||||
l_bResult = true;
|
||||
// Se il record è stato modificato, prosegue con il salvataggio
|
||||
if (IsUpdated()) {
|
||||
// Verifica globale dei check delle variabili.
|
||||
l_bResult = l_bResult && BRCheck();
|
||||
l_bResult = l_bResult && Check();
|
||||
l_bResult = l_bResult && (m_bSkipCheckOTPSecurity || CheckOTPSecurity());
|
||||
l_bResult = l_bResult && (p_bAlreadyAccepted || CanSave());
|
||||
if (l_bResult) {
|
||||
// Il metodo "Save" richiede l'utilizzo di una transazione. Se il modulo che
|
||||
// gestisce le transazioni trova che ce n'è già una, utilizza quella, altrimenti
|
||||
// ne inizia una nuova ("begin transaction").
|
||||
m_Sql.RequireTransaction();
|
||||
if (m_bLoaded) {
|
||||
Update();
|
||||
BROnUpdated();
|
||||
} else {
|
||||
Insert();
|
||||
BROnInserted();
|
||||
}
|
||||
if (CPLib.gt(m_MNTs.length,0)) {
|
||||
if (m_bLoaded) {
|
||||
NotifyEvent("Update children start");
|
||||
} else {
|
||||
NotifyEvent("Insert children start");
|
||||
}
|
||||
}
|
||||
CPLib.SaveMNTs(m_Sql,m_MNTs,this);
|
||||
l_bResult = CPLib.eq(m_Sql.GetTransactionStatus(),CPSql.OK);
|
||||
if (CPLib.gt(m_MNTs.length,0)) {
|
||||
if (m_bLoaded) {
|
||||
NotifyEvent("Update children end");
|
||||
} else {
|
||||
NotifyEvent("Insert children end");
|
||||
}
|
||||
}
|
||||
/* Se il metodo di richiesta della transazione ha cominciato una nuova transazione,
|
||||
questa viene terminata ("Commit" o "Rollback"), altrimenti segna come completata
|
||||
la parte di transazione corrente
|
||||
*/
|
||||
// * --- Area Manuale = BO - Save End
|
||||
// * --- Fine Area Manuale
|
||||
BROnSaved();
|
||||
if (CPLib.ne(m_Sql.GetTransactionStatus(),CPSql.OK)) {
|
||||
m_cLastMsgError = m_Sql.TransactionErrorMessage();
|
||||
l_bResult = false;
|
||||
}
|
||||
m_Sql.CompleteTransaction();
|
||||
}
|
||||
}
|
||||
return l_bResult;
|
||||
}
|
||||
public static String[] m_cLoadParameterNames = {"AZIENDA","MVSERIAL"};
|
||||
public static String[] m_cDeleteParameterNames = m_cLoadParameterNames;
|
||||
public boolean Load(String p_AZIENDA,String p_MVSERIAL) {
|
||||
CPResultSet l_rsLoad=null;
|
||||
SqlLoader l_oSqlLoader;
|
||||
l_oSqlLoader = new SqlLoader(m_Sql,m_cServer_DOCMAST,m_cPhName_DOCMAST,m_cVirtName_DOCMAST,m_cVirtName_DOCMAST+".AZIENDA="+CPSql.SQLValueAdapter(CPLib.ToSQL(p_AZIENDA,"C",5,0),m_cServer_DOCMAST,p_AZIENDA)+" AND "+m_cVirtName_DOCMAST+".MVSERIAL="+CPSql.SQLValueAdapter(CPLib.ToSQL(p_MVSERIAL,"C",10,0),m_cServer_DOCMAST,p_MVSERIAL),"");
|
||||
// * --- Area Manuale = BO - Load Record Init
|
||||
// * --- Fine Area Manuale
|
||||
BlankStatusVariables();
|
||||
// Cursore dei record caricati
|
||||
l_rsLoad = l_oSqlLoader.Query();
|
||||
try {
|
||||
m_bLoaded = ! (l_rsLoad.Eof());
|
||||
if (m_bLoaded) {
|
||||
m_bCalculating = true;
|
||||
/* Assegna il valore iniziale a tutte le variabili non calcolate/inizializzate.
|
||||
Queste variabili non vengono inizializzate nella lettura del record,
|
||||
quindi terrebbero il valore che avevano precedentemente.
|
||||
*/
|
||||
/* Assegna i valori letti dal record appena caricato nelle variabili di work.
|
||||
Vengono calcolate e inizializzate le variabili ed eseguiti i link, rispettando la sequenza
|
||||
degli item.
|
||||
*/
|
||||
w_AZIENDA = l_rsLoad.GetString("AZIENDA");
|
||||
w_MVSERIAL = l_rsLoad.GetString("MVSERIAL");
|
||||
w_MVDATREG = l_rsLoad.GetDate("MVDATREG");
|
||||
// Assegna i valori degli op_
|
||||
SPExtenderLib.LoadExtendedFields(l_rsLoad,extendedFields);
|
||||
if (CPLib.HasTableCPCCCHK(m_Ctx,"DOCMAST")) {
|
||||
m_cOldCPCCCHK = l_rsLoad.GetString("CPCCCHK");
|
||||
} else {
|
||||
m_cOldCPCCCHK = "nocpcc";
|
||||
}
|
||||
m_bCalculating = false;
|
||||
SaveDependsOn();
|
||||
m_cPreviousState = GetCurrentState();
|
||||
NotifyEvent("Load");
|
||||
} else {
|
||||
Blank();
|
||||
}
|
||||
} finally {
|
||||
l_rsLoad.Close();
|
||||
}
|
||||
// * --- Area Manuale = BO - Load Record End
|
||||
// * --- Fine Area Manuale
|
||||
return m_bLoaded;
|
||||
}
|
||||
public boolean Load() {
|
||||
return Load(w_AZIENDA,w_MVSERIAL);
|
||||
}
|
||||
void Insert() {
|
||||
String l_cSql;
|
||||
String l_cCPCCCHK = CPLib.NewCPCCCHK();
|
||||
double l_nUpdatedRows;
|
||||
// * --- Area Manuale = BO - Insert Init
|
||||
// * --- Fine Area Manuale
|
||||
// * --- Area Manuale = BO - Autonum Assigned
|
||||
// * --- Fine Area Manuale
|
||||
NotifyEvent("Insert start");
|
||||
if (CPLib.eq(m_Sql.GetTransactionStatus(),CPSql.OK)) {
|
||||
m_oParameters = CPLib.GetParamsForSqlUpdate(m_cServer_DOCMAST);
|
||||
l_cSql = "insert into "+m_oWrInfo_DOCMAST.GetTableWriteName()+" (";
|
||||
l_cSql = l_cSql+"AZIENDA,";
|
||||
l_cSql = l_cSql+"MVSERIAL,";
|
||||
l_cSql = l_cSql+"MVDATREG,";
|
||||
l_cSql = l_cSql+SPExtenderLib.InsertExtendedFieldsNameToSQL(extendedFields);
|
||||
l_cSql = l_cSql+m_oWrInfo_DOCMAST.InsertFields();
|
||||
if (CPLib.HasTableCPCCCHK(m_Ctx,"DOCMAST")) {
|
||||
l_cSql = l_cSql+"CPCCCHK";
|
||||
} else {
|
||||
l_cSql = CPLib.TrimTrailingComma(l_cSql);
|
||||
}
|
||||
l_cSql = l_cSql+") values (";
|
||||
l_cSql = l_cSql+CPLib.ToSQL(w_AZIENDA,"C",5,0)+", ";
|
||||
l_cSql = l_cSql+CPLib.ToSQL(w_MVSERIAL,"C",10,0)+", ";
|
||||
l_cSql = l_cSql+CPLib.ToSQL(w_MVDATREG,"D",8,0)+", ";
|
||||
l_cSql = l_cSql+SPExtenderLib.InsertExtendedFieldsValueToSQL(extendedFields);
|
||||
l_cSql = l_cSql+m_oWrInfo_DOCMAST.InsertValues();
|
||||
if (CPLib.HasTableCPCCCHK(m_Ctx,"DOCMAST")) {
|
||||
l_cSql = l_cSql+CPLib.ToSQL(l_cCPCCCHK,"C",10,0);
|
||||
} else {
|
||||
l_cSql = CPLib.TrimTrailingComma(l_cSql);
|
||||
}
|
||||
l_cSql = l_cSql+")";
|
||||
l_nUpdatedRows = m_Sql.Update(m_cServer_DOCMAST,l_cSql,m_oParameters);
|
||||
if (CPLib.ne(l_nUpdatedRows,1)) {
|
||||
m_Sql.AbortTransaction();
|
||||
}
|
||||
}
|
||||
NotifyEvent("Insert end");
|
||||
// * --- Area Manuale = BO - Insert End
|
||||
// * --- Fine Area Manuale
|
||||
}
|
||||
void Update() {
|
||||
String l_cSql;
|
||||
int l_nUpdatedRows;
|
||||
String l_cCPCCCHK = CPLib.NewCPCCCHK();
|
||||
// * --- Area Manuale = BO - Replace Init
|
||||
// * --- Fine Area Manuale
|
||||
NotifyEvent("Update start");
|
||||
if (CPLib.eq(m_Sql.GetTransactionStatus(),CPSql.OK)) {
|
||||
m_oParameters = CPLib.GetParamsForSqlUpdate(m_cServer_DOCMAST);
|
||||
l_cSql = "Update "+m_oWrInfo_DOCMAST.GetTableWriteName()+" set";
|
||||
l_cSql = l_cSql+" MVDATREG = "+CPLib.ToSQL(w_MVDATREG,"D",8,0);
|
||||
if (CPLib.HasTableCPCCCHK(m_Ctx,"DOCMAST")) {
|
||||
l_cSql = l_cSql+", CPCCCHK ="+CPLib.ToSQL(l_cCPCCCHK,"C",10,0);
|
||||
}
|
||||
l_cSql = l_cSql+SPExtenderLib.UpdateExtendedFieldsNameValueToSQL(extendedFields);
|
||||
l_cSql = l_cSql+" where ";
|
||||
l_cSql = l_cSql+"AZIENDA="+CPSql.SQLValueAdapter(CPLib.ToSQL(w_AZIENDA,"C",5,0),m_cServer_DOCMAST,w_AZIENDA)+" AND "+"MVSERIAL="+CPSql.SQLValueAdapter(CPLib.ToSQL(w_MVSERIAL,"C",10,0),m_cServer_DOCMAST,w_MVSERIAL);
|
||||
l_cSql = l_cSql+m_oWrInfo_DOCMAST.WhereFilter();
|
||||
if (CPLib.HasTableCPCCCHK(m_Ctx,"DOCMAST")) {
|
||||
l_cSql = l_cSql+" and CPCCCHK="+CPLib.ToSQL(m_cOldCPCCCHK,"C",10,0);
|
||||
}
|
||||
l_nUpdatedRows = m_Sql.Update(m_cServer_DOCMAST,l_cSql,m_oParameters);
|
||||
if (CPLib.ne(l_nUpdatedRows,1)) {
|
||||
m_Sql.AbortTransaction();
|
||||
}
|
||||
}
|
||||
NotifyEvent("Update end");
|
||||
// * --- Area Manuale = BO - Replace End
|
||||
// * --- Fine Area Manuale
|
||||
}
|
||||
public boolean Delete(String p_AZIENDA,String p_MVSERIAL) {
|
||||
String l_cSql;
|
||||
int l_nUpdatedRows = 0;
|
||||
boolean l_bTrsOk = false;
|
||||
Load(p_AZIENDA,p_MVSERIAL);
|
||||
// * --- Area Manuale = BO - Delete Init
|
||||
// * --- Fine Area Manuale
|
||||
if (m_bLoaded) {
|
||||
if (CanDelete()) {
|
||||
/* Il metodo "Delete" richiede l'utilizzo di una transazione. Se il modulo che
|
||||
gestisce le transazioni trova che ce n'è già una, utilizza quella, altrimenti
|
||||
ne inizia una nuova ("begin transaction").
|
||||
*/
|
||||
m_Sql.RequireTransaction();
|
||||
NotifyEvent("Delete start");
|
||||
CPLib.DeleteMNTs(m_Sql,m_MNTs,this);
|
||||
if (CPLib.eq(m_Sql.GetTransactionStatus(),CPSql.OK)) {
|
||||
l_cSql = "Delete from "+m_oWrInfo_DOCMAST.GetTableWriteName()+" where ";
|
||||
l_cSql = l_cSql+"AZIENDA="+CPSql.SQLValueAdapter(CPLib.ToSQL(w_AZIENDA,"C",5,0),m_cServer_DOCMAST,w_AZIENDA)+" AND "+"MVSERIAL="+CPSql.SQLValueAdapter(CPLib.ToSQL(w_MVSERIAL,"C",10,0),m_cServer_DOCMAST,w_MVSERIAL);
|
||||
l_cSql = l_cSql+m_oWrInfo_DOCMAST.WhereFilter();
|
||||
if (CPLib.HasTableCPCCCHK(m_Ctx,"DOCMAST")) {
|
||||
l_cSql = l_cSql+" and CPCCCHK="+CPLib.ToSQL(m_cOldCPCCCHK,"C",10,0);
|
||||
}
|
||||
l_nUpdatedRows = m_Sql.Update(m_cServer_DOCMAST,l_cSql);
|
||||
if (CPLib.ne(l_nUpdatedRows,1)) {
|
||||
// AbortTransaction
|
||||
m_Sql.AbortTransaction();
|
||||
}
|
||||
}
|
||||
NotifyEvent("Delete end");
|
||||
BROnDeleted();
|
||||
l_bTrsOk = CPLib.eq(m_Sql.GetTransactionStatus(),CPSql.OK);
|
||||
// Se il metodo di richiesta della transazione ha cominciato una nuova transazione,
|
||||
// questa viene terminata ("Commit" o "Rollback"), altrimenti segna come completata
|
||||
// la parte di transazione corrente
|
||||
m_Sql.CompleteTransaction();
|
||||
} else {
|
||||
m_Sql.AbortTransaction(m_cLastMsgError);
|
||||
}
|
||||
}
|
||||
// * --- Area Manuale = BO - Delete End
|
||||
// * --- Fine Area Manuale
|
||||
return m_bLoaded && CPLib.eq(l_nUpdatedRows,1) && l_bTrsOk;
|
||||
}
|
||||
public boolean Delete() {
|
||||
return Delete(w_AZIENDA,w_MVSERIAL);
|
||||
}
|
||||
public static CPLib.SPLinkProperties GetLinkProperties(String p_cID) {
|
||||
CPLib.SPLinkProperties result = CPLib.GetSPLinkerProperties();
|
||||
return result;
|
||||
}
|
||||
// * --- Area Manuale = BO - Methods
|
||||
// * --- Fine Area Manuale
|
||||
// ENTITY_BATCHES: ,
|
||||
public static final String i_InvokedRoutines = ",";
|
||||
}
|
||||
12
JavaServletSrc/pi_adocmastWV.java
Normal file
@ -0,0 +1,12 @@
|
||||
public class pi_adocmastWV extends CallerBRImpl {
|
||||
/* Dichiarazione delle variabili di lavoro: riflettono gli interventi dell'utente
|
||||
o di una procedura nell'applicazione. Vengono utilizzate per aggiornare e
|
||||
interrogare il database collegato.
|
||||
*/
|
||||
public String w_AZIENDA;
|
||||
public String w_MVSERIAL;
|
||||
public java.sql.Date w_MVDATREG;
|
||||
public CPMNTChild[] m_MNTs = new CPMNTChild[]{};
|
||||
// variabile contenente i valori per i campi aggiunti e le proprietà dei rispettivi campi
|
||||
public XDCFieldValue[] extendedFields = new XDCFieldValue[]{};
|
||||
}
|
||||
245
JavaServletSrc/pi_adocmast_edit.js
Normal file
@ -0,0 +1,245 @@
|
||||
function DisplayErrorMessage() {
|
||||
if (Le(m_nLastError,-1)) {
|
||||
return;
|
||||
}
|
||||
if (Eq(typeof(m_cErrorInChild),'undefined') || Empty(m_cErrorInChild)) {
|
||||
var l_cErrorMsg = m_cLastMsgError;
|
||||
if (Eq(l_cErrorMsg,'')) {
|
||||
if (Eq(m_nLastError,1)) {
|
||||
l_cErrorMsg='MSG_OBBLI_FIELD';
|
||||
} else if (Eq(m_nLastError,2)) {
|
||||
l_cErrorMsg='MSG_VALUE_NOT_ALLOWED';
|
||||
} else if (Eq(m_nLastError,3)) {
|
||||
l_cErrorMsg='MSG_VALUE_NOT_ALLOWED';
|
||||
} else {
|
||||
l_cErrorMsg='MSG_UNSPEC_ERROR';
|
||||
}
|
||||
}
|
||||
if (Eq(m_nLastError,1)) {
|
||||
WindowAlert(Translate(m_cObblFieldName)+' : '+Translate(l_cErrorMsg));
|
||||
} else {
|
||||
if (Eq(l_cErrorMsg,'MSG_VALUE_NOT_ALLOWED') && Ne(m_cLastWorkVarErrorMsg,'')) {
|
||||
WindowAlert(Translate(m_cLastWorkVarErrorMsg)+': '+Translate(l_cErrorMsg));
|
||||
} else {
|
||||
WindowAlert(Translate(l_cErrorMsg));
|
||||
}
|
||||
}
|
||||
if (Ne(m_cLastWorkVarError,'')) {
|
||||
SetControlFocus(m_cLastWorkVarError);
|
||||
SetErrorField(m_cLastWorkVarError,true);
|
||||
m_cLastWorkVarError='';
|
||||
}
|
||||
} else if (Ne(typeof('DisplayErrorMessage_'+m_cErrorInChild),'undefined')) {
|
||||
DisplayErrorMessageOfChild(m_cErrorInChild);
|
||||
}
|
||||
}
|
||||
function ResetErrorVars() {
|
||||
m_nLastError=0;
|
||||
m_cLastMsgError='';
|
||||
m_cLastWorkVarError='';
|
||||
m_cLastWorkVarErrorMsg='';
|
||||
m_cErrorInChild='';
|
||||
}
|
||||
function EnableControlsUnderCondition() {
|
||||
}
|
||||
function EnableControlsUnderCondition_WhenReady() {
|
||||
var l_bEnabled = true;
|
||||
// * --- Area Manuale = UI - Enable Controls Init
|
||||
// * --- Fine Area Manuale
|
||||
if (window.Z && window.Z.Tabs) {
|
||||
Z.Tabs.Get('tabs').CheckTabStrip();
|
||||
}
|
||||
LibJavascript.forEachItem(m_FoundlingEditExpression,i_body_0)
|
||||
function i_body_0(child){
|
||||
child();
|
||||
}
|
||||
DisableUI();
|
||||
HideControlsUnderCondition();
|
||||
ObligatoryControlsUnderCondition();
|
||||
// * --- Area Manuale = UI - Enable Controls End
|
||||
// * --- Fine Area Manuale
|
||||
}
|
||||
function ObligatoryControlsUnderCondition() {
|
||||
var l_bObligatory = true;
|
||||
}
|
||||
function SetDynamicClasses() {
|
||||
var c;
|
||||
}
|
||||
function SetDynamicTooltip() {
|
||||
var c;
|
||||
}
|
||||
function Set_AZIENDA(ctrlValue,kmode,e) {
|
||||
if (Ne(w_AZIENDA,ctrlValue)) {
|
||||
var ctl = _GetCtl(e,'DCPCUVJOFL');
|
||||
if (_tracker.goon(ctl,ctrlValue)) {
|
||||
w_AZIENDA=ctrlValue;
|
||||
SetModified();
|
||||
var l_bResult = true;
|
||||
SetErrorField(ctl,false);
|
||||
l_bResult=_ChkObl('DCPCUVJOFL',0);
|
||||
DoUpdate(l_bResult);
|
||||
return l_bResult;
|
||||
} else {
|
||||
ctl.value=WtH('','C',5,0,'');
|
||||
_ResetTracker();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
function Set_MVSERIAL(ctrlValue,kmode,e) {
|
||||
if (Ne(w_MVSERIAL,ctrlValue)) {
|
||||
var ctl = _GetCtl(e,'UMGBGSQJYH');
|
||||
if (_tracker.goon(ctl,ctrlValue)) {
|
||||
w_MVSERIAL=ctrlValue;
|
||||
SetModified();
|
||||
var l_bResult = true;
|
||||
SetErrorField(ctl,false);
|
||||
l_bResult=_ChkObl('UMGBGSQJYH',0);
|
||||
DoUpdate(l_bResult);
|
||||
return l_bResult;
|
||||
} else {
|
||||
ctl.value=WtH('','C',10,0,'');
|
||||
_ResetTracker();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
function Set_MVDATREG(ctrlValue,kmode,e) {
|
||||
if (Ne(w_MVDATREG,ctrlValue)) {
|
||||
var ctl = _GetCtl(e,'DJAHUICCZV');
|
||||
if (_tracker.goon(ctl,ctrlValue)) {
|
||||
w_MVDATREG=ctrlValue;
|
||||
SetModified();
|
||||
var l_bResult = true;
|
||||
SetErrorField(ctl,false);
|
||||
l_bResult=_ChkObl('DJAHUICCZV',0);
|
||||
DoUpdate(l_bResult);
|
||||
return l_bResult;
|
||||
} else {
|
||||
ctl.value=WtH(NullDate(),'D',8,0,TranslatePicture(GetDatePicture(false,'D'),'D'));
|
||||
_ResetTracker();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
function Calculate() {
|
||||
var l_bTmpRes;
|
||||
var l_bResult = true;
|
||||
m_bCalculating=true;
|
||||
LibJavascript.forEachItem(m_FoundlingCopyWorkVar,i_body_1)
|
||||
function i_body_1(child){
|
||||
child();
|
||||
}
|
||||
// * --- Area Manuale = UI - Calculate
|
||||
// * --- Fine Area Manuale
|
||||
m_bCalculating=false;
|
||||
}
|
||||
function SaveDependsOn() {
|
||||
}
|
||||
function SaveLabelDependsOn() {
|
||||
}
|
||||
function SendData(formaction,url,data) {
|
||||
if (Eq(m_bAlreadySubmitted,true)) {
|
||||
WindowAlert(Translate('MSG_SERVER_DATA'));
|
||||
return;
|
||||
}
|
||||
var Frm = document.FSender;
|
||||
var bResult = true;
|
||||
function l_Checks() {
|
||||
bResult=bResult && Check() && CheckPwdOTP();
|
||||
}
|
||||
if (Eq(formaction,'moveto') && m_bUpdated) {
|
||||
bResult=WindowConfirm(Translate('MSG_LEAVE_MOD'));
|
||||
}
|
||||
if (bResult) {
|
||||
if (Eq(formaction,'moveto') || (Eq(m_cFunction,'edit') && ! (m_bUpdated))) {
|
||||
formaction='discard';
|
||||
}
|
||||
if (Eq(formaction,'save')) {
|
||||
NotifyEvent('Before Save');
|
||||
l_Checks();
|
||||
}
|
||||
if (bResult) {
|
||||
Frm.m_cSelectedPage.value=GetSelectedPage(InitWvApplet()).asString();
|
||||
SubmitForm.SetAction(formaction);
|
||||
SubmitForm.SetPwdAndOTP();
|
||||
Frm.m_cAltInterface.value=m_cAltInterface;
|
||||
Frm.m_cLayerInterface.value=m_cLayerInterface;
|
||||
FillWv();
|
||||
Frm.m_cWv.value=WvApplet().asString(1);
|
||||
if (Ne(parent,window) && parent.ZtVWeb) {
|
||||
parent.ZtVWeb.raiseEventToEvalParms('pi_adocmast_beforeSubmit',{'action':formaction});
|
||||
}
|
||||
Frm.submit();
|
||||
m_bAlreadySubmitted=true;
|
||||
InstTR();
|
||||
} else {
|
||||
DisplayErrorMessage();
|
||||
if (Ne(parent,window) && parent.ZtVWeb) {
|
||||
parent.ZtVWeb.raiseEventToEvalParms('pi_adocmast_dataNotSent',{'action':formaction});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
CheckChild.child=[];
|
||||
function Check() {
|
||||
var l_bResult = true;
|
||||
ResetErrorVars();
|
||||
m_nLastError=0;
|
||||
if ( ! (_ChkObl('DCPCUVJOFL',1))) {
|
||||
_SignErr('DCPCUVJOFL');
|
||||
m_cLastWorkVarErrorMsg='AZIENDA';
|
||||
l_bResult=false;
|
||||
w_AZIENDA=HtW('','C');
|
||||
} else if ( ! (_ChkObl('UMGBGSQJYH',1))) {
|
||||
_SignErr('UMGBGSQJYH');
|
||||
m_cLastWorkVarErrorMsg='MVSERIAL';
|
||||
l_bResult=false;
|
||||
w_MVSERIAL=HtW('','C');
|
||||
} else if ( ! (_ChkObl('DJAHUICCZV',1))) {
|
||||
_SignErr('DJAHUICCZV');
|
||||
m_cLastWorkVarErrorMsg='MVDATREG';
|
||||
l_bResult=false;
|
||||
w_MVDATREG=HtW('','D');
|
||||
}
|
||||
if (l_bResult) {
|
||||
l_bResult=CheckChild(0);
|
||||
}
|
||||
// * --- Area Manuale = UI - Check Form
|
||||
// * --- Fine Area Manuale
|
||||
return l_bResult;
|
||||
}
|
||||
function link_index(lc) {
|
||||
if (Eq('DJAHUICCZV_ZOOM',lc)) {
|
||||
return 0;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
function link_url(index) {
|
||||
var l_oWv;
|
||||
}
|
||||
function FillWv() {
|
||||
var l_oWv = InitWvApplet();
|
||||
l_oWv.setValue('m_CheckVars',JSON.stringify(m_CheckVars));
|
||||
l_oWv.setValue('AZIENDA',WtA(w_AZIENDA,'C'));
|
||||
l_oWv.setValue('MVSERIAL',WtA(w_MVSERIAL,'C'));
|
||||
l_oWv.setValue('MVDATREG',WtA(w_MVDATREG,'D'));
|
||||
_FillChildren(l_oWv);
|
||||
if (m_bExtended) {
|
||||
ExtendWv(l_oWv);
|
||||
}
|
||||
if (Ne(m_cFunction,'view')) {
|
||||
l_oWv.setValue('m_bUpdated',WtA(m_bUpdated,'L'));
|
||||
l_oWv.setValue('m_cPrvsStt',WtA(m_cPrvsStt,'C'));
|
||||
}
|
||||
l_oWv.setValue('m_bLoaded',WtA(m_bLoaded,'L'));
|
||||
l_oWv.setValue('m_cOldCPCCCHK',WtA(m_cOldCPCCCHK,'C'));
|
||||
}
|
||||
_FillChildren.n=[];
|
||||
FillWv.n=["AZIENDA","MVSERIAL","MVDATREG"];
|
||||
function SetModified() {
|
||||
m_bUpdated=true;
|
||||
}
|
||||
230
JavaServletSrc/pi_adocmast_proc.js
Normal file
@ -0,0 +1,230 @@
|
||||
function FillCombosValues() {
|
||||
}
|
||||
function SetControlsValue() {
|
||||
var c;
|
||||
SPBOUILib.SetInputValue('DCPCUVJOFL',function(){return WtH(w_AZIENDA,'C',5,0,'')},w_AZIENDA);
|
||||
SPBOUILib.SetInputValue('UMGBGSQJYH',function(){return WtH(w_MVSERIAL,'C',10,0,'')},w_MVSERIAL);
|
||||
SPBOUILib.SetInputValue('DJAHUICCZV',function(){return WtH(w_MVDATREG,'D',8,0,TranslatePicture(GetDatePicture(true,'D'),'D'))},w_MVDATREG);
|
||||
if (m_bExtended) {
|
||||
SetExtensions();
|
||||
}
|
||||
if (window.SPMobileLib) {
|
||||
window.SPMobileLib.iOSRepaint();
|
||||
}
|
||||
}
|
||||
function HideControlsUnderCondition() {
|
||||
var h;
|
||||
LibJavascript.forEachItem(m_FoundlingHideExpression,i_body_2)
|
||||
function i_body_2(child){
|
||||
child();
|
||||
}
|
||||
HideUI();
|
||||
}
|
||||
function DCPCUVJOFL_Valid(e) {
|
||||
SetActiveField(Ctrl('DCPCUVJOFL'),false);
|
||||
if (Eq(m_cFunction,'query')) {
|
||||
if (IsLastInPk('DCPCUVJOFL') || ! (m_bQueryOnLatestKeyOnly)) {
|
||||
DoQuery('AZIENDA','C',w_AZIENDA,HtW(Ctrl('DCPCUVJOFL').value,'C'),m_bQueryOnLatestKeyOnly);
|
||||
}
|
||||
} else {
|
||||
e=(Ne(e,null)?e:window.event);
|
||||
var l_bSetResult;
|
||||
l_bSetResult=Set_AZIENDA(HtW(Ctrl('DCPCUVJOFL').value,'C'),null,e);
|
||||
return l_bSetResult;
|
||||
}
|
||||
}
|
||||
function DCPCUVJOFL_OnFocus(e) {
|
||||
if (Ne(m_cFunction,'query') && ! (CheckZone('DCPCUVJOFL'))) {
|
||||
DisplayErrorMessage();
|
||||
}
|
||||
SetActiveField(Ctrl('DCPCUVJOFL'),true);
|
||||
SetLastFocusedOnParent();
|
||||
SPSelectCtrl(Ctrl('DCPCUVJOFL'),e);
|
||||
}
|
||||
function UMGBGSQJYH_Valid(e) {
|
||||
SetActiveField(Ctrl('UMGBGSQJYH'),false);
|
||||
if (Eq(m_cFunction,'query')) {
|
||||
if (IsLastInPk('UMGBGSQJYH') || ! (m_bQueryOnLatestKeyOnly)) {
|
||||
DoQuery('MVSERIAL','C',w_MVSERIAL,HtW(Ctrl('UMGBGSQJYH').value,'C'),m_bQueryOnLatestKeyOnly);
|
||||
}
|
||||
} else {
|
||||
e=(Ne(e,null)?e:window.event);
|
||||
var l_bSetResult;
|
||||
l_bSetResult=Set_MVSERIAL(HtW(Ctrl('UMGBGSQJYH').value,'C'),null,e);
|
||||
return l_bSetResult;
|
||||
}
|
||||
}
|
||||
function UMGBGSQJYH_OnFocus(e) {
|
||||
if (Ne(m_cFunction,'query') && ! (CheckZone('UMGBGSQJYH'))) {
|
||||
DisplayErrorMessage();
|
||||
}
|
||||
SetActiveField(Ctrl('UMGBGSQJYH'),true);
|
||||
SetLastFocusedOnParent();
|
||||
SPSelectCtrl(Ctrl('UMGBGSQJYH'),e);
|
||||
}
|
||||
function DJAHUICCZV_Valid(e) {
|
||||
var dateisok = false;
|
||||
if (Eq(m_oEnteredInDate,Ctrl('DJAHUICCZV'))) {
|
||||
CheckDateValidity(Ctrl('DJAHUICCZV'),'DJAHUICCZV');
|
||||
m_oEnteredInDate=null;
|
||||
dateisok=lastDateIsOk;
|
||||
if ( ! (dateisok)) {
|
||||
m_nLastError=-2;
|
||||
if (IsMobile()) {
|
||||
m_oEnteredInDate=Ctrl('DJAHUICCZV');
|
||||
}
|
||||
}
|
||||
}
|
||||
SetActiveField(Ctrl('DJAHUICCZV'),false);
|
||||
if (Eq(m_cFunction,'query')) {
|
||||
DoQuery('MVDATREG','D',w_MVDATREG,HtW(Ctrl('DJAHUICCZV').value,'D'));
|
||||
} else {
|
||||
e=(Ne(e,null)?e:window.event);
|
||||
var l_bSetResult;
|
||||
l_bSetResult=Set_MVDATREG(HtW(Ctrl('DJAHUICCZV').value,'D'),null,e) && dateisok;
|
||||
return l_bSetResult;
|
||||
}
|
||||
}
|
||||
function DJAHUICCZV_OnFocus(e) {
|
||||
if (Ne(m_cFunction,'query') && ! (CheckZone('DJAHUICCZV'))) {
|
||||
DisplayErrorMessage();
|
||||
}
|
||||
if ( ! (IsMobile() && LibJavascript.HTML5Tests && LibJavascript.HTML5Tests.InputTypes && LibJavascript.HTML5Tests.InputTypes.date)) {
|
||||
SPBOUILib.WtH('DJAHUICCZV',w_MVDATREG,'D',8,0,TranslatePicture(GetDatePicture(false,'D'),'D'));
|
||||
}
|
||||
m_oEnteredInDate=Ctrl('DJAHUICCZV');
|
||||
SetActiveField(Ctrl('DJAHUICCZV'),true);
|
||||
SetLastFocusedOnParent();
|
||||
SPSelectCtrl(Ctrl('DJAHUICCZV'),e);
|
||||
}
|
||||
function DJAHUICCZV_ZOOM_Click() {
|
||||
LaunchCalendar(Ctrl('DJAHUICCZV'));
|
||||
}
|
||||
_ResetTracker();
|
||||
function setEventHandlers() {
|
||||
var c;
|
||||
if (Ne(m_cFunction,'view')) {
|
||||
function DCPCUVJOFL_wrap_Valid(event) {
|
||||
return DCPCUVJOFL_Valid(event);
|
||||
}
|
||||
SPBOUILib.SetInputExit('DCPCUVJOFL',DCPCUVJOFL_wrap_Valid);
|
||||
function DCPCUVJOFL_wrap_OnFocus(event) {
|
||||
return DCPCUVJOFL_OnFocus(event);
|
||||
}
|
||||
SPBOUILib.SetInputEnter('DCPCUVJOFL',DCPCUVJOFL_wrap_OnFocus);
|
||||
function DCPCUVJOFL_wrap_OnKeyDown(event) {
|
||||
return ManageKeys(event,Eq(window.m_cFunction,'query'),false,false,false);
|
||||
}
|
||||
SPBOUILib.SetInputKeyDown('DCPCUVJOFL',DCPCUVJOFL_wrap_OnKeyDown);
|
||||
function UMGBGSQJYH_wrap_Valid(event) {
|
||||
return UMGBGSQJYH_Valid(event);
|
||||
}
|
||||
SPBOUILib.SetInputExit('UMGBGSQJYH',UMGBGSQJYH_wrap_Valid);
|
||||
function UMGBGSQJYH_wrap_OnFocus(event) {
|
||||
return UMGBGSQJYH_OnFocus(event);
|
||||
}
|
||||
SPBOUILib.SetInputEnter('UMGBGSQJYH',UMGBGSQJYH_wrap_OnFocus);
|
||||
function UMGBGSQJYH_wrap_OnKeyDown(event) {
|
||||
return ManageKeys(event,Eq(window.m_cFunction,'query'),false,false,false);
|
||||
}
|
||||
SPBOUILib.SetInputKeyDown('UMGBGSQJYH',UMGBGSQJYH_wrap_OnKeyDown);
|
||||
function DJAHUICCZV_wrap_Valid(event) {
|
||||
return DJAHUICCZV_Valid(event);
|
||||
}
|
||||
SPBOUILib.SetInputExit('DJAHUICCZV',DJAHUICCZV_wrap_Valid);
|
||||
function DJAHUICCZV_wrap_OnFocus(event) {
|
||||
return DJAHUICCZV_OnFocus(event);
|
||||
}
|
||||
SPBOUILib.SetInputEnter('DJAHUICCZV',DJAHUICCZV_wrap_OnFocus);
|
||||
function DJAHUICCZV_wrap_OnKeyPress(event) {
|
||||
return CheckDateChar(event);
|
||||
}
|
||||
SPBOUILib.SetInputKeyPress('DJAHUICCZV',DJAHUICCZV_wrap_OnKeyPress);
|
||||
function DJAHUICCZV_wrap_OnKeyDown(event) {
|
||||
return ManageKeys(event,Eq(window.m_cFunction,'query'),false,false,true);
|
||||
}
|
||||
SPBOUILib.SetInputKeyDown('DJAHUICCZV',DJAHUICCZV_wrap_OnKeyDown);
|
||||
function DJAHUICCZV_ZOOM_setHandlers() {
|
||||
function DJAHUICCZV_ZOOM_wrap_OnClick(event) {
|
||||
return (Ne(m_cFunction,'view') && Ne(m_cFunction,'query')?DJAHUICCZV_ZOOM_Click():void(0));
|
||||
}
|
||||
SPBOUILib.SetButtonClick('DJAHUICCZV_ZOOM',DJAHUICCZV_ZOOM_wrap_OnClick);
|
||||
function DJAHUICCZV_ZOOM_wrap_OnKeyDown(event) {
|
||||
return ManageKeys(event,true,false);
|
||||
}
|
||||
SPBOUILib.SetButtonKeyDown('DJAHUICCZV_ZOOM',DJAHUICCZV_ZOOM_wrap_OnKeyDown);
|
||||
}
|
||||
SPBOUILib.SetPicker('DJAHUICCZV',DJAHUICCZV_ZOOM_setHandlers);
|
||||
if (m_bExtended) {
|
||||
SetEventsAndStylesToExtendedFields();
|
||||
}
|
||||
}
|
||||
if (Eq(m_cFunction,'query') && Ne(document.FrmToolbar,null)) {
|
||||
document.FrmToolbar.pos.onkeypress=RecPositionInput;
|
||||
document.FrmToolbar.pos.onblur=SelectRecord;
|
||||
}
|
||||
}
|
||||
function NotifyEvent(p_cEvent) {
|
||||
var old_c;
|
||||
}
|
||||
function SetLastFocusedOnParent() {
|
||||
// used only in child entities
|
||||
}
|
||||
function DoUpdate(p_bResult) {
|
||||
if (Ne(m_cFunction,'query') && Ne(m_cFunction,'view')) {
|
||||
Calculate();
|
||||
SaveDependsOn();
|
||||
SetControlsValue();
|
||||
SetDynamicClasses();
|
||||
SetDynamicTooltip();
|
||||
EnableControlsUnderCondition();
|
||||
SaveLabelDependsOn();
|
||||
}
|
||||
if ( ! (p_bResult)) {
|
||||
DisplayErrorMessage();
|
||||
}
|
||||
m_nLastError=0;
|
||||
m_cLastMsgError='';
|
||||
}
|
||||
FocusFirstComponent.edit={"page_1":["DJAHUICCZV"]};
|
||||
FocusFirstComponent.query={"page_1":["DCPCUVJOFL"]};
|
||||
FocusFirstComponent.otherwise={"page_1":["DCPCUVJOFL"]};
|
||||
function Help() {
|
||||
windowOpenForeground('../doc/pi_adocmast_usr.xml','','toolbar=0,menubar=0,directories=0,width=500,height=450,resizable=1');
|
||||
}
|
||||
function CalledBatchEnd() {
|
||||
if ( ! (m_bCalculating)) {
|
||||
DoUpdate(true);
|
||||
}
|
||||
}
|
||||
function LoadChildrenInPage(page,lazy) {
|
||||
}
|
||||
function DeclareWVs() {
|
||||
var a = arguments;
|
||||
w_AZIENDA=a[0];
|
||||
w_MVSERIAL=a[1];
|
||||
w_MVDATREG=a[2];
|
||||
m_PrimaryKeys=['MVSERIAL','AZIENDA'];
|
||||
}
|
||||
function i_PrimaryKey() {
|
||||
return 'DOCMAST'+'\\'+CPLib.ToCPStr(w_AZIENDA)+'\\'+CPLib.ToCPStr(w_MVSERIAL);
|
||||
}
|
||||
function CheckZone(me) {
|
||||
return true;
|
||||
}
|
||||
GetSelectedChildPage.child={}
|
||||
function GetSelectedPage(p_d) {
|
||||
p_d.setValue('pi_adocmast',m_cSelectedPage);
|
||||
return GetSelectedChildPage(p_d);
|
||||
}
|
||||
function GetEntityActions() {
|
||||
var l_aActions=[];
|
||||
return l_aActions;
|
||||
}
|
||||
function RenderDynamicCombo(p_id) {
|
||||
}
|
||||
function LinkZoomExtendedMenu() {
|
||||
}
|
||||
_Obli('AZIENDA',0,'DCPCUVJOFL',false)
|
||||
_Obli('MVSERIAL',0,'UMGBGSQJYH',false)
|
||||
_Obli('MVDATREG',2,'DJAHUICCZV',false)
|
||||
159
JavaServletSrc/pi_adocmast_query.js
Normal file
@ -0,0 +1,159 @@
|
||||
function SendData(formaction) {
|
||||
SubmitListenerForm('discard');
|
||||
}
|
||||
function SubmitListenerForm(formaction) {
|
||||
if (Eq(m_bAlreadySubmitted,true)) {
|
||||
WindowAlert(Translate('MSG_SERVER_DATA'));
|
||||
return;
|
||||
}
|
||||
var Frm = document.FSender;
|
||||
var bResult = true;
|
||||
if (Eq(formaction,'delete')) {
|
||||
if (m_bLoaded) {
|
||||
bResult=WindowConfirm(Translate('MSG_PROCEED_WITH_DELETE'));
|
||||
} else {
|
||||
bResult=false;
|
||||
WindowAlert(Translate('MSG_REC_NOT_SELECTED'));
|
||||
}
|
||||
} else if (Eq(formaction,'edit')) {
|
||||
if (Eq(m_cLanguage,'eng')) {
|
||||
}
|
||||
Frm.m_cSelectedPage.value=GetSelectedPage(InitWvApplet()).asString();
|
||||
if (m_bLoaded) {
|
||||
} else {
|
||||
bResult=false;
|
||||
WindowAlert(Translate('MSG_REC_NOT_SELECTED'));
|
||||
}
|
||||
} else {
|
||||
Frm.m_cSelectedPage.value='';
|
||||
m_cSelectedPage='';
|
||||
}
|
||||
if (bResult) {
|
||||
SubmitForm.SetAction(formaction);
|
||||
Frm.m_cAltInterface.value=m_cAltInterface;
|
||||
Frm.m_cLayerInterface.value=m_cLayerInterface;
|
||||
Frm.submit();
|
||||
m_bAlreadySubmitted=true;
|
||||
InstTR();
|
||||
}
|
||||
}
|
||||
var m_bIsMq = false;
|
||||
function SetMultiQuery(e) {
|
||||
var Frm = document.FSender;
|
||||
if (m_bIsMq) {
|
||||
var ctrl = GetEventSrcElement(e);
|
||||
if (Ne(ctrl,null)) {
|
||||
var id = ctrl.id;
|
||||
if (Eq('function',typeof(id+'_Valid'))) {
|
||||
window[id+'_Valid'](null);
|
||||
}
|
||||
}
|
||||
m_bIsMq=false;
|
||||
Frm.m_cMode.value='';
|
||||
Frm.m_cAction.value='query';
|
||||
Frm.m_cSelectedPage.value=GetSelectedPage(InitWvApplet()).asString();
|
||||
// * --- Area Manuale = UI - Build Filter
|
||||
// * --- Fine Area Manuale
|
||||
Frm.submit();
|
||||
m_bAlreadySubmitted=true;
|
||||
InstTR();
|
||||
} else {
|
||||
Frm.m_cLastWhere.value='';
|
||||
m_bIsMq=true;
|
||||
}
|
||||
}
|
||||
function DoQuery(name,type,workvarValue,ctrlValue,sendfullkey) {
|
||||
var l_bQuery = false;
|
||||
if (sendfullkey) {
|
||||
if (Ne(HtW(Ctrl('DCPCUVJOFL').value,'C'),w_AZIENDA)) {
|
||||
l_bQuery=true;
|
||||
}
|
||||
if (Ne(HtW(Ctrl('UMGBGSQJYH').value,'C'),w_MVSERIAL)) {
|
||||
l_bQuery=true;
|
||||
}
|
||||
}
|
||||
if (Ne(ctrlValue,workvarValue) || l_bQuery) {
|
||||
if (IsWndAccessible(window['m_oFather'])) {
|
||||
// Gestione filtro avanzato figli-padri
|
||||
if (m_oFather.DoQueryFromChild) {
|
||||
m_oFather.DoQueryFromChild('DOCMAST',_flt_(m_cVirtName+'.'+name,ctrlValue,type),m_cVirtName);
|
||||
}
|
||||
} else {
|
||||
var Frm = document.FSender;
|
||||
if (m_bIsMq) {
|
||||
if (Eq(Frm.m_cLastWhere.value,'')) {
|
||||
Frm.m_cLastWhere.value=_flt_(m_cVirtName+'.'+name,ctrlValue,type);
|
||||
} else {
|
||||
Frm.m_cLastWhere.value=Frm.m_cLastWhere.value+' and '+_flt_(m_cVirtName+'.'+name,ctrlValue,type);
|
||||
}
|
||||
} else {
|
||||
Frm.m_cLastWhere.value='';
|
||||
if ( ! (Empty(ctrlValue))) {
|
||||
Frm.m_cLastWhere.value=_flt_(m_cVirtName+'.'+name,ctrlValue,type);
|
||||
}
|
||||
if (sendfullkey) {
|
||||
if (Ne(name,'AZIENDA') && ! (Empty(HtW(Ctrl('DCPCUVJOFL').value,'C')))) {
|
||||
if ( ! (Empty(Frm.m_cLastWhere.value))) {
|
||||
Frm.m_cLastWhere.value=Frm.m_cLastWhere.value+' and ';
|
||||
}
|
||||
Frm.m_cLastWhere.value=Frm.m_cLastWhere.value+_flt_(m_cVirtName+'.AZIENDA',HtW(Ctrl('DCPCUVJOFL').value,'C'),'C');
|
||||
}
|
||||
if (Ne(name,'MVSERIAL') && ! (Empty(HtW(Ctrl('UMGBGSQJYH').value,'C')))) {
|
||||
if ( ! (Empty(Frm.m_cLastWhere.value))) {
|
||||
Frm.m_cLastWhere.value=Frm.m_cLastWhere.value+' and ';
|
||||
}
|
||||
Frm.m_cLastWhere.value=Frm.m_cLastWhere.value+_flt_(m_cVirtName+'.MVSERIAL',HtW(Ctrl('UMGBGSQJYH').value,'C'),'C');
|
||||
}
|
||||
}
|
||||
if (Ne(type,'M')) {
|
||||
Frm.m_cLastOrderBy.value=m_cVirtName+'.'+name;
|
||||
} else {
|
||||
Frm.m_cLastOrderBy.value='';
|
||||
}
|
||||
Frm.m_cMode.value='';
|
||||
Frm.m_cAction.value='query';
|
||||
// * --- Area Manuale = UI - Build Filter
|
||||
// * --- Fine Area Manuale
|
||||
Frm.submit();
|
||||
m_bAlreadySubmitted=true;
|
||||
InstTR();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function DoQueryFromChild(childAlias,childWhere,allAliases) {
|
||||
var keyWhere = '';
|
||||
var firstAlias = allAliases.split("|")[0];
|
||||
if (childAlias) {
|
||||
if (window['DoQueryFrom_'+childAlias]) {
|
||||
keyWhere=window["DoQueryFrom_"+childAlias](firstAlias);
|
||||
} else {
|
||||
_chNotF(childAlias,'master','pi_adocmast');
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (IsWndAccessible(window['m_oFather'])) {
|
||||
m_oFather.DoQueryFromChild('DOCMAST',keyWhere+' and '+childWhere,m_cVirtName+'|'+allAliases);
|
||||
} else {
|
||||
var Frm = document.FSender;
|
||||
Frm.m_cLastWhere.value=keyWhere+' and '+childWhere;
|
||||
Frm.m_cMode.value='';
|
||||
Frm.m_cAction.value='query';
|
||||
Frm.m_cAllVirtNames.value=m_cVirtName+'|'+allAliases;
|
||||
Frm.submit();
|
||||
}
|
||||
}
|
||||
function IsLastInPk(id) {
|
||||
if ( ! (m_bQueryOnLatestKeyOnly)) {
|
||||
return true;
|
||||
}
|
||||
if (Empty(IsLastInPk.Last)) {
|
||||
for(var a=['DCPCUVJOFL','UMGBGSQJYH'],i=1;i>=0;i--){
|
||||
if (Ne(Ctrl(a[i]).style.display,'none') && Ne(Ctrl(a[i]).style.visibility,'hidden') && ! (GetDisabled(a[i]))) {
|
||||
IsLastInPk.Last=a[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return Eq(IsLastInPk.Last,id);
|
||||
}
|
||||
219
JavaServletSrc/pi_fapprova.java
Normal file
@ -0,0 +1,219 @@
|
||||
import java.io.*;
|
||||
import java.text.*;
|
||||
import java.util.*;
|
||||
import javax.servlet.*;
|
||||
import javax.servlet.http.*;
|
||||
import com.zucchetti.sitepainter.SPPrxycizer;
|
||||
|
||||
@com.zucchetti.sitepainter.EntityRoles({})
|
||||
public class pi_fapprova extends SPRoutineServlet implements SPInvokable {
|
||||
public static String m_cEntityUid = "!*ee7dd581*!";
|
||||
public class ServletStatus extends SPRoutineServletStatus {
|
||||
public String res;
|
||||
MemoryCursor_pi_qord_mast_vqr pDATI;
|
||||
public String a_retval;
|
||||
void PrintMutableParameters() throws java.io.IOException {
|
||||
CPMemoryCursor l_PreviousResult = this.m_CursorResult;
|
||||
boolean l_PreviousMutated = this.m_bMutated;
|
||||
try {
|
||||
this.m_bMutated = true;
|
||||
this.out.println("djs:pDATI=");
|
||||
this.m_CursorResult = this.pDATI;
|
||||
JSResultSet(this);
|
||||
this.out.println();
|
||||
} finally {
|
||||
this.m_CursorResult = l_PreviousResult;
|
||||
this.m_bMutated = l_PreviousMutated;
|
||||
}
|
||||
}
|
||||
public void GetNonLocals(SPParameterSource source) {
|
||||
CPContext m_Ctx = context;
|
||||
Caller m_Caller = this;
|
||||
Map<String,Object> l_UniqueIDs;
|
||||
l_UniqueIDs = new HashMap<String,Object>();
|
||||
Properties l_PropertiesRead;
|
||||
l_PropertiesRead = CPMemoryCursor.GetProperties(source.GetParameter("pDATI",""));
|
||||
if (l_UniqueIDs.containsKey(l_PropertiesRead.getProperty("uniqueID"))) {
|
||||
pDATI = (MemoryCursor_pi_qord_mast_vqr)l_UniqueIDs.get(l_PropertiesRead.getProperty("uniqueID"));
|
||||
} else {
|
||||
pDATI = new MemoryCursor_pi_qord_mast_vqr(l_PropertiesRead,this.context);
|
||||
if ( ! (CPLib.IsNull(l_PropertiesRead.getProperty("uniqueID")))) {
|
||||
l_UniqueIDs.put(l_PropertiesRead.getProperty("uniqueID"),pDATI);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public SPEntityGlobals getEntityGlobals() {
|
||||
// Costanti globali dell' entita'
|
||||
SPRoutineGlobals l_eg;
|
||||
l_eg = new SPRoutineGlobals();
|
||||
l_eg.name = "pi_fapprova";
|
||||
l_eg.hasProgressItem = false;
|
||||
l_eg.isPublic = false;
|
||||
return l_eg;
|
||||
}
|
||||
public void doProcess(HttpServletRequest request,HttpServletResponse response) throws IOException, ServletException {
|
||||
// Inizializzazione delle variabili della classe globale di stato
|
||||
ServletStatus status;
|
||||
status = new ServletStatus();
|
||||
status.containing = this;
|
||||
SPParameterSource source;
|
||||
source = SPLib.GetSource(request);
|
||||
if ( ! (EnterServlet(status,source,request,response))) {
|
||||
return;
|
||||
}
|
||||
Begin(status);
|
||||
}
|
||||
boolean NeedsFetchPage(ServletStatus status) {
|
||||
return false;
|
||||
}
|
||||
private void ExecuteRoutine(ServletStatus status) throws IOException {
|
||||
pi_fapprovaR Rcalled;
|
||||
Rcalled = new pi_fapprovaR(status.context,status);
|
||||
if (CPLib.ne(status.m_cAction,"executeAsync")) {
|
||||
ExecuteWorkflowStartingScript(status,Rcalled);
|
||||
status.a_retval = Rcalled.Run(status.pDATI);
|
||||
if (Rcalled.m_bError) {
|
||||
status.m_bError = true;
|
||||
status.m_cErrMsg = Rcalled.m_cLastMsgError;
|
||||
} else if ( ! (CPLib.Empty(status.m_cFaultTrace))) {
|
||||
status.m_bError = true;
|
||||
status.m_cErrMsg = status.m_cFaultTrace;
|
||||
}
|
||||
if (CPLib.eqr(CPLib.Left(status.m_cAtExit,8),"workflow")) {
|
||||
ExitToWorkflow(status);
|
||||
}
|
||||
if (Forward.IsForwarded(status.forwardedto)) {
|
||||
if (CPLib.IsNull(status.forwardedto.GetParameterString("m_cAtExit",null))) {
|
||||
status.forwardedto.SetParameter("m_cAtExit",status.m_cAtExit);
|
||||
}
|
||||
SPLib.ForwardTo(status.forwardedto,servletContext,status.request,status.response);
|
||||
return;
|
||||
}
|
||||
}
|
||||
BringBackPage(status,Rcalled);
|
||||
}
|
||||
CallerWithObjs NewRoutine(SPServletStatus status,Caller dataFromClient) {
|
||||
return new pi_fapprovaR(status.context,dataFromClient);
|
||||
}
|
||||
protected void BringBackPage(ServletStatus status,pi_fapprovaR Rcalled) throws IOException {
|
||||
String l_cErrMsg;
|
||||
String msg;
|
||||
msg = status.context.Translate("MSG_END_ROUTINE");
|
||||
SPLib.SetContentType(status.response);
|
||||
SPLib.NoCache(status.response);
|
||||
status.out = status.response.getWriter();
|
||||
String l_cJsUid;
|
||||
status.out.println(
|
||||
"<!doctype html>" +
|
||||
"");
|
||||
status.out.println(
|
||||
"<html>" +
|
||||
"");
|
||||
status.out.println(
|
||||
"<head>" +
|
||||
"");
|
||||
status.out.println(
|
||||
"<title>" +
|
||||
""+status.context.Translate("MSG_ROUTINE_WIND")+"" +
|
||||
"</title>" +
|
||||
"");
|
||||
l_cJsUid = SPPrxycizer.proxycizedPath("stdFunctions.js");
|
||||
status.out.println(
|
||||
"<script src='../"+l_cJsUid+"' type='text/javascript'>" +
|
||||
"</script>" +
|
||||
"");
|
||||
l_cJsUid = SPPrxycizer.proxycizedPath("controls.js");
|
||||
status.out.println(
|
||||
"<script src='../"+l_cJsUid+"' type='text/javascript'>" +
|
||||
"</script>" +
|
||||
"");
|
||||
status.out.println(
|
||||
"<link type='text/css' rel='STYLESHEET' href='../"+status.m_cTheme+"/formPage.css'>" +
|
||||
"");
|
||||
status.out.println(
|
||||
"</head>" +
|
||||
"");
|
||||
if (status.m_bError) {
|
||||
msg = status.context.Translate("MSG_END_ROUTINE_WITH_MSG");
|
||||
status.out.println(
|
||||
"<body onkeydown='window.ManageKeys(event,false,false)'>" +
|
||||
"");
|
||||
} else {
|
||||
status.out.println(
|
||||
"<body>" +
|
||||
"");
|
||||
}
|
||||
status.out.println(
|
||||
"<p class='TabLabel' style='margin:0'>" +
|
||||
""+msg+"" +
|
||||
"</p>" +
|
||||
"");
|
||||
if (status.m_bError) {
|
||||
status.out.println(
|
||||
"<script type='text/javascript'>" +
|
||||
"");
|
||||
l_cErrMsg = status.context.Translate(com.zucchetti.sitepainter.Library.explicativeErrorMessage(status.m_cErrMsg));
|
||||
status.out.println("detailed_database_error="+SPLib.ToJSValue(l_cErrMsg,"C",0,0)+";");
|
||||
status.out.println("m_cBrowser=" + SPLib.ToJSValue(status.m_cBrowser,"C",0,0)+ ";");
|
||||
status.out.println(
|
||||
"</script>" +
|
||||
"");
|
||||
}
|
||||
status.out.println(
|
||||
"<!--" +
|
||||
"");
|
||||
if ( ! (CPLib.Empty(Rcalled.m_cLastMsgError))) {
|
||||
CPTokenSource ts;
|
||||
ts = new CPTokenSource(status.context.Translate(com.zucchetti.sitepainter.Library.explicativeErrorMessage(Rcalled.m_cLastMsgError)),"\n");
|
||||
while (ts.HasMoreTokens()) {
|
||||
status.out.println("Error message:"+com.zucchetti.sitepainter.Library.ToHTMLEuro(ts.NextToken())+"");
|
||||
}
|
||||
}
|
||||
if ( ! (CPLib.Empty(status.m_cFaultTrace))) {
|
||||
status.out.println("Fault:["+SPLib.ToJSValue(status.context.Translate("MSG_ROUTINE_FAULTED","pi_fapprova"),"C",0,0)+","+SPLib.ToJSValue(status.m_cFaultTrace,"C",0,0)+"]");
|
||||
if (CPLib.Empty(Rcalled.m_cLastMsgError) && ! (status.m_bApplet)) {
|
||||
status.out.println("Error message:"+com.zucchetti.sitepainter.Library.ToHTMLEuro(status.m_cFaultTrace)+"");
|
||||
}
|
||||
}
|
||||
status.PrintMutableParameters();
|
||||
status.out.println("Function return value:"+com.zucchetti.sitepainter.Library.ToHTMLEuro(CPLib.ToProperties(status.a_retval))+"");
|
||||
status.out.println(
|
||||
" -->" +
|
||||
"");
|
||||
status.out.println(
|
||||
"</body>" +
|
||||
"");
|
||||
status.out.println(
|
||||
"</html>" +
|
||||
"");
|
||||
}
|
||||
private void Begin(ServletStatus status) throws IOException {
|
||||
if ( ! (CPLib.Empty(status.m_cGlobalsToRead))) {
|
||||
JSGlobals(status);
|
||||
} else if (CPLib.Empty(status.m_cBrowseName)) {
|
||||
ExecuteRoutine(status);
|
||||
} else {
|
||||
JSResultSet(status);
|
||||
}
|
||||
}
|
||||
void IncludeJS(ServletStatus status) {
|
||||
/* --- Area Manuale = UI - Include */
|
||||
/* --- Fine Area Manuale */
|
||||
}
|
||||
// m_CallableNames inizializzato dal primo accesso a GetCallableNames
|
||||
private static volatile String[] m_CallableNames;
|
||||
public static String[] GetCallableNames() {
|
||||
if (CPLib.IsNull(m_CallableNames)) {
|
||||
java.util.Set building = new java.util.HashSet();
|
||||
GetCallableNames(building);
|
||||
m_CallableNames = CPLib.SetOfStringsAsArray(building);
|
||||
}
|
||||
return (String[])m_CallableNames.clone();
|
||||
}
|
||||
public static void GetCallableNames(java.util.Set callable) {
|
||||
}
|
||||
String[] RoutineIDChain() {
|
||||
return GetCallableNames();
|
||||
}
|
||||
}
|
||||
21
JavaServletSrc/pi_fapprova.js
Normal file
@ -0,0 +1,21 @@
|
||||
function pi_fapprova() {
|
||||
var pDATI;
|
||||
var m_Caller
|
||||
pi_fapprova._p=_rargs(arguments,{eval:function(e){eval(e)}})
|
||||
function i_BlankParameters() {
|
||||
}
|
||||
if(pi_fapprova._p.length>0)_rargs([[['pDATI',pi_fapprova._p[0]]]],{eval:function(e){eval(e)}})
|
||||
pi_fapprova._s=new BatchJavascript();
|
||||
if (Ne(typeof(document.FSender),'undefined') && Ne(typeof(document.FSender.m_cRegionalSettings),'undefined')) {
|
||||
pi_fapprova._s.SetParameterString('m_cRegionalSettings',document.FSender.m_cRegionalSettings.value);
|
||||
}
|
||||
pi_fapprova._s.SetParameterString('pDATI',WtA(pDATI,'MC'),pDATI);
|
||||
pi_fapprova._s.SetParameterString('m_bApplet','true');
|
||||
pi_fapprova._s.CallServlet('pi_fapprova');
|
||||
pDATI._Copy(pi_fapprova._s.GetCallerMemoryCursorVar('pDATI'))
|
||||
if (Eq(typeof(m_bCalculating),'undefined') || ! (m_bCalculating)) {
|
||||
m_cErrorFromRoutine=pi_fapprova._s.errmsg;
|
||||
}
|
||||
return pi_fapprova._s.GetString();
|
||||
}
|
||||
pi_fapprova.CtxLoad_ = function(){return []}
|
||||
435
JavaServletSrc/pi_fapprovaR.java
Normal file
@ -0,0 +1,435 @@
|
||||
// * --- Area Manuale = BO - Header
|
||||
// * --- Fine Area Manuale
|
||||
public class pi_fapprovaR implements CallerWithObjs {
|
||||
// gestori associati a particolari eventi ('Routine start')
|
||||
public static volatile java.util.Map<String,java.util.List<com.zucchetti.sitepainter.EventHandler>> specificEventsHandlers;
|
||||
// gestori associati a tutti gli eventi
|
||||
public static volatile java.util.List<com.zucchetti.sitepainter.EventHandler> allEventsHandlers;
|
||||
// indica se si sta gestendo un evento scatenato da questa routine per restituire il valore corretto di i_EntityName ed i_EntityType
|
||||
static boolean m_bEventRunning;
|
||||
public String m_cLastMsgError;
|
||||
public boolean m_bError;
|
||||
// Variabile di collegamento con il database: passata nel costruttore
|
||||
public CPSql m_Sql;
|
||||
// Variabile di contesto (variabili globali): passata nel costruttore
|
||||
public CPContext m_Ctx;
|
||||
// Variabile di caller (variabili di caller): passata nel costruttore
|
||||
public CallerWithObjs m_Caller;
|
||||
public String m_cPhName_poloidoc_mast;
|
||||
public String m_cServer_poloidoc_mast;
|
||||
public String m_cPhName_metridoc_mast;
|
||||
public String m_cServer_metridoc_mast;
|
||||
public String m_cPhName_fconndoc_mast;
|
||||
public String m_cServer_fconndoc_mast;
|
||||
public String m_cPhName_logaut;
|
||||
public String m_cServer_logaut;
|
||||
String m_cServer;
|
||||
String m_cPhName;
|
||||
CPPhTableWrInfo m_oWrInfo;
|
||||
String m_cQuery;
|
||||
String m_cQueryTable;
|
||||
String m_cSql;
|
||||
java.util.List<String> m_oParameters;
|
||||
String m_cWhere;
|
||||
int m_nUpdatedRows;
|
||||
// Contiene il messaggio di errore dell'ultima select terminata a causa della caduta della connessione
|
||||
String m_cConnectivityError;
|
||||
public MemoryCursor_pi_qord_mast_vqr pDATI;
|
||||
public String res;
|
||||
// * --- Area Manuale = BO - Properties
|
||||
// * --- Fine Area Manuale
|
||||
public pi_fapprovaR (CPContext p_ContextObject, Caller caller) {
|
||||
if (caller == null)
|
||||
m_Caller = CallerWithObjsImpl.EMPTY;
|
||||
else if (caller instanceof CallerWithObjs)
|
||||
m_Caller = (CallerWithObjs)caller;
|
||||
else
|
||||
m_Caller = new CallerWithObjsImpl(caller);
|
||||
m_Ctx=p_ContextObject;
|
||||
// Assegnazione della variabile di collegamento con il database
|
||||
m_Sql=m_Ctx.GetSql();
|
||||
/* Impostazione dell'ambiente globale: il businness object si collega
|
||||
all'oggetto globale (unico per più istanze di una stessa applicazione)
|
||||
per recuperare informazioni sul:
|
||||
1) nome fisico della tabella di gestione;
|
||||
2) nome fisico delle tabelle collegate nei link;
|
||||
3) stringa di connessione.
|
||||
L'azienda è contenuta nel global object.
|
||||
*/
|
||||
p_ContextObject = p_ContextObject.DisabledDataFilteringVersion();
|
||||
CPSecurity.RoutineCallableByProgram("pi_fapprova",m_Caller);
|
||||
m_cPhName_poloidoc_mast = p_ContextObject.GetPhName("poloidoc_mast");
|
||||
if (m_cPhName_poloidoc_mast.endsWith(CPSecurity.FILTER_QUERY_POSTFIX)) {
|
||||
m_cPhName_poloidoc_mast = m_cPhName_poloidoc_mast+" "+m_Ctx.GetWritePhName("poloidoc_mast");
|
||||
}
|
||||
m_cServer_poloidoc_mast = p_ContextObject.GetServer("poloidoc_mast");
|
||||
m_cPhName_metridoc_mast = p_ContextObject.GetPhName("metridoc_mast");
|
||||
if (m_cPhName_metridoc_mast.endsWith(CPSecurity.FILTER_QUERY_POSTFIX)) {
|
||||
m_cPhName_metridoc_mast = m_cPhName_metridoc_mast+" "+m_Ctx.GetWritePhName("metridoc_mast");
|
||||
}
|
||||
m_cServer_metridoc_mast = p_ContextObject.GetServer("metridoc_mast");
|
||||
m_cPhName_fconndoc_mast = p_ContextObject.GetPhName("fconndoc_mast");
|
||||
if (m_cPhName_fconndoc_mast.endsWith(CPSecurity.FILTER_QUERY_POSTFIX)) {
|
||||
m_cPhName_fconndoc_mast = m_cPhName_fconndoc_mast+" "+m_Ctx.GetWritePhName("fconndoc_mast");
|
||||
}
|
||||
m_cServer_fconndoc_mast = p_ContextObject.GetServer("fconndoc_mast");
|
||||
m_cPhName_logaut = p_ContextObject.GetPhName("logaut");
|
||||
if (m_cPhName_logaut.endsWith(CPSecurity.FILTER_QUERY_POSTFIX)) {
|
||||
m_cPhName_logaut = m_cPhName_logaut+" "+m_Ctx.GetWritePhName("logaut");
|
||||
}
|
||||
m_cServer_logaut = p_ContextObject.GetServer("logaut");
|
||||
Blank();
|
||||
}
|
||||
public double GetNumber(String p_cVarName,String p_cType,int len,int dec) {
|
||||
return 0;
|
||||
}
|
||||
public String GetString(String p_cVarName,String p_cType,int len,int dec) {
|
||||
if (CPLib.eqr("m_cVQRList",p_cVarName)) {
|
||||
return m_cVQRList;
|
||||
} else if (CPLib.eqr("i_InvokedRoutines",p_cVarName)) {
|
||||
return i_InvokedRoutines;
|
||||
} else if (m_bEventRunning && CPLib.eqr("i_EntityName",p_cVarName)) {
|
||||
return "pi_fapprova";
|
||||
} else if (m_bEventRunning && CPLib.eqr("i_EntityType",p_cVarName)) {
|
||||
return "function";
|
||||
}
|
||||
if (CPLib.eqr("res",p_cVarName)) {
|
||||
return res;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
public java.sql.Date GetDate(String p_cVarName,String p_cType,int len,int dec) {
|
||||
return CPLib.NullDate();
|
||||
}
|
||||
public java.sql.Timestamp GetDateTime(String p_cVarName,String p_cType,int len,int dec) {
|
||||
return CPLib.NullDateTime();
|
||||
}
|
||||
public boolean GetLogic(String p_cVarName,String p_cType,int len,int dec) {
|
||||
return false;
|
||||
}
|
||||
public CPMemoryCursor GetMemoryCursor(String p_cVarName,String p_cType,int len,int dec) {
|
||||
if (CPLib.eqr("pDATI",p_cVarName)) {
|
||||
return pDATI;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public CPMemoryCursorRow GetMemoryCursorRow(String p_cVarName,String p_cType,int len,int dec) {
|
||||
return null;
|
||||
}
|
||||
public com.zucchetti.sitepainter.datatypes.CPJSONStruct GetJSON(String p_cVarName,String p_cType,int len,int dec) {
|
||||
return com.zucchetti.sitepainter.datatypes.CPJSONStruct.EmptyStruct();
|
||||
}
|
||||
public void SetNumber(String p_cVarName,String p_cType,int len,int dec,double value) {
|
||||
}
|
||||
public void SetString(String p_cVarName,String p_cType,int len,int dec,String value) {
|
||||
if (CPLib.eqr("res",p_cVarName)) {
|
||||
res = value;
|
||||
return;
|
||||
}
|
||||
}
|
||||
public void SetDate(String p_cVarName,String p_cType,int len,int dec,java.sql.Date value) {
|
||||
}
|
||||
public void SetDateTime(String p_cVarName,String p_cType,int len,int dec,java.sql.Timestamp value) {
|
||||
}
|
||||
public void SetLogic(String p_cVarName,String p_cType,int len,int dec,boolean value) {
|
||||
}
|
||||
public void SetMemoryCursorRow(String p_cVarName,String p_cType,int len,int dec,CPMemoryCursorRow value) {
|
||||
}
|
||||
public void SetMemoryCursor(String p_cVarName,String p_cType,int len,int dec,CPMemoryCursor value) {
|
||||
if (CPLib.eqr("pDATI",p_cVarName)) {
|
||||
pDATI = (MemoryCursor_pi_qord_mast_vqr)value;
|
||||
return;
|
||||
}
|
||||
}
|
||||
public void SetJSON(String p_cVarName,String p_cType,int len,int dec,com.zucchetti.sitepainter.datatypes.CPJSONStruct value) {
|
||||
}
|
||||
public void CalledBatchEnd() {
|
||||
}
|
||||
void Page_1() throws Exception {
|
||||
/* pDATI MemoryCursor(pi_qord_mast.vqr) */
|
||||
/* res Char(0) */
|
||||
for (MemoryCursorRow_pi_qord_mast_vqr x : pDATI._iterable_()) {
|
||||
/* Case x.AZIENDA="POLOI" */
|
||||
if (CPLib.eqr(x.AZIENDA,"POLOI")) {
|
||||
// * --- Write into POLOIDOC_MAST from values
|
||||
m_Sql.RequireTransaction();
|
||||
m_cServer = m_Ctx.GetServer("POLOIDOC_MAST");
|
||||
m_cPhName = m_Ctx.GetPhName("POLOIDOC_MAST");
|
||||
m_oWrInfo = CPPhTableWrInfo.GetCPPhTableWrInfo(m_Ctx,"POLOIDOC_MAST",m_Ctx.GetCompany());
|
||||
m_oParameters = CPLib.GetParamsForSqlUpdate(m_cServer);
|
||||
m_cSql = CPLib.GetSQLPrefixComment("pi_fapprova",5,"00000005")+"Update "+m_oWrInfo.GetTableWriteName()+" set ";
|
||||
m_cSql = m_cSql+"MVFLPROV = "+CPLib.ToSQL("N","C",1,0,m_cServer)+", ";
|
||||
m_cSql = CPLib.AddCPCCCHKUpdate(m_Ctx,m_cSql,"POLOIDOC_MAST",false,true);
|
||||
m_cSql = m_cSql+" where ";
|
||||
m_cSql = m_cSql+"MVSERIAL = "+CPSql.SQLValueAdapter(CPLib.ToSQL(x.MVSERIAL,"?",0,0,m_cServer),m_cServer,x.MVSERIAL)+"";
|
||||
m_cSql = m_cSql+m_oWrInfo.WhereFilter();
|
||||
m_nUpdatedRows = m_Sql.Update(m_cServer,m_cSql,m_oParameters);
|
||||
if (CPLib.lt(m_nUpdatedRows,0)) {
|
||||
m_nUpdatedRows = 0;
|
||||
}
|
||||
m_Sql.CompleteTransaction();
|
||||
m_cLastMsgError = m_Sql.TransactionErrorMessage();
|
||||
if (CPLib.lt(m_nUpdatedRows,1)) {
|
||||
// No rows updated
|
||||
/* res := "Errore approvazione ordine"+ x.AZIENDA+x.MVSERIAL */
|
||||
res = "Errore approvazione ordine"+x.AZIENDA+x.MVSERIAL;
|
||||
// Exit Loop
|
||||
if (true) {
|
||||
break;
|
||||
}
|
||||
} else if (CPLib.ne(m_cLastMsgError,"")) {
|
||||
m_bError = true;
|
||||
}
|
||||
// * --- Insert into LOGAUT from values
|
||||
m_Sql.RequireTransaction();
|
||||
m_cServer = m_Ctx.GetServer("LOGAUT");
|
||||
m_cPhName = m_Ctx.GetPhName("LOGAUT");
|
||||
m_oWrInfo = CPPhTableWrInfo.GetCPPhTableWrInfo(m_Ctx,"LOGAUT",m_Ctx.GetCompany());
|
||||
m_oParameters = CPLib.GetParamsForSqlUpdate(m_cServer);
|
||||
m_cSql = CPLib.GetSQLPrefixComment("pi_fapprova",5,"00000008")+CPLib.InsertIntoStatement(m_Ctx,m_oWrInfo)+" (";
|
||||
m_cSql = m_cSql+GetFieldsName_00000008(m_Ctx,m_oWrInfo);
|
||||
m_cSql = m_cSql+") values (";
|
||||
m_cSql = m_cSql+""+CPLib.ToSQL(x.AZIENDA,"?",0,0,m_cServer)+", ";
|
||||
m_cSql = m_cSql+""+CPLib.ToSQL(x.MVSERIAL,"?",0,0,m_cServer)+", ";
|
||||
m_cSql = m_cSql+""+CPLib.ToSQL(Utilities.Make(m_Ctx,m_Caller).UserCode(),"?",0,0,m_cServer)+", ";
|
||||
m_cSql = m_cSql+m_oWrInfo.InsertValues();
|
||||
m_cSql = CPLib.AddCPCCCHKValue(m_Ctx,m_cSql,"LOGAUT",true);
|
||||
m_cSql = m_cSql+")";
|
||||
m_nUpdatedRows = m_Sql.Update(m_cServer,m_cSql,m_oParameters);
|
||||
if (CPLib.lt(m_nUpdatedRows,0)) {
|
||||
m_Sql.AbortTransaction();
|
||||
}
|
||||
m_Sql.CompleteTransaction();
|
||||
m_cLastMsgError = m_Sql.TransactionErrorMessage();
|
||||
if (CPLib.ne(m_cLastMsgError,"")) {
|
||||
m_bError = true;
|
||||
}
|
||||
/* Case x.AZIENDA="METRI" */
|
||||
} else if (CPLib.eqr(x.AZIENDA,"METRI")) {
|
||||
// * --- Write into METRIDOC_MAST from values
|
||||
m_Sql.RequireTransaction();
|
||||
m_cServer = m_Ctx.GetServer("METRIDOC_MAST");
|
||||
m_cPhName = m_Ctx.GetPhName("METRIDOC_MAST");
|
||||
m_oWrInfo = CPPhTableWrInfo.GetCPPhTableWrInfo(m_Ctx,"METRIDOC_MAST",m_Ctx.GetCompany());
|
||||
m_oParameters = CPLib.GetParamsForSqlUpdate(m_cServer);
|
||||
m_cSql = CPLib.GetSQLPrefixComment("pi_fapprova",5,"00000009")+"Update "+m_oWrInfo.GetTableWriteName()+" set ";
|
||||
m_cSql = m_cSql+"MVFLPROV = "+CPLib.ToSQL("N","C",1,0,m_cServer)+", ";
|
||||
m_cSql = CPLib.AddCPCCCHKUpdate(m_Ctx,m_cSql,"METRIDOC_MAST",false,true);
|
||||
m_cSql = m_cSql+" where ";
|
||||
m_cSql = m_cSql+"MVSERIAL = "+CPSql.SQLValueAdapter(CPLib.ToSQL(x.MVSERIAL,"?",0,0,m_cServer),m_cServer,x.MVSERIAL)+"";
|
||||
m_cSql = m_cSql+m_oWrInfo.WhereFilter();
|
||||
m_nUpdatedRows = m_Sql.Update(m_cServer,m_cSql,m_oParameters);
|
||||
if (CPLib.lt(m_nUpdatedRows,0)) {
|
||||
m_nUpdatedRows = 0;
|
||||
}
|
||||
m_Sql.CompleteTransaction();
|
||||
m_cLastMsgError = m_Sql.TransactionErrorMessage();
|
||||
if (CPLib.lt(m_nUpdatedRows,1)) {
|
||||
// No rows updated
|
||||
/* res := "Errore approvazione ordine"+ x.AZIENDA+x.MVSERIAL */
|
||||
res = "Errore approvazione ordine"+x.AZIENDA+x.MVSERIAL;
|
||||
// Exit Loop
|
||||
if (true) {
|
||||
break;
|
||||
}
|
||||
} else if (CPLib.ne(m_cLastMsgError,"")) {
|
||||
m_bError = true;
|
||||
}
|
||||
// * --- Insert into LOGAUT from values
|
||||
m_Sql.RequireTransaction();
|
||||
m_cServer = m_Ctx.GetServer("LOGAUT");
|
||||
m_cPhName = m_Ctx.GetPhName("LOGAUT");
|
||||
m_oWrInfo = CPPhTableWrInfo.GetCPPhTableWrInfo(m_Ctx,"LOGAUT",m_Ctx.GetCompany());
|
||||
m_oParameters = CPLib.GetParamsForSqlUpdate(m_cServer);
|
||||
m_cSql = CPLib.GetSQLPrefixComment("pi_fapprova",5,"0000000C")+CPLib.InsertIntoStatement(m_Ctx,m_oWrInfo)+" (";
|
||||
m_cSql = m_cSql+GetFieldsName_0000000C(m_Ctx,m_oWrInfo);
|
||||
m_cSql = m_cSql+") values (";
|
||||
m_cSql = m_cSql+""+CPLib.ToSQL(x.AZIENDA,"?",0,0,m_cServer)+", ";
|
||||
m_cSql = m_cSql+""+CPLib.ToSQL(x.MVSERIAL,"?",0,0,m_cServer)+", ";
|
||||
m_cSql = m_cSql+""+CPLib.ToSQL(Utilities.Make(m_Ctx,m_Caller).UserCode(),"?",0,0,m_cServer)+", ";
|
||||
m_cSql = m_cSql+m_oWrInfo.InsertValues();
|
||||
m_cSql = CPLib.AddCPCCCHKValue(m_Ctx,m_cSql,"LOGAUT",true);
|
||||
m_cSql = m_cSql+")";
|
||||
m_nUpdatedRows = m_Sql.Update(m_cServer,m_cSql,m_oParameters);
|
||||
if (CPLib.lt(m_nUpdatedRows,0)) {
|
||||
m_Sql.AbortTransaction();
|
||||
}
|
||||
m_Sql.CompleteTransaction();
|
||||
m_cLastMsgError = m_Sql.TransactionErrorMessage();
|
||||
if (CPLib.ne(m_cLastMsgError,"")) {
|
||||
m_bError = true;
|
||||
}
|
||||
/* Case x.AZIENDA="FCONN" */
|
||||
} else if (CPLib.eqr(x.AZIENDA,"FCONN")) {
|
||||
// * --- Write into FCONNDOC_MAST from values
|
||||
m_Sql.RequireTransaction();
|
||||
m_cServer = m_Ctx.GetServer("FCONNDOC_MAST");
|
||||
m_cPhName = m_Ctx.GetPhName("FCONNDOC_MAST");
|
||||
m_oWrInfo = CPPhTableWrInfo.GetCPPhTableWrInfo(m_Ctx,"FCONNDOC_MAST",m_Ctx.GetCompany());
|
||||
m_oParameters = CPLib.GetParamsForSqlUpdate(m_cServer);
|
||||
m_cSql = CPLib.GetSQLPrefixComment("pi_fapprova",5,"0000000D")+"Update "+m_oWrInfo.GetTableWriteName()+" set ";
|
||||
m_cSql = m_cSql+"MVFLPROV = "+CPLib.ToSQL("N","C",1,0,m_cServer)+", ";
|
||||
m_cSql = CPLib.AddCPCCCHKUpdate(m_Ctx,m_cSql,"FCONNDOC_MAST",false,true);
|
||||
m_cSql = m_cSql+" where ";
|
||||
m_cSql = m_cSql+"MVSERIAL = "+CPSql.SQLValueAdapter(CPLib.ToSQL(x.MVSERIAL,"?",0,0,m_cServer),m_cServer,x.MVSERIAL)+"";
|
||||
m_cSql = m_cSql+m_oWrInfo.WhereFilter();
|
||||
m_nUpdatedRows = m_Sql.Update(m_cServer,m_cSql,m_oParameters);
|
||||
if (CPLib.lt(m_nUpdatedRows,0)) {
|
||||
m_nUpdatedRows = 0;
|
||||
}
|
||||
m_Sql.CompleteTransaction();
|
||||
m_cLastMsgError = m_Sql.TransactionErrorMessage();
|
||||
if (CPLib.lt(m_nUpdatedRows,1)) {
|
||||
// No rows updated
|
||||
/* res := "Errore approvazione ordine"+ x.AZIENDA+x.MVSERIAL */
|
||||
res = "Errore approvazione ordine"+x.AZIENDA+x.MVSERIAL;
|
||||
// Exit Loop
|
||||
if (true) {
|
||||
break;
|
||||
}
|
||||
} else if (CPLib.ne(m_cLastMsgError,"")) {
|
||||
m_bError = true;
|
||||
}
|
||||
// * --- Insert into LOGAUT from values
|
||||
m_Sql.RequireTransaction();
|
||||
m_cServer = m_Ctx.GetServer("LOGAUT");
|
||||
m_cPhName = m_Ctx.GetPhName("LOGAUT");
|
||||
m_oWrInfo = CPPhTableWrInfo.GetCPPhTableWrInfo(m_Ctx,"LOGAUT",m_Ctx.GetCompany());
|
||||
m_oParameters = CPLib.GetParamsForSqlUpdate(m_cServer);
|
||||
m_cSql = CPLib.GetSQLPrefixComment("pi_fapprova",5,"00000010")+CPLib.InsertIntoStatement(m_Ctx,m_oWrInfo)+" (";
|
||||
m_cSql = m_cSql+GetFieldsName_00000010(m_Ctx,m_oWrInfo);
|
||||
m_cSql = m_cSql+") values (";
|
||||
m_cSql = m_cSql+""+CPLib.ToSQL(x.AZIENDA,"?",0,0,m_cServer)+", ";
|
||||
m_cSql = m_cSql+""+CPLib.ToSQL(x.MVSERIAL,"?",0,0,m_cServer)+", ";
|
||||
m_cSql = m_cSql+""+CPLib.ToSQL(Utilities.Make(m_Ctx,m_Caller).UserCode(),"?",0,0,m_cServer)+", ";
|
||||
m_cSql = m_cSql+m_oWrInfo.InsertValues();
|
||||
m_cSql = CPLib.AddCPCCCHKValue(m_Ctx,m_cSql,"LOGAUT",true);
|
||||
m_cSql = m_cSql+")";
|
||||
m_nUpdatedRows = m_Sql.Update(m_cServer,m_cSql,m_oParameters);
|
||||
if (CPLib.lt(m_nUpdatedRows,0)) {
|
||||
m_Sql.AbortTransaction();
|
||||
}
|
||||
m_Sql.CompleteTransaction();
|
||||
m_cLastMsgError = m_Sql.TransactionErrorMessage();
|
||||
if (CPLib.ne(m_cLastMsgError,"")) {
|
||||
m_bError = true;
|
||||
}
|
||||
} // End Case
|
||||
/* res := "Ordine approvato" */
|
||||
res = "Ordine approvato";
|
||||
}
|
||||
/* Return res */
|
||||
throw new Stop(res);
|
||||
}
|
||||
void _init_() {
|
||||
}
|
||||
public String RunAsync(MemoryCursor_pi_qord_mast_vqr p_pDATI) {
|
||||
pDATI = p_pDATI;
|
||||
return CPAsyncRoutine.CreateAsyncAndStart(
|
||||
new CPAsyncRoutine.AsyncRunnable() {
|
||||
public void Compute(CPAsyncRoutine.AsyncResult p_oResult) {
|
||||
try {
|
||||
p_oResult.m_oResult=new Stop(Run());
|
||||
} finally {
|
||||
//evito di tenere nell'heap della virtual machine riferimenti non piu' usati
|
||||
m_Caller = null;
|
||||
m_Sql = null;
|
||||
m_Ctx = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
public String Run(MemoryCursor_pi_qord_mast_vqr p_pDATI) {
|
||||
pDATI = p_pDATI;
|
||||
return Run();
|
||||
}
|
||||
public String Run() {
|
||||
String l_result;
|
||||
l_result = "";
|
||||
m_Ctx = m_Ctx.DisabledDataFilteringVersion();
|
||||
try {
|
||||
try {
|
||||
try {
|
||||
try {
|
||||
m_bEventRunning = true;
|
||||
com.zucchetti.sitepainter.EventHandler.notifyEvent("Run start",this,m_Ctx,specificEventsHandlers,allEventsHandlers);
|
||||
} finally {
|
||||
m_bEventRunning = false;
|
||||
}
|
||||
Page_1();
|
||||
} finally {
|
||||
try {
|
||||
m_bEventRunning = true;
|
||||
com.zucchetti.sitepainter.EventHandler.notifyEvent(com.zucchetti.sitepainter.EventHandler.RUN_END,this,m_Ctx,specificEventsHandlers,allEventsHandlers);
|
||||
} finally {
|
||||
m_bEventRunning = false;
|
||||
}
|
||||
}
|
||||
} catch(Stop stop_value) {
|
||||
l_result = stop_value.GetString();
|
||||
} catch(RoutineException l_transactionRaise) {
|
||||
//non va segnalato come errore
|
||||
} catch(Exception fault) {
|
||||
l_result = "";
|
||||
CPStdCounter.Error(fault);
|
||||
CallerExImpl l_oTraceSink;
|
||||
l_oTraceSink = new CallerExImpl(m_Caller,"");
|
||||
if (l_oTraceSink.HasWorkingVar("m_cFaultTrace")) {
|
||||
if ( ! (CPLib.IsAdministrator(m_Ctx)) && m_Ctx.HasAdministeredUsers()) {
|
||||
l_oTraceSink.SetString("m_cFaultTrace","C",0,0,"MSG_ADMIN_REQUIRED");
|
||||
} else {
|
||||
l_oTraceSink.SetString("m_cFaultTrace","C",0,0,CPLib.DumpException(fault));
|
||||
}
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
m_Ctx.EnableDataFiltering();
|
||||
}
|
||||
return l_result;
|
||||
}
|
||||
public static pi_fapprovaR Make(CPContext p_Ctx, Caller p_Caller) {
|
||||
return new pi_fapprovaR(p_Ctx, p_Caller);
|
||||
}
|
||||
public static pi_fapprovaR Make(CPContext p_Ctx) {
|
||||
return new pi_fapprovaR(p_Ctx, CPSecurity.EXECUTE_ALL_ROUTINES);
|
||||
}
|
||||
public void Blank() {
|
||||
pDATI = new MemoryCursor_pi_qord_mast_vqr();
|
||||
res = CPLib.Space(0);
|
||||
}
|
||||
// * --- Area Manuale = BO - Methods
|
||||
// * --- Fine Area Manuale
|
||||
// ENTITY_VQR:
|
||||
public static final String m_cVQRList = "";
|
||||
// ENTITY_BATCHES: ,pi_fapprova,
|
||||
public static final String i_InvokedRoutines = ",pi_fapprova,";
|
||||
public static String[] m_cRunParameterNames={"pDATI"};
|
||||
protected static String GetFieldsName_00000008(CPContext p_Ctx,CPPhTableWrInfo p_oWrInfo) {
|
||||
String p_cSql = "";
|
||||
p_cSql = p_cSql+"AZIENDA,";
|
||||
p_cSql = p_cSql+"MVSERIAL,";
|
||||
p_cSql = p_cSql+"COD_UTE,";
|
||||
p_cSql = p_cSql+p_oWrInfo.InsertFields();
|
||||
p_cSql = CPLib.AddCPCCCHKName(p_Ctx,p_cSql,"LOGAUT",true);
|
||||
return p_cSql;
|
||||
}
|
||||
protected static String GetFieldsName_0000000C(CPContext p_Ctx,CPPhTableWrInfo p_oWrInfo) {
|
||||
String p_cSql = "";
|
||||
p_cSql = p_cSql+"AZIENDA,";
|
||||
p_cSql = p_cSql+"MVSERIAL,";
|
||||
p_cSql = p_cSql+"COD_UTE,";
|
||||
p_cSql = p_cSql+p_oWrInfo.InsertFields();
|
||||
p_cSql = CPLib.AddCPCCCHKName(p_Ctx,p_cSql,"LOGAUT",true);
|
||||
return p_cSql;
|
||||
}
|
||||
protected static String GetFieldsName_00000010(CPContext p_Ctx,CPPhTableWrInfo p_oWrInfo) {
|
||||
String p_cSql = "";
|
||||
p_cSql = p_cSql+"AZIENDA,";
|
||||
p_cSql = p_cSql+"MVSERIAL,";
|
||||
p_cSql = p_cSql+"COD_UTE,";
|
||||
p_cSql = p_cSql+p_oWrInfo.InsertFields();
|
||||
p_cSql = CPLib.AddCPCCCHKName(p_Ctx,p_cSql,"LOGAUT",true);
|
||||
return p_cSql;
|
||||
}
|
||||
}
|
||||
1
Libraries/DatabaseLibrary.crc
Normal file
@ -0,0 +1 @@
|
||||
-1237698696
|
||||
1
Libraries/Utilities.crc
Normal file
@ -0,0 +1 @@
|
||||
-1956689735
|
||||
288
PortalStudio/ChartObj.css
Normal file
@ -0,0 +1,288 @@
|
||||
/* SVGCHARTS - ICON FONT */
|
||||
@font-face {
|
||||
font-family: 'svgCharts';
|
||||
src: url('../chart/svgCharts.eot');
|
||||
src: url('../chart/svgCharts.eot#svgCharts') format('embedded-opentype'),
|
||||
url('chart/svgCharts.svg#svgCharts') format('svg'),
|
||||
url('chart/svgCharts.woff') format('woff'),
|
||||
url('chart/svgCharts.ttf') format('truetype');
|
||||
}
|
||||
|
||||
.ztchart_legend_icon, .ztchart_legend_icon_small {
|
||||
font-family: svgCharts;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
/*.ztchart_legend_icon_small {
|
||||
font-family: svgCharts;
|
||||
font-size: 9px;
|
||||
}*/
|
||||
|
||||
.SPPortalZoomBaseMenuFilter.global_handler::after {
|
||||
content: "\EE44";
|
||||
color: rgba(0,0,0,.93);
|
||||
font-family: icons8_win10;
|
||||
font-weight: normal;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.SPPortalZoomBaseMenuFilter.global_handler.opened::after {
|
||||
color: rgba(255,255,255,.87);
|
||||
content: "\EE44";
|
||||
color: rgba(255,255,255,.93);
|
||||
font-family: icons8_win10;
|
||||
font-weight: normal;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.SPPortalZoomBaseMenuFilter { /*!control:HamburgerMenu*/
|
||||
}
|
||||
|
||||
.SPPortalZoomBaseMenuFilter.global_handler{
|
||||
display:inline-block;
|
||||
cursor:pointer;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
padding:8px;
|
||||
}
|
||||
.SPPortalZoomBaseMenuFilter.global_handler.opened{
|
||||
}
|
||||
|
||||
.SPPortalZoomBaseMenuFilter.global_container {
|
||||
background-color:#343434;
|
||||
color:rgba(255,255,255,.93);
|
||||
position: absolute;
|
||||
display:none;
|
||||
font-family:Open Sans;
|
||||
font-weight:300;
|
||||
font-size:13px;
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
.SPPortalZoomBaseMenuFilter.global_container.tl {
|
||||
box-shadow:0 2px 5px rgba(0,0,0,0.14), 0 2px 10px 0 rgba(0,0,0,0.12);
|
||||
}
|
||||
.SPPortalZoomBaseMenuFilter.global_container.tr {
|
||||
box-shadow:-0 2px 5px rgba(0,0,0,0.14), 0 2px 10px 0 rgba(0,0,0,0.12);
|
||||
}
|
||||
.SPPortalZoomBaseMenuFilter.global_container.bl {
|
||||
box-shadow:0 2px 5px rgba(0,0,0,0.14), 0 2px 10px 0 rgba(0,0,0,0.12);
|
||||
}
|
||||
.SPPortalZoomBaseMenuFilter.global_container.br {
|
||||
box-shadow:-0 2px 5px rgba(0,0,0,0.14), 0 2px 10px 0 rgba(0,0,0,0.12);
|
||||
}
|
||||
|
||||
.SPPortalZoomBaseMenuFilter.global_container.visible {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.SPPortalZoomBaseMenuFilter_column {
|
||||
display:inline-block;
|
||||
margin:0px 25px 25px 25px;
|
||||
padding:0;
|
||||
vertical-align:top;
|
||||
-webkit-box-flex:1;
|
||||
-ms-flex:1 1 auto;
|
||||
flex:1 1 auto;
|
||||
}
|
||||
|
||||
.SPPortalZoomBaseMenuFilter_content ul {
|
||||
list-style-type:none;
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
}
|
||||
.SPPortalZoomBaseMenuFilter_content li {
|
||||
list-style:none;
|
||||
padding:4px 0px;
|
||||
white-space:nowrap;
|
||||
}
|
||||
.hoverable .SPPortalZoomBaseMenuFilter_content li:hover {
|
||||
background-color: rgba( 40, 70,120,.54);
|
||||
}
|
||||
.SPPortalZoomBaseMenuFilter_content li .item_image {
|
||||
padding:0px 3px 0px 0px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.SPPortalZoomBaseMenuFilter_content li .item_label {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.SPPortalZoomBaseMenuFilter_content li .handler::after {
|
||||
content: "\F143";
|
||||
color: rgba(255,255,255,.87);
|
||||
font-family: icons8_win10;
|
||||
font-size: 14px;
|
||||
}
|
||||
.SPPortalZoomBaseMenuFilter_content li .handler {
|
||||
}
|
||||
.SPPortalZoomBaseMenuFilter_content li .handler.opened::after {
|
||||
content: "\F146";
|
||||
color: rgba(255,255,255,.87);
|
||||
font-family: icons8_win10;
|
||||
font-size: 14px;
|
||||
}
|
||||
.SPPortalZoomBaseMenuFilter_content li .handler.opened {
|
||||
}
|
||||
|
||||
.SPPortalZoomBaseMenuFilter_content.horizontal li {
|
||||
display:inline-block;
|
||||
}
|
||||
.SPPortalZoomBaseMenuFilter_content.horizontal li img{
|
||||
}
|
||||
.SPPortalZoomBaseMenuFilter_content.vertical li {
|
||||
display:block;
|
||||
}
|
||||
.SPPortalZoomBaseMenuFilter a, .hoverable .SPPortalZoomBaseMenuFilter a:hover {
|
||||
text-decoration: none;
|
||||
width:100%;
|
||||
display:inline-block;
|
||||
color:rgba(255,255,255,.93);
|
||||
}
|
||||
|
||||
.SPPortalZoomBaseMenuFilter li.highlight_item, .hoverable .SPPortalZoomBaseMenuFilter li.highlight_item:hover{
|
||||
}
|
||||
.SPPortalZoomBaseMenuFilter li.highlight_item a, .hoverable .SPPortalZoomBaseMenuFilter li.highlight_item a:hover {
|
||||
font-weight:600;
|
||||
}
|
||||
.SPPortalZoomBaseMenuFilter li.highlight_item div, .hoverable .SPPortalZoomBaseMenuFilter li.highlight_item div:hover {
|
||||
font-weight:600;
|
||||
}
|
||||
.SPPortalZoomBaseMenuFilter_title {
|
||||
font-weight:600;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.SPPortalZoomBaseMenuFilter_container {
|
||||
display:-webkit-box;
|
||||
display:-ms-flexbox;
|
||||
display:flex;
|
||||
-ms-flex-flow: wrap row;
|
||||
flex-flow: wrap row;
|
||||
}
|
||||
.SPPortalZoomBaseMenuFilter_content .subitem_content {
|
||||
margin:0px 0px 10px 10px;
|
||||
overflow:auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
/*** DIV LOADING ***/
|
||||
.ztchartLoadingpdiv {
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
z-index: 2000;
|
||||
background-color: #FFFFFF;
|
||||
display: block;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.ztchartLoading {
|
||||
font-family: icons8_win10;
|
||||
color: #8f8f8f;
|
||||
text-rendering: auto;
|
||||
animation: ztc_spin 2s infinite linear;
|
||||
position: relative;
|
||||
float: left;
|
||||
opacity: 0.75;
|
||||
}
|
||||
.ztchartLoading::before {
|
||||
content: "\ea81";
|
||||
}
|
||||
@keyframes ztc_spin {
|
||||
0% { transform: rotate(0deg); }
|
||||
100% { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
/*
|
||||
.cLoading_div {
|
||||
position: relative;
|
||||
float: left;
|
||||
left: 33%;
|
||||
margin-top: 50%;
|
||||
height: 70px;
|
||||
bottom: 50%;
|
||||
width: 90px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.cLoading_one {
|
||||
width : 27px;
|
||||
height : 50px;
|
||||
background-color : #CDD3CE;
|
||||
float : left;
|
||||
bottom: 0;
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.cLoading_two {
|
||||
width : 27px;
|
||||
height : 30px;
|
||||
background-color : #DCDCDC;
|
||||
float : left;
|
||||
left : 30px;
|
||||
bottom: 0;
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.cLoading_three {
|
||||
width : 27px;
|
||||
height : 70px;
|
||||
background-color : #595758;
|
||||
float : left;
|
||||
left : 60px;
|
||||
bottom: 0;
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
@keyframes move {
|
||||
from {
|
||||
transform: translateY(100%);
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
transform: translateY(0);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.cLoading_one {
|
||||
animation-name: move;
|
||||
animation-duration: 1.5s;
|
||||
animation-iteration-count: infinite;
|
||||
animation-timing-function: ease-out;
|
||||
animation-delay: 0s;
|
||||
}
|
||||
|
||||
.cLoading_two {
|
||||
animation-name: move;
|
||||
animation-duration: 1.5s;
|
||||
animation-iteration-count: infinite;
|
||||
animation-timing-function: ease-out;
|
||||
animation-delay: 0.2s;
|
||||
}
|
||||
|
||||
.cLoading_three {
|
||||
animation-name: move;
|
||||
animation-duration: 1.5s;
|
||||
animation-iteration-count: infinite;
|
||||
animation-timing-function: ease-out;
|
||||
animation-delay: 0.4s;
|
||||
}
|
||||
*/
|
||||
.maskFrameCancelBtn:after{
|
||||
font-family: svgCharts;
|
||||
font-size: 20px;
|
||||
color: rgba(0, 0, 0, .87);
|
||||
content: "\ed93";
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
.maskFrame {
|
||||
background-color: rgba(255, 255, 255, 0.4);
|
||||
}
|
||||
|
||||
.maskFrameTransparent {
|
||||
background-color: transparent;
|
||||
}
|
||||
653
PortalStudio/ChartObj.js
Normal file
@ -0,0 +1,653 @@
|
||||
/* exported getQueryParams expressionReturn languageConfigurations getObjConfigFromChartCtrl
|
||||
getChartConfigFromChartCtrl xPhantomMakeMySvg VQRNameReturn
|
||||
*/
|
||||
function getFieldDescription(queryName,valueFields){
|
||||
var l_oFields = getQueryFields(queryName);
|
||||
var myArray=[];
|
||||
if (l_oFields){
|
||||
for (var i = 0; i < l_oFields.length; i++) {
|
||||
var alias = l_oFields[i].alias;
|
||||
var desc = l_oFields[i].desc;
|
||||
if(Empty(desc))
|
||||
desc=alias;
|
||||
if(valueFields.indexOf(alias)>=0){
|
||||
myArray[valueFields.indexOf(alias)]=desc;
|
||||
}
|
||||
}
|
||||
}
|
||||
return myArray.toString();
|
||||
}
|
||||
function getQueryFields(queryName){
|
||||
if (Empty(queryName))
|
||||
return [];
|
||||
var AllField = new JSURL("../servlet/SPVZMProxy?action=vqr_fields&vqr=" + queryName + "&offlineMode=false+&table=" + queryName, true);
|
||||
AllField = AllField.Response();
|
||||
if (!Empty(AllField)) {
|
||||
try {
|
||||
return eval(AllField);
|
||||
}
|
||||
catch (e) {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
else
|
||||
return [];
|
||||
}
|
||||
function getQueryParams(pvals){
|
||||
var retp = "";
|
||||
if (Empty(pvals))
|
||||
return retp;
|
||||
var pobj = JSON.parse(pvals);
|
||||
for (var key in pobj) {
|
||||
retp += (key + "=" + pobj[key] + ",");
|
||||
}
|
||||
return retp.substring(0, retp.length - 1);
|
||||
}
|
||||
function expressionReturn(id,value/*,pars,toolList*/){
|
||||
if (id) {
|
||||
var el = document.getElementById(id);
|
||||
if (el) {
|
||||
el.value = value;
|
||||
el.blur();
|
||||
el.focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// polyfill per phantomjs o codice non supportato - ripresa da stdFunc
|
||||
if (typeof window.Object.assign != 'function') {
|
||||
window.Object.assign = function (target) {
|
||||
'use strict';
|
||||
if (target == null) {
|
||||
throw new TypeError('Cannot convert undefined or null to object');
|
||||
}
|
||||
|
||||
target = Object(target);
|
||||
for (var index = 1; index < arguments.length; index++) {
|
||||
var source = arguments[index];
|
||||
if (source != null) {
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return target;
|
||||
};
|
||||
}
|
||||
|
||||
var languageConfigurations = function (lang) {
|
||||
var vocal_i_gr = String.fromCharCode(0xec),
|
||||
vocal_e_ac = String.fromCharCode(0xe9),
|
||||
vocal_u_ci = String.fromCharCode(0xfb),
|
||||
vocal_a_ac = String.fromCharCode(0xe1),
|
||||
vocal_a_di = String.fromCharCode(0xe4),
|
||||
euro = String.fromCharCode(0x20ac),
|
||||
dollar = String.fromCharCode(0x24),
|
||||
pound = String.fromCharCode(0xa3),
|
||||
englishFormatLocale = {
|
||||
formatLocale: {
|
||||
decimal: ".",
|
||||
thousands: ",",
|
||||
grouping: [3]
|
||||
},
|
||||
timeFormatLocale: {
|
||||
periods: ["AM", "PM"],
|
||||
days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
|
||||
shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
||||
months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
|
||||
shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
|
||||
},
|
||||
csvSeparator: ","
|
||||
},
|
||||
europeFormatLocale = {
|
||||
formatLocale: {
|
||||
decimal: ",",
|
||||
thousands: ".",
|
||||
grouping: [3]
|
||||
},
|
||||
timeFormatLocale: {
|
||||
date: "%d/%m/%Y",
|
||||
time: "%H:%M:%S",
|
||||
periods: ["", ""]
|
||||
},
|
||||
csvSeparator: ";"
|
||||
},
|
||||
configs = {};
|
||||
|
||||
configs.usa = {};
|
||||
configs.usa.formatLocale = Object.assign({ currency: [dollar, ""] }, englishFormatLocale.formatLocale);
|
||||
configs.usa.timeFormatLocale = Object.assign({
|
||||
dateTime: "%x, %X",
|
||||
date: "%-m/%-d/%Y",
|
||||
time: "%-I:%M:%S %p"
|
||||
}, englishFormatLocale.timeFormatLocale);
|
||||
configs.usa.csvSeparator = englishFormatLocale.csvSeparator;
|
||||
|
||||
configs.eng = {};
|
||||
configs.eng.formatLocale = Object.assign({ currency: [pound, ""] }, englishFormatLocale.formatLocale);
|
||||
configs.eng.timeFormatLocale = Object.assign({
|
||||
dateTime: "%a %e %b %X %Y",
|
||||
date: "%d/%m/%Y",
|
||||
time: "%H:%M:%S"
|
||||
}, englishFormatLocale.timeFormatLocale);
|
||||
configs.eng.csvSeparator = englishFormatLocale.csvSeparator;
|
||||
|
||||
configs.ita = {};
|
||||
configs.ita.formatLocale = Object.assign({ currency: [euro, ""] }, europeFormatLocale.formatLocale);
|
||||
configs.ita.timeFormatLocale = Object.assign({
|
||||
dateTime: "%A %e %B %Y, %X",
|
||||
days: ["Domenica", "Luned" + vocal_i_gr, "Marted" + vocal_i_gr, "Mercoled" + vocal_i_gr, "Gioved" + vocal_i_gr, "Venerd" + vocal_i_gr, "Sabato"],
|
||||
shortDays: ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"],
|
||||
months: ["Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"],
|
||||
shortMonths: ["Gen", "Feb", "Mar", "Apr", "Mag", "Giu", "Lug", "Ago", "Set", "Ott", "Nov", "Dic"]
|
||||
}, europeFormatLocale.timeFormatLocale);
|
||||
configs.ita.csvSeparator = europeFormatLocale.csvSeparator;
|
||||
|
||||
configs.fra = {}
|
||||
configs.fra.formatLocale = Object.assign({ currency: ["", euro] }, europeFormatLocale.formatLocale);
|
||||
configs.fra.timeFormatLocale = Object.assign({
|
||||
dateTime: "%A, le %e %B %Y, %X",
|
||||
days: ["dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"],
|
||||
shortDays: ["dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."],
|
||||
months: ["janvier", "f"+vocal_e_ac+"vrier", "mars", "avril", "mai", "juin", "juillet", "ao"+vocal_u_ci+"t", "septembre", "octobre", "novembre", "d"+vocal_e_ac+"cembre"],
|
||||
shortMonths: ["janv.", "f"+vocal_e_ac+"vr.", "mars", "avr.", "mai", "juin", "juil.", "ao"+vocal_u_ci+"t", "sept.", "oct.", "nov.", "d"+vocal_e_ac+"c."]
|
||||
}, europeFormatLocale.timeFormatLocale);
|
||||
configs.fra.formatLocale.thousands = " ";
|
||||
configs.fra.csvSeparator = europeFormatLocale.csvSeparator;
|
||||
|
||||
configs.spa = {}
|
||||
configs.spa.formatLocale = Object.assign({ currency: ["", euro] }, europeFormatLocale.formatLocale);
|
||||
configs.spa.timeFormatLocale = Object.assign({
|
||||
dateTime: "%A, %e de %B de %Y, %X",
|
||||
days: ["domingo", "lunes", "martes", "mi"+vocal_e_ac+"rcoles", "jueves", "viernes", "s"+vocal_a_ac+"bado"],
|
||||
shortDays: ["dom", "lun", "mar", "mi"+vocal_e_ac, "jue", "vie", "s"+vocal_a_ac+"b"],
|
||||
months: ["enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"],
|
||||
shortMonths: ["ene", "feb", "mar", "abr", "may", "jun", "jul", "ago", "sep", "oct", "nov", "dic"]
|
||||
}, europeFormatLocale.timeFormatLocale);
|
||||
configs.spa.csvSeparator = europeFormatLocale.csvSeparator;
|
||||
|
||||
configs.deu = {}
|
||||
configs.deu.formatLocale = Object.assign({ currency: ["", euro] }, europeFormatLocale.formatLocale);
|
||||
configs.deu.timeFormatLocale = Object.assign({
|
||||
dateTime: "%A, der %e. %B %Y, %X",
|
||||
days: ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"],
|
||||
shortDays: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"],
|
||||
months: ["Januar", "Februar", "M"+vocal_a_di+"rz", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"],
|
||||
shortMonths: ["Jan", "Feb", "Mrz", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"]
|
||||
}, europeFormatLocale.timeFormatLocale);
|
||||
configs.deu.timeFormatLocale.date = "%d.%m.%Y";
|
||||
configs.deu.csvSeparator = europeFormatLocale.csvSeparator;
|
||||
|
||||
configs.ned = {}
|
||||
configs.ned.formatLocale = Object.assign({ currency: [euro, ""] }, europeFormatLocale.formatLocale);
|
||||
configs.ned.timeFormatLocale = Object.assign({
|
||||
dateTime: "%a %e %B %Y %T",
|
||||
days: ["zondag", "maandag", "dinsdag", "woensdag", "donderdag", "vrijdag", "zaterdag"],
|
||||
shortDays: ["zo", "ma", "di", "wo", "do", "vr", "za"],
|
||||
months: ["januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"],
|
||||
shortMonths: ["jan", "feb", "mrt", "apr", "mei", "jun", "jul", "aug", "sep", "okt", "nov", "dec"]
|
||||
}, europeFormatLocale.timeFormatLocale);
|
||||
configs.ned.timeFormatLocale.date = "%d-%m-%Y";
|
||||
configs.ned.csvSeparator = europeFormatLocale.csvSeparator;
|
||||
|
||||
return configs[lang];
|
||||
}
|
||||
|
||||
function getObjConfigFromChartCtrl(chctrl, usectrl) {
|
||||
var i, retObjConfig,
|
||||
myQuery;
|
||||
if (usectrl)
|
||||
retObjConfig = chctrl.objConfig;
|
||||
else
|
||||
retObjConfig = {};
|
||||
|
||||
if (chctrl.gendataset)
|
||||
myQuery = chctrl.query;
|
||||
else
|
||||
myQuery = chctrl.datasource.cmd;
|
||||
|
||||
var updfields = false;
|
||||
if (!Empty(chctrl.ctype)) {
|
||||
switch (chctrl.ctype) {
|
||||
case "VORONOI":
|
||||
retObjConfig.labelField = chctrl.voro_cat;
|
||||
retObjConfig.valueFields = chctrl.voro_coords;
|
||||
retObjConfig.labelSeries = chctrl.voro_class;
|
||||
updfields = true;
|
||||
break;
|
||||
case "PCOORDS":
|
||||
retObjConfig.keyField = chctrl.sfield;
|
||||
retObjConfig.labelField = chctrl.sfieldlabel;
|
||||
retObjConfig.valueFields = chctrl.value_fields;
|
||||
retObjConfig.labelSeries = chctrl.label_series;
|
||||
updfields = true;
|
||||
break;
|
||||
case "RINGPERC":
|
||||
retObjConfig.keyField = chctrl.labelKey_field;
|
||||
retObjConfig.labelField = chctrl.label_field;
|
||||
retObjConfig.valueFields = chctrl.val_field;
|
||||
retObjConfig.maxFields = chctrl.max_field;
|
||||
updfields = true;
|
||||
break;
|
||||
case "ASTER":
|
||||
retObjConfig.labelSeries = chctrl.xyz_series_field;
|
||||
retObjConfig.valueFields = chctrl.y_field;
|
||||
retObjConfig.labelField = chctrl.x_field;
|
||||
if (!Empty(chctrl.xKey_field))
|
||||
retObjConfig.keyField = chctrl.xKey_field;
|
||||
retObjConfig.minFields = chctrl.min_field;
|
||||
retObjConfig.maxFields = chctrl.max_field;
|
||||
updfields = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!updfields) {
|
||||
var ctype = chctrl.chartType || chctrl.chart_type;
|
||||
switch (ctype) {
|
||||
case 'xyz' :
|
||||
retObjConfig.labelSeries = chctrl.xyz_series_field;
|
||||
retObjConfig.valueFields = chctrl.y_field + (Empty(chctrl.z_field) ? "" : "," + chctrl.z_field);
|
||||
retObjConfig.labelField = chctrl.x_field;
|
||||
if (!Empty(chctrl.xKey_field))
|
||||
retObjConfig.keyField = chctrl.xKey_field;
|
||||
break;
|
||||
case 'geo':
|
||||
retObjConfig.geoFields = chctrl.geo_0_field + (Empty(chctrl.geo_1_field) ? "" : "," + chctrl.geo_1_field);
|
||||
retObjConfig.labelField = chctrl.geo_dom_field;
|
||||
retObjConfig.valueFields = chctrl.geo_value_field;
|
||||
retObjConfig.geoOpts = {};
|
||||
retObjConfig.geoOpts.typeView = chctrl.geo_view_select;
|
||||
retObjConfig.geoOpts.view = chctrl.geo_view;
|
||||
if (chctrl.geo_view_select == "2")
|
||||
retObjConfig.geoOpts.level = chctrl.geo_level_2;
|
||||
else if (chctrl.geo_view_select == "3")
|
||||
retObjConfig.geoOpts.level = chctrl.geo_level_3;
|
||||
else
|
||||
retObjConfig.geoOpts.level = chctrl.geo_level;
|
||||
retObjConfig.geoOpts.onlyData = CharToBool("" + chctrl.geo_onlydata);
|
||||
if (!Empty(chctrl.markers_dataobj)) {
|
||||
retObjConfig.geoOpts.markers = {};
|
||||
retObjConfig.geoOpts.markers.lat = chctrl.markers_lat;
|
||||
retObjConfig.geoOpts.markers.lng = chctrl.markers_lng;
|
||||
retObjConfig.geoOpts.markers.desc = chctrl.markers_desc;
|
||||
retObjConfig.geoOpts.markers.key = chctrl.markers_key;
|
||||
retObjConfig.geoOpts.markers.type = parseInt(chctrl.markers_type);
|
||||
}
|
||||
retObjConfig.zooming = {};
|
||||
break;
|
||||
case 'hie' :
|
||||
retObjConfig.labelField = chctrl.fieldpath;
|
||||
retObjConfig.valueFields = chctrl.fieldvalue;
|
||||
retObjConfig.keyField = chctrl.keyfieldpath;
|
||||
/*retObjConfig.labelSeries = chctrl.sfield;
|
||||
if (!Empty(chctrl.sfieldlabel))
|
||||
retObjConfig.labelSeries = chctrl.sfieldlabel;*/
|
||||
break;
|
||||
case 'dep' :
|
||||
retObjConfig.labelField = chctrl.depfield_1 + "," + chctrl.depfield_2;
|
||||
retObjConfig.valueFields = chctrl.depvalue;
|
||||
retObjConfig.labelSeries = "";
|
||||
if (!Empty(chctrl.depfield_1label) && !Empty(chctrl.depfield_2label))
|
||||
retObjConfig.labelSeries = chctrl.depfield_1label + "," + chctrl.depfield_2label;
|
||||
retObjConfig.fieldClass = "";
|
||||
if (!Empty(chctrl.depfield_1class) && !Empty(chctrl.depfield_2class))
|
||||
retObjConfig.fieldClass = chctrl.depfield_1class + "," + chctrl.depfield_2class;
|
||||
break;
|
||||
case "classif" :
|
||||
retObjConfig.labelSeries = chctrl.class_label;
|
||||
retObjConfig.keyField = chctrl.class_key;
|
||||
retObjConfig.xValues = "";
|
||||
if (!Empty(chctrl.class_xfrom))
|
||||
retObjConfig.xValues += chctrl.class_xfrom;
|
||||
if (!Empty(chctrl.class_xto)) {
|
||||
if (!Empty(retObjConfig.xValues))
|
||||
retObjConfig.xValues += ",";
|
||||
retObjConfig.xValues += chctrl.class_xto;
|
||||
}
|
||||
retObjConfig.yValues = "";
|
||||
if (!Empty(chctrl.class_yfrom))
|
||||
retObjConfig.yValues += chctrl.class_yfrom;
|
||||
if (!Empty(chctrl.class_yto)) {
|
||||
if (!Empty(retObjConfig.yValues))
|
||||
retObjConfig.yValues += ",";
|
||||
retObjConfig.yValues += chctrl.class_yto;
|
||||
}
|
||||
retObjConfig.labelField = chctrl.class_cat;
|
||||
retObjConfig.valueFields = chctrl.class_xval;
|
||||
retObjConfig.valueFields += ";";
|
||||
retObjConfig.valueFields += chctrl.class_yval;
|
||||
/*if (!Empty(chctrl.class_zval)) {
|
||||
if (!Empty(retObjConfig.valueFields))
|
||||
retObjConfig.valueFields += ",";
|
||||
retObjConfig.valueFields += chctrl.class_zval;
|
||||
}*/
|
||||
retObjConfig.labelFieldKey = chctrl.class_keycat;
|
||||
retObjConfig.classField = chctrl.class_cfield;
|
||||
break;
|
||||
default :
|
||||
retObjConfig.labelField = chctrl.label_field;
|
||||
retObjConfig.valueFields = chctrl.value_fields;
|
||||
retObjConfig.labelSeries = chctrl.label_series;
|
||||
if (Empty(retObjConfig.labelSeries))
|
||||
retObjConfig.labelSeries = getFieldDescription(myQuery, retObjConfig.valueFields.split(","));
|
||||
if (!Empty(chctrl.labelKey_field))
|
||||
retObjConfig.keyField = chctrl.labelKey_field;
|
||||
|
||||
if (ctype == 'measure') {
|
||||
retObjConfig.minFields = chctrl.min_field;
|
||||
retObjConfig.maxFields = chctrl.max_field;
|
||||
}
|
||||
|
||||
if (chctrl.label_field.split(",").length > 1)
|
||||
retObjConfig.concatDomain = true;
|
||||
|
||||
if (!Empty(chctrl.labelKey_field) && chctrl.labelKey_field.split(",").length > 1)
|
||||
retObjConfig.concatKey = true;
|
||||
|
||||
if (!Empty(chctrl.sfield)) {
|
||||
retObjConfig.valueFields = chctrl.dynSeries;
|
||||
retObjConfig.labelSeries = chctrl.dynSeries;
|
||||
if (!Empty(chctrl.sfieldlabel))
|
||||
retObjConfig.labelSeries = chctrl.labeldynSeries;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
retObjConfig.title = chctrl.title;
|
||||
if (chctrl.value_labels == "0" || !chctrl.value_labels || chctrl.value_labels == "hide")
|
||||
retObjConfig.valueLabels = false;
|
||||
else if (chctrl.value_labels != "default" && !Empty(chctrl.value_labels))
|
||||
retObjConfig.valueLabels = true;
|
||||
if (chctrl.data_order != 'default')
|
||||
retObjConfig.dataOrder = chctrl.data_order;
|
||||
retObjConfig.multiDimensionalKeyStart = chctrl.key_start;
|
||||
retObjConfig.enableChangeOrder = chctrl.enable_change_order;
|
||||
retObjConfig.otherChart = chctrl.other_chart;
|
||||
retObjConfig.downloadFormat = chctrl.downloadlist;
|
||||
retObjConfig.multiDimensionalStartAnimation = chctrl.multi_autochange;
|
||||
retObjConfig.titleSeries = chctrl.titleSeries;
|
||||
if (!Empty(chctrl.focuskey))
|
||||
retObjConfig.focusKey = chctrl.focuskey;
|
||||
retObjConfig.menuPosition = chctrl.menuPosition;
|
||||
if (!Empty(chctrl.othlimits) || !Empty(chctrl.othfunc)) {
|
||||
retObjConfig.dataOthers = {};
|
||||
if (!Empty(chctrl.othmenu))
|
||||
retObjConfig.dataOthers.menu = CharToBool("" + chctrl.othmenu);
|
||||
else
|
||||
retObjConfig.dataOthers.menu = true;
|
||||
retObjConfig.dataOthers.desc = chctrl.othlabel;
|
||||
retObjConfig.dataOthers.value = [];
|
||||
retObjConfig.dataOthers.isPerc = [];
|
||||
if (!Empty(chctrl.othlimits)) {
|
||||
var mval = chctrl.othlimits.split(",");
|
||||
for(i = 0; i < mval.length; i++) {
|
||||
if (mval[i].indexOf("%") >= 0)
|
||||
retObjConfig.dataOthers.isPerc.push(true);
|
||||
else
|
||||
retObjConfig.dataOthers.isPerc.push(false);
|
||||
retObjConfig.dataOthers.value.push(parseFloat(mval[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
retObjConfig.multidimFixedScale = chctrl.multi_scale;
|
||||
if (!Empty(chctrl.chartW) || !Empty(chctrl.chartH))
|
||||
retObjConfig.scrollView = true;
|
||||
else
|
||||
retObjConfig.scrollView = false;
|
||||
if (chctrl.typecondform == "default") {
|
||||
if (!Empty(chctrl.rangebands))
|
||||
retObjConfig.rangeBands = getRangeBandsObj(chctrl.rangebands);
|
||||
}
|
||||
else if (!Empty(chctrl.rangefunc))
|
||||
retObjConfig.rangeBands = "function";
|
||||
|
||||
retObjConfig.enableMenuSelections = chctrl.enable_menu_sel;
|
||||
retObjConfig.exportFileName = chctrl.exportFileName;
|
||||
var mprop, mobj, mp;
|
||||
|
||||
if (ctype == "dep") {
|
||||
if (!Empty(chctrl.depclass)) {
|
||||
mprop = chctrl.depclass.split("|");
|
||||
mobj = {};
|
||||
for (i = 0; i < mprop.length; i++) {
|
||||
mp = mprop[i].split(";");
|
||||
mobj[mp[0]] = {};
|
||||
mobj[mp[0]].type = mp[1];
|
||||
mobj[mp[0]].color = mp[2] || "";
|
||||
}
|
||||
retObjConfig.mapSeries = mobj;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!Empty(chctrl.mapSeries)) {
|
||||
mprop = chctrl.mapSeries.split("|");
|
||||
mobj = {};
|
||||
for (i = 0; i < mprop.length; i++) {
|
||||
mp = mprop[i].split(";");
|
||||
mobj[mp[0]] = {};
|
||||
mobj[mp[0]].type = mp[1];
|
||||
mobj[mp[0]].ownerScale = CharToBool(mp[2] + "") || false;
|
||||
}
|
||||
retObjConfig.mapSeries = mobj;
|
||||
}
|
||||
}
|
||||
|
||||
retObjConfig.zoomFilter = chctrl.zoomFilter;
|
||||
retObjConfig.manualScale = CharToBool(chctrl.manualScale + "");
|
||||
retObjConfig.compactChart = chctrl.compactChart;
|
||||
retObjConfig.domainAsString = CharToBool(chctrl.domain_type + "");
|
||||
retObjConfig.subAxis = CharToBool(chctrl.class_subaxis + "");
|
||||
retObjConfig.enableGrid = CharToBool(chctrl.grid_chart + "");
|
||||
retObjConfig.fieldsGrid = chctrl.grch_fields;
|
||||
// titoli colonne griglia
|
||||
retObjConfig.labelsGrid = {};
|
||||
switch (chctrl.chart_type) {
|
||||
case "xyz":
|
||||
case "geo":
|
||||
if (!Empty(chctrl.grch_key))
|
||||
retObjConfig.labelsGrid.key = chctrl.grch_key;
|
||||
if (!Empty(chctrl.grch_serie))
|
||||
retObjConfig.labelsGrid.serie = chctrl.grch_serie;
|
||||
if (!Empty(chctrl.grch_values))
|
||||
retObjConfig.labelsGrid.values = chctrl.grch_values;
|
||||
break;
|
||||
case "hie":
|
||||
case "dep":
|
||||
if (!Empty(chctrl.grch_key))
|
||||
retObjConfig.labelsGrid.key = chctrl.grch_key;
|
||||
if (!Empty(chctrl.grch_values))
|
||||
retObjConfig.labelsGrid.values = chctrl.grch_values;
|
||||
break;
|
||||
case "classif":
|
||||
if (!Empty(chctrl.grch_key))
|
||||
retObjConfig.labelsGrid.key = chctrl.grch_key;
|
||||
if (!Empty(chctrl.grch_domain))
|
||||
retObjConfig.labelsGrid.domain = chctrl.grch_domain;
|
||||
if (!Empty(chctrl.grch_serie))
|
||||
retObjConfig.labelsGrid.serie = chctrl.grch_serie;
|
||||
if (!Empty(chctrl.grch_values))
|
||||
retObjConfig.labelsGrid.values = chctrl.grch_values;
|
||||
break;
|
||||
default:
|
||||
if (!Empty(chctrl.grch_key))
|
||||
retObjConfig.labelsGrid.key = chctrl.grch_key;
|
||||
if (!Empty(chctrl.grch_domain))
|
||||
retObjConfig.labelsGrid.domain = chctrl.grch_domain;
|
||||
if (!Empty(chctrl.grch_values))
|
||||
retObjConfig.labelsGrid.values = chctrl.grch_values;
|
||||
break;
|
||||
}
|
||||
|
||||
retObjConfig.language = chctrl.language || "";
|
||||
return retObjConfig;
|
||||
}
|
||||
|
||||
function getChartConfigFromChartCtrl(chctrl, chconfig) {
|
||||
var retChartConfig = Empty(chconfig) ? {} : chconfig,
|
||||
chartType = chctrl.chart_type || chctrl.chartType;
|
||||
if (!retChartConfig.globalSettings.titles[2])
|
||||
retChartConfig.globalSettings.titles[2] = {};
|
||||
if (!chctrl.dontOverwrite) {
|
||||
retChartConfig.globalSettings.titles[0].text = chctrl.title;
|
||||
retChartConfig.globalSettings.titles[1].text = chctrl.titleSeries;
|
||||
retChartConfig.globalSettings.titles[2].text = chctrl.subtitle;
|
||||
if (chctrl.legend != "a" && chctrl.legend != "default" && !Empty(chctrl.legend))
|
||||
retChartConfig.globalSettings.titles[1].position = chctrl.legend;
|
||||
retChartConfig.graphSettings.axisLabel.xLabel = chctrl.x_label;
|
||||
retChartConfig.graphSettings.axisLabel.yLabel = chctrl.y_label;
|
||||
retChartConfig.graphSettings.axisLabel.percentLabel = chctrl.percent_label;
|
||||
}
|
||||
|
||||
if (parseFloat(chctrl.min_value) != null && !isNaN(parseFloat(chctrl.min_value))) {
|
||||
if (chartType == "measure")
|
||||
retChartConfig.graphSettings.tickAxis.minValue = parseFloat(chctrl.min_value);
|
||||
else
|
||||
retChartConfig.graphSettings.valueAxis.minValue = parseFloat(chctrl.min_value);
|
||||
}
|
||||
if (parseFloat(chctrl.max_value) != null && !isNaN(parseFloat(chctrl.max_value))) {
|
||||
if(chartType == "measure")
|
||||
retChartConfig.graphSettings.tickAxis.maxValue = parseFloat(chctrl.max_value);
|
||||
else
|
||||
retChartConfig.graphSettings.valueAxis.maxValue = parseFloat(chctrl.max_value);
|
||||
}
|
||||
if (parseFloat(chctrl.tick_unit) != null)
|
||||
retChartConfig.graphSettings.valueAxis.tick = parseFloat(chctrl.tick_unit);
|
||||
if (!Empty(chctrl.chartW))
|
||||
retChartConfig.globalSettings.width = parseFloat(chctrl.chartW);
|
||||
if (!Empty(chctrl.chartH))
|
||||
retChartConfig.globalSettings.height = parseFloat(chctrl.chartH);
|
||||
if (!Empty(chctrl.legendlimit)){
|
||||
if (chctrl.legendlimit.indexOf("%") >= 0)
|
||||
retChartConfig.globalSettings.titles[1].limitUnitPerc = true;
|
||||
else
|
||||
retChartConfig.globalSettings.titles[1].limitUnitPerc = false;
|
||||
retChartConfig.globalSettings.titles[1].showLegendButtonWhen = parseFloat(chctrl.legendlimit);
|
||||
}
|
||||
if (chctrl.elanimate != "default")
|
||||
retChartConfig.graphSettings.animate = chctrl.elanimate == "enable" ? true : false;
|
||||
if (parseFloat(chctrl.danimation) != null && !isNaN(parseFloat(chctrl.danimation)))
|
||||
retChartConfig.graphSettings.durationAnimation = parseFloat(chctrl.danimation);
|
||||
if (chctrl.ctooltip != "default" && !Empty(chctrl.ctooltip))
|
||||
retChartConfig.graphSettings.chartTooltips = chctrl.ctooltip;
|
||||
// time
|
||||
if (!Empty(chctrl.dateformat))
|
||||
retChartConfig.graphSettings.time.format = chctrl.dateformat;
|
||||
if (!Empty(chctrl.tcustformat))
|
||||
retChartConfig.graphSettings.time.customFormat = chctrl.tcustformat;
|
||||
if (!Empty(chctrl.tdomainunit))
|
||||
retChartConfig.graphSettings.time.unit = chctrl.tdomainunit;
|
||||
if (!Empty(chctrl.tdomainvalue))
|
||||
retChartConfig.graphSettings.time.value = chctrl.tdomainvalue;
|
||||
if (!Empty(chctrl.dataload_datelimit))
|
||||
retChartConfig.graphSettings.time.dateLimit = chctrl.dataload_datelimit;
|
||||
retChartConfig.graphSettings.time.dataType = chctrl.datatype;
|
||||
retChartConfig.graphSettings.time.missingData = chctrl.missval;
|
||||
retChartConfig.graphSettings.time.holesStep = chctrl.discunit;
|
||||
retChartConfig.graphSettings.time.holesStepValue = parseFloat(chctrl.discval);
|
||||
// multidimensional
|
||||
if (retChartConfig.graphSettings.multiDimensional) {
|
||||
retChartConfig.graphSettings.multiDimensional.multiDim = /*chctrl.ismulti*/ chctrl.vmode == "mdim";
|
||||
retChartConfig.graphSettings.multiDimensional.cursorType = chctrl.cursorType;
|
||||
retChartConfig.graphSettings.multiDimensional.position = chctrl.cursorPosition;
|
||||
retChartConfig.graphSettings.multiDimensional.alignment = chctrl.cursorAlignment;
|
||||
retChartConfig.graphSettings.multiDimensional.subdivision = chctrl.multisubdivision;
|
||||
retChartConfig.graphSettings.multiDimensional.subdivisionHeight = chctrl.multisubheight;
|
||||
retChartConfig.graphSettings.multiDimensional.axis.color = chctrl.ccolor;
|
||||
retChartConfig.graphSettings.multiDimensional.axis.stroke = chctrl.cstroke;
|
||||
}
|
||||
if (parseFloat(chctrl.vaxis_precision) != null && !isNaN(parseFloat(chctrl.vaxis_precision)))
|
||||
retChartConfig.graphSettings.valueAxis.precision = chctrl.vaxis_precision;
|
||||
|
||||
// retro-compatibilita' pictures su editor
|
||||
if (!CharToBool("" + retChartConfig.graphSettings.valueLabel.applyPicture)) {
|
||||
if (!Empty(chctrl.pic_prefix) || !Empty(chctrl.pic_suffix) || !Empty(chctrl.pic_cust)) {
|
||||
if (Empty(retChartConfig.globalSettings.valuepicture))
|
||||
retChartConfig.globalSettings.valuepicture = {};
|
||||
retChartConfig.graphSettings.valueLabel.applyPicture = true;
|
||||
}
|
||||
}
|
||||
if (!retChartConfig.globalSettings.valuepicture)
|
||||
retChartConfig.globalSettings.valuepicture = {};
|
||||
if (!Empty(chctrl.pic_prefix))
|
||||
retChartConfig.globalSettings.valuepicture.prefix = chctrl.pic_prefix;
|
||||
if (!Empty(chctrl.pic_suffix))
|
||||
retChartConfig.globalSettings.valuepicture.suffix = chctrl.pic_suffix;
|
||||
if (!Empty(chctrl.pic_cust)) {
|
||||
if (!CharToBool("" + chctrl.pic_type))
|
||||
retChartConfig.globalSettings.valuepicture.applyFunction = true;
|
||||
retChartConfig.globalSettings.valuepicture.picture = chctrl.pic_cust;
|
||||
}
|
||||
// min max tick d.axis
|
||||
if (parseFloat(chctrl.xmin_value) != null && !isNaN(parseFloat(chctrl.xmin_value)))
|
||||
retChartConfig.graphSettings.domainAxis.minValue = parseFloat(chctrl.xmin_value);
|
||||
if (parseFloat(chctrl.xmax_value) != null && !isNaN(parseFloat(chctrl.xmax_value)))
|
||||
retChartConfig.graphSettings.domainAxis.maxValue = parseFloat(chctrl.xmax_value);
|
||||
if (parseFloat(chctrl.xtick_unit) != null)
|
||||
retChartConfig.graphSettings.domainAxis.tick = parseFloat(chctrl.xtick_unit);
|
||||
// reflines
|
||||
if (!retChartConfig.graphSettings.domainAxis.referenceLine)
|
||||
retChartConfig.graphSettings.domainAxis.referenceLine = {};
|
||||
if (parseFloat(chctrl.xrefline) != null && !isNaN(parseFloat(chctrl.xrefline)))
|
||||
retChartConfig.graphSettings.domainAxis.referenceLine.value = parseFloat(chctrl.xrefline);
|
||||
retChartConfig.graphSettings.domainAxis.referenceLine.color = chctrl.xreflinecol;
|
||||
if (!retChartConfig.graphSettings.valueAxis.referenceLine)
|
||||
retChartConfig.graphSettings.valueAxis.referenceLine = {};
|
||||
if (parseFloat(chctrl.refline) != null && !isNaN(parseFloat(chctrl.refline)))
|
||||
retChartConfig.graphSettings.valueAxis.referenceLine.value = parseFloat(chctrl.refline);
|
||||
retChartConfig.graphSettings.valueAxis.referenceLine.color = chctrl.reflinecol;
|
||||
|
||||
return retChartConfig;
|
||||
}
|
||||
|
||||
function xPhantomMakeMySvg(cconfig, oconfig, propName, propValue, divctrl){
|
||||
var ret = {};
|
||||
var chart = new ZtChart(cconfig,oconfig,propName,propValue,divctrl,"","","serverchart",null,true);
|
||||
chart.setIsStaticChart(true);
|
||||
chart.setIsPhantomJS(true);
|
||||
chart.setEnableClick(false);
|
||||
chart.setEnableClickEffect(false);
|
||||
chart.setEnableLegendClick(false);
|
||||
chart.setEnableLegendEffect(false);
|
||||
chart.setEnableExclude(false);
|
||||
if (!Empty(oconfig.language))
|
||||
chart.setLanguage(oconfig.language)
|
||||
chart.StdChart.DrawCallback();
|
||||
ret.svg = chart.getSVGString('svg');
|
||||
ret.svg = ret.svg.replaceAll('lineargradient', 'linearGradient');
|
||||
ret.svg = ret.svg.replaceAll('gradientunits', 'gradientUnits');
|
||||
ret.svg = ret.svg.replaceAll('clip-path', 'clipPath');
|
||||
ret.svg = ret.svg.replaceAll('clippath', 'clipPath');
|
||||
ret.chartId = chart.getChartId();
|
||||
if (chart.StdChart.usedFonts.indexOf("svgcharts") < 0)
|
||||
chart.StdChart.usedFonts.push("svgcharts");
|
||||
ret.fonts = chart.StdChart.usedFonts.toString();
|
||||
return JSON.stringify(ret);
|
||||
}
|
||||
|
||||
function VQRNameReturn(id,value){
|
||||
var mtext = document.getElementsByName(id)[0];
|
||||
if(mtext){
|
||||
mtext.value = value;
|
||||
mtext.focus();
|
||||
mtext.blur();
|
||||
}
|
||||
}
|
||||
|
||||
function getRangeBandsObj(rbstr){
|
||||
var tBand,minV,maxV;
|
||||
var ret = [];
|
||||
if(!Empty(rbstr)){
|
||||
var tmp = rbstr.split("|");
|
||||
for(var i=0; i<tmp.length; i++){
|
||||
tBand=tmp[i].split(";");
|
||||
minV = parseFloat(tBand[1].substring(0,tBand[1].indexOf("_")));
|
||||
maxV = parseFloat(tBand[1].substring(tBand[1].indexOf("_")+1,tBand[1].length));
|
||||
ret.push({label:tBand[0], minValue:minV, maxValue:maxV, color:tBand[2], percent:CharToBool("" + tBand[3]), imageUrl:tBand[4], iconCode:tBand[5]});
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
0
PortalStudio/Doc/empty.dir
Normal file
151
PortalStudio/FileLibrary.js
Normal file
@ -0,0 +1,151 @@
|
||||
(function() {//MakeFileLibrary
|
||||
//---Start function: Close
|
||||
function filelibrary_Close(){
|
||||
return;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: CopyDirectory
|
||||
function filelibrary_CopyDirectory(srcDir, dstDir) {
|
||||
var res = false;
|
||||
return res;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: CreateDir
|
||||
function filelibrary_CreateDir(path) {
|
||||
var res = false;
|
||||
return res;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: DeleteDirectory
|
||||
function filelibrary_DeleteDirectory(dir) {
|
||||
var res = false;
|
||||
return res;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: DeleteFile
|
||||
function filelibrary_DeleteFile(filename) {
|
||||
var res = false;
|
||||
return res;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: Eof
|
||||
function filelibrary_Eof(){
|
||||
return;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: ExistFile
|
||||
function filelibrary_ExistFile(filename) {
|
||||
var res = false;
|
||||
return res;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: FileCopy
|
||||
function filelibrary_FileCopy(source, destination) {
|
||||
var res = false;
|
||||
return res;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: GetLastModified
|
||||
function filelibrary_GetLastModified(filename) {
|
||||
return new Date()
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: GetLocation
|
||||
function filelibrary_GetLocation() {
|
||||
var res = "";
|
||||
return res;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: MoveFile
|
||||
function filelibrary_MoveFile() {
|
||||
var res = false;
|
||||
return res;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: OpenAppend
|
||||
function filelibrary_OpenAppend(filename, CharSet) {
|
||||
var res = "";
|
||||
return res;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: OpenRead
|
||||
function filelibrary_OpenRead(Name, CharSet) {
|
||||
return;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: OpenWrite
|
||||
function filelibrary_OpenWrite(Name, CharSet) {
|
||||
return;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: ReadLine
|
||||
function filelibrary_ReadLine(){
|
||||
return;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: RenameFile
|
||||
function filelibrary_RenameFile(oldfilename, newfilename) {
|
||||
var res = false;
|
||||
return res;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: SetLocation
|
||||
function filelibrary_SetLocation(){
|
||||
return;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: Write
|
||||
function filelibrary_Write(){
|
||||
return;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: WriteLine
|
||||
function filelibrary_WriteLine(){
|
||||
return;
|
||||
}
|
||||
//---End function
|
||||
|
||||
//---Start function: MakeFileLibrary
|
||||
function MakeFileLibrary() {
|
||||
this.Close=filelibrary_Close
|
||||
this.CopyDirectory=filelibrary_CopyDirectory
|
||||
this.CreateDir=filelibrary_CreateDir
|
||||
this.DeleteDirectory=filelibrary_DeleteDirectory
|
||||
this.DeleteFile=filelibrary_DeleteFile
|
||||
this.Eof=filelibrary_Eof
|
||||
this.ExistFile=filelibrary_ExistFile
|
||||
this.FileCopy=filelibrary_FileCopy
|
||||
this.GetLastModified=filelibrary_GetLastModified
|
||||
this.GetLocation=filelibrary_GetLocation
|
||||
this.MoveFile=filelibrary_MoveFile
|
||||
this.OpenAppend=filelibrary_OpenAppend
|
||||
this.OpenRead=filelibrary_OpenRead
|
||||
this.OpenWrite=filelibrary_OpenWrite
|
||||
this.ReadLine=filelibrary_ReadLine
|
||||
this.RenameFile=filelibrary_RenameFile
|
||||
this.SetLocation=filelibrary_SetLocation
|
||||
this.Write=filelibrary_Write
|
||||
this.WriteLine=filelibrary_WriteLine
|
||||
}
|
||||
//---End function
|
||||
|
||||
arguments[0].FileLibrary = new MakeFileLibrary()
|
||||
})(window);//MakeFileLibrary
|
||||
1006
PortalStudio/FontLoader.js
Normal file
17
PortalStudio/GlobalVars_PortalStudio_plan.java
Normal file
@ -0,0 +1,17 @@
|
||||
public class GlobalVars_PortalStudio_plan {
|
||||
public GlobalVars_PortalStudio_plan() {
|
||||
CPGlobalDefaults d = CPGlobalDefaults.GetGlobalDefaults();
|
||||
d.AddString("IsPortalStudioInstalled",new GlobalDefaultPortalStudio_planVar_IsPortalStudioInstalled());
|
||||
}
|
||||
}
|
||||
class GlobalDefaultPortalStudio_planVar_IsPortalStudioInstalled extends CPGlobalDefaultValue {
|
||||
GlobalDefaultPortalStudio_planVar_IsPortalStudioInstalled() {
|
||||
super();
|
||||
readonly=true;
|
||||
frequency="oneTimePerApplication";
|
||||
}
|
||||
Object compute(CPContext p_Ctx) {
|
||||
CPContext m_Ctx=p_Ctx;
|
||||
return "yes";
|
||||
}
|
||||
}
|
||||
733
PortalStudio/JSReportDocumentHtml.js
Normal file
@ -0,0 +1,733 @@
|
||||
/* global generateBarcode docSettings ToStringHTML setCurrentDateTime
|
||||
drawIconField
|
||||
*/
|
||||
|
||||
/*jshint laxcomma: true */
|
||||
/*** CLASSE RepDocumentHtml: gestisce la generazione/disegno del documento (report) in formato html
|
||||
* Eredita da RepDocument - JSReportDocumentRuntime.js
|
||||
*/
|
||||
RepDocumentHtml = function (name, uid) {
|
||||
RepDocument.call(this);
|
||||
this.format = "html";
|
||||
this.gcurrpage = null;
|
||||
this.name = name;
|
||||
this.progrid = 0;
|
||||
this.datetime = new Date();
|
||||
if(Empty(uid)) uid = LibJavascript.AlfaKeyGen(5);
|
||||
this.uid = uid;
|
||||
this.parent = null;
|
||||
this.document = null;
|
||||
this.window = null;
|
||||
this.barcodesItems = [];
|
||||
this.barcodesCtrls = [];
|
||||
};
|
||||
RepDocumentHtml.prototype = new RepDocument();
|
||||
RepDocumentHtml.prototype.constructor = RepDocumentHtml;
|
||||
|
||||
RepDocumentHtml.prototype.Ctrl = function(id){
|
||||
return this.document.getElementById(id);
|
||||
};
|
||||
|
||||
RepDocumentHtml.prototype.initProcess = function(allfields,container,bprint,imgfields,simulatedData){
|
||||
this.container = container;
|
||||
this.setParent();
|
||||
this.setDocument();
|
||||
this.setWindow();
|
||||
this.parent.innerHTML="";
|
||||
if(window.tool && window.tool=='smartreport'){
|
||||
if(window.winitprocess) window.winitprocess();
|
||||
}
|
||||
this.allfields = allfields;
|
||||
this.imgfields = imgfields;
|
||||
this.mrows = 0;
|
||||
this.lastRec = null;
|
||||
this.progrid = 0;
|
||||
this.simulatedData = simulatedData;
|
||||
};
|
||||
|
||||
RepDocumentHtml.prototype.appendFontsInDocument = function () {
|
||||
var list = this._fontList;
|
||||
this._cssString = "";
|
||||
for (var i = 0; i < list.length; i++)
|
||||
this._cssString += "<link type='text/css' rel='STYLESHEET' href='../fonts/" + window._fontMap[list[i]].css + ".css'>";
|
||||
this.document.head.innerHTML += this._cssString;
|
||||
}
|
||||
|
||||
RepDocumentHtml.prototype.endProcess = function(){
|
||||
for(var i=0; i<this.barcodesItems.length; i++) {
|
||||
var item = this.barcodesItems[i];
|
||||
var ctrl = this.barcodesCtrls[i];
|
||||
generateBarcode(item, ctrl.getAttribute("data-value"), ctrl, item.position.width, item.position.height);
|
||||
if (!Empty(item._newWidth)) {
|
||||
item.position.width = item._newWidth;
|
||||
this.Ctrl(ctrl.parentElement.id).style.width = item._newWidth + "px";
|
||||
}
|
||||
}
|
||||
|
||||
this.removeLoading();
|
||||
|
||||
if(window.tool && window.tool=='smartreport'){
|
||||
if(window.wendprocess) window.wendprocess();
|
||||
}
|
||||
else
|
||||
this.removeAllSignatureMarkups();
|
||||
|
||||
if (window.tool && window.tool=='smartreport'){}
|
||||
else {
|
||||
var w, h, tmp;
|
||||
if (docSettings && docSettings[this.obj.page.format]) { // sono in pt
|
||||
w = docSettings[this.obj.page.format].w;
|
||||
h = docSettings[this.obj.page.format].h;
|
||||
}
|
||||
else if (this.obj.page.format == "custom") {
|
||||
w = this.obj.page.width + "mm";
|
||||
h = this.obj.page.height + "mm";
|
||||
}
|
||||
else { //A4
|
||||
w = '595pt';
|
||||
h = '842pt';
|
||||
}
|
||||
if (this.obj.page.orientation == "landscape") {
|
||||
tmp = w;
|
||||
w = h;
|
||||
h = tmp;
|
||||
}
|
||||
|
||||
//var hprint = (parseFloat(h) - 1) + (this.obj.page.format == "custom" ? "mm" : "pt"),
|
||||
var stylehead = "";
|
||||
stylehead += "<style type=\"text/css\">.imagePrintclass a::after{content:'\\ec0b'}</style>";
|
||||
stylehead += "<style type=\"text/css\" media=\"screen\"> ";
|
||||
stylehead += "body {background-color:rgb(82,86,89);overflow:hidden;margin:0px 0px 0px 0px;} ";
|
||||
stylehead += ".report {height:100%;width:100%;overflow:hidden} ";
|
||||
// stylehead += ".contentZone {position:relative;width:" + w + ";height:" + h + ";margin:5px auto;background-color:#FFFFFF} ";
|
||||
stylehead += ".contentZone {position:relative;background-color:#FFFFFF} ";
|
||||
stylehead += ".pgbreak {} ";
|
||||
stylehead += ".toolbar {position:fixed;z-index:9999;text-align:center;height:48px;width:100%;background-color:rgb(50, 54, 57);box-shadow:rgba(0, 0, 0, 0.14) 0px 2px 2px 0px, rgba(0, 0, 0, 0.12) 0px 1px 5px 0px, rgba(0, 0, 0, 0.2) 0px 3px 1px -2px} ";
|
||||
stylehead += ".ptextbox { border-bottom: 1px solid #b1b1b1; text-align: right; outline: 0; max-width: 40px; } ";
|
||||
stylehead += ".pagecontainer {position:absolute;top:50px;width:100%;height:calc(100% - 50px);overflow:auto;background-color:#A0A0A0;} ";
|
||||
stylehead += "</style>";
|
||||
stylehead += "<style type=\"text/css\" media=\"print\"> ";
|
||||
stylehead += '@page {' +
|
||||
// 'size: ' + w + ' ' + h + '; ' +
|
||||
'margin: 0pt; padding: 0pt; border: 0pt solid transparent; ' +
|
||||
'border: 0pt solid transparent; ' +
|
||||
'@top-left-corner, @top-left, @top-center, @top-right, @top-right-corner, ' +
|
||||
'@right-top, @right-middle, @right-bottom, ' +
|
||||
'@bottom-left-corner, @bottom-left, @bottom-center, @bottom-right, @bottom-right-corner, ' +
|
||||
'@left-top, @left-middle, @left-bottom {' +
|
||||
'content: ""; display: inline-block; height: 0px; overflow: hidden;' +
|
||||
'margin: 0pt; padding: 0pt; border: 0pt solid transparent;' +
|
||||
'}' +
|
||||
'}';
|
||||
stylehead += "* { margin: 0px; padding: 0px; border: 0px solid transparent; box-sizing: border-box; } ";
|
||||
stylehead += "body {overflow-x:hidden; width:" + w + "; margin:0px 0px 0px 0px; overflow:hidden} ";
|
||||
stylehead += ".toolbar {display:none} ";
|
||||
stylehead += ".pagecontainer {} ";
|
||||
stylehead += ".pgbreak {} ";
|
||||
stylehead += ".imagePrintclass {display:none} ";
|
||||
stylehead += ".report {} ";
|
||||
// stylehead += ".contentZone {margin:0px;position:relative;width:" + w + ";height:" + hprint + ";} ";
|
||||
stylehead += ".contentZone {margin:0px;position:relative;} ";
|
||||
stylehead += "</style>";
|
||||
|
||||
if (this.theme) {
|
||||
stylehead+="<link type='text/css' rel='STYLESHEET' href='../" + this.theme + "/portalstudio.css'>"
|
||||
stylehead+="<link type='text/css' rel='STYLESHEET' href='../" + this.theme + "/formPage.css'>"
|
||||
stylehead+="<script src='../"+this.theme+"/webReport.js'></script>"
|
||||
}
|
||||
|
||||
if (!Empty(this._cssString))
|
||||
stylehead += this._cssString;
|
||||
|
||||
var mhtml = this.parent.innerHTML,
|
||||
inHTML = "";
|
||||
if(this.container.tagName.toLowerCase() != "iframe"){
|
||||
this.parent.innerHTML = "";
|
||||
this.setIFrame();
|
||||
this.setParent(document.getElementById(this.container.id+"ifrprev"));
|
||||
this.setDocument(document.getElementById(this.container.id+"ifrprev").contentWindow.document);
|
||||
this.setWindow(document.getElementById(this.container.id+"ifrprev").contentWindow);
|
||||
this.document.head.innerHTML = stylehead;
|
||||
|
||||
inHTML = "<div class='report'>";
|
||||
inHTML+= "<div class='toolbar'>"
|
||||
inHTML+= "<div style='left:0px;position:absolute;margin:12px 12px 12px 16px;'><span style='color:#ffffff' class='label'>[smrname]</span></div>"
|
||||
inHTML+= "<div style='display: inline-block;'><div style='float:left;margin-top:12px;'>"
|
||||
inHTML+= "<input style='display:none;color:#ffffff' id='pagenumber' type='number' min='0' size='3' value='1' maxlength='5' class='textbox ptextbox'>"
|
||||
inHTML+= "</div><div style='float:left;margin:12px 5px 5px 5px;'><span style='display:none;color:#ffffff'>/</span><span id='pagenumberMax' class='label' style='color:#ffffff;position:relative;'>[nmax]</span></div></div>"
|
||||
inHTML+= "<div onclick='window.print()' style='float:right;cursor:pointer;margin:12px 16px 12px 12px;' id='_cTEMSRBNQPR_imagePrint' class='imagePrintclass'>"
|
||||
inHTML+= "<a style='text-decoration: none;font-size:20px;font-family:icons8_win10;font-weight:normal;color:rgba(0,0,0,.93);color:#ffffff'></a>"
|
||||
inHTML+= "</div>"
|
||||
inHTML+= '</div>'; //toolbar
|
||||
inHTML+= "<div class='pagecontainer'>"
|
||||
inHTML+= mhtml;
|
||||
inHTML+= '</div>';//pagecontainer
|
||||
inHTML+= '</div>';//report
|
||||
//this.document.body.innerHTML = mhtml;
|
||||
inHTML = Strtran(inHTML, "[smrname]", this.name);
|
||||
inHTML = Strtran(inHTML, "[nmax]",'[ ' + ((this.isPreview && this.isEoPreview()) ? this.gwork.rpagecounter : this.gwork.pagecounter ) + ' pages ]');
|
||||
this.document.body.innerHTML = inHTML;
|
||||
document.getElementById(this.container.id+"ifrprev").height = "100%";
|
||||
document.getElementById(this.container.id+"ifrprev").frameborder = 0;
|
||||
document.getElementById(this.container.id+"ifrprev").style.border = 0;
|
||||
document.getElementById(this.container.id+"ifrprev").allowTransparency = true;
|
||||
document.getElementById(this.container.id+"ifrprev").style.backgroundColor = "rgb(82,86,89)";
|
||||
this.parent.style.border = 0;
|
||||
this.parent.style.margin = 0;
|
||||
this.parent.style.overflow = "hidden";
|
||||
}
|
||||
else{
|
||||
if(Empty(this.container.style.backgroundColor))
|
||||
this.container.style.backgroundColor = "rgb(82,86,89)";
|
||||
}
|
||||
}
|
||||
this.end = true;
|
||||
this.removeCanvasImages();
|
||||
|
||||
var ifr = document.getElementById(this.container.id+"ifrprev");
|
||||
if (ifr) {
|
||||
ifr.onload = function () {
|
||||
// tutela nel caso l'iframe non si sia ancora caricato
|
||||
this.contentWindow.document.head.innerHTML = stylehead;
|
||||
this.contentWindow.document.body.innerHTML = inHTML;
|
||||
}
|
||||
}
|
||||
|
||||
this.execFncCallback();
|
||||
};
|
||||
|
||||
RepDocumentHtml.prototype.removeLastLabelContinue = function(){
|
||||
var toremove = [];
|
||||
var i;
|
||||
var lblco = this.document.getElementsByClassName("labelcontinue_gf");
|
||||
for(i=0; i<lblco.length; i++){
|
||||
toremove.push(lblco[i]);
|
||||
}
|
||||
var lblc = this.document.getElementsByClassName("labelcontinue_pf");
|
||||
for(i=0; i<lblc.length; i++){
|
||||
if(lblc[i].parentNode.id.indexOf("zpagem"+this.gwork.rpagecounter)>=0)
|
||||
toremove.push(lblc[i]);
|
||||
}
|
||||
for(i=0; i<toremove.length; i++){
|
||||
if(toremove[i])
|
||||
toremove[i].parentNode.removeChild(toremove[i]);
|
||||
}
|
||||
};
|
||||
|
||||
RepDocumentHtml.prototype.removeAllSignatureMarkups = function(){
|
||||
var toremove = [];
|
||||
var i;
|
||||
var lblco = this.document.getElementsByClassName("signmup");
|
||||
for(i=0; i<lblco.length; i++){
|
||||
toremove.push(lblco[i]);
|
||||
}
|
||||
for(i=0; i<toremove.length; i++){
|
||||
if(toremove[i])
|
||||
toremove[i].parentNode.removeChild(toremove[i]);
|
||||
}
|
||||
};
|
||||
|
||||
RepDocumentHtml.prototype.pageNumber = function(){
|
||||
var lz = this.document.getElementsByClassName("pagenumber");
|
||||
var pp, p;
|
||||
for(var i=0; i<lz.length; i++){
|
||||
p = lz[i];
|
||||
while(p.parentNode && p.parentNode.id.indexOf('page')!==0){
|
||||
p=p.parentNode;
|
||||
}
|
||||
p=p.parentNode;
|
||||
//if(this.Ctrl(lz[i].id+'_int').innerHTML.indexOf('[')>=0)
|
||||
pp = parseInt(Strtran(p.id,'page','')) + this.gwork.pagecounter - this.gwork.rpagecounter;
|
||||
if (this.isPreview && this.isEoPreview())
|
||||
pp = parseInt(Strtran(p.id,'page',''));
|
||||
this.Ctrl(lz[i].id+'_int').innerHTML = pp;//this.gwork.pagecounter
|
||||
}
|
||||
|
||||
lz = this.document.getElementsByClassName("totalpages");
|
||||
for(i=0; i<lz.length; i++){
|
||||
pp = this.gwork.pagecounter;
|
||||
if (this.isPreview && this.isEoPreview())
|
||||
pp = this.gwork.rpagecounter;
|
||||
this.Ctrl(lz[i].id+'_int').innerHTML = pp;
|
||||
}
|
||||
};
|
||||
|
||||
RepDocumentHtml.prototype.drawNewPage = function(firstpage){
|
||||
if(Empty(firstpage)){
|
||||
var p = this.document.createElement("p");
|
||||
p.style.pageBreakAfter='always';
|
||||
p.className = 'pgbreak';
|
||||
this.loadingDiv.parentNode.appendChild(p);
|
||||
}
|
||||
|
||||
if(!Ctrl("page" + this.gwork.rpagecounter)) {
|
||||
var page = this.document.createElement("div");
|
||||
page.style.position='relative';
|
||||
page.style.width = "auto"; // this.gwork.ww+"px";
|
||||
page.style.height = (this.gwork.hh-2)+"px";
|
||||
page.style.backgroundColor="#FFFFFF";
|
||||
page.style.border ="1px solid #F3F3F3";
|
||||
page.id="page" + this.gwork.rpagecounter;
|
||||
page.className = "contentZone";
|
||||
this.loadingDiv.parentNode.appendChild(page);
|
||||
if(window.tool && window.tool=='smartreport'){
|
||||
if(window.fzoneclick) page.addEvent('click', window.fzoneclick);
|
||||
if(window.wpagegrid) window.wpagegrid(this.gwork); //grid
|
||||
}
|
||||
//grid end
|
||||
page = this.document.createElement("div");
|
||||
page.style.position='absolute';
|
||||
page.style.top=this.gwork.margint+"px";
|
||||
page.style.left=this.gwork.marginl+"px";
|
||||
page.style.width = (this.gwork.ww-this.gwork.marginr-this.gwork.marginl)+"px";
|
||||
page.style.height = (this.gwork.hh-this.gwork.margint-this.gwork.marginb)+"px";
|
||||
page.style.border ="0px solid #C3C3C3";
|
||||
page.id="zpagem" + this.gwork.rpagecounter;
|
||||
this.Ctrl("page" + this.gwork.rpagecounter).appendChild(page);
|
||||
this.gcurrpage = this.Ctrl("zpagem" + this.gwork.rpagecounter);
|
||||
}
|
||||
this.updateLoading();
|
||||
};
|
||||
|
||||
RepDocumentHtml.prototype.getLastChildElement = function(){
|
||||
var mylc = {};
|
||||
if(this.gcurrpage && !Empty(this.gcurrpage.lastChild)){
|
||||
mylc.top = this.gcurrpage.lastChild.offsetTop;
|
||||
mylc.left = this.gcurrpage.lastChild.offsetLeft;
|
||||
mylc.width = this.gcurrpage.lastChild.offsetWidth;
|
||||
mylc.height = this.gcurrpage.lastChild.offsetHeight;
|
||||
}
|
||||
else {
|
||||
mylc.top = 0;
|
||||
mylc.left = 0;
|
||||
mylc.width = 0;
|
||||
mylc.height = 0;
|
||||
}
|
||||
return mylc;
|
||||
};
|
||||
|
||||
RepDocumentHtml.prototype.addCurrentZone = function(objzone,zoneid,numrec){
|
||||
var zpage = this.document.createElement("div");
|
||||
zpage.style.position='relative';
|
||||
zpage.style.height = objzone.height+"px";
|
||||
if(this.gcurrpage) {
|
||||
zpage.id=this.gcurrpage.id+zoneid+numrec;
|
||||
this.gcurrpage.appendChild(zpage);
|
||||
}
|
||||
if(zoneid=='groupbody')
|
||||
this.Ctrl(zpage.id).className += " bodyZoneZ";
|
||||
};
|
||||
|
||||
RepDocumentHtml.prototype.updateZoneHeight = function(h){
|
||||
if(!Empty(this.gcurrpage.lastChild))
|
||||
this.gcurrpage.lastChild.style.height = (this.gcurrpage.lastChild.offsetHeight+h) + 'px';
|
||||
};
|
||||
|
||||
RepDocumentHtml.prototype.updateFontProperties = function(stObj, rid){
|
||||
if (stObj.typeView == "image" || stObj.typeView == "barcode" || stObj.typeView == "html")
|
||||
return;
|
||||
if(stObj.type=="line") return;
|
||||
var cText = this.Ctrl(rid+"_int");
|
||||
if(stObj.style.font.bold)
|
||||
cText.style.fontWeight = "bold";
|
||||
else
|
||||
cText.style.fontWeight = "normal";
|
||||
if(stObj.style.font.italic)
|
||||
cText.style.fontStyle = "italic";
|
||||
else
|
||||
cText.style.fontStyle = "normal";
|
||||
cText.style.fontSize = stObj.style.font.fontSize;
|
||||
cText.style.fontFamily = stObj.style.font.fontName;
|
||||
|
||||
var tmptext = "";
|
||||
if(stObj.style.font.underline)
|
||||
tmptext += "underline ";
|
||||
if(stObj.style.font.strikeout)
|
||||
tmptext += "line-through ";
|
||||
cText.style.textDecoration = tmptext;
|
||||
|
||||
if(stObj.style.font.center)
|
||||
cText.style.textAlign = "center";
|
||||
else if(stObj.style.font.right)
|
||||
cText.style.textAlign = "right";
|
||||
else
|
||||
cText.style.textAlign = "left";
|
||||
|
||||
cText.style.color = stObj.style.font.fontColor;
|
||||
};
|
||||
|
||||
RepDocumentHtml.prototype.applyLineStyleProperties = function(item, rid){
|
||||
if(item.type!="line") return;
|
||||
if(!item.style.line.onlyStroke)
|
||||
this.Ctrl(rid).style.borderTop = item.position.height+"px solid " + item.style.line.color;
|
||||
else
|
||||
this.Ctrl(rid).style.border = "1px solid " + item.style.line.color;
|
||||
if(item.style.stretchToRight){
|
||||
var nl = this.gwork.ww - this.gwork.marginl - this.gwork.marginr - this.Ctrl(rid).offsetLeft;
|
||||
this.Ctrl(rid).style.width = nl + "px";
|
||||
}
|
||||
};
|
||||
|
||||
RepDocumentHtml.prototype.initPage = function(coverobj) {
|
||||
this.newPage();
|
||||
if(!coverobj.numPageCover)
|
||||
this.gwork.pagecounter--;
|
||||
}
|
||||
|
||||
RepDocumentHtml.prototype.generateHtmlElement = function(it){
|
||||
var ritem = {};
|
||||
ritem.id = 'item'+this.progrid;
|
||||
ritem.uidfor = it.uid;
|
||||
ritem.html = "";
|
||||
ritem.yRel = it.position.yRelative;
|
||||
if(it.type=="line"){
|
||||
ritem.html="<div ";
|
||||
ritem.html+="id='"+ritem.id+"' ";
|
||||
ritem.html+="class='unselectable lineItem' ";
|
||||
ritem.html+="style='";
|
||||
ritem.html+="left:"+it.position.x+"px;";
|
||||
ritem.html+="top:"+it.position.y+"px;";
|
||||
ritem.html+="width:"+it.position.width+"px;";
|
||||
if(!it.style.line.onlyStroke)
|
||||
ritem.html+="height:1px;";
|
||||
else
|
||||
ritem.html+="height:"+(it.position.height-2)+"px;";
|
||||
ritem.html+="position:absolute;";
|
||||
ritem.html+="'>";
|
||||
ritem.html+="</div>";
|
||||
}
|
||||
else if (it.typeView == "image" || it.typeView == "html"){
|
||||
ritem.html="<div ";
|
||||
ritem.html+="id='"+ritem.id+"' ";
|
||||
ritem.html+="class='unselectable labelFieldImg' ";
|
||||
ritem.html+="style='";
|
||||
ritem.html+="left:"+it.position.x+"px;";
|
||||
ritem.html+="top:"+it.position.y+"px;";
|
||||
if (it.fieldDetail && it.fieldDetail.type == "checkbox") {
|
||||
var size = Math.min(it.position.width, it.position.height);
|
||||
ritem.html+="width:"+size+"px;";
|
||||
ritem.html+="height:"+size+"px;";
|
||||
}
|
||||
else {
|
||||
ritem.html+="width:"+it.position.width+"px;";
|
||||
ritem.html+="height:"+it.position.height+"px;";
|
||||
}
|
||||
ritem.html+="'";
|
||||
ritem.html+=">";
|
||||
ritem.html+="<img ";
|
||||
ritem.html+="id='"+ritem.id+"_img' ";
|
||||
ritem.html+="class='unselectable' ";
|
||||
ritem.html+="alt='Image not found' ";
|
||||
ritem.html+="style='";
|
||||
ritem.html+="width:"+(100)+"%;";
|
||||
ritem.html+="height:"+(100)+"%;";
|
||||
ritem.html+="'";
|
||||
ritem.html+="/>";
|
||||
ritem.html+="</div>";
|
||||
}
|
||||
else if(it.typeView == "barcode"){
|
||||
ritem.html="<div ";
|
||||
ritem.html+="id='"+ritem.id+"' ";
|
||||
ritem.html+="class='unselectable labelFieldImg' ";
|
||||
ritem.html+="style='";
|
||||
ritem.html+="left:"+it.position.x+"px;";
|
||||
ritem.html+="top:"+it.position.y+"px;";
|
||||
ritem.html+="width:"+it.position.width+"px;";
|
||||
ritem.html+="height:"+it.position.height+"px;";
|
||||
ritem.html+="'";
|
||||
ritem.html+=">";
|
||||
ritem.html+="<svg "; //"<img ";
|
||||
ritem.html+="id='"+ritem.id+"_barcode' ";
|
||||
ritem.html+="class='unselectable' ";
|
||||
// ritem.html+="style='";
|
||||
// ritem.html+="width:"+(100)+"%;";
|
||||
// ritem.html+="height:"+(100)+"%;";
|
||||
// ritem.html+="'";
|
||||
ritem.html+="/>";
|
||||
ritem.html+="</div>";
|
||||
}
|
||||
else{ // tutto cio' che e' testo
|
||||
ritem.html="<div ";
|
||||
ritem.html+="id='"+ritem.id+"' ";
|
||||
ritem.html+="class='unselectable labelFieldDesc";
|
||||
ritem.html+="' ";
|
||||
ritem.html+="style='";
|
||||
ritem.html+="left:"+it.position.x+"px;";
|
||||
ritem.html+="top:"+it.position.y+"px;";
|
||||
ritem.html+="width:"+it.position.width+"px;";
|
||||
ritem.html+="height:"+it.position.height+"px;";
|
||||
ritem.html+="'>";
|
||||
ritem.html+="<div ";
|
||||
ritem.html+="id='"+ritem.id+"_int' ";
|
||||
ritem.html+="class='unselectable labelFieldText textContainerDoc";
|
||||
ritem.html+="' ";
|
||||
ritem.html+=">";
|
||||
if(it.type=="label")
|
||||
ritem.html+=ToStringHTML(it.value);
|
||||
else if(it.typeView == "pagenum")
|
||||
ritem.html+="["+ToStringHTML(it.fieldDetail.desc)+"]";
|
||||
else
|
||||
ritem.html+=ToStringHTML(it.fieldDetail.desc);
|
||||
ritem.html+="</div>";
|
||||
ritem.html+="</div>";
|
||||
}
|
||||
this.progrid++;
|
||||
return ritem;
|
||||
};
|
||||
|
||||
RepDocumentHtml.prototype.getItemValue = function(k, item, zoneid, repObj, useLastRecord){
|
||||
var value;
|
||||
var noprint = false;
|
||||
var mdata = useLastRecord?repObj.lastRec:repObj.propertyValue[k];
|
||||
|
||||
if(zoneid == "groupfooter" && repObj.obj.groupfooter.options.printOnGroupBreak && !repObj.lastGrpFooter)
|
||||
noprint = true;
|
||||
|
||||
if (item.typeView.indexOf("date") >= 0) {
|
||||
if(item.isGeneric)
|
||||
value = repObj.datetime;
|
||||
else if(mdata[item.fieldDetail.alias+'##pic'])
|
||||
value = mdata[item.fieldDetail.alias+'##pic'];
|
||||
else
|
||||
value = mdata[item.fieldDetail.alias];
|
||||
value = setCurrentDateTime(value,item);
|
||||
}
|
||||
else if(item.typeView=="numeric"){
|
||||
if(item.calculation && !Empty(item.calculation.type) && item.calculation.type!='none') {
|
||||
value = repObj.calcObjs[item.calculation.type][item.fieldDetail.alias][item.uid];
|
||||
value = repObj.setFormatNumber(value,item.fieldDetail.len,item.fieldDetail.dec,item.stdPicture);
|
||||
}
|
||||
else if(mdata[item.fieldDetail.alias+'##pic'])
|
||||
value = mdata[item.fieldDetail.alias+'##pic'];
|
||||
else {
|
||||
value = mdata[item.fieldDetail.alias];
|
||||
value = repObj.setFormatNumber(value,item.fieldDetail.len,item.fieldDetail.dec,item.stdPicture);
|
||||
}
|
||||
}
|
||||
else if(item.typeView=="image"){
|
||||
if (!item.isGeneric && repObj.simulatedData)
|
||||
value = "";
|
||||
else {
|
||||
if (item.isGeneric) {
|
||||
if (item.fieldDetail && item.fieldDetail.type == "checkbox")
|
||||
item.style.imageSrc = (Empty(mdata[item.fieldDetail.alias])) ? repObj.uncheckedSrc : repObj.checkedSrc;
|
||||
value = item.style.imageSrc;
|
||||
}
|
||||
else if (noprint)
|
||||
value = "";
|
||||
else
|
||||
value = mdata[item.fieldDetail.alias];
|
||||
}
|
||||
|
||||
// tratto il caso src:tooltip che potrebbe arrivarmi da griglia o da query
|
||||
var dp_split = value.split(":");
|
||||
if (dp_split.length > 1)
|
||||
value = dp_split[0];
|
||||
}
|
||||
else if (item.typeView == "html") {
|
||||
if (!item.isGeneric && repObj.simulatedData)
|
||||
value = "";
|
||||
else {
|
||||
if (item.isGeneric) {
|
||||
if (item.fieldDetail && item.fieldDetail.type == "checkbox")
|
||||
item.style.imageSrc = (Empty(mdata[item.fieldDetail.alias])) ? repObj.uncheckedSrc : repObj.checkedSrc;
|
||||
value = item.style.imageSrc;
|
||||
}
|
||||
else if (noprint)
|
||||
value = "";
|
||||
else if(mdata[item.fieldDetail.alias+'##pic'])
|
||||
value = mdata[item.fieldDetail.alias+'##pic'];
|
||||
else
|
||||
value = mdata[item.fieldDetail.alias];
|
||||
}
|
||||
}
|
||||
else if(item.type=='field' && !item.isGeneric) {
|
||||
if(mdata[item.fieldDetail.alias+'##pic'])
|
||||
value = mdata[item.fieldDetail.alias+'##pic'];
|
||||
else
|
||||
value = Format(mdata[item.fieldDetail.alias],item.fieldDetail.len,item.fieldDetail.dec,item.stdPicture);
|
||||
}
|
||||
if(item.type=='field' && item.isGeneric && item.typeView!="pagenum" && item.typeView.indexOf("date")<0 && item.typeView!="image")
|
||||
value = item.fieldDetail.desc;
|
||||
|
||||
if(noprint && item.type=='field' && !item.isGeneric && item.typeView!="image")
|
||||
value = "";
|
||||
|
||||
if(item.type=='label')
|
||||
value = item.value;
|
||||
|
||||
return value;
|
||||
};
|
||||
|
||||
RepDocumentHtml.prototype.addItemInZone = function(k,item,objzone,zoneid, value, yRel, split, nrow){
|
||||
if(!this.gcurrpage)
|
||||
return;
|
||||
if( value == null ) value = '';
|
||||
var currpage = this.gcurrpage.lastChild;
|
||||
var ritem = null;
|
||||
if(typeof(split) == 'undefined') split = false;
|
||||
if(window.tool && window.tool=='smartreport'){
|
||||
if(window.waddinzone) ritem = window.waddinzone(item,zoneid,true,split,nrow);
|
||||
}
|
||||
if(Empty(ritem))
|
||||
ritem = this.generateHtmlElement(item);
|
||||
if(Empty(yRel)) yRel = ritem.yRel;
|
||||
currpage.innerHTML += ritem.html;
|
||||
this.Ctrl(ritem.id).style.position = 'absolute';
|
||||
if(item.style && item.style.line && item.style.line.onlyStroke) yRel = yRel - 2;
|
||||
this.Ctrl(ritem.id).style.top = yRel+"px";
|
||||
if(item.type!="line"){
|
||||
this.Ctrl(ritem.id).style.border = "1px"; //forzatura
|
||||
this.Ctrl(ritem.id).style.backgroundColor = 'transparent';
|
||||
}
|
||||
|
||||
this.Ctrl(ritem.id).className += (" "+ritem.uidfor);
|
||||
|
||||
if(item.typeView=="pagenum"){
|
||||
if(item.fieldDetail.desc == "Total pages")
|
||||
this.Ctrl(ritem.id).className += " totalpages";
|
||||
else if(item.fieldDetail.desc == "Page number")
|
||||
this.Ctrl(ritem.id).className += " pagenumber";
|
||||
}
|
||||
|
||||
if(item.isContinue && zoneid == "pagefooter")
|
||||
this.Ctrl(ritem.id).className += " labelcontinue_pf";
|
||||
else if(item.isContinue && this.lastGrpFooter)
|
||||
this.Ctrl(ritem.id).className += " labelcontinue_gf";
|
||||
|
||||
if(item.typeView == "signmup")
|
||||
this.Ctrl(ritem.id).className += " signmup";
|
||||
|
||||
if(window.tool && window.tool=='smartreport'){
|
||||
if(window.wupdatehtmlitem) window.wupdatehtmlitem(item,ritem,this.gwork);
|
||||
}
|
||||
else{
|
||||
this.updateFontProperties(item, ritem.id);
|
||||
this.applyLineStyleProperties(item, ritem.id);
|
||||
}
|
||||
|
||||
if(item.typeView=="barcode"){
|
||||
generateBarcode(item, value, this.Ctrl(ritem.id+"_barcode"), this.Ctrl(ritem.id+"_barcode").offsetWidth, this.Ctrl(ritem.id+"_barcode").offsetHeight, null, true);
|
||||
this.Ctrl(ritem.id+"_barcode").setAttribute("data-value", value);
|
||||
this.barcodesItems.push(item);
|
||||
this.barcodesCtrls.push(this.Ctrl(ritem.id+"_barcode"));
|
||||
}
|
||||
else if(item.typeView=="image"){
|
||||
var msrc = "";
|
||||
if(value.indexOf(this.rootApp)==0 || value.indexOf(this.rootAppB)==0|| Empty(value))
|
||||
msrc = value;
|
||||
else
|
||||
msrc = this.rootApp+value;
|
||||
this.Ctrl(ritem.id+"_img").src = msrc;
|
||||
}
|
||||
else if (item.typeView == "html") {
|
||||
var mvalue = item.style.htmlSrc;
|
||||
if (!item.isGeneric)
|
||||
mvalue = value;
|
||||
this.renderHTMLtoCanvas(item, mvalue, ritem.id);
|
||||
}
|
||||
else if(item.type!='line') {
|
||||
if(window.tool && window.tool=='smartreport'){
|
||||
this.Ctrl(ritem.id+'_int').innerHTML = ToStringHTML(value);
|
||||
if(item.calculation && !Empty(item.calculation.type) && item.calculation.type!='none')
|
||||
drawIconField("calc",ritem);
|
||||
}
|
||||
else {
|
||||
this.Ctrl(ritem.id+'_int').innerHTML = ToStringHTML(value);
|
||||
}
|
||||
}
|
||||
|
||||
if(window.tool && window.tool=='smartreport'){
|
||||
if(split && nrow!=0)
|
||||
$(ritem.id).addClass("noclick");
|
||||
}
|
||||
};
|
||||
|
||||
RepDocumentHtml.prototype.download = function () {
|
||||
var akey = LibJavascript.AlfaKeyGen(5);
|
||||
var a = document.createElement('a');
|
||||
a.setAttribute("id", akey);
|
||||
this.document.body.appendChild(a);
|
||||
if(typeof a.download == "undefined"){
|
||||
(window.PSAlert||window).alert('Browser Not Implemented Client Side Download!!!');
|
||||
}
|
||||
else{
|
||||
var base64doc = btoa(unescape(encodeURIComponent(this.document.documentElement.innerHTML)));
|
||||
a.href = 'data:text/html;base64,' + base64doc;
|
||||
a.download = (Empty(this.name)?LibJavascript.AlfaKeyGen(10):this.name)+".html";
|
||||
a.click();
|
||||
}
|
||||
document.body.removeChild(a);
|
||||
};
|
||||
|
||||
RepDocumentHtml.prototype.getImageBase64 = function(imgid,src,w,h){
|
||||
var divId = "mspan_"+this.uid;
|
||||
var myDiv = this.Ctrl(divId);
|
||||
if(Empty(myDiv)){
|
||||
myDiv = this.document.createElement("div");
|
||||
myDiv.id = divId;
|
||||
this.document.body.appendChild(myDiv);
|
||||
myDiv.style.width=w+'px';
|
||||
myDiv.style.height=h+'px';
|
||||
myDiv.style.display='none';
|
||||
myDiv.style.position="absolute";
|
||||
myDiv.style.left="400px";
|
||||
myDiv.style.top="400px";
|
||||
}
|
||||
|
||||
divId = this.uid+"_canvas_"+imgid;
|
||||
var canvas = this.Ctrl(divId);
|
||||
if(Empty(canvas)){
|
||||
canvas = this.document.createElement("CANVAS");
|
||||
canvas.id = divId;
|
||||
canvas.width = w;
|
||||
canvas.height = h;
|
||||
myDiv.appendChild(canvas);
|
||||
}
|
||||
|
||||
var mimg = new Image();
|
||||
mimg.id = this.uid+"_image_"+imgid;
|
||||
myDiv.appendChild(mimg);
|
||||
|
||||
var muid = this.uid;
|
||||
mimg.onload = function(){
|
||||
var ctx = window[muid].Ctrl(muid+"_canvas_"+imgid).getContext("2d");
|
||||
ctx.drawImage(this, 0, 0, this.width, this.height, 0, 0, w, h);
|
||||
var dataURL = window[muid].Ctrl(muid+"_canvas_"+imgid).toDataURL("image/png");
|
||||
window[muid].Ctrl(imgid).src = dataURL;
|
||||
};
|
||||
var msrc = "";
|
||||
if (src.indexOf(this.rootApp)==0 || src.indexOf(this.rootAppB)==0)
|
||||
msrc = src;
|
||||
else
|
||||
msrc = this.rootApp+src;
|
||||
mimg.src = msrc;
|
||||
};
|
||||
|
||||
RepDocumentHtml.prototype.print = function(){
|
||||
if(!this.window.frameElement || this.window.frameElement.id!=this.container.id+"ifrprev")
|
||||
this.setWindow(document.getElementById(this.container.id+"ifrprev").contentWindow);
|
||||
if(this.window !== null){
|
||||
this.window.print();
|
||||
}
|
||||
};
|
||||
|
||||
RepDocumentHtml.prototype.drawPreviewValidator = function () {
|
||||
if (this.isEoPreview())
|
||||
return;
|
||||
if (!Empty(this.watermark) && this.gcurrpage) {
|
||||
var div = this.document.createElement("div");
|
||||
div.className = "validatorPreviewLabel";
|
||||
div.textContent = this.watermark;
|
||||
div.style.top = - (this.gcurrpage.offsetHeight / 2) + "px";
|
||||
div.style.position = 'relative';
|
||||
div.style.transform = 'rotate(45deg)';
|
||||
div.style.fontSize = '24pt';
|
||||
div.style.color = '#E51400';
|
||||
div.style.fontWeight = 'bold';
|
||||
div.style.textAlign = 'center';
|
||||
div.style.fontFamily = 'Helvetica';
|
||||
div.style.zIndex = 1500;
|
||||
this.gcurrpage.appendChild(div);
|
||||
}
|
||||
};
|
||||
761
PortalStudio/JSReportDocumentPdf.js
Normal file
@ -0,0 +1,761 @@
|
||||
/* global generateBarcode convertStringToPx ptTopx jspdf setCurrentDateTime zRuntime b64toBlob */
|
||||
/*jshint laxcomma: true */
|
||||
( function (window, document) {
|
||||
/*** CLASSE RepDocumentPdf: gestisce la generazione/disegno del documento (report) in formato pdf
|
||||
* Eredita da RepDocument - JSReportDocumentRuntime.js
|
||||
*/
|
||||
|
||||
function privateContext (name, uid) {
|
||||
|
||||
var datauristring;
|
||||
|
||||
function RepDocumentPdf (options, uid) {
|
||||
var jspdf =
|
||||
(document.getElementById("visualweb/jspdf.js") || {}).href ||
|
||||
(window.ZtVWeb
|
||||
? ZtVWeb.SPWebRootURL + "/visualweb/jspdf.js"
|
||||
: "../visualweb/jspdf.js"),
|
||||
jspdfmore =
|
||||
(document.getElementById("visualweb/jspdf-more.js") || {}).href ||
|
||||
(window.ZtVWeb
|
||||
? ZtVWeb.SPWebRootURL + "/visualweb/jspdf-more.js"
|
||||
: "../visualweb/jspdf-more.js");
|
||||
LibJavascript.RequireLibrary(jspdf);
|
||||
LibJavascript.RequireLibrary(jspdfmore);
|
||||
RepDocument.call(this);
|
||||
this.format = "pdf";
|
||||
this.gcurrpage = null;
|
||||
this.lastElement = null;
|
||||
this.datetime = new Date();
|
||||
this.options = options;
|
||||
if( typeof(options) == 'string' ){
|
||||
this.name = options || 'smartreport';
|
||||
}
|
||||
else {
|
||||
this.name = options.filePath || 'smartreport';
|
||||
}
|
||||
if(Empty(uid)) uid = LibJavascript.AlfaKeyGen(5);
|
||||
this.uid = uid;
|
||||
};
|
||||
|
||||
RepDocumentPdf.prototype = new RepDocument();
|
||||
RepDocumentPdf.prototype.constructor = RepDocumentPdf;
|
||||
|
||||
RepDocumentPdf.prototype.initProcess = function(allfields,container,bprint,imgfields,simulatedData){
|
||||
this.container = container;
|
||||
this.setParent();
|
||||
this.setDocument();
|
||||
this.setWindow();
|
||||
var pformat = this.obj.page.format.toLowerCase();
|
||||
var porientation = this.obj.page.orientation.toLowerCase();
|
||||
if(this.obj.page.format.toLowerCase() == 'custom') {
|
||||
var w = this.obj.page.width + "mm";
|
||||
var h = this.obj.page.height + "mm";
|
||||
var ww = convertStringToPx(w)/ptTopx;
|
||||
var hh = convertStringToPx(h)/ptTopx;
|
||||
if(porientation == 'portrait')
|
||||
porientation = 'n';
|
||||
else
|
||||
porientation = 's';
|
||||
pformat = [];
|
||||
pformat[0] = ww;
|
||||
pformat[1] = hh;
|
||||
}
|
||||
this.jspdf = new jspdf.jsPDF(porientation,"pt",pformat);
|
||||
if (bprint){
|
||||
this.jspdfprint = new jspdf.jsPDF(porientation,"pt",pformat);
|
||||
this.jspdfprint.autoPrint();
|
||||
}
|
||||
else
|
||||
this.jspdfprint = null;
|
||||
this.allfields = allfields;
|
||||
this.imgfields = imgfields;
|
||||
this.mrows = 0;
|
||||
this.lastRec = null;
|
||||
this.simulatedData = simulatedData;
|
||||
};
|
||||
|
||||
RepDocumentPdf.prototype.appendFontsInDocument = function () {
|
||||
var list = this._fontList;
|
||||
for (var i = 0; i < list.length; i++) {
|
||||
this.jspdf.addFileToVFS(list[i] + ".ttf", window._fontMap[list[i]].cont);
|
||||
this.jspdf.addFont(list[i] + ".ttf", window._fontMap[list[i]].name, window._fontMap[list[i]].style);
|
||||
this.jspdf.addFont(list[i] + ".ttf", window._fontMap[list[i]].name.toLowerCase(), window._fontMap[list[i]].style);
|
||||
if (this.jspdfprint != null) {
|
||||
this.jspdfprint.addFileToVFS(list[i] + ".ttf", window._fontMap[list[i]].cont);
|
||||
this.jspdfprint.addFont(list[i] + ".ttf", window._fontMap[list[i]].name, window._fontMap[list[i]].style);
|
||||
this.jspdfprint.addFont(list[i] + ".ttf", window._fontMap[list[i]].name.toLowerCase(), window._fontMap[list[i]].style);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
RepDocumentPdf.prototype.endProcess = function(){
|
||||
var totP = (this.isPreview && this.isEoPreview()) ? this.gwork.rpagecounter : this.gwork.pagecounter;
|
||||
this.jspdf.putTotalPages("Total pages", totP);
|
||||
if (this.jspdfprint != null)
|
||||
this.jspdfprint.putTotalPages("Total pages", totP);
|
||||
if(this.autoprint)this.jspdf.autoPrint();
|
||||
if(this.container.tagName.toLowerCase()=='iframe')
|
||||
this.addInFrame(this.container);
|
||||
else{
|
||||
this.setIFrame();
|
||||
this.addInFrame(document.getElementById(this.container.id+"ifrprev"));
|
||||
}
|
||||
this.removeLoading();
|
||||
if(this.autodownload)this.download();
|
||||
this.end = true;
|
||||
this.removeCanvasImages();
|
||||
if (!this._dontruncb)
|
||||
this.execFncCallback();
|
||||
};
|
||||
|
||||
RepDocumentPdf.prototype.removeLastLabelContinue = function(){
|
||||
// ripreso da algoritmo page numb in jspdf.js
|
||||
function removelabelcontinue(jspdf){
|
||||
if(jspdf==null) return;
|
||||
var lastpage = jspdf.internal.getNumberOfPages();
|
||||
var i,n;
|
||||
var replaceExpression = new RegExp("CONTINUE_GF", 'g');
|
||||
for(n=1; n<=lastpage; n++){
|
||||
for(i=jspdf.internal.pages[n].length-1; i>=0; i--){
|
||||
if(jspdf.internal.pages[n][i].search(replaceExpression)>=0)
|
||||
jspdf.internal.pages[n].splice(i,1);
|
||||
}
|
||||
}
|
||||
|
||||
replaceExpression = new RegExp("CONTINUE", 'g');
|
||||
for(i=jspdf.internal.pages[lastpage].length-1; i>=0; i--){
|
||||
if(jspdf.internal.pages[lastpage][i].search(replaceExpression)>=0)
|
||||
jspdf.internal.pages[lastpage].splice(i,1);
|
||||
}
|
||||
};
|
||||
removelabelcontinue(this.jspdf);
|
||||
removelabelcontinue(this.jspdfprint);
|
||||
};
|
||||
|
||||
RepDocumentPdf.prototype.pageNumber = function(){
|
||||
};
|
||||
|
||||
RepDocumentPdf.prototype.drawNewPage = function(firstpage){
|
||||
function insertpage(jspdf){
|
||||
if(jspdf==null) return;
|
||||
if(!firstpage)
|
||||
jspdf.addPage();
|
||||
};
|
||||
insertpage(this.jspdf);
|
||||
insertpage(this.jspdfprint);
|
||||
this.lastElement = null;
|
||||
this.updateLoading();
|
||||
};
|
||||
|
||||
RepDocumentPdf.prototype.getLastChildElement = function(){
|
||||
return this.lastElement;
|
||||
};
|
||||
|
||||
RepDocumentPdf.prototype.addCurrentZone = function (objzone /*, zoneid*//*, numrec*/ ){
|
||||
this.lastElement = { height : objzone.height /*px*/
|
||||
, left : 0 /*px*/
|
||||
, width : this.gwork.ww - ( this.gwork.marginl + this.gwork.marginr ) /*px*/
|
||||
, top : ( ( ( this.lastElement || {} ).height || 0 )
|
||||
+ ( ( this.lastElement || {} ).top || 0 )
|
||||
) /*px*/
|
||||
}
|
||||
;
|
||||
};
|
||||
|
||||
RepDocumentPdf.prototype.updateZoneHeight = function(h){
|
||||
if(this.lastElement && this.lastElement.height)
|
||||
this.lastElement.height = this.lastElement.height+h;
|
||||
};
|
||||
|
||||
RepDocumentPdf.prototype.getItemValue = function(k, item, zoneid, repObj, useLastRecord){
|
||||
var value = "";
|
||||
var mdata = useLastRecord?repObj.lastRec:repObj.propertyValue[k];
|
||||
if(item.type=="label"){
|
||||
value = item.value;
|
||||
if(item.isContinue && zoneid!="pagefooter" && repObj.lastGrpFooter)
|
||||
value+="_GF";
|
||||
}
|
||||
else if(item.typeView=="pagenum"){
|
||||
if(item.fieldDetail.desc == "Page number")
|
||||
value = repObj.gwork.pagecounter;
|
||||
else
|
||||
value = item.fieldDetail.desc;
|
||||
}
|
||||
else if(item.typeView.indexOf("date")>=0){
|
||||
if(item.isGeneric)
|
||||
value = setCurrentDateTime(repObj.datetime,item);
|
||||
else if(mdata[item.fieldDetail.alias+'##pic'])
|
||||
value = mdata[item.fieldDetail.alias+'##pic'];
|
||||
else
|
||||
value = setCurrentDateTime(mdata[item.fieldDetail.alias],item);
|
||||
}
|
||||
else if(item.typeView=='numeric'){
|
||||
if (item.calculation && !Empty(item.calculation.type) && item.calculation.type != 'none')
|
||||
value = repObj.setFormatNumber(repObj.calcObjs[item.calculation.type][item.fieldDetail.alias][item.uid], item.fieldDetail.len, item.fieldDetail.dec, item.stdPicture);
|
||||
else if ("value" in item && !Empty(item.value + "")) // totale
|
||||
value = repObj.setFormatNumber(item.value, null, null, item.stdPicture);
|
||||
else if(mdata[item.fieldDetail.alias+'##pic'])
|
||||
value = mdata[item.fieldDetail.alias+'##pic'];
|
||||
else
|
||||
value = repObj.setFormatNumber(mdata[item.fieldDetail.alias],item.fieldDetail.len,item.fieldDetail.dec,item.stdPicture);
|
||||
}
|
||||
else if (item.fieldDetail && item.fieldDetail.type == "checkbox")
|
||||
item.style.imageSrc = (Empty(mdata[item.fieldDetail.alias])) ? repObj.uncheckedSrc : repObj.checkedSrc;
|
||||
else if (item.type!="line") {
|
||||
if(mdata[item.fieldDetail.alias+'##pic'])
|
||||
value = mdata[item.fieldDetail.alias+'##pic'];
|
||||
else
|
||||
value = Format(mdata[item.fieldDetail.alias],item.fieldDetail.len,item.fieldDetail.dec,item.stdPicture);
|
||||
}
|
||||
return value;
|
||||
};
|
||||
|
||||
RepDocumentPdf.prototype.getTextDimensions = function(text, font) {
|
||||
var fsize = convertStringToPx(font.size),
|
||||
px2pt = 72 / 96;
|
||||
var numr = 1;
|
||||
if(!Empty(text)) numr = text.split(/[\n\r]/g).length;
|
||||
var fstyle = "";
|
||||
if(font.weight == 'bold')
|
||||
fstyle = "bold";
|
||||
if(font.italic == 'italic')
|
||||
fstyle += "italic";
|
||||
/* if(!Empty(fstyle))
|
||||
this.jspdf.setFontStyle(fstyle);
|
||||
else
|
||||
this.jspdf.setFontStyle("normal");*/
|
||||
var fname = font.name;
|
||||
if (fname.indexOf("Times") >= 0)
|
||||
fname = "times";
|
||||
if(!Empty(fstyle))
|
||||
this.jspdf.setFont(fname, fstyle);
|
||||
else
|
||||
this.jspdf.setFont(fname, "normal");
|
||||
var w = Math.round(this.jspdf.getStringUnitWidth(text, { fontSize: fsize*px2pt} ) * fsize);
|
||||
return { width : w /*px*/
|
||||
, height: fsize * numr /*px*/
|
||||
};
|
||||
}
|
||||
|
||||
RepDocumentPdf.prototype.addItemInZone = function (k, item, objzone, zoneid, value, yRel/*, split, nrow*/) {
|
||||
function hex2rgb ( colorhex ) {
|
||||
// inspired by jspdf
|
||||
var hex = parseInt( colorhex.substr( 1 ), 16 );
|
||||
return [ ( hex >> 16 ) & 255 /*R*/
|
||||
, ( hex >> 8 ) & 255 /*G*/
|
||||
, hex & 255 /*B*/
|
||||
];
|
||||
} // hex2rgb
|
||||
|
||||
function insertinpdf(jspdf, repobj, zoneid){
|
||||
if (jspdf == null)
|
||||
return;
|
||||
|
||||
var myimg, txtDimensions, msrc
|
||||
, px2pt = 72 / 96
|
||||
, posObj = { x : item.position.x + repobj.lastElement.left + repobj.gwork.marginl
|
||||
, y : yRel + repobj.lastElement.top + repobj.gwork.margint
|
||||
, w : item.position.width
|
||||
, h : item.position.height
|
||||
}
|
||||
, fstyle = ""
|
||||
;
|
||||
var noprint = false;
|
||||
|
||||
if (zoneid == "groupfooter" && repobj.obj.groupfooter.options.printOnGroupBreak && !repobj.lastGrpFooter)
|
||||
noprint = true;
|
||||
var opt, loaded;
|
||||
switch (item.typeView) {
|
||||
case "line":
|
||||
var tmpw = posObj.w;
|
||||
if (item.style.stretchToRight) {
|
||||
var nl = repobj.gwork.ww - repobj.gwork.marginl - repobj.gwork.marginr - posObj.x;
|
||||
tmpw = nl;
|
||||
}
|
||||
jspdf.setFillColor.apply( jspdf, hex2rgb( item.style.line.color ) );
|
||||
jspdf.setDrawColor.apply( jspdf, hex2rgb( item.style.line.color ) );
|
||||
if(item.style.line.onlyStroke) {
|
||||
jspdf.rect( posObj.x * px2pt /*x1*/
|
||||
, posObj.y * px2pt /*y1*/
|
||||
, tmpw * px2pt /*x2*/
|
||||
, posObj.h * px2pt /*y2*/
|
||||
, 'S'
|
||||
);
|
||||
}
|
||||
else {
|
||||
jspdf.rect( posObj.x * px2pt /*x1*/
|
||||
, posObj.y * px2pt /*y1*/
|
||||
, tmpw * px2pt /*x2*/
|
||||
, posObj.h * px2pt /*y2*/
|
||||
, 'F'
|
||||
);
|
||||
}
|
||||
|
||||
break;
|
||||
case "barcode" :
|
||||
opt = {};
|
||||
msrc = LibJavascript.AlfaKeyGen(5);
|
||||
opt.x = Math.round(posObj.x*px2pt);
|
||||
opt.y = Math.round(posObj.y*px2pt);
|
||||
opt.width = Math.round(posObj.w*px2pt);
|
||||
opt.height = Math.round(posObj.h*px2pt);
|
||||
opt.alias = msrc;
|
||||
opt.nPage = jspdf.internal.getCurrentPageInfo().pageNumber;
|
||||
opt.barcode = true;
|
||||
opt._newWidth = 0;
|
||||
opt._msrc = msrc;
|
||||
repobj.optMapImg.push(opt);
|
||||
repobj.imgMap[msrc] = new Image();
|
||||
repobj.imgMap[msrc].id = msrc;
|
||||
loaded = function(){
|
||||
repobj.imgCount++;
|
||||
repobj.imgMap[msrc] = this;
|
||||
var item = repobj.optMapImg.filter(function(item){ return item._msrc == msrc; }),
|
||||
iw = this.width;
|
||||
if (!Empty(item) && !Empty(item[0])) {
|
||||
if (item[0].width < iw)
|
||||
item[0]._newWidth = iw * px2pt;
|
||||
}
|
||||
}
|
||||
generateBarcode(item, value, repobj.imgMap[msrc], opt.width, opt.height, loaded);
|
||||
break;
|
||||
case "html" :
|
||||
if (!repobj.simulatedData) {
|
||||
var mid = k + "_" + (item.colIdx || "") + "_" + zoneid + "_" + item.fieldDetail.alias,
|
||||
mvalue = item.style.htmlSrc;
|
||||
if (!item.isGeneric)
|
||||
mvalue = value;
|
||||
repobj.renderHTMLtoCanvas(item, mvalue, mid);
|
||||
|
||||
if (noprint && !item.isGeneric) { }
|
||||
else {
|
||||
opt = {};
|
||||
opt.x = posObj.x*px2pt;
|
||||
opt.y = posObj.y*px2pt;
|
||||
opt.width = posObj.w*px2pt;
|
||||
opt.height = posObj.h*px2pt;
|
||||
opt.alias = mid;
|
||||
opt.nPage = jspdf.internal.getCurrentPageInfo().pageNumber;
|
||||
repobj.optMapImg.push(opt);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "image":
|
||||
if (!repobj.simulatedData) {
|
||||
if (item.isGeneric)
|
||||
msrc = item.style.imageSrc;
|
||||
else
|
||||
msrc = repobj.propertyValue[k][item.fieldDetail.alias];
|
||||
|
||||
// tratto il caso src:tooltip che potrebbe arrivarmi da griglia o da query
|
||||
var dp_split = msrc.split(":");
|
||||
if (dp_split.length > 1)
|
||||
msrc = dp_split[0];
|
||||
|
||||
if (msrc.indexOf(repobj.rootApp)!=0 && msrc.indexOf(repobj.rootAppB)!=0 && !Empty(msrc))
|
||||
msrc = repobj.rootApp + msrc;
|
||||
|
||||
if (noprint && !item.isGeneric) { }
|
||||
else {
|
||||
if (repobj.offline) {
|
||||
myimg = repobj.imgMap[msrc];
|
||||
if (typeof(myimg) != "undefined")
|
||||
jspdf.addImage(myimg,"png",posObj.x*px2pt,posObj.y*px2pt,posObj.w*px2pt,posObj.h*px2pt,myimg.src);
|
||||
}
|
||||
else {
|
||||
opt = {};
|
||||
opt.x = posObj.x*px2pt;
|
||||
opt.y = posObj.y*px2pt;
|
||||
if (item.isGeneric && item.fieldDetail && item.fieldDetail.type == "checkbox")
|
||||
opt.width = opt.height = Math.min(posObj.w, posObj.h) * px2pt;
|
||||
else {
|
||||
opt.width = posObj.w*px2pt;
|
||||
opt.height = posObj.h*px2pt;
|
||||
}
|
||||
opt.alias = msrc;
|
||||
opt.nPage = jspdf.internal.getCurrentPageInfo().pageNumber;
|
||||
repobj.optMapImg.push(opt);
|
||||
|
||||
if (!Empty(msrc) && !(msrc in repobj.imgMap)) {
|
||||
repobj.imgMap[msrc] = new Image();
|
||||
repobj.imgMap[msrc].src = msrc;
|
||||
|
||||
// onload
|
||||
loaded = function() {
|
||||
repobj.imgCount++;
|
||||
}
|
||||
|
||||
if (repobj.imgMap[msrc].complete)
|
||||
loaded();
|
||||
else
|
||||
repobj.imgMap[msrc].addEventListener('load', loaded);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "signmup":
|
||||
opt = {};
|
||||
opt.title = item.signmup.title;
|
||||
opt.obligatory = item.signmup.brequired;
|
||||
opt.requirePosition = item.signmup.bgeoposition;
|
||||
opt.signIdx = item.signmup.sequence;
|
||||
var df = item.signmup.dateformat;
|
||||
var tf = item.signmup.timeformat;
|
||||
if(df == 'None') df = '';
|
||||
if(tf == 'None') tf = '';
|
||||
if(!Empty(df)){
|
||||
df = Strtran(df, "Y", "y");
|
||||
df = Strtran(df, "D", "d");
|
||||
}
|
||||
if(!Empty(tf)){
|
||||
tf = Strtran(tf, "M", "m");
|
||||
tf = Strtran(tf, "S", "s");
|
||||
}
|
||||
if(!Empty(df) && !Empty(tf)) df = df + ' ' + tf;
|
||||
else if(Empty(df) && !Empty(tf)) df = tf;
|
||||
if(!Empty(df))
|
||||
opt.dateFormat = df;
|
||||
opt.hideExtraText = item.signmup.bhideextra;
|
||||
opt.x = Math.round(posObj.x*px2pt);
|
||||
opt.y = Math.round(posObj.y*px2pt);
|
||||
opt.width = Math.round(posObj.w*px2pt);
|
||||
opt.height = Math.round(posObj.h*px2pt);
|
||||
jspdf.createMarkup(opt);
|
||||
break;
|
||||
default:
|
||||
var numr = 1;
|
||||
value = value + '';
|
||||
var fname = item.style.font.fontName.toLowerCase();
|
||||
if (fname.indexOf("times") >= 0)
|
||||
fname = "times";
|
||||
if (!Empty(value))
|
||||
numr = value.split(/[\n\r]/g).length;
|
||||
txtDimensions = repobj.getTextDimensions(value
|
||||
, {
|
||||
name: fname
|
||||
, size: item.style.font.fontSize
|
||||
, weight: item.style.font.bold ? 'bold' : 'normal'
|
||||
, italic: item.style.font.italic ? 'italic' : 'normal'
|
||||
}
|
||||
);
|
||||
posObj.y += txtDimensions.height / numr;
|
||||
// font
|
||||
if (item.style.font.bold)
|
||||
fstyle = "bold";
|
||||
if (item.style.font.italic)
|
||||
fstyle += "italic";
|
||||
/*if(!Empty(fstyle))
|
||||
jspdf.setFontStyle(fstyle);
|
||||
else
|
||||
jspdf.setFontStyle("normal");*/
|
||||
if (!Empty(fstyle))
|
||||
jspdf.setFont(fname, fstyle);
|
||||
else
|
||||
jspdf.setFont(fname, "normal");
|
||||
var fsize = convertStringToPx(item.style.font.fontSize);
|
||||
jspdf.setFontSize(fsize * px2pt);
|
||||
jspdf.setTextColor(item.style.font.fontColor);
|
||||
|
||||
if (item.style.font.right)
|
||||
posObj.x += posObj.w - txtDimensions.width;
|
||||
else if (item.style.font.center)
|
||||
posObj.x += (posObj.w - txtDimensions.width) / 2;
|
||||
|
||||
if (noprint && item.type == 'field' && !item.isGeneric && item.typeView != "image")
|
||||
value = "";
|
||||
jspdf.text(value + '', posObj.x * px2pt, posObj.y * px2pt);
|
||||
|
||||
if (item.style.font.underline) {
|
||||
jspdf.setDrawColor(item.style.font.fontColor);
|
||||
jspdf.line(posObj.x * px2pt, (posObj.y + 2) * px2pt, (posObj.x + txtDimensions.width + 2) * px2pt, (posObj.y + 2) * px2pt);
|
||||
jspdf.setDrawColor("#000000"); // ripristino default
|
||||
}
|
||||
|
||||
if (item.style.font.strikeout) {
|
||||
jspdf.setDrawColor(item.style.font.fontColor);
|
||||
jspdf.line(posObj.x * px2pt, (posObj.y - (fsize / 2) + 2) * px2pt, (posObj.x + txtDimensions.width + 2) * px2pt, (posObj.y - (fsize / 2) + 2) * px2pt);
|
||||
jspdf.setDrawColor("#000000"); // ripristino default
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
if( value == null ) value = '';
|
||||
insertinpdf(this.jspdf, this, zoneid);
|
||||
insertinpdf(this.jspdfprint, this, zoneid);
|
||||
}; // addItemInZone
|
||||
|
||||
RepDocumentPdf.prototype.renderHTMLtoCanvas = function (item, value, ctrlid) {
|
||||
var doc = document,
|
||||
mdiv = doc.createElement("div"),
|
||||
id = ctrlid + "_canvimg";
|
||||
if (!Empty(doc.getElementById(id)))
|
||||
mdiv = doc.getElementById(id);
|
||||
else {
|
||||
mdiv.id = id;
|
||||
mdiv.style.visibility = "hidden";
|
||||
mdiv.innerHTML = value;
|
||||
mdiv.style.position = "absolute";
|
||||
mdiv.style.top = "0px";
|
||||
mdiv.style.left = "0px";
|
||||
mdiv.style.width = item.position.width + "px";
|
||||
mdiv.style.height = item.position.height + "px";
|
||||
doc.body.appendChild(mdiv);
|
||||
}
|
||||
|
||||
if (typeof html2canvas !== 'undefined') {
|
||||
var repobj = this;
|
||||
html2canvas(mdiv, {
|
||||
onrendered : function (newCanvas) {
|
||||
var img = new Image();
|
||||
img.src = newCanvas.toDataURL('image/png');
|
||||
repobj.imgMap[Strtran(id, "_canvimg", "")] = img;
|
||||
repobj.imgCount++;
|
||||
if (doc.getElementById(id))
|
||||
doc.getElementById(id).parentNode.removeChild(doc.getElementById(id));
|
||||
},
|
||||
width: item.position.width,
|
||||
height: item.position.height
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var mcounter = 1;
|
||||
RepDocumentPdf.prototype.checkImages = function () {
|
||||
var repobj = this;
|
||||
var currimg = repobj.imgCount;
|
||||
var totimg = Object.keys(repobj.imgMap).length;
|
||||
|
||||
if (currimg != totimg && mcounter <= 5) {
|
||||
setTimeout( function () {
|
||||
repobj.checkImages();
|
||||
mcounter ++;
|
||||
}, 250)
|
||||
return;
|
||||
}
|
||||
|
||||
putImagesInPDF(this.jspdf);
|
||||
if (this.jspdfprint)
|
||||
putImagesInPDF(this.jspdfprint);
|
||||
|
||||
function putImagesInPDF(jspdf) {
|
||||
/* potrebbero esserci problemi in rendering delle immagini gif */
|
||||
for (var kk = 0; kk < repobj.optMapImg.length; kk++) {
|
||||
jspdf.setPage(repobj.optMapImg[kk].nPage);
|
||||
try {
|
||||
if (repobj.optMapImg[kk].alias in repobj.imgMap) {
|
||||
var img = repobj.imgMap[repobj.optMapImg[kk].alias];
|
||||
jspdf.addImage( img,
|
||||
"png",
|
||||
repobj.optMapImg[kk].x,
|
||||
repobj.optMapImg[kk].y,
|
||||
repobj.optMapImg[kk]._newWidth || repobj.optMapImg[kk].width,
|
||||
repobj.optMapImg[kk].height,
|
||||
repobj.optMapImg[kk].alias
|
||||
);
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
//console.log(e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.endProcess();
|
||||
delete this.obj.emptyzone;
|
||||
|
||||
if (this.end && this.format == "IARViewer" && window.navigator.userAgent.match( /zRuntime/ )) {
|
||||
this.view(this.fncCallBack);
|
||||
}
|
||||
}
|
||||
|
||||
RepDocumentPdf.prototype.getDataUrl = function () {
|
||||
datauristring || ( datauristring = this.jspdf.output( 'datauristring' ) );
|
||||
return datauristring;
|
||||
};
|
||||
|
||||
RepDocumentPdf.prototype.download = function () {
|
||||
var akey = LibJavascript.AlfaKeyGen(5);
|
||||
var a = document.createElement('a');
|
||||
a.setAttribute("id", akey);
|
||||
document.body.appendChild(a);
|
||||
this.generatePdfUrl(a, true);
|
||||
};
|
||||
|
||||
RepDocumentPdf.prototype.addInFrame = function (iframe) {
|
||||
if (iframe) {
|
||||
if (Empty(iframe.name))
|
||||
iframe.name = iframe.id;
|
||||
this.generatePdfUrl(iframe);
|
||||
}
|
||||
this.removeLoading();
|
||||
};
|
||||
|
||||
RepDocumentPdf.prototype.print = function () {
|
||||
if(this.jspdfprint==null) return;
|
||||
var self = this;
|
||||
if ( window.navigator.userAgent.match( /zRuntime/ ) ) {
|
||||
window.SPOfflineLib.importCordova(
|
||||
function saveAndPrint () {
|
||||
window.zRuntime.pdf.print( self.getDataUrl()
|
||||
, function success () {}
|
||||
, fail
|
||||
);
|
||||
}
|
||||
, fail
|
||||
);
|
||||
|
||||
function fail (error) {
|
||||
console.log( error );
|
||||
alert( "Unexpected error: " + error );
|
||||
}
|
||||
}
|
||||
else {
|
||||
var iframeid = this.uid + "streamiframe"
|
||||
, iframe = document.getElementById( iframeid )
|
||||
;
|
||||
if ( !iframe ) {
|
||||
iframe = document.createElement("IFRAME");
|
||||
iframe.id = iframeid;
|
||||
iframe.name = iframeid;
|
||||
iframe.width = "1px";
|
||||
iframe.height = "1px";
|
||||
iframe.frameborder = 0;
|
||||
iframe.style.border = 0;
|
||||
iframe.allowTransparency = true;
|
||||
document.body.appendChild(iframe);
|
||||
}
|
||||
this.generatePdfUrl(iframe);
|
||||
}
|
||||
};
|
||||
|
||||
RepDocumentPdf.prototype.view = function (successCallback) {
|
||||
var self = this;
|
||||
if ( window.navigator.userAgent.match( /zRuntime/ ) ) {
|
||||
function fail (error) {
|
||||
console.log( error );
|
||||
alert( "Unexpected error: " + error );
|
||||
}
|
||||
|
||||
function createView () {
|
||||
zRuntime.pdf.open( self.getDataUrl()
|
||||
, self.options
|
||||
, success
|
||||
, fail
|
||||
);
|
||||
function success ( resultObj ) {
|
||||
/*
|
||||
resultObj
|
||||
{
|
||||
modified: indica se il pdf ha subito un processo di modifica da parte del viewer interno
|
||||
fileUri: percorso del file pdf sul dispositivo (se returnType = fileUri)
|
||||
base64: base64 del file pdf (se returnType = base64)
|
||||
}
|
||||
*/
|
||||
if(successCallback){
|
||||
successCallback(resultObj, self);
|
||||
}
|
||||
window.close();
|
||||
}
|
||||
}
|
||||
|
||||
(window.SPMobileLib || window.SPOfflineLib).importCordova( createView, fail );
|
||||
}
|
||||
else {
|
||||
var iframeid = this.uid+"streamiframe"
|
||||
, iframe = document.getElementById(iframeid)
|
||||
;
|
||||
if ( !iframe ) {
|
||||
iframe = document.createElement("IFRAME");
|
||||
iframe.id = iframeid;
|
||||
iframe.name = iframeid;
|
||||
iframe.width = "1px";
|
||||
iframe.height = "1px";
|
||||
iframe.frameborder = 0;
|
||||
iframe.style.border = 0;
|
||||
iframe.allowTransparency = true;
|
||||
document.body.appendChild(iframe);
|
||||
}
|
||||
this.generatePdfUrl(iframe);
|
||||
}
|
||||
};
|
||||
|
||||
RepDocumentPdf.prototype.drawPreviewValidator = function () {
|
||||
var mlimits;
|
||||
if(this.obj.page.format == 'custom') {
|
||||
mlimits = [];
|
||||
mlimits[0] = convertStringToPx(this.obj.page.width + "mm");
|
||||
mlimits[1] = convertStringToPx(this.obj.page.height + "mm");
|
||||
}
|
||||
else if (window.jsPDFPageFormats)
|
||||
mlimits = window.jsPDFPageFormats[this.obj.page.format.toLowerCase()];
|
||||
if (this.jspdf)
|
||||
drawTextValidator(this.jspdf, mlimits, this.obj, this.watermark);
|
||||
if (this.jspdfprint)
|
||||
drawTextValidator(this.jspdfprint, mlimits, this.obj, this.watermark);
|
||||
|
||||
function drawTextValidator(jspdf, mlimits, obj, watermark) {
|
||||
//jspdf.setFontStyle("bold");
|
||||
jspdf.setFont("helvetica", "bold");
|
||||
jspdf.setFontSize(24);
|
||||
jspdf.setTextColor("#E51400");
|
||||
if(!Empty(watermark)) {
|
||||
var w = jspdf.getStringUnitWidth(watermark) * 24;
|
||||
if (obj.page.orientation.toLowerCase() == "portrait")
|
||||
jspdf.text(watermark, mlimits[0]/4, mlimits[1]/2 - Math.sin(45)*w/2, -45);
|
||||
else
|
||||
jspdf.text(watermark, mlimits[1]/4, mlimits[0]/2 - Math.sin(45)*w/2, -45);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
RepDocumentPdf.prototype.generatePdfUrl = function (htmlItem, isDownload) {
|
||||
var durl = this.getDataUrl(),
|
||||
end_pos = durl.indexOf("base64,"),
|
||||
len = end_pos + ("base64,").length,
|
||||
mData = b64toBlob(durl.substr(len), "application/pdf", true),
|
||||
mUrl = URL.createObjectURL(mData);
|
||||
if (isDownload) {
|
||||
if (typeof htmlItem.download == "undefined") {
|
||||
if (navigator.msSaveBlob)
|
||||
navigator.msSaveBlob(mData, (Empty(this.name) ? LibJavascript.AlfaKeyGen(10) : this.name) + ".pdf");
|
||||
else
|
||||
(window.PSAlert||window).alert('Browser Not Implemented Client Side Download!!!');
|
||||
}
|
||||
else {
|
||||
htmlItem.href = mUrl;
|
||||
htmlItem.download = (Empty(this.name) ? LibJavascript.AlfaKeyGen(10) : this.name) + ".pdf";
|
||||
htmlItem.click();
|
||||
|
||||
}
|
||||
document.body.removeChild(htmlItem);//rimuovere il link
|
||||
}
|
||||
else {
|
||||
var framedoc = ( htmlItem.contentWindow || htmlItem.contentDocument ).document;
|
||||
var srcurl;
|
||||
if (IsIE()) {
|
||||
if(mData.size <= 1572229) { // valore in B testato su 2855 record in stampa da zoom e ultimo accettabile per la stampa - EG 20161020
|
||||
srcurl = ZtVWeb.SPWebRootURL + "/servlet/Base64DecodeDownload?base64data=" + durl + "&fileName=" + (Empty(this.name) ? LibJavascript.AlfaKeyGen(10) : this.name) + ".pdf";
|
||||
windowOpenForeground(srcurl, htmlItem.name, null, null, null, framedoc);
|
||||
}
|
||||
else {
|
||||
navigator.msSaveOrOpenBlob(mData)
|
||||
htmlItem.frameBorder = "no";
|
||||
htmlItem.allowTransparency = true;
|
||||
var msg = "RPT_TOO_BIG_FOR_VIEW";
|
||||
srcurl = "../jsp-system/SPReportMaskMessage_portlet.jsp?hideWarning=true&msgBox=" + msg;
|
||||
windowOpenForeground(srcurl, htmlItem.name, null, null, null, framedoc);
|
||||
}
|
||||
}
|
||||
else
|
||||
htmlItem.src = mUrl;
|
||||
}
|
||||
}
|
||||
|
||||
return new RepDocumentPdf( name, uid );
|
||||
} // privateContext
|
||||
window.RepDocumentPdf = privateContext;
|
||||
})(window, document);
|
||||
2263
PortalStudio/JSReportDocumentRuntime.js
Normal file
453
PortalStudio/JSReportDocumentText.js
Normal file
@ -0,0 +1,453 @@
|
||||
/* global getFieldsList getFieldsObjList getFieldsDescMap setCurrentDateTime getBlob*/
|
||||
|
||||
/*jshint laxcomma: true */
|
||||
/*** CLASSE RepDocumentText: gestisce la generazione/export del documento (report) in formato csv (standard e non)
|
||||
* Eredita da RepDocument - JSReportDocumentRuntime.js
|
||||
*/
|
||||
RepDocumentText = function (name, uid, format, isStandard, csvSeparator, csvHeader) {
|
||||
RepDocument.call(this);
|
||||
this.format = format.toLowerCase();
|
||||
this.gcurrpage = null;
|
||||
this.name = name;
|
||||
this.progrid = 0;
|
||||
this.datetime = new Date();
|
||||
if(Empty(uid)) uid = LibJavascript.AlfaKeyGen(5);
|
||||
this.uid = uid;
|
||||
this.parent = null;
|
||||
this.document = null;
|
||||
this.window = null;
|
||||
this.separator = isStandard?",":";";
|
||||
csvSeparator = LRTrim(csvSeparator);
|
||||
if(!Empty(csvSeparator) && Len(csvSeparator)==1)
|
||||
this.separator = csvSeparator;
|
||||
this.csvHeader = csvHeader;
|
||||
this.fieldsuid = [];
|
||||
};
|
||||
|
||||
RepDocumentText.prototype = new RepDocument();
|
||||
RepDocumentText.prototype.constructor = RepDocumentText;
|
||||
|
||||
RepDocumentText.prototype.Ctrl = function(id){
|
||||
return this.document.getElementById(id);
|
||||
};
|
||||
|
||||
RepDocumentText.prototype.initProcess = function(allfields,container,bprint,imgfields,simulatedData){
|
||||
this.container = container;
|
||||
this.setParent();
|
||||
this.setDocument();
|
||||
this.setWindow();
|
||||
this.allfields = allfields;
|
||||
this.simulatedData = simulatedData;
|
||||
this.exportString = "";
|
||||
this.fieldsuid = getFieldsList(this.obj);
|
||||
this.fieldsobjs = getFieldsObjList(this.obj);
|
||||
this.fielddesc = getFieldsDescMap(this.obj);
|
||||
this.initLastRow();
|
||||
this.lastGrp = [];
|
||||
this.newLine = "\n";
|
||||
this.lastRec = [];
|
||||
this.writeHeader();
|
||||
};
|
||||
|
||||
RepDocumentText.prototype.initLastRow = function(){
|
||||
this.lastRow = [];
|
||||
var rowobj = {};
|
||||
for(var i=0; i<this.fieldsuid.length; i++){
|
||||
if(this.format=="csvs" || this.format=="csv")
|
||||
rowobj = {value: "", item: ""};
|
||||
else
|
||||
rowobj = {value: "", item: this.fieldsobjs[this.fieldsuid[i]]};
|
||||
this.lastRow.push(rowobj);
|
||||
}
|
||||
}
|
||||
|
||||
RepDocumentText.prototype.endProcess = function(){
|
||||
this.end = true;
|
||||
if (this.fieldsuid.length > 1)
|
||||
this.writeRow();
|
||||
this.writeFooter();
|
||||
if (this.format.indexOf("xml") < 0 || this.autodownload)
|
||||
this.download();
|
||||
else { // xml - xmls
|
||||
if (this.autodownload)
|
||||
this.download();
|
||||
else
|
||||
this.printPreview();
|
||||
}
|
||||
this.execFncCallback();
|
||||
};
|
||||
|
||||
RepDocumentText.prototype.drawCover = function(/*coverobj*/){
|
||||
};
|
||||
|
||||
RepDocumentText.prototype.startLoading = function(){
|
||||
}
|
||||
|
||||
RepDocumentText.prototype.updateLoading = function(){
|
||||
}
|
||||
|
||||
RepDocumentText.prototype.appendFontsInDocument = function () {
|
||||
}
|
||||
|
||||
RepDocumentText.prototype.setLimitPage = function(){
|
||||
this.gwork.limitpage = Infinity;
|
||||
}
|
||||
|
||||
RepDocumentText.prototype.newPage = function(k,firstpage){
|
||||
if(Empty(firstpage) && this.obj.showPageZone){
|
||||
this.drawZone(k,'pagefooter','',false,true);
|
||||
this.drawZone(k,'pageheader','',false);
|
||||
}
|
||||
}
|
||||
|
||||
RepDocumentText.prototype.getLastChildElement = function(){
|
||||
return {};
|
||||
}
|
||||
|
||||
RepDocumentText.prototype.addCurrentZone = function(){
|
||||
}
|
||||
|
||||
RepDocumentText.prototype.checkLimitPage = function(){
|
||||
return false;
|
||||
}
|
||||
|
||||
RepDocumentText.prototype.splitStringCheck = function(){
|
||||
return false;
|
||||
}
|
||||
|
||||
RepDocumentText.prototype.updateZoneHeight = function(){
|
||||
}
|
||||
|
||||
RepDocumentText.prototype.writeHeader = function(){
|
||||
if(this.csvHeader && (this.format=="csvs" || this.format=="csv") && (this.fieldsuid.length > 0)){
|
||||
var tmp = "";
|
||||
for (var i = 0; i < this.fieldsuid.length - 1; i++) {
|
||||
tmp = "" + this.fielddesc[this.fieldsuid[i]];
|
||||
this.exportString += convertCsv(tmp, this.separator) + this.separator;
|
||||
}
|
||||
tmp = "" + this.fielddesc[this.fieldsuid[this.fieldsuid.length - 1]];
|
||||
this.exportString += convertCsv(tmp, this.separator);
|
||||
}
|
||||
else if(this.format.indexOf("xml")>=0){
|
||||
var txt="<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+this.newLine;
|
||||
this.exportString=txt;
|
||||
this.exportString+="<REPORT ";
|
||||
this.exportString+="NAME=\""+this.obj.name+"\" ";
|
||||
this.exportString+="QUERY=\""+this.obj.datasource+"\"";
|
||||
this.exportString+=">"+this.newLine;
|
||||
if(this.format=="xml")
|
||||
this.exportString+="<RECORDS>"+this.newLine;
|
||||
}
|
||||
}
|
||||
|
||||
RepDocumentText.prototype.writeFooter = function(){
|
||||
if(this.format.indexOf("xml")>=0){
|
||||
if(this.format=="xml")
|
||||
this.exportString+="</RECORDS>"+this.newLine;
|
||||
this.exportString+="</REPORT>";
|
||||
}
|
||||
}
|
||||
|
||||
RepDocumentText.prototype.getItemValue = function (k, item, zoneid, repObj, useLastRecord) {
|
||||
if (item.type != "field" || (item.fieldDetail && Empty(item.fieldDetail.alias)))
|
||||
return "";
|
||||
var value;
|
||||
var mdata = useLastRecord ? repObj.lastRec : repObj.propertyValue[k];
|
||||
if (item.typeView.indexOf("date") >= 0) {
|
||||
if (mdata[item.fieldDetail.alias + '##pic'])
|
||||
value = mdata[item.fieldDetail.alias + '##pic'];
|
||||
else {
|
||||
value = mdata[item.fieldDetail.alias];
|
||||
value = setCurrentDateTime(value, item);
|
||||
}
|
||||
}
|
||||
else if (item.typeView == "numeric") {
|
||||
if (item.calculation && !Empty(item.calculation.type) && item.calculation.type != 'none')
|
||||
value = repObj.calcObjs[item.calculation.type][item.fieldDetail.alias][item.uid];
|
||||
else if (mdata[item.fieldDetail.alias + '##pic'])
|
||||
value = mdata[item.fieldDetail.alias + '##pic'];
|
||||
else {
|
||||
value = mdata[item.fieldDetail.alias];
|
||||
value = repObj.setFormatNumber(value, item.fieldDetail.len, item.fieldDetail.dec, item.stdPicture);
|
||||
}
|
||||
}
|
||||
else if (mdata[item.fieldDetail.alias + '##pic'])
|
||||
value = mdata[item.fieldDetail.alias + '##pic'];
|
||||
else
|
||||
value = Format(mdata[item.fieldDetail.alias], item.fieldDetail.len, item.fieldDetail.dec, item.stdPicture);
|
||||
return value;
|
||||
};
|
||||
|
||||
RepDocumentText.prototype.isEoPreview = function () {
|
||||
return false;
|
||||
}
|
||||
|
||||
RepDocumentText.prototype.addItemInZone = function(k,item,objzone,zoneid,value/*,yRel*/){
|
||||
var curindex = this.fieldsuid.indexOf(item.uid);
|
||||
if(curindex>=0 && this.format!="xmls"){
|
||||
if (this.fieldsuid.length == 1) {
|
||||
this.lastRow[curindex].value = value;
|
||||
this.writeRow();
|
||||
}
|
||||
else {
|
||||
if(this.grpBreak){
|
||||
this.resetRow(curindex);
|
||||
this.grpBreak = false;
|
||||
}
|
||||
if(curindex<this.lastElement)
|
||||
this.writeRow();
|
||||
if(zoneid.indexOf("page")>=0)
|
||||
value = "";
|
||||
this.lastRow[curindex].value = value;
|
||||
this.lastElement = curindex;
|
||||
}
|
||||
}
|
||||
else if(curindex>=0){
|
||||
this.lastRow[curindex].value = value;
|
||||
if(zoneid.indexOf("report")>=0)
|
||||
this.writeRow(zoneid,curindex);
|
||||
else if(zoneid.indexOf("group")>=0){
|
||||
if(!this.grpBreak){
|
||||
if(!this.lastGrp[zoneid])
|
||||
this.lastGrp[zoneid] = [];
|
||||
if(!this.lastGrp[zoneid][curindex+""])
|
||||
this.lastGrp[zoneid][curindex+""] = [];
|
||||
this.lastGrp[zoneid][curindex+""].push(value);
|
||||
}
|
||||
else{
|
||||
this.writeRow();
|
||||
this.lastGrp = [];
|
||||
this.lastGrp[zoneid] = [];
|
||||
this.lastGrp[zoneid][curindex+""] = [];
|
||||
this.lastGrp[zoneid][curindex+""].push(value);
|
||||
this.grpBreak = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
RepDocumentText.prototype.resetRow = function(fromidx){
|
||||
for(var i=fromidx; i<this.lastRow.length; i++)
|
||||
this.lastRow[i].value = "";
|
||||
}
|
||||
|
||||
RepDocumentText.prototype.writeRow = function(zoneid,curindex){
|
||||
var i, j, keys;
|
||||
// ? Check if a string starts with a number
|
||||
function startsWithNumber(str) {
|
||||
return /^\d/.test(str);
|
||||
}
|
||||
function encodeXMLTag(tagname) {
|
||||
var ret = encodeSpecialCharsXML(tagname);
|
||||
if (startsWithNumber(ret)) ret = 'initWith' + ret;
|
||||
return ret;
|
||||
}
|
||||
function getXMLRow(tagname, tagvalue) {
|
||||
var ret = "";
|
||||
ret += "<" + encodeXMLTag(tagname) + ">";
|
||||
if( tagvalue != null ) ret += encodeTextForXML(tagvalue);
|
||||
ret += "</" + encodeXMLTag(tagname) + ">";
|
||||
return ret;
|
||||
}
|
||||
if ((this.format == "csvs" || this.format == "csv") && (this.lastRow.length > 0)) {
|
||||
this.exportString += this.newLine;
|
||||
var tmp = "";
|
||||
for (i = 0; i < this.lastRow.length - 1; i++) {
|
||||
tmp = "" + this.lastRow[i].value;//Strtran(this.lastRow[i].value," ","");
|
||||
this.exportString += convertCsv(tmp, this.separator) + this.separator;
|
||||
}
|
||||
if( this.lastRow[this.lastRow.length - 1].value!=null ) tmp = "" + this.lastRow[this.lastRow.length - 1].value;//Strtran(this.lastRow[this.lastRow.length-1].value," ","");
|
||||
this.exportString += convertCsv(tmp, this.separator);
|
||||
}
|
||||
else if(this.format=="csv2"){
|
||||
var mstr,mlen,diff;
|
||||
for(i=0; i<this.lastRow.length; i++){
|
||||
mstr = this.lastRow[i].value;
|
||||
if( mstr == null ) mstr = '';
|
||||
mlen = this.lastRow[i].item.len;
|
||||
diff = 0;
|
||||
if(mstr.length<mlen){
|
||||
diff = mlen-mstr.length;
|
||||
for(var s=0; s<diff; s++)
|
||||
mstr+=" ";
|
||||
}
|
||||
this.exportString+=mstr.slice(0,mlen);
|
||||
}
|
||||
this.exportString+=this.newLine;
|
||||
}
|
||||
else if(this.format=="xml"){
|
||||
this.exportString+="<RECORD>"+this.newLine;
|
||||
for(i=0; i<this.lastRow.length; i++){
|
||||
this.exportString+="<FIELD ";
|
||||
this.exportString+="NAME=\""+encodeSpecialCharsXML(this.fielddesc[this.fieldsuid[i]])+"\" ";
|
||||
this.exportString+="SIZE=\""+this.lastRow[i].item.len+"\" ";
|
||||
this.exportString+="TYPE=\""+this.lastRow[i].item.type+"\"";
|
||||
this.exportString+=">";
|
||||
if( this.lastRow[i].value != null ) this.exportString+=encodeTextForXML(this.lastRow[i].value);
|
||||
this.exportString+="</FIELD>"+this.newLine;
|
||||
}
|
||||
this.exportString+="</RECORD>"+this.newLine;
|
||||
}
|
||||
else if(this.format=="xmls"){
|
||||
if(zoneid && zoneid.indexOf("report")>=0){
|
||||
this.exportString+=getXMLRow(Strtran(this.fielddesc[this.fieldsuid[curindex]]," ",""),this.lastRow[curindex].value);
|
||||
this.exportString+=this.newLine;
|
||||
}
|
||||
else{
|
||||
var grp = "<SECTION EXPRESSION=\""+this.obj.groupbreak.items.toString()+"\">";
|
||||
this.exportString+=grp+this.newLine;
|
||||
if(this.lastGrp.groupheader){
|
||||
keys = Object.keys(this.lastGrp.groupheader);
|
||||
for(j=0; j<keys.length; j++){
|
||||
this.exportString+=getXMLRow(Strtran(this.fielddesc[this.fieldsuid[parseInt(keys[j])]]," ",""),this.lastGrp.groupheader[keys[j]][0]);
|
||||
this.exportString+=this.newLine;
|
||||
}
|
||||
}
|
||||
if(this.lastGrp.groupbody){
|
||||
keys = Object.keys(this.lastGrp.groupbody);
|
||||
var dlen = this.lastGrp.groupbody[keys[0]].length;
|
||||
for(i=0; i<dlen; i++){
|
||||
this.exportString+="<DETAIL>"+this.newLine;
|
||||
for(j=0; j<keys.length; j++){
|
||||
this.exportString+=getXMLRow(Strtran(this.fielddesc[this.fieldsuid[parseInt(keys[j])]]," ",""),this.lastGrp.groupbody[keys[j]][i]);
|
||||
this.exportString+=this.newLine;
|
||||
}
|
||||
this.exportString+="</DETAIL>"+this.newLine;
|
||||
}
|
||||
}
|
||||
if(this.lastGrp.groupfooter){
|
||||
keys = Object.keys(this.lastGrp.groupfooter);
|
||||
for(j=0; j<keys.length; j++){
|
||||
this.exportString+=getXMLRow(Strtran(this.fielddesc[this.fieldsuid[parseInt(keys[j])]]," ",""),this.lastGrp.groupfooter[keys[j]][0]);
|
||||
this.exportString+=this.newLine;
|
||||
}
|
||||
}
|
||||
this.exportString+="</SECTION>"+this.newLine;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RepDocumentText.prototype.pageNumber = function(){
|
||||
}
|
||||
|
||||
RepDocumentText.prototype.removeLastLabelContinue = function(){
|
||||
}
|
||||
|
||||
RepDocumentText.prototype.addLicense = function(){
|
||||
}
|
||||
|
||||
RepDocumentText.prototype.download = function () {
|
||||
var mUrl,
|
||||
a = document.createElement('a');
|
||||
document.body.appendChild(a);
|
||||
a.style.display = "none";
|
||||
var ext = ".";
|
||||
if(this.format=="csvs" || this.format=="csv")
|
||||
ext+="csv";
|
||||
else if(this.format=="csv2")
|
||||
ext+="txt";
|
||||
else if(this.format.indexOf("xml")>=0)
|
||||
ext+="xml";
|
||||
var filename = (Empty(this.name) ? LibJavascript.AlfaKeyGen(10) : this.name) + ext,
|
||||
_Blob = getBlob();
|
||||
if(typeof a.download == "undefined"){
|
||||
if (navigator.msSaveBlob) {
|
||||
var csvData;
|
||||
if(this.format.indexOf("xml")>=0) {
|
||||
csvData = new _Blob(["\ufeff", this.exportString], {type: 'text/xml;charset=utf-8;'});
|
||||
}
|
||||
else {
|
||||
csvData = new _Blob(["\ufeff", this.exportString], {type: 'text/csv;charset=utf-8;'});
|
||||
}
|
||||
//navigator.msSaveBlob("\ufeff", csvData, filename);
|
||||
navigator.msSaveOrOpenBlob(csvData, filename);
|
||||
}
|
||||
else {
|
||||
(window.PSAlert||window).alert('Browser Not Implemented Client Side Download!!!');
|
||||
}
|
||||
}
|
||||
else {
|
||||
var typeApp = 'text/';
|
||||
if(this.format.indexOf("csv")>=0)
|
||||
typeApp+="csv";
|
||||
else // xml
|
||||
typeApp+="xml";
|
||||
typeApp += ';charset=utf-8;';
|
||||
var mData = new _Blob(["\ufeff", this.exportString], {type: typeApp});
|
||||
if (IsEdge()) {
|
||||
// https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/7260192/
|
||||
navigator.msSaveOrOpenBlob(mData, filename);
|
||||
}
|
||||
else {
|
||||
mUrl = URL.createObjectURL(mData);
|
||||
a.href = mUrl;
|
||||
a.download = filename;
|
||||
a.click();
|
||||
}
|
||||
document.body.removeChild(a);
|
||||
}
|
||||
};
|
||||
|
||||
RepDocumentText.prototype.drawPreviewValidator = function () {};
|
||||
|
||||
RepDocumentText.prototype.printPreview = function () {
|
||||
var _Blob = getBlob(),
|
||||
mData = new _Blob(["\ufeff", this.exportString], {type: 'text/xml;charset=utf-8;'}),
|
||||
mUrl = URL.createObjectURL(mData);
|
||||
windowOpenForeground(mUrl, "", "left=50,top=50,status=no,toolbar=no,menubar=no,location=no,resizable=yes", null, null, null, 2)
|
||||
};
|
||||
|
||||
function convertCsv(tmp, separator) {
|
||||
// riporto codice RPGenCSV
|
||||
var newLineWin = "\n",
|
||||
newLineLin = "\r",
|
||||
dblQuote = "\"";
|
||||
tmp = Strtran(tmp, dblQuote, (dblQuote + dblQuote));
|
||||
tmp = Strtran(tmp, newLineLin, newLineWin);
|
||||
if (tmp.indexOf(separator) >= 0 || tmp.indexOf(newLineWin) >= 0 || tmp.indexOf(dblQuote) >= 0)
|
||||
tmp = JSON.stringify(tmp);
|
||||
return tmp;
|
||||
}
|
||||
|
||||
function encodeSpecialCharsXML(myString){
|
||||
var ret = myString.replace(/[^a-zA-Z0-9._-]/g, "");
|
||||
ret = Strtran(ret, " ", "");
|
||||
/*ret = Strtran(ret, "&", "");
|
||||
ret = Strtran(ret, "<", "");
|
||||
ret = Strtran(ret, ">", "");
|
||||
ret = Strtran(ret, "\"", "");
|
||||
ret = Strtran(ret, "'", "");
|
||||
ret = Strtran(ret, "\\r", "");
|
||||
ret = Strtran(ret, "(", "");
|
||||
ret = Strtran(ret, ")", "");
|
||||
ret = Strtran(ret, "=", "");
|
||||
ret = Strtran(ret, ",", "");
|
||||
ret = Strtran(ret, ":", "");
|
||||
ret = Strtran(ret, "*", "");
|
||||
ret = Strtran(ret, "%", "");
|
||||
ret = Strtran(ret, "_", "");
|
||||
ret = Strtran(ret, "+", "");
|
||||
ret = Strtran(ret, "/", "");
|
||||
ret = Strtran(ret, "\\", "");
|
||||
ret = Strtran(ret, "#", "");*/
|
||||
return ret;
|
||||
}
|
||||
|
||||
function encodeTextForXML(myString){
|
||||
var str = myString;
|
||||
var res = '';
|
||||
var i;
|
||||
for(i = 0; i < str.length; i++){
|
||||
if(+str[i] || str[i].toLowerCase() !== str[i].toUpperCase()){
|
||||
res += str[i];
|
||||
continue;
|
||||
};
|
||||
if((str[i] === '\r'))
|
||||
res +='';
|
||||
else if((str[i] === '<') || (str[i] === '>') || (str[i] === '/') || (str[i] === '&') || (str[i] === '\'') || (str[i] === '\"') || (str[i] === '\n') || (str[i] === ' ') || (str[i].charCodeAt(0) > 128) )
|
||||
res += '&#'+str[i].charCodeAt(0)+';';
|
||||
else
|
||||
res += str[i];
|
||||
};
|
||||
return res;
|
||||
}
|
||||
333
PortalStudio/JSReportDocumentXlsx.js
Normal file
@ -0,0 +1,333 @@
|
||||
/* global getFieldsList getFieldsObjList getFieldsDescMap XLSX */
|
||||
|
||||
/*jshint laxcomma: true */
|
||||
/*** CLASSE RepDocumentXlsx: gestisce la generazione/export del documento (report) in formato xls/xlsx
|
||||
* Eredita da RepDocument - JSReportDocumentRuntime.js
|
||||
*/
|
||||
RepDocumentXlsx = function (name, uid, format) {
|
||||
RepDocument.call(this);
|
||||
this.format = format.toLowerCase();
|
||||
this.gcurrpage = null;
|
||||
this.name = name;
|
||||
this.progrid = 0;
|
||||
this.datetime = new Date();
|
||||
if(Empty(uid)) uid = LibJavascript.AlfaKeyGen(5);
|
||||
this.uid = uid;
|
||||
this.parent = null;
|
||||
this.document = null;
|
||||
this.window = null;
|
||||
this.fieldsuid = [];
|
||||
this.dtpict = {};
|
||||
this.exportCells = [];
|
||||
this.widthCells = [];
|
||||
this.__sst = false;
|
||||
};
|
||||
|
||||
RepDocumentXlsx.prototype = new RepDocument();
|
||||
RepDocumentXlsx.prototype.constructor = RepDocumentXlsx;
|
||||
|
||||
RepDocumentXlsx.prototype.Ctrl = function(id){
|
||||
return this.document.getElementById(id);
|
||||
};
|
||||
|
||||
RepDocumentXlsx.prototype.initProcess = function(allfields,container,bprint,imgfields,simulatedData){
|
||||
this.container = container;
|
||||
this.setParent();
|
||||
this.setDocument();
|
||||
this.setWindow();
|
||||
this.allfields = allfields;
|
||||
this.simulatedData = simulatedData;
|
||||
this.fieldsuid = getFieldsList(this.obj);
|
||||
this.fieldsobjs = getFieldsObjList(this.obj);
|
||||
this.fielddesc = getFieldsDescMap(this.obj);
|
||||
this.initLastRow();
|
||||
this.lastGrp = [];
|
||||
this.lastRec = [];
|
||||
this.writeHeader();
|
||||
};
|
||||
|
||||
RepDocumentXlsx.prototype.initLastRow = function(){
|
||||
this.lastRow = [];
|
||||
for(var i=0; i<this.fieldsuid.length; i++){
|
||||
this.lastRow.push({});
|
||||
}
|
||||
}
|
||||
|
||||
RepDocumentXlsx.prototype.endProcess = function(){
|
||||
this.end = true;
|
||||
this.writeRow();
|
||||
this.writeFooter();
|
||||
this.download();
|
||||
};
|
||||
|
||||
RepDocumentXlsx.prototype.drawCover = function(/*coverobj*/){
|
||||
};
|
||||
|
||||
RepDocumentXlsx.prototype.startLoading = function(){
|
||||
}
|
||||
|
||||
RepDocumentXlsx.prototype.updateLoading = function(){
|
||||
}
|
||||
|
||||
RepDocumentXlsx.prototype.appendFontsInDocument = function () {
|
||||
}
|
||||
|
||||
RepDocumentXlsx.prototype.setLimitPage = function(){
|
||||
this.gwork.limitpage = Infinity;
|
||||
}
|
||||
|
||||
RepDocumentXlsx.prototype.newPage = function(k,firstpage){
|
||||
if(Empty(firstpage) && this.obj.showPageZone){
|
||||
this.drawZone(k,'pagefooter','',false,true);
|
||||
this.drawZone(k,'pageheader','',false);
|
||||
}
|
||||
}
|
||||
|
||||
RepDocumentXlsx.prototype.getLastChildElement = function(){
|
||||
return {};
|
||||
}
|
||||
|
||||
RepDocumentXlsx.prototype.addCurrentZone = function(){
|
||||
}
|
||||
|
||||
RepDocumentXlsx.prototype.checkLimitPage = function(){
|
||||
return false;
|
||||
}
|
||||
|
||||
RepDocumentXlsx.prototype.splitStringCheck = function(){
|
||||
return false;
|
||||
}
|
||||
|
||||
RepDocumentXlsx.prototype.updateZoneHeight = function(){
|
||||
}
|
||||
|
||||
RepDocumentXlsx.prototype.writeHeader = function(){
|
||||
var i, j, item;
|
||||
var tmp = "",
|
||||
_cells = [];
|
||||
if( this.obj.pivot ) {
|
||||
var items = this.obj.groupheader.items;
|
||||
for ( i=items.length-1; i>=0; i-- ) {
|
||||
item = items[i];
|
||||
if( item.alias == 'lbl_columns') {
|
||||
for( j=0; j<this.obj.pivot.rows.length; j++ ) {
|
||||
if(!this.widthCells[j]) this.widthCells[j]= 0;
|
||||
this.widthCells[j] = Math.max(this.widthCells[j], 0);
|
||||
_cells.push( { t: 's', v: '' , s:{font:{bold:true}}} )
|
||||
}
|
||||
tmp=item.value;
|
||||
_cells.push( { t: 's', v: tmp , s:{font:{bold:true}}} ) // testo
|
||||
if(!this.widthCells[j]) this.widthCells[j]= 0;
|
||||
this.widthCells[j] = Math.max(this.widthCells[j], tmp.length);
|
||||
this.exportCells.push(_cells);
|
||||
i = -1;
|
||||
}
|
||||
}
|
||||
_cells = [];
|
||||
for ( i=0; i<items.length; i++ ) {
|
||||
item = items[i];
|
||||
if( item.alias == 'lbl_columns') {
|
||||
i = items.length;
|
||||
}
|
||||
else {
|
||||
item.colIdx = this.fieldsuid.indexOf('fld_tgroupbody'+item.alias);
|
||||
if( item.colIdx == 0 ) {
|
||||
if( _cells.length > 0) this.exportCells.push(_cells);
|
||||
_cells = [];
|
||||
}
|
||||
tmp=item.value;
|
||||
_cells.push( { t: 's', v: tmp , s:{font:{bold:true}}} ) // testo
|
||||
if(!this.widthCells[item.colIdx]) this.widthCells[item.colIdx]= 0;
|
||||
this.widthCells[item.colIdx] = Math.max(this.widthCells[item.colIdx], tmp.length);
|
||||
}
|
||||
}
|
||||
if( _cells.length > 0) this.exportCells.push(_cells);
|
||||
}
|
||||
else {
|
||||
if((this.fieldsuid.length > 0)){
|
||||
for(i=0; i<this.fieldsuid.length; i++){
|
||||
tmp=""+this.fielddesc[this.fieldsuid[i]];
|
||||
_cells.push( { t: 's', v: tmp } ) // testo
|
||||
if(!this.widthCells[i]) this.widthCells[i]= 0;
|
||||
this.widthCells[i] = Math.max(this.widthCells[i], tmp.length);
|
||||
}
|
||||
this.exportCells.push(_cells);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RepDocumentXlsx.prototype.writeFooter = function(){
|
||||
}
|
||||
|
||||
RepDocumentXlsx.prototype.getItemValue = function(k,item,zoneid,repObj,useLastRecord){
|
||||
if(item.type!="field" || (item.fieldDetail && Empty(item.fieldDetail.alias)))
|
||||
return "";
|
||||
var value,
|
||||
mdata = useLastRecord?repObj.lastRec:repObj.propertyValue[k];
|
||||
if(item.typeView.indexOf("date")>=0 && !Empty(mdata[item.fieldDetail.alias])){
|
||||
value = mdata[item.fieldDetail.alias].toISOString();
|
||||
value = new Date(value);
|
||||
this.setDateTimePicture(item);
|
||||
}
|
||||
else if (item.typeView == "numeric") {
|
||||
if (item.calculation && !Empty(item.calculation.type) && item.calculation.type != 'none')
|
||||
value = repObj.calcObjs[item.calculation.type][item.fieldDetail.alias][item.uid];
|
||||
else
|
||||
value = mdata[item.fieldDetail.alias];
|
||||
}
|
||||
else {
|
||||
value = mdata[item.fieldDetail.alias];
|
||||
}
|
||||
return value;
|
||||
};
|
||||
|
||||
RepDocumentXlsx.prototype.setDateTimePicture = function (item) {
|
||||
if (!Empty(this.dtpict[item.uid]))
|
||||
return;
|
||||
var sptolib = {};
|
||||
sptolib["dd-mm-yyyy"] = "dd-mm-yyyy";
|
||||
sptolib["dd/mm/yyyy"] = "dd/mm/yyyy";
|
||||
sptolib["yyyy-mm-dd"] = "yyyy-mm-dd";
|
||||
sptolib["yyyy/mm/dd"] = "yyyy/mm/dd";
|
||||
sptolib["hh:mm"] = "hh:mm";
|
||||
sptolib["hh:mm:ss"] = "hh:mm:ss";
|
||||
sptolib["hh.mm"] = sptolib["hh:mm"]; // non supportato da lib
|
||||
sptolib["hh.mm.ss"] = sptolib["hh.mm.ss"]; // non supportato da lib
|
||||
sptolib["dd-mm-YYYY hh:mm:ss"] = sptolib["dd-mm-yyyy"] + " " + sptolib["hh:mm:ss"];
|
||||
|
||||
if (!item.picture && item.stdPicture)
|
||||
this.dtpict[item.uid] = sptolib[item.stdPicture.toLowerCase()];
|
||||
else if (item.picture) {
|
||||
if (item.picture.dateformat) this.dtpict[item.uid] = sptolib[item.picture.dateformat.toLowerCase()];
|
||||
if (item.picture.timeformat) this.dtpict[item.uid] += " " + sptolib[item.picture.timeformat.toLowerCase()];
|
||||
}
|
||||
else
|
||||
this.dtpict[item.uid] = sptolib["dd-mm-yyyy"];
|
||||
}
|
||||
|
||||
RepDocumentXlsx.prototype.isEoPreview = function () {
|
||||
return false;
|
||||
}
|
||||
|
||||
RepDocumentXlsx.prototype.addItemInZone = function (k, item, objzone, zoneid, value/*,yRel*/) {
|
||||
var curindex = this.fieldsuid.indexOf(item.uid);
|
||||
if (curindex >= 0) {
|
||||
if( value == null ) value = '';
|
||||
if (this.grpBreak) {
|
||||
this.resetRow(curindex);
|
||||
this.grpBreak = false;
|
||||
}
|
||||
if ((curindex < this.lastElement) || ((curindex == this.lastElement) && this.fieldsuid.length == 1))
|
||||
this.writeRow();
|
||||
if (zoneid.indexOf("page") >= 0)
|
||||
value = "";
|
||||
|
||||
if (item.typeView.indexOf("date") >= 0) {
|
||||
// memorizzo valore raw della data
|
||||
var oneDay = 24 * 60 * 60 * 1000,
|
||||
secondDate = new Date(1900, 0, 1),
|
||||
firstDate = value;
|
||||
if (!Empty(value)) {
|
||||
var diffDays = ((firstDate - secondDate) / oneDay),
|
||||
_1900b = new Date(1900,1,28,23,59,59,999),
|
||||
tz_1 = Math.round(firstDate.getTimezoneOffset() / 60),
|
||||
tz_2 = Math.round(secondDate.getTimezoneOffset() / 60);
|
||||
if (tz_1 != tz_2) {
|
||||
// test timezone
|
||||
var diffHrs = Math.abs(tz_1) - Math.abs(tz_2),
|
||||
factor = tz_1 < 0 ? -1 : 1;
|
||||
secondDate = new Date(secondDate.getTime() + (factor * diffHrs * 60 * 60 * 1000));
|
||||
diffDays = ((firstDate - secondDate) / oneDay);
|
||||
}
|
||||
if (value.getTime() > _1900b.getTime()) {
|
||||
// excel 1900 leap year bug
|
||||
diffDays = diffDays + 1;
|
||||
}
|
||||
diffDays = diffDays + 1; // +1 conteggio anche 1gen1900
|
||||
|
||||
var sp_pict = "";
|
||||
if (!item.picture && item.stdPicture)
|
||||
sp_pict = item.stdPicture;
|
||||
else if (item.picture) {
|
||||
if (item.picture.dateformat) sp_pict = item.picture.dateformat;
|
||||
if (item.picture.timeformat) sp_pict += " " + item.picture.timeformat.toLowerCase();
|
||||
}
|
||||
this.lastRow[curindex] = { t: 'n', v: diffDays, z: this.dtpict[item.uid], w: Format(value, null, null, sp_pict) }; // d-dt
|
||||
if(!this.widthCells[curindex]) this.widthCells[curindex]= 0;
|
||||
this.widthCells[curindex] = Math.max(this.widthCells[curindex], this.lastRow[curindex].w.length);
|
||||
}
|
||||
else {
|
||||
this.lastRow[curindex] = { t: 'n', v: '', z: '', w: '' }; // data empty
|
||||
if(!this.widthCells[curindex]) this.widthCells[curindex]= 0;
|
||||
this.widthCells[curindex] = Math.max(this.widthCells[curindex], this.lastRow[curindex].w.length);
|
||||
}
|
||||
}
|
||||
else if (item.typeView == "numeric") {
|
||||
this.lastRow[curindex] = { t: 'n', v: value }; // num
|
||||
if(!this.widthCells[curindex]) this.widthCells[curindex]= 0;
|
||||
this.widthCells[curindex] = Math.max(this.widthCells[curindex], "99999.999".length);
|
||||
}
|
||||
else {
|
||||
if (this.format == "xls" && !this.__sst && value!=null && value.length > 255)
|
||||
this.__sst = true;
|
||||
this.lastRow[curindex] = { t: 's', v: (value + "") }; // txt - converto anche i logic in stringa
|
||||
if(!this.widthCells[curindex]) this.widthCells[curindex]= 0;
|
||||
this.widthCells[curindex] = Math.max(this.widthCells[curindex], value.length);
|
||||
}
|
||||
this.lastElement = curindex;
|
||||
}
|
||||
};
|
||||
|
||||
RepDocumentXlsx.prototype.resetRow = function(fromidx){
|
||||
for(var i=fromidx; i<this.lastRow.length; i++) {
|
||||
this.lastRow[i] = {};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
RepDocumentXlsx.prototype.writeRow = function(){
|
||||
if (this.lastRow.length > 0) {
|
||||
var _cells = JSON.stringify(this.lastRow);
|
||||
this.exportCells.push(JSON.parse(_cells));
|
||||
}
|
||||
}
|
||||
|
||||
RepDocumentXlsx.prototype.pageNumber = function(){
|
||||
}
|
||||
|
||||
RepDocumentXlsx.prototype.removeLastLabelContinue = function(){
|
||||
}
|
||||
|
||||
RepDocumentXlsx.prototype.addLicense = function(){
|
||||
}
|
||||
|
||||
RepDocumentXlsx.prototype.download = function () {
|
||||
/*js-xlsx*/
|
||||
var ext = "." + this.format, i,
|
||||
downloadname = (Empty(this.name) ? LibJavascript.AlfaKeyGen(10) : this.name) + ext,
|
||||
ws, wb;
|
||||
wb = XLSX.utils.book_new();
|
||||
if (this.format == "xls" && this.exportCells.length > 65536) // formato xls non supporta 65.536+ righe
|
||||
ws = XLSX.utils.aoa_to_sheet(this.exportCells.slice(0, 65536));
|
||||
else
|
||||
ws = XLSX.utils.aoa_to_sheet(this.exportCells);
|
||||
|
||||
XLSX.utils.book_append_sheet(wb, ws, 'Doc 1');
|
||||
var wscols = [];
|
||||
for( i=0; i< this.widthCells.length; i++ ) {
|
||||
if( !this.widthCells[i])
|
||||
wscols.push(null)
|
||||
else {
|
||||
wscols.push({wch:this.widthCells[i]})
|
||||
}
|
||||
}
|
||||
wb["Sheets"]["Doc 1"]['!cols'] = wscols;
|
||||
var opts = { raw: true, cellDates: true, dateNF: this.dtpict };
|
||||
if (this.format == "xls" && this.__sst) // xls non supporta di default stringhe > 255; imposto tipo long string (+ lento in mem)
|
||||
opts.bookSST = true;
|
||||
XLSX.writeFile(wb, downloadname, opts);
|
||||
};
|
||||
|
||||
RepDocumentXlsx.prototype.drawPreviewValidator = function () {
|
||||
};
|
||||
|
||||
30
PortalStudio/Notimoo.css
Normal file
@ -0,0 +1,30 @@
|
||||
.notimoo {
|
||||
font: 12px/14px "Lucida Grande", Arial, Helvetica, Verdana, sans-serif;
|
||||
/* Don't touch here */
|
||||
position: absolute;
|
||||
z-index: 10003; /* There are some cases where you'll need to change this if you're currently using a greater one in your project*/
|
||||
cursor: pointer;
|
||||
border-radius: 10px;
|
||||
-moz-border-radius: 10px;
|
||||
-webkit-border-radius: 10px;
|
||||
|
||||
/* Change this to fit your needs*/
|
||||
padding:10px;
|
||||
background: #333333;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.notimoo .nt-title {
|
||||
font-weight: bold;
|
||||
font-size:13px;
|
||||
}
|
||||
|
||||
.notimoo .nt-message {
|
||||
margin-top: 2px;
|
||||
font-size:11px;
|
||||
padding-top:5px;
|
||||
}
|
||||
|
||||
.notimoo a {
|
||||
color: #FFFFFF;
|
||||
}
|
||||
368
PortalStudio/Notimoo.js
Normal file
@ -0,0 +1,368 @@
|
||||
/*
|
||||
---
|
||||
|
||||
name: Notimoo
|
||||
|
||||
description: Notification system using Mootools (1.2+)
|
||||
|
||||
license: MIT-style
|
||||
|
||||
authors:
|
||||
- PaquitoSoft
|
||||
|
||||
requires: [Core/Element.Style, Core/Element.Event, Core/Element.Dimension, Core/Fx.Tween, Core/Fx.Morph]
|
||||
|
||||
provides: [Notimoo]
|
||||
|
||||
version: 1.3
|
||||
|
||||
...
|
||||
*/
|
||||
|
||||
/*
|
||||
Script: Notimoo.js
|
||||
Notimoo - Notification system using Mootools (1.2)
|
||||
|
||||
License:
|
||||
MIT-style license.
|
||||
Copyright (c) 2009 PaquitoSoft
|
||||
|
||||
Permission is hereby granted, free of charge, to any
|
||||
person obtaining a copy of this software and associated
|
||||
documentation files (the "Software"), to deal in the
|
||||
Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the
|
||||
Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice
|
||||
shall be included in all copies or substantial portions of
|
||||
the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
|
||||
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
||||
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
|
||||
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Author:
|
||||
PaquitoSoft (http://paquitosoft.com/).
|
||||
|
||||
Code & Documentation:
|
||||
PaquitoSoft blog (http://paquitosoft.com/?page_id=53)
|
||||
|
||||
Inspiration:
|
||||
- Growl by Growl team (http://growl.info/)
|
||||
- Window.Growl by Daniel Mota (http://icebeat.bitacoras.com/mootools/growl/)
|
||||
|
||||
*/
|
||||
|
||||
var Notimoo = new Class({
|
||||
|
||||
/**
|
||||
* Notification elements list.
|
||||
*/
|
||||
elements: [],
|
||||
|
||||
/**
|
||||
* Needed Mootools functionality
|
||||
*/
|
||||
Implements: [Options, Events],
|
||||
|
||||
/**
|
||||
* Used to properly work with the scroll relocation transition
|
||||
*/
|
||||
scrollTimeOut: null,
|
||||
|
||||
/**
|
||||
* Options to configure the notification manager.
|
||||
* @param String parent -> parent element where notifications are to be inserted (defaults to 'body' tag)
|
||||
* @param Number height -> height of the notification DOM element (in pixels -defaults to 50-)
|
||||
* @param Number width -> width of the notification DOM element (in pixels -defaults to 300-)
|
||||
* @param Number visibleTime -> time the notification is displayed (in miliseconds -defaults to 5000-)
|
||||
* @param String locationVType -> whether you want the notifications to be shown on the top or the bottom of the parent element (defaults to 'top')
|
||||
* @param String locationHType -> whether you want the notification to be shown at the left or right of the parent element (defaults to 'right')
|
||||
* @param Number locationVBase -> vertical base position for the notifications (in pixels -defaults to 10-)
|
||||
* @param Number locationHBase -> horizontal base position for the notifications (in pixels -defaults to 10-)
|
||||
* @param Number notificationsMargin -> margin between notifications (in pixels -defaults to 5-)
|
||||
* @param Number opacityTransitionTime -> duration for notification opacity transition (in miliseconds -defaults to 750-)
|
||||
* @param Number closeRelocationTransitionTime -> duration for notification relocation transition when one of them is close (in miliseconds -defaults to 750-)
|
||||
* @param Number scrollRelocationTransitionTime -> duration for notification relocation transition when parent scroll is moved (in miliseconds -defaults to 250-)
|
||||
* @param Number notificationOpacity -> opacity used when the notification is displayed (defaults to 0.95)
|
||||
* @param Function onShow -> callback to be executed when the notification is displayed. The notification element is passed as a parameter.
|
||||
* @param Function onClose -> callback to be executed when the notification id closed. The notification element is passed as a parameter.
|
||||
*/
|
||||
options: {
|
||||
parent: '', // This value needs to be set into the initializer
|
||||
height: 50,
|
||||
width: 300,
|
||||
visibleTime: 5000, // notifications are visible for 5 seconds by default
|
||||
locationVType: 'top',
|
||||
locationHType: 'right',
|
||||
locationVBase: 10,
|
||||
locationHBase: 10,
|
||||
notificationsMargin: 5,
|
||||
opacityTransitionTime : 750,
|
||||
closeRelocationTransitionTime: 500,
|
||||
scrollRelocationTransitionTime: 500,
|
||||
notificationOpacity : 0.85 /*,
|
||||
onShow: $empty,
|
||||
onClose: $empty */
|
||||
},
|
||||
|
||||
/**
|
||||
* Initilize instance.
|
||||
* @param Hash options -> (see code above)
|
||||
*/
|
||||
initialize: function(options) {
|
||||
this.options.parent = document.id(document.body);
|
||||
if (options) {
|
||||
if (options.parent) options.parent = document.id(options.parent);
|
||||
this.setOptions(options);
|
||||
}
|
||||
|
||||
var manager = this;
|
||||
|
||||
// Track scroll in parent element
|
||||
this.options.parent.addEvent('scroll', function() {
|
||||
clearTimeout(this.scrollTimeOut);
|
||||
this.scrollTimeOut = (function() { manager._relocateActiveNotifications(manager.TYPE_RELOCATE_SCROLL) }).delay(200);
|
||||
}, this);
|
||||
|
||||
window.addEvent('scroll', function() {
|
||||
clearTimeout(manager.scrollTimeOut);
|
||||
manager.scrollTimeOut = (function() { manager._relocateActiveNotifications(manager.TYPE_RELOCATE_SCROLL) }).delay(200);
|
||||
});
|
||||
|
||||
// Insert default element into array
|
||||
this.elements.push(this.createNotificationElement());
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Creates and initializes an element to show the notification
|
||||
*/
|
||||
createNotificationElement: function() {
|
||||
var el = new Element('div', {
|
||||
'class': 'notimoo',
|
||||
styles: {
|
||||
width: this.options.width,
|
||||
height: this.options.height,
|
||||
opacity: 0
|
||||
},
|
||||
tween: {
|
||||
link: 'chain',
|
||||
duration: this.options.opacityTransitionTime
|
||||
},
|
||||
events: {
|
||||
// Close the notification when the user click inside
|
||||
click: function(e) {
|
||||
e.stop();
|
||||
this.close(el);
|
||||
}.bind(this)
|
||||
}
|
||||
})
|
||||
.setStyle(this.options.locationVType, this.options.locationVBase)
|
||||
.setStyle(this.options.locationHType, this.options.locationHBase)
|
||||
.adopt(new Element('span', { 'class': 'nt-title' }))
|
||||
.adopt(new Element('div', { 'class': 'nt-message' }));
|
||||
|
||||
// Element default tween instance is used to handle opacity
|
||||
el.store('working', false);
|
||||
|
||||
// This tween instance is used to move the notification when another one is closed
|
||||
var fx1 = new Fx.Tween(el, {
|
||||
property: this.options.locationVType,
|
||||
link: 'chain',
|
||||
duration: this.options.closeRelocationTransitionTime
|
||||
});
|
||||
el.store('baseTween', fx1);
|
||||
|
||||
// This tween instance is used to move the notification when scroll is moved
|
||||
var fx2 = new Fx.Tween(el, {
|
||||
property: this.options.locationVType,
|
||||
link: 'chain',
|
||||
duration: this.options.scrollRelocationTransitionTime
|
||||
});
|
||||
el.store('scrollTween', fx2);
|
||||
|
||||
return el;
|
||||
},
|
||||
|
||||
/**
|
||||
* Function to actually show a notification.
|
||||
* @param String title (required) -> Title for the notification
|
||||
* @param String message (required) -> Message for the notification
|
||||
* @param booleam sticky (optional) -> Whether the notification won't be removed until user interaction (defaults to false)
|
||||
* @param int visibleTime (optional) -> Time for the notification to be displayed (in milliseconds). If this isn't provided, the global one will be used.
|
||||
* @param int width (optional) -> Width fot the notification (in pixels). If this isn't provided, the global one will be used.
|
||||
* @param String customClass (optional) -> Custom class you want to apply to this notification. (It can be a list of classes separated by a blank space)
|
||||
*/
|
||||
show: function(options) {
|
||||
|
||||
var manager = this;
|
||||
|
||||
// Get the base for the notification
|
||||
var nextBase = this._applyScrollPosition(this.options.locationVBase);
|
||||
var el = this.elements.filter(function(el) {
|
||||
var w = el.retrieve('working');
|
||||
if (w) {
|
||||
nextBase = el.getStyle(this.options.locationVType).toInt() + el.getSize().y + this.options.notificationsMargin;
|
||||
}
|
||||
return !w;
|
||||
}, this).getLast();
|
||||
|
||||
// Create element if there is no available one
|
||||
if (!el) {
|
||||
el = this.createNotificationElement();
|
||||
this.elements.push(el);
|
||||
}
|
||||
|
||||
// Set base and 'working' flag
|
||||
el.setStyle(this.options.locationVType, nextBase);
|
||||
el.store('working', true);
|
||||
|
||||
// Check if a custom width has been provided
|
||||
if (options.width) el.setStyle('width', options.width);
|
||||
|
||||
// Set notification content
|
||||
// Since title is optional and we're reusing notifications, we need to check
|
||||
el.getElement('span.nt-title').set('text', (options.title) ? options.title : '');
|
||||
el.getElement('div.nt-message').set('text', options.message);
|
||||
|
||||
// Add custom classes
|
||||
if (options.customClass) el.addClass(options.customClass);
|
||||
|
||||
// Once the notification is populated, we check to see if there is any link inside so we can
|
||||
// configure it in order not to close the notification when it's clicked
|
||||
el.getElements('a').addEvent('click', function(event) {
|
||||
event.stopPropagation();
|
||||
});
|
||||
|
||||
// Insert the element into the DOM
|
||||
this.options.parent.adopt(el);
|
||||
|
||||
// This must be done after the element is inserted into DOM. Previously (on Lost!) the element does not have coordinates (obviously)
|
||||
this._checkSize(el);
|
||||
|
||||
// Show the element with a lot of style
|
||||
|
||||
el.get('tween').start('opacity', this.options.notificationOpacity).chain(function() {
|
||||
// Set close notification with options visibleTime delay
|
||||
if ((options.sticky) ? !options.sticky : true) {
|
||||
manager.close.delay((options.visibleTime) ? options.visibleTime : manager.options.visibleTime, manager,el);
|
||||
//(function() { manager.close(el); } ).delay((options.visibleTime) ? options.visibleTime : manager.options.visibleTime, manager);
|
||||
}
|
||||
// Fire callback
|
||||
manager.fireEvent('show', el);
|
||||
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Function to close the notification.
|
||||
* It also deals with moving other still visible notifications.
|
||||
* @param Element element -> element to be removed
|
||||
*/
|
||||
close: function(element) {
|
||||
|
||||
// Hide and reset notification. Destroy it when it's not the last one.
|
||||
var manager = this;
|
||||
var nots = manager.elements;
|
||||
element.get('tween')
|
||||
.addEvent('onComplete',function(){
|
||||
element.destroy();
|
||||
//element.dispose();
|
||||
})
|
||||
.start('opacity', 0).chain(function() {
|
||||
var toDelete=false;
|
||||
if (nots.length > 1) {
|
||||
nots.elements = nots.erase(element);
|
||||
toDelete=true;
|
||||
} else {
|
||||
manager._resetNotificationElement(element);
|
||||
}
|
||||
|
||||
// If there are more notifications on screen, move them!
|
||||
manager._relocateActiveNotifications(manager.TYPE_RELOCATE_CLOSE);
|
||||
|
||||
manager.fireEvent('close', element);
|
||||
if (toDelete) element.destroy();
|
||||
//element.dispose();
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Function to relocate active notifications when needed
|
||||
* (notification closed or scroll moved).
|
||||
* @param int sourceEvent -> the event that cause the movement (see events at the bottom)
|
||||
* 1.- notification closed
|
||||
* 2.- scroll moved
|
||||
*/
|
||||
_relocateActiveNotifications: function(sourceEvent) {
|
||||
|
||||
var base = this._applyScrollPosition(this.options.locationVBase);
|
||||
for (var index = 0; index < this.elements.length; index++) {
|
||||
var el = this.elements[index];
|
||||
if (el.retrieve('working')) {
|
||||
if (this.TYPE_RELOCATE_CLOSE == sourceEvent) {
|
||||
el.retrieve('baseTween').start(base);
|
||||
} else {
|
||||
el.retrieve('scrollTween').start(base);
|
||||
}
|
||||
base += el.getSize().y + this.options.notificationsMargin;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Function to check if the size of the notification element has space enough
|
||||
* to show the message.
|
||||
* In case it hasn't, the element is resized.
|
||||
*/
|
||||
_checkSize: function(element) {
|
||||
var notificationElHeight = element.getStyle('height').toInt();
|
||||
var titleHeight = element.getElement('span.nt-title').getSize().y;
|
||||
var messageHeight = element.getElement('div.nt-message').getSize().y;
|
||||
if (messageHeight > (notificationElHeight - titleHeight)) {
|
||||
|
||||
element.setStyle('height', notificationElHeight + (messageHeight - (notificationElHeight - titleHeight)));
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Function used to reset the attributes of a used element to the original state.
|
||||
* It only resets the attributes that could be changed before.
|
||||
*/
|
||||
_resetNotificationElement: function(element) {
|
||||
|
||||
var styles = {
|
||||
height: this.options.height,
|
||||
widht: this.options.width
|
||||
};
|
||||
styles[this.options.locationVType] = this.options.locationVBase;
|
||||
element.setStyles(styles).store('working', false);
|
||||
},
|
||||
|
||||
/**
|
||||
* Helper function to apply scroll location to element base.
|
||||
*/
|
||||
_applyScrollPosition: function(base) {
|
||||
var y = this.options.parent.getScroll().y;
|
||||
if(this.options.locationVType != 'top') y = -y;
|
||||
return base + y;
|
||||
},
|
||||
|
||||
/*
|
||||
* Constants for transitions
|
||||
*/
|
||||
TYPE_RELOCATE_CLOSE: 1,
|
||||
TYPE_RELOCATE_SCROLL: 2
|
||||
|
||||
});
|
||||
2343
PortalStudio/PortalCommonJS.js
Normal file
2430
PortalStudio/SPMaskParameters.js
Normal file
5118
PortalStudio/SPPortalZoom.js
Normal file
1
PortalStudio/SPPortalZoomConfiguration.js
Normal file
@ -0,0 +1 @@
|
||||
//Vecchio JS non piu usato (to delete)
|
||||
80
PortalStudio/SPPortalZoomLink.js
Normal file
@ -0,0 +1,80 @@
|
||||
function doLinkZoom() {
|
||||
var pagelet = this.pagelet||this;
|
||||
function DoOnKeyDown(e) {
|
||||
var keyCode = GetKeyCode( e ? e : window.event),
|
||||
zoom = ( (pagelet["SPPortalZoomBase"+(window.SPOfflineLib ? "OL" : "")+"_portlet"] ) || (pagelet.ZoomGrid) || (pagelet.zoom) ).getResource(),
|
||||
newRec,
|
||||
changeRow = false;
|
||||
var ctrl = GetEventSrcElement(e);
|
||||
if (ctrl.tagName.toLowerCase()=='input' && ctrl.type.toLowerCase()=='text') return; //se sono in un input non devo fare nulla
|
||||
if (!zoom.formid) { //array
|
||||
for (var i=0;i<zoom.length;i++){
|
||||
if (zoom[i].Ctrl.ownerDocument==window.document) {
|
||||
zoom=zoom[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
var oldRec = zoom.dataobj.curRec,
|
||||
curPage = zoom.Grid.GetCurPage();
|
||||
switch ( keyCode ) {
|
||||
case 27: // ESC
|
||||
WindowClose();
|
||||
break;
|
||||
case 37: // left
|
||||
if ( !zoom.GetRS_EOF() && zoom.Grid.scroll_bars!='infinite_scroll')
|
||||
zoom.Grid.PrevPage();
|
||||
DoOnKeyDown.CancelEvent(e);
|
||||
break;
|
||||
case 38: // up
|
||||
newRec = oldRec-1;
|
||||
changeRow = true;
|
||||
DoOnKeyDown.CancelEvent(e);
|
||||
break;
|
||||
case 39: // right
|
||||
if ( !zoom.GetRS_EOF() && zoom.Grid.scroll_bars!='infinite_scroll')
|
||||
zoom.Grid.NextPage();
|
||||
DoOnKeyDown.CancelEvent(e);
|
||||
break;
|
||||
case 40: // down
|
||||
newRec = oldRec+1;
|
||||
changeRow = true;
|
||||
DoOnKeyDown.CancelEvent(e);
|
||||
break;
|
||||
case 13: // enter
|
||||
if ( !zoom.GetRS_EOF() && !zoom.Grid.filterByExampleMask_IsVisible() ) {
|
||||
document.getElementById(zoom.Grid.ctrlid+"_link_"+(oldRec-1)).onclick();
|
||||
DoOnKeyDown.CancelEvent(e);
|
||||
}
|
||||
break;
|
||||
case 120: // F9
|
||||
zoom.AddNewRecord();
|
||||
DoOnKeyDown.CancelEvent(e);
|
||||
break;
|
||||
}
|
||||
if ( changeRow && !zoom.GetRS_EOF() ) {
|
||||
if ( newRec<1 && curPage>1 ) {
|
||||
zoom.Grid.PrevRecord();
|
||||
} else if ( newRec>zoom.dataobj.getRecCount() ) {
|
||||
zoom.Grid.NextRecord();
|
||||
} else {
|
||||
if(newRec<1) newRec=1;
|
||||
zoom.Grid.SetCurRec(newRec, true);
|
||||
if (document.getElementById(zoom.Grid.ctrlid + '_row' + (newRec-1))) {
|
||||
document.getElementById(zoom.Grid.ctrlid + '_row' + (newRec-1)).scrollIntoView(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
DoOnKeyDown.CancelEvent=function(e){
|
||||
e.cancelBubble=true
|
||||
if(e.stopPropagation) e.stopPropagation();
|
||||
if(e.preventDefault) e.preventDefault(true);
|
||||
e.returnValue=false
|
||||
}
|
||||
if ( document.addEventListener ) {
|
||||
document.addEventListener("keydown", DoOnKeyDown, false);
|
||||
} else {
|
||||
document.attachEvent("onkeydown", DoOnKeyDown);
|
||||
}
|
||||
}
|
||||
542
PortalStudio/SPPortalZoomParameters.js
Normal file
@ -0,0 +1,542 @@
|
||||
/* global PrepareJsCalendar LaunchCalendar */
|
||||
var filtersString='',tempFilterHtmlString='',tempFilterScriptString='';
|
||||
|
||||
var parameters_main_div=document.createElement('DIV');
|
||||
parameters_main_div.id=this.formid+'_parameters_main';
|
||||
parameters_main_div.style.position='relative';
|
||||
document.getElementById(this.formid).appendChild(parameters_main_div);
|
||||
if (!('m_IDS' in window)) window.m_IDS={};
|
||||
|
||||
this.DrawPortlet=function(){
|
||||
this.offsetLeft=0;
|
||||
this.htmlCode='';
|
||||
this.htmlCode_MainTable='';
|
||||
this.scriptCode='';
|
||||
this.parametersRowHeight=0;
|
||||
this.parametersDivHeight=0;
|
||||
this.fixedFiltersCount=0;
|
||||
this.tempFiltersCount=0;
|
||||
this.tempFiltersNum=0;
|
||||
this.tempFiltersFieldTypesString='';
|
||||
this.allFilters=[];
|
||||
this.tempFilters=[];
|
||||
|
||||
var url = new ZtVWeb.JSURL('../servlet/SPVZMFilters?PortletID='+this.Ctrl.id+'&Table='+this.Table.Value()+'&ConfigName='+this.ConfigName.Value()+'&VQRName='+this.VQRName.Value()+
|
||||
'&ViewMode='+(Empty(this.Mode.Value())?(SPTheme.portalZoomParamDefaultViewMode?SPTheme.portalZoomParamDefaultViewMode:""):this.Mode.Value())+
|
||||
'&ReadFieldNewLine='+(Empty(this.ReadFieldNewLine.Value())?(SPTheme.portalZoomParamReadFieldNewLine?SPTheme.portalZoomParamReadFieldNewLine:"false"):this.ReadFieldNewLine.Value())+
|
||||
'&FormWidth='+(this.Width.Value()==0?this.Ctrl.offsetWidth:this.Width.Value())+
|
||||
'&MaxFieldWidth='+this.MaxFieldWidth.Value()+'&Columns='+this.Columns.Value()+
|
||||
'&AutoZoom='+this.AddAutoZoom.Value()+'&OperationSelect='+this.OperationSelect.Value()+
|
||||
'&EnableEdit='+this.EnableEdit.Value()+'&ResetButton='+this.ResetButton.Value()+'&DynamicFilters='+this.DynamicFilters.Value()+
|
||||
'&UseImages='+this.UseImages.Value()+'&EnablePrint='+!EmptyString(this.ReportName.Value())+
|
||||
'&ToolbarLabels='+this.ToolbarLabels.Value()+'&ToolbarAlign='+this.ToolbarAlign.Value(),true);
|
||||
eval(url.Response());
|
||||
|
||||
if(this.cfgBuilder){
|
||||
this.cfgBuilder.showSaveBtn.Value(false);
|
||||
this.cfgBuilder.btnSave.Hide();
|
||||
this.cfgBuilder.lblSaving.Ctrl.style.left=8;
|
||||
this.cfgBuilder.lblSaving.Ctrl.style.top=25;
|
||||
}
|
||||
parameters_main_div.style.height=this.parametersDivHeight+30+'px';
|
||||
parameters_main_div.style.top=this.OffsetTop.Value(); //per spostare su o giu
|
||||
parameters_main_div.innerHTML=this.htmlCode_MainTable;
|
||||
|
||||
var parameters_filters_div=document.createElement('DIV');
|
||||
parameters_filters_div.id=this.formid+'_parameters';
|
||||
parameters_filters_div.style.position='relative';
|
||||
parameters_filters_div.style.height=this.parametersDivHeight+'px';
|
||||
parameters_filters_div.innerHTML=this.htmlCode;
|
||||
|
||||
try{
|
||||
document.getElementById(this.formid+"_main").appendChild(parameters_filters_div);
|
||||
} catch(e){}
|
||||
|
||||
eval(this.scriptCode);
|
||||
|
||||
this.tempFiltersFieldTypes=this.tempFiltersFieldTypesString.split('|');
|
||||
|
||||
if(this.FilterButtonCaption.Value()!=''){
|
||||
this.btn_filter.Ctrl.title=this.FilterButtonCaption.Value();
|
||||
if(!this.UseImages.Value()){
|
||||
this.btn_filter.Ctrl.value=this.FilterButtonCaption.Value();
|
||||
}
|
||||
else if(this.ToolbarLabels.Value()){
|
||||
this.lbl_filter.Value(this.FilterButtonCaption.Value());
|
||||
}
|
||||
}
|
||||
if(this.FilterAddButtonCaption.Value()!=''){
|
||||
this.btn_add.Ctrl.title=this.FilterAddButtonCaption.Value();
|
||||
if(!this.UseImages.Value()){
|
||||
this.btn_add.Ctrl.value=this.FilterAddButtonCaption.Value();
|
||||
}
|
||||
else if(this.ToolbarLabels.Value()){
|
||||
this.lbl_add.Value(this.FilterAddButtonCaption.Value());
|
||||
}
|
||||
}
|
||||
if(this.FilterRefreshButtonCaption.Value()!=''){
|
||||
this.btn_reset.Ctrl.title=this.FilterRefreshButtonCaption.Value();
|
||||
if(!this.UseImages.Value()){
|
||||
this.btn_reset.Ctrl.value=this.FilterRefreshButtonCaption.Value();
|
||||
}
|
||||
else if(this.ToolbarLabels.Value()){
|
||||
this.lbl_reset.Value(this.FilterRefreshButtonCaption.Value());
|
||||
}
|
||||
}
|
||||
|
||||
this.SetPortletHeight();
|
||||
if(this.Width.Value()==0 && this.Ctrl.offsetWidth==0)
|
||||
this.SetPortletWidth();
|
||||
}
|
||||
|
||||
this.SetPortletHeight=function(){
|
||||
if(document.getElementById(this.formid+'_main_table').offsetHeight==0)
|
||||
window.setTimeout(this.formid+".SetPortletHeight()",50);
|
||||
else {
|
||||
var h=document.getElementById(this.formid+'_main_table').offsetHeight;
|
||||
this.height=h;
|
||||
document.getElementById(this.formid).style.height=h+"px";
|
||||
try {
|
||||
ZtVWeb.ResizeIframe();
|
||||
}catch(e){}
|
||||
}
|
||||
}
|
||||
this.SetPortletWidth=function(){
|
||||
if(this.Ctrl.offsetWidth>0){
|
||||
this.DrawPortlet();
|
||||
if(this.gridFilters)
|
||||
this.UpdateTempFilters(this.gridFilters);
|
||||
}
|
||||
else
|
||||
window.setTimeout(this.formid+".SetPortletWidth()",50);
|
||||
}
|
||||
|
||||
try{
|
||||
this.DrawPortlet();
|
||||
} catch(e){}
|
||||
|
||||
var emtName=this.EmitterName.Value();
|
||||
if(EmptyString(emtName)){
|
||||
emtName=this.Table.Value()+'_zoomSetFilter';
|
||||
}
|
||||
this.$entity$_zoomSetFilter.name=this.$entity$_zoomSetFilter.name.replace('$entity$_zoomSetFilter',emtName);
|
||||
|
||||
var rcvName=this.ReceiverName.Value();
|
||||
if(EmptyString(rcvName)){
|
||||
rcvName=this.Table.Value()+'_updateFilters';
|
||||
}
|
||||
this.$entity$_updateFilters.name=this.$entity$_updateFilters.name.replace('$entity$_updateFilters',rcvName);
|
||||
this['on_'+(this.ReceiverName.Value() || this.Table.Value())+"_updateFilters"]=function(parmsObj){
|
||||
this.$entity$_updateFilters.receiveFnc(parmsObj);
|
||||
};
|
||||
this.$entity$_updateConfiguration.name=this.$entity$_updateConfiguration.name.replace('$entity$',rcvName);
|
||||
this['on_'+(this.ReceiverName.Value() || this.Table.Value())+"_updateConfiguration"]=function(parmsObj){
|
||||
this.$entity$_updateConfiguration.receiveFnc(parmsObj);
|
||||
};
|
||||
|
||||
this.gridFilters;
|
||||
this.hideFilters=[];
|
||||
this.UpdateTempFilters=function(filters){
|
||||
this.hideFilters=[];
|
||||
this.gridFilters=LibJavascript.Array.filter(filters,function(f){ return !f.fixed; });
|
||||
this.ClearTempFilters();
|
||||
for(var i=0;i<filters.length;i++){
|
||||
if(!filters[i].fixed){
|
||||
if(filters[i].visible)
|
||||
this.addFilter(filters[i]);
|
||||
else
|
||||
this.hideFilters.push(filters[i]);
|
||||
}
|
||||
}
|
||||
this.SetPortletHeight();
|
||||
}
|
||||
|
||||
this.DoOnKeyDown=function(e){
|
||||
e = e ? e : window.event;
|
||||
var keyCode = GetKeyCode(e);
|
||||
if(keyCode==13){
|
||||
if(GetEventSrcElement(e).type=='text'){
|
||||
this.btn_filter_Click();
|
||||
e.cancelBubble=true;
|
||||
e.returnValue=false;
|
||||
}
|
||||
}
|
||||
}
|
||||
this.OpenCalendar=function(id){
|
||||
PrepareJsCalendar(false);
|
||||
LaunchCalendar(id);
|
||||
}
|
||||
|
||||
this.lbl_filter_Click=function(){
|
||||
this.btn_filter_Click();
|
||||
}
|
||||
this.btn_filter_Click=function(){
|
||||
// this.SetInitialValue();
|
||||
this.$entity$_zoomSetFilter.Emit();
|
||||
}
|
||||
|
||||
this.lbl_print_Click=function(){
|
||||
this.btn_print_Click();
|
||||
}
|
||||
this.btn_print_Click=function(){
|
||||
var height=600;
|
||||
var width=800;
|
||||
var left=(screen.width)?(screen.width-width)/2:100;
|
||||
var top=(screen.height)?(screen.height-height-(height/4))/2:100;
|
||||
if (IsNetscape() || IsMozilla()) {
|
||||
width+=5; //Per Netscape e Mozilla, il width e height sono leggermente diversi
|
||||
height+=4;
|
||||
}
|
||||
window.open("../servlet/Report?ReportName="+this.ReportName.Value()+
|
||||
(EmptyString(this.PrintFormat.Value())?"":"&outputFormat="+this.PrintFormat.Value())+
|
||||
(EmptyString(this.PrintOrientation.Value())?"":"&rotation="+this.PrintOrientation.Value())+
|
||||
"&m_cVZMParamBlock="+URLenc(this.GetParamBlock()),"print","height="+height+",width="+width+",left="+left+",top="+top+",resizable=yes,scrollbars=yes");
|
||||
}
|
||||
|
||||
this.lbl_reset_Click=function(){
|
||||
this.btn_reset_Click();
|
||||
}
|
||||
this.btn_reset_Click=function(){
|
||||
this.DrawPortlet();
|
||||
this.btn_filter_Click();
|
||||
}
|
||||
|
||||
this.lbl_save_Click=function(){
|
||||
this.btn_save_Click();
|
||||
}
|
||||
this.btn_save_Click=function(){
|
||||
this.cfgBuilder.Save();
|
||||
}
|
||||
|
||||
this.lbl_add_Click=function(){
|
||||
this.btn_add_Click();
|
||||
}
|
||||
this.addFilter=function(filter){
|
||||
var temp_parameters_table=document.getElementById(this.formid+"_temp");
|
||||
if(this.tempFiltersNum==0){
|
||||
var temp_parameters_sep=document.createElement('HR');
|
||||
temp_parameters_sep.id=this.formid+'_temp_sep';
|
||||
var temp_parameters_table_td=document.getElementById(this.formid+"_temp_td");
|
||||
temp_parameters_table_td.insertBefore(temp_parameters_sep,temp_parameters_table);
|
||||
}
|
||||
var temp_parameters_row=temp_parameters_table.insertRow(temp_parameters_table.rows.length);
|
||||
temp_parameters_row.id='temp_parameters_'+this.tempFiltersCount;
|
||||
var temp_parameters_cell=temp_parameters_row.insertCell(0);
|
||||
temp_parameters_cell.innerHTML=Strtran(tempFilterHtmlString,'##INDEX##',this.tempFiltersCount);
|
||||
eval(Strtran(tempFilterScriptString,'##INDEX##',this.tempFiltersCount));
|
||||
|
||||
if(filter){
|
||||
this.tempFilters[this.tempFiltersCount]=[filter.field,filter.operator,'','','','','','','','','','','','','','','','','','','','','','','','',''];
|
||||
this['combobox_temp_fields_'+this.tempFiltersCount].Value(filter.field.toUpperCase());
|
||||
this['combobox_temp_operations_'+this.tempFiltersCount].Value(filter.operator);
|
||||
this['fld_temp_'+this.tempFiltersCount].Value(filter.expression);
|
||||
}
|
||||
else {
|
||||
this.tempFilters[this.tempFiltersCount]=['','','','','','','','','','','','','','','','','','','','','','','','','','',''];
|
||||
this.SetPortletHeight();
|
||||
}
|
||||
this.tempFiltersCount++;
|
||||
this.tempFiltersNum++;
|
||||
}
|
||||
|
||||
this.btn_add_Click=function(/*evt*/){
|
||||
this.addFilter();
|
||||
}
|
||||
|
||||
this.btn_edit_Click=function(ctrl,idx,temp){
|
||||
var cp_type='';
|
||||
if(temp && Empty(this['combobox_temp_fields_'+idx].Value())){
|
||||
alert("Select a field for the filter.");
|
||||
}
|
||||
else {
|
||||
var height=490;
|
||||
var width=480;
|
||||
var windowLeft=(screen.width)?(screen.width-width)/2:100;
|
||||
var windowTop=(screen.height)?(screen.height-height-(height/4))/2:100;
|
||||
if (IsNetscape() || IsMozilla()) {
|
||||
width+=5; //Per Netscape e Mozilla, il width e height sono leggermente diversi
|
||||
height+=4;
|
||||
}
|
||||
if(temp)
|
||||
cp_type='&type='+this.tempFiltersFieldTypes[this['combobox_temp_fields_'+idx].Ctrl.selectedIndex-1];
|
||||
window.open("../SPPortalZoomParameters_FilterProps.htm?formid="+this.formid+"&action=edit&temp="+temp+"&idx="+idx+cp_type, "field", "height="+height+",width="+width+",left="+windowLeft+",top="+windowTop);
|
||||
}
|
||||
}
|
||||
this.btn_delete_Click=function(idx,isTemp){
|
||||
if(isTemp){
|
||||
var temp_parameters_table=document.getElementById(this.formid+"_temp");
|
||||
var j=document.getElementById('temp_parameters_'+idx).rowIndex;
|
||||
this['combobox_temp_fields_'+idx]=null;
|
||||
temp_parameters_table.deleteRow(j);
|
||||
this.tempFilters[idx]=null;
|
||||
this.tempFiltersNum--;
|
||||
if(this.tempFiltersNum==0){ //non ci sono + filtri temp
|
||||
var temp_parameters_table_td=document.getElementById(this.formid+"_temp_td");
|
||||
temp_parameters_table_td.removeChild(document.getElementById(this.formid+"_temp_sep"));
|
||||
}
|
||||
this.SetPortletHeight();
|
||||
}
|
||||
else { //imposto che il filtro non deve essere salvato
|
||||
if(!this.allFilters[idx][27]){
|
||||
this["lbl_"+this.allFilters[idx][0]+idx].Ctrl.style.fontStyle='italic';
|
||||
this["lbl_"+this.allFilters[idx][0]+idx].Ctrl.style.textDecoration='line-through';
|
||||
LibJavascript.CssClassNameUtils.replaceClass(this["delete_btn_"+this.allFilters[idx][0]+idx].Ctrl,'PortalZoomParams_DeleteFilter','PortalZoomParams_UnDeleteFilter');
|
||||
this.allFilters[idx][27]=true;
|
||||
}
|
||||
else {
|
||||
this["lbl_"+this.allFilters[idx][0]+idx].Ctrl.style.fontStyle='';
|
||||
this["lbl_"+this.allFilters[idx][0]+idx].Ctrl.style.textDecoration='';
|
||||
LibJavascript.CssClassNameUtils.replaceClass(this["delete_btn_"+this.allFilters[idx][0]+idx].Ctrl,'PortalZoomParams_UnDeleteFilter','PortalZoomParams_DeleteFilter');
|
||||
this.allFilters[idx][27]=false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.ClearTempFilters=function(){
|
||||
if(this.tempFiltersNum>0){
|
||||
var temp_parameters_table=document.getElementById(this.formid+"_temp");
|
||||
var temp_parameters_table_td=document.getElementById(this.formid+"_temp_td");
|
||||
|
||||
while(temp_parameters_table.rows.length>0) {
|
||||
temp_parameters_table.deleteRow(0);
|
||||
}
|
||||
temp_parameters_table_td.removeChild(document.getElementById(this.formid+"_temp_sep"));
|
||||
|
||||
//this.tempFilters=new Array();
|
||||
for(var i=0;i<this.tempFilters.length;i++){
|
||||
this.tempFilters[i]=null;
|
||||
}
|
||||
this.tempFiltersNum=0;
|
||||
}
|
||||
}
|
||||
this.SetConfiguration=function(evt){
|
||||
this.ConfigName.Value(evt.Config.ConfigName);
|
||||
this.Custom = evt.Config.Custom;
|
||||
this.User = evt.Config.User;
|
||||
this.Group = evt.Config.Group;
|
||||
if (evt.reload) this.DrawPortlet();
|
||||
}
|
||||
this.advanced_filters_toggle_Click=function(){
|
||||
if(document.getElementById(this.Ctrl.id+'_advanced_filters').style.display=='none'){
|
||||
document.getElementById(this.formid+'_main').style.height=document.getElementById(this.formid+'_main').offsetHeight+this.parametersAdvDivHeight+'px';
|
||||
try{
|
||||
document.getElementById(this.formid+'_parameter_groups_0').style.top=document.getElementById(this.formid+'_parameter_groups_0').offsetTop+this.parametersAdvDivHeight;
|
||||
}catch(e){}
|
||||
document.getElementById(this.Ctrl.id+'_advanced_filters').style.display='block';
|
||||
LibJavascript.CssClassNameUtils.replaceClass(document.getElementById(this.Ctrl.id+'_advanced_filters_toggle'),'PortalZoomParams_Group_Collapsed','PortalZoomParams_Group_Expanded');
|
||||
LibJavascript.CssClassNameUtils.replaceClass(document.getElementById(this.Ctrl.id+'_advanced_filters_togglehref'),'PortalZoomParams_Group_Collapsed','PortalZoomParams_Group_Expanded');
|
||||
}
|
||||
else {
|
||||
document.getElementById(this.formid+'_main').style.height=document.getElementById(this.formid+'_main').offsetHeight-this.parametersAdvDivHeight+'px';
|
||||
try{
|
||||
document.getElementById(this.formid+'_parameter_groups_0').style.top=document.getElementById(this.formid+'_parameter_groups_0').offsetTop-this.parametersAdvDivHeight;
|
||||
}catch(e){}
|
||||
document.getElementById(this.Ctrl.id+'_advanced_filters').style.display='none';
|
||||
LibJavascript.CssClassNameUtils.replaceClass(document.getElementById(this.Ctrl.id+'_advanced_filters_toggle'),'PortalZoomParams_Group_Expanded','PortalZoomParams_Group_Collapsed');
|
||||
LibJavascript.CssClassNameUtils.replaceClass(document.getElementById(this.Ctrl.id+'_advanced_filters_togglehref'),'PortalZoomParams_Group_Expanded','PortalZoomParams_Group_Collapsed');
|
||||
}
|
||||
this.SetPortletHeight();
|
||||
}
|
||||
|
||||
this.GetFilters=function(){
|
||||
var j, filters, field_name, field_op, field_visible, filter;
|
||||
eval('filters={'+filtersString+'};');
|
||||
//I filtri dinamici
|
||||
var fields=this.fields.split(",");
|
||||
for(var i=0; i<this.tempFiltersCount; i++){
|
||||
if(this['combobox_temp_fields_'+i]!=null && this.tempFilters[i]!=null){
|
||||
var find=false;
|
||||
field_name=this["combobox_temp_fields_"+i].Value();
|
||||
for(j=0;j<fields.length;j++){
|
||||
if(fields[j].toUpperCase()==field_name.toUpperCase()) {
|
||||
find=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (find) {
|
||||
field_op=field_name+'_op';
|
||||
field_visible=field_name+'_visible';
|
||||
filter={};
|
||||
filter[field_name]=this["fld_temp_"+i].Value();
|
||||
filter[field_op]=this["combobox_temp_operations_"+i].Value();
|
||||
filter[field_visible]=true;
|
||||
filters[i+this.fixedFiltersCount]=filter;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (j=0; j<this.hideFilters.length;j++) {
|
||||
field_name=this.hideFilters[j].field;
|
||||
field_op=field_name+'_op';
|
||||
field_visible=field_name+'_visible';
|
||||
filter={};
|
||||
var field_type=field_name+'_type';
|
||||
filter[field_name]=this.hideFilters[j].expression;
|
||||
filter[field_op]=this.hideFilters[j].operator;
|
||||
filter[field_type]=this.hideFilters[j].type;
|
||||
filter[field_visible]=false;
|
||||
filters[i+this.fixedFiltersCount+j]=filter;
|
||||
}
|
||||
filters['removeFixed']=true;
|
||||
return filters;
|
||||
}
|
||||
|
||||
this.GetParamBlock=function(){
|
||||
var result = [], filterType = "", i;
|
||||
for(i=0;i<this.allFilters.length;i++){
|
||||
if(this.allFilters[i]!=null && !this.allFilters[i][27]){
|
||||
result.push({filter_field: this.allFilters[i][0],
|
||||
filter_type: this.allFilters[i][3],
|
||||
filter_value: this.GetFilterValue(i,false,this.allFilters[i][3]),
|
||||
query_param: this.allFilters[i][21],
|
||||
filter_operation: this.GetFilterOperation(i,false)});
|
||||
}
|
||||
}
|
||||
for(i=0; i<this.tempFilters.length; i++){
|
||||
if(this.tempFilters[i]!=null && this["combobox_temp_fields_"+i].Value()!=""){
|
||||
filterType = this.GetTempFilterType(i);
|
||||
result.push({filter_field: this["combobox_temp_fields_"+i].Value(),
|
||||
filter_type: filterType,
|
||||
filter_value: this.GetFilterValue(i,true,filterType),
|
||||
query_param: this.tempFilters[i][21],
|
||||
filter_operation: this.GetFilterOperation(i,true)});
|
||||
}
|
||||
}
|
||||
return JSON.stringify(result);
|
||||
}
|
||||
this.GetFilter=function(idx,temp){
|
||||
if(temp)
|
||||
return(this.tempFilters[idx]);
|
||||
else
|
||||
return(this.allFilters[idx]);
|
||||
}
|
||||
this.GetFilterOperation=function(idx,temp){
|
||||
if(temp)
|
||||
return this["combobox_temp_operations_"+idx].Value();
|
||||
else
|
||||
return this.OperationSelect.Value() ? this["combobox_"+this.allFilters[idx][0]+idx].Value() : this.allFilters[idx][1];
|
||||
}
|
||||
this.GetFilterValue=function(idx,temp,filterType){
|
||||
var filterValue;
|
||||
if(temp)
|
||||
filterValue = this["fld_temp_"+idx].Value()==null ? '' : this["fld_temp_"+idx].Value();
|
||||
else {
|
||||
if(this.allFilters[idx][24]==''){
|
||||
filterValue = this["fld_"+this.allFilters[idx][0]+idx].Ctrl_input.value==null ? '' : this["fld_"+this.allFilters[idx][0]+idx].Ctrl_input.value;
|
||||
}else{
|
||||
filterValue = this["fld_"+this.allFilters[idx][0]+idx].Ctrl.value==null ? '' : this["fld_"+this.allFilters[idx][0]+idx].Ctrl.value;
|
||||
}
|
||||
}
|
||||
|
||||
if (filterType) {
|
||||
if(filterType=="D"){
|
||||
filterValue = ZtVWeb.strToValue(filterValue,filterType,ZtVWeb.defaultDatePict);
|
||||
filterValue = ZtVWeb.applyPicture(filterValue,'D',0,"YYYYMMDD");
|
||||
}
|
||||
else if(filterType=="T"){
|
||||
filterValue = ZtVWeb.strToValue(filterValue,filterType,ZtVWeb.defaultDateTimePict);
|
||||
filterValue = ZtVWeb.applyPicture(filterValue,'T',0,"YYYYMMDDhhmmss");
|
||||
}
|
||||
else{
|
||||
filterValue = (ZtVWeb.strToValue(filterValue,filterType,"")).toString();
|
||||
}
|
||||
}
|
||||
return filterValue;
|
||||
}
|
||||
this.GetTempFilterType=function(idx){
|
||||
if(EmptyString(LRTrim(this.tempFilters[idx][3]))) {
|
||||
var type = this.tempFiltersFieldTypes[this["combobox_temp_fields_"+idx].Ctrl.selectedIndex-1];
|
||||
var pos = type.indexOf("(");
|
||||
if (pos > -1) {
|
||||
return type.substring(0,pos);
|
||||
} else {
|
||||
return type;
|
||||
}
|
||||
}
|
||||
else
|
||||
return this.tempFilters[idx][3];
|
||||
}
|
||||
|
||||
this.GetDataSave=function(conf){
|
||||
var jsonFilters=[];
|
||||
var i;
|
||||
for(i=0;i<this.allFilters.length;i++){
|
||||
if(this.allFilters[i]!=null && this.allFilters[i][27]){
|
||||
this.AdaptSequence(999,this.allFilters[i][26]);
|
||||
}
|
||||
}
|
||||
|
||||
for(i=0;i<this.allFilters.length;i++){
|
||||
if(this.allFilters[i]!=null && !this.allFilters[i][27]){
|
||||
this.allFilters[i][1]=this.GetFilterOperation(i,false);
|
||||
if(this.allFilters[i][3]=='N' && this.allFilters[i][25]==0){
|
||||
this.allFilters[i][25]='';
|
||||
}
|
||||
jsonFilters[jsonFilters.length]=this.allFilters[i];
|
||||
}
|
||||
}
|
||||
for(i=0; i<this.tempFilters.length; i++){
|
||||
if(this.tempFilters[i]!=null && this["combobox_temp_fields_"+i].Value()!=""){
|
||||
this.tempFilters[i][0]=this["combobox_temp_fields_"+i].Value();
|
||||
this.tempFilters[i][1]=this["combobox_temp_operations_"+i].Value();
|
||||
this.tempFilters[i][26]=jsonFilters.length+1;
|
||||
jsonFilters.push(this.tempFilters[i]);
|
||||
}
|
||||
}
|
||||
conf.Filters=jsonFilters;
|
||||
conf.ConfigName = this.ConfigName.Value();
|
||||
conf.Custom = this.Custom;
|
||||
conf.User = this.User;
|
||||
conf.Group = this.Group;
|
||||
}
|
||||
|
||||
this.AdaptSequence=function(sequenceNew,sequenceOld){
|
||||
var i=0;
|
||||
while(i<this.allFilters.length){
|
||||
//Filtro spostato in avanti
|
||||
if(this.allFilters[i][26]>=sequenceOld && this.allFilters[i][26]<=sequenceNew){
|
||||
this.allFilters[i][26]=this.allFilters[i][26]-1;
|
||||
}
|
||||
//Filtro spostato indietro
|
||||
else if(this.allFilters[i][26]>=sequenceNew && this.allFilters[i][26]<=sequenceOld){
|
||||
this.allFilters[i][26]=this.allFilters[i][26]+1;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
return sequenceNew;
|
||||
}
|
||||
|
||||
this.SetOperation=function(index){
|
||||
if (this.fields.indexOf(this["combobox_temp_fields_"+index].Value())==-1) {
|
||||
this["combobox_temp_operations_"+index].Disabled();
|
||||
this["combobox_temp_operations_"+index].Value("=");
|
||||
} else {
|
||||
this["combobox_temp_operations_"+index].Enabled();
|
||||
}
|
||||
}
|
||||
//funzione globale
|
||||
var oldReportLinkValue=window.ReportLinkValue;
|
||||
window.ReportLinkValue=function(varName,value){
|
||||
try {
|
||||
document.getElementById(varName).value=value;
|
||||
window[Left(varName,5)]["zoom_report_"+varName](value);
|
||||
return true;
|
||||
}
|
||||
catch(e){}
|
||||
if (oldReportLinkValue) {
|
||||
return oldReportLinkValue(varName,value);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
this.SetInitialValue=function(){
|
||||
for(var i=0;i<this.allFilters.length;i++){
|
||||
var filterValue = this.GetFilterValue(i,false);
|
||||
if (EmptyString(filterValue) && !EmptyString(this.allFilters[i][25])){
|
||||
if(this.allFilters[i][24]==''){
|
||||
this["fld_"+this.allFilters[i][0]+i].Ctrl_input.value=this.allFilters[i][25];
|
||||
}else{
|
||||
return this["fld_"+this.allFilters[i][0]+i].Ctrl.value=this.allFilters[i][25];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
405
PortalStudio/SPPortalZoomParameters_FilterProps.htm
Normal file
@ -0,0 +1,405 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Filter properties</title>
|
||||
<script type="text/javascript" src="stdFunctions.js"></script>
|
||||
<script type="text/javascript" src="controls.js"></script>
|
||||
<script type="text/javascript">
|
||||
QueryString.keys = new Array();
|
||||
QueryString.values = new Array();
|
||||
var action,temp,formid,idx,field_props;
|
||||
|
||||
function QueryString(key) {
|
||||
var value = null;
|
||||
for (var i=0;i<QueryString.keys.length;i++) {
|
||||
if (QueryString.keys[i]==key) {
|
||||
value = QueryString.values[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
function QueryString_Parse() {
|
||||
var query = window.location.search.substring(1);
|
||||
var pairs = query.split("&");
|
||||
|
||||
for (var i=0;i<pairs.length;i++) {
|
||||
var pos = pairs[i].indexOf('=');
|
||||
if (pos >= 0) {
|
||||
var argname = pairs[i].substring(0,pos);
|
||||
var value = pairs[i].substring(pos+1);
|
||||
QueryString.keys[QueryString.keys.length] = argname;
|
||||
QueryString.values[QueryString.values.length] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function CloseWindow() {
|
||||
window.close();
|
||||
}
|
||||
|
||||
function DoLoad() {
|
||||
QueryString_Parse();
|
||||
action = QueryString("action");
|
||||
temp = QueryString("temp")=='true';
|
||||
field_props = QueryString("type");
|
||||
formid = QueryString("formid");
|
||||
idx = QueryString("idx");
|
||||
|
||||
if (action=="edit") {
|
||||
var filter = eval("window.opener."+formid+".GetFilter("+idx+","+temp+");");
|
||||
|
||||
Ctrl("name").value =(temp?eval("window.opener."+formid+".combobox_temp_fields_"+idx).Value():filter[0]);
|
||||
Ctrl("operation").value = (temp?eval("window.opener."+formid+".combobox_temp_operations_"+idx).Value():filter[1]);
|
||||
Ctrl("description").value = (Empty(filter[2])?(temp?
|
||||
(eval("window.opener."+formid+".combobox_temp_fields_"+idx).Text())
|
||||
:filter[2])
|
||||
:filter[2]);
|
||||
if (temp) {
|
||||
if(eval("window.opener."+formid+".fields.toUpperCase().indexOf(eval(\"window.opener.\"+formid+\".combobox_temp_fields_\"+idx).Value().toUpperCase())")==-1) {
|
||||
Ctrl("query_param").value = eval("window.opener."+formid+".combobox_temp_fields_"+idx).Value();
|
||||
Ctrl("query_param").disabled=true;
|
||||
} else {
|
||||
Ctrl("query_param").disabled=false;
|
||||
Ctrl("query_param").value = filter[21];
|
||||
}
|
||||
} else {
|
||||
if(eval("window.opener."+formid+".fields.toUpperCase().indexOf(filter[0].toUpperCase())")==-1) {
|
||||
Ctrl("query_param").disabled=true;
|
||||
} else {
|
||||
Ctrl("query_param").disabled=false;
|
||||
}
|
||||
Ctrl("query_param").value = filter[21];
|
||||
}
|
||||
if(temp){
|
||||
//faccio parsing della stringa di proprietà tipo N(9,2)
|
||||
field_props = field_props.split('(');
|
||||
var type='',len='',dec='';
|
||||
type = field_props[0];
|
||||
if(field_props.length==2){
|
||||
field_props = Left(field_props[1],Len(field_props[1])-1).split(',');
|
||||
if(field_props.length>0){
|
||||
len = field_props[0];
|
||||
if(field_props.length==2)
|
||||
dec = field_props[1];
|
||||
else
|
||||
dec = '0';
|
||||
}
|
||||
}
|
||||
}
|
||||
Ctrl("type").value = (Empty(filter[3]) && temp?type:filter[3]);
|
||||
Ctrl("len").value = (Empty(filter[4]) && temp?len:filter[4]);
|
||||
Ctrl("dec").value = (Empty(filter[5]) && temp?dec:filter[5]);
|
||||
Ctrl("format").value = filter[6];
|
||||
Ctrl("linked_table").value = filter[7];
|
||||
Ctrl("filter_fixed_1").value = filter[8];
|
||||
Ctrl("filter_fixed_2").value = filter[9];
|
||||
Ctrl("filter_fixed_3").value = filter[10];
|
||||
Ctrl("key_field").value = filter[11];
|
||||
Ctrl("filter_fixed_1_value").value = filter[12];
|
||||
Ctrl("filter_fixed_2_value").value = filter[13];
|
||||
Ctrl("filter_fixed_3_value").value = filter[14];
|
||||
Ctrl("read_field").value = filter[15];
|
||||
//16 vuoto
|
||||
Ctrl("combo_value").value = filter[17];
|
||||
Ctrl("advanced").checked=((filter[18]=="S")?true:false);
|
||||
Ctrl("group").value= filter[19];
|
||||
|
||||
if(Ctrl("group").value=="sp_hidden") {
|
||||
Ctrl("group").disabled=true;
|
||||
Ctrl("hidden_group").checked=true;
|
||||
}
|
||||
|
||||
Ctrl("keep_on_prev_row").checked=((filter[20]=="S")?true:false);
|
||||
Ctrl("tooltip").value = filter[22];
|
||||
Ctrl("display_length").value = filter[23];
|
||||
Ctrl("init_value").value = filter[25];
|
||||
Ctrl("filter_sequence").value = filter[26];
|
||||
if(temp){
|
||||
Ctrl("filter_sequence").style.display='none';
|
||||
Ctrl("filter_sequence_label").style.display='none';
|
||||
}
|
||||
}
|
||||
UpdateSizeControls();
|
||||
QueryParamControls();
|
||||
Ctrl("description").focus();
|
||||
}
|
||||
|
||||
function SetField() {
|
||||
if(Ctrl("len").value<0){
|
||||
alert("Field length error.");
|
||||
Ctrl("len").focus();
|
||||
}
|
||||
else {
|
||||
var currentFilter
|
||||
if(temp)
|
||||
currentFilter=eval("window.opener."+formid+".tempFilters["+idx+"]");
|
||||
else
|
||||
currentFilter=eval("window.opener."+formid+".allFilters["+idx+"]");
|
||||
|
||||
currentFilter[1]=Ctrl("operation").value;
|
||||
currentFilter[2]=Ctrl("description").value;
|
||||
currentFilter[3]=Ctrl("type").value;
|
||||
currentFilter[4]=Ctrl("len").value;
|
||||
currentFilter[5]=Ctrl("dec").value;
|
||||
currentFilter[6]=Ctrl("format").value;
|
||||
currentFilter[7]=Ctrl("linked_table").value;
|
||||
currentFilter[8]=Ctrl("filter_fixed_1").value;
|
||||
currentFilter[9]=Ctrl("filter_fixed_2").value;
|
||||
currentFilter[10]=Ctrl("filter_fixed_3").value;
|
||||
currentFilter[11]=Ctrl("key_field").value;
|
||||
currentFilter[12]=Ctrl("filter_fixed_1_value").value;
|
||||
currentFilter[13]=Ctrl("filter_fixed_2_value").value;
|
||||
currentFilter[14]=Ctrl("filter_fixed_3_value").value;
|
||||
currentFilter[15]=Ctrl("read_field").value;
|
||||
//16 vuoto
|
||||
currentFilter[17]=Ctrl("combo_value").value;
|
||||
currentFilter[18]=((Ctrl("advanced").checked==true)?'S':'N');
|
||||
currentFilter[19]=Ctrl("group").value;
|
||||
currentFilter[20]=((Ctrl("keep_on_prev_row").checked==true)?'S':'N');
|
||||
currentFilter[21]=Ctrl("query_param").value;
|
||||
currentFilter[22]=Ctrl("tooltip").value;
|
||||
currentFilter[23]=Ctrl("display_length").value;
|
||||
currentFilter[25]=Ctrl("init_value").value;
|
||||
currentFilter[26]=(currentFilter[26]==Ctrl("filter_sequence").value)?Ctrl("filter_sequence").value:eval("window.opener."+formid+".AdaptSequence("+Ctrl("filter_sequence").value+","+currentFilter[26]+")");
|
||||
|
||||
if(!temp)
|
||||
eval("window.opener."+formid+".lbl_"+currentFilter[0]+idx).Value(currentFilter[2]);
|
||||
|
||||
try{
|
||||
eval("window.opener."+formid+".combobox_"+(temp?"temp_operations_":currentFilter[0])+idx).Value(currentFilter[1]);
|
||||
if(!Empty(Ctrl("query_param").value))
|
||||
eval("window.opener."+formid+".combobox_"+(temp?"temp_operations_":currentFilter[0])+idx).Disabled();
|
||||
else
|
||||
eval("window.opener."+formid+".combobox_"+(temp?"temp_operations_":currentFilter[0])+idx).Enabled();
|
||||
} catch(e) {}
|
||||
|
||||
if(!Empty(currentFilter[25])){
|
||||
eval("window.opener."+formid+".fld_"+(temp?"temp_":currentFilter[0])+idx).Value(Left(LTrim(currentFilter[25]),1)=="["?"":currentFilter[25]);
|
||||
}
|
||||
CloseWindow();
|
||||
}
|
||||
}
|
||||
|
||||
function TestSequence(){
|
||||
var maxSequence=eval("window.opener."+formid+".allFilters.length");
|
||||
if(Ctrl("filter_sequence").value>maxSequence)
|
||||
Ctrl("filter_sequence").value=maxSequence;
|
||||
else if(Ctrl("filter_sequence").value<1)
|
||||
Ctrl("filter_sequence").value=1;
|
||||
}
|
||||
|
||||
function UpdateSizeControls() {
|
||||
if(Ctrl("type").value=="N") {
|
||||
Ctrl("len").disabled=false;
|
||||
Ctrl("dec").disabled=false;
|
||||
} else if(Ctrl("type").value=="C") {
|
||||
Ctrl("len").disabled=false;
|
||||
Ctrl("dec").disabled=true;
|
||||
} else {
|
||||
Ctrl("len").disabled=true;
|
||||
Ctrl("dec").disabled=true;
|
||||
}
|
||||
|
||||
switch(Ctrl("type").value) {
|
||||
case "D":
|
||||
Ctrl("len").value="8";
|
||||
Ctrl("dec").value="0";
|
||||
break;
|
||||
case "T":
|
||||
Ctrl("len").value="14";
|
||||
Ctrl("dec").value="0";
|
||||
break;
|
||||
case "L":
|
||||
Ctrl("len").value="1";
|
||||
Ctrl("dec").value="0";
|
||||
break;
|
||||
case "M":
|
||||
case "S":
|
||||
Ctrl("len").value="10";
|
||||
Ctrl("dec").value="0";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function ManageKeys(e) {
|
||||
e=e?e:window.event;
|
||||
var keyCode=GetKeyCode(e);
|
||||
if(keyCode==13) SetField();
|
||||
else if(keyCode==27) CloseWindow();
|
||||
}
|
||||
|
||||
function QueryParamControls() {
|
||||
if(Empty(Ctrl("query_param").value)){
|
||||
Ctrl("operation").disabled=false;
|
||||
} else
|
||||
Ctrl("operation").disabled=true;
|
||||
}
|
||||
|
||||
function CheckHiddenGroup() {
|
||||
if (Ctrl("hidden_group").checked){
|
||||
Ctrl("group").value="sp_hidden";
|
||||
Ctrl("group").disabled=true;
|
||||
Ctrl("advanced").checked=false;
|
||||
} else{
|
||||
Ctrl("group").disabled=false;
|
||||
Ctrl("group").value="";
|
||||
}
|
||||
}
|
||||
function CheckAdvanced() {
|
||||
if(Ctrl("advanced").checked){
|
||||
Ctrl("hidden_group").checked=false;
|
||||
Ctrl("group").disabled=false;
|
||||
if (Ctrl("group").value=="sp_hidden")
|
||||
Ctrl("group").value="";
|
||||
}
|
||||
}
|
||||
|
||||
function CheckInitValue(){
|
||||
switch(Ctrl("type").value) {
|
||||
case "D":
|
||||
Ctrl("init_value").value=ApplyPictureToDate(Ctrl("init_value").value,"DD-MM-YYYY");
|
||||
break;
|
||||
case "T":
|
||||
Ctrl("init_value").value=ApplyPictureToDateTime(Ctrl("init_value").value,"DD-MM-YYYY hh:mm:ss");
|
||||
break;
|
||||
case "L":
|
||||
break;
|
||||
case "M":
|
||||
case "S":
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function Help(e){
|
||||
var anchor="";
|
||||
if(typeof(anchorToFeature)!='undefined'){
|
||||
anchor=anchorToFeature['portalzoom_interfaccia_parms_prop_filtri'];
|
||||
}
|
||||
windowOpenForeground('help/portalstudio/'+helpToOpen+'_navigator.htm?'+anchor,'','toolbar=0,menubar=0,directories=0,width=720,height=600,resizable=1,scrollbars=1');
|
||||
} // Help
|
||||
|
||||
var helpToOpen;
|
||||
if(LibJavascript.RequireLibrary("help/portalstudio/spportalzoom_dictionary.js",true)){
|
||||
helpToOpen='spportalzoom';
|
||||
} else {
|
||||
if(LibJavascript.RequireLibrary("help/portalstudio/ps_urg_dictionary.js",true)){
|
||||
helpToOpen='ps_urg';
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body style="border:0;overflow:hidden;margin:0;background-color:#D6D3CE" onload="DoLoad()" onhelp="CancelHelp(event)" onkeydown="ManageKeys(event)">
|
||||
<table align="center" width="482" height="493" cellpadding="0" cellspacing="1" border="1">
|
||||
<tr>
|
||||
<td style="font-family:Arial;font-size:9pt">
|
||||
<input id="name" type="text" style="position:absolute;top:15;left:79;width:185" disabled maxlength="202">
|
||||
<label style="position:absolute;top:19;left:22" onselectstart="return false">Filter field:</label>
|
||||
|
||||
<input id="description" type="text" style="position:absolute;top:41;left:79;width:340" maxlength="382">
|
||||
<label style="position:absolute;top:45;left:12" onselectstart="return false">Description:</label>
|
||||
|
||||
<select id="operation" style="position:absolute;top:67;left:79;width:130">
|
||||
<option value=" " selected>-</option>
|
||||
<option value="like">Starts with</option>
|
||||
<option value="contains">Contains</option>
|
||||
<option value="=">=</option>
|
||||
<option value="<"><</option>
|
||||
<option value="<="><=</option>
|
||||
<option value=">">></option>
|
||||
<option value=">=">>=</option>
|
||||
<option value="<>"><></option>
|
||||
<option value="empty">empty</option>
|
||||
</select>
|
||||
<label style="position:absolute;top:71;left:21" onselectstart="return false">Operation:</label>
|
||||
|
||||
<input id="init_value" type="text" style="position:absolute;top:67;left:309;width:110" maxlength="102" onblur="CheckInitValue()">
|
||||
<label style="position:absolute;top:71;left:244" onselectstart="return false">Initial value:</label>
|
||||
|
||||
<hr style="position:absolute;top:93;width:100%">
|
||||
|
||||
<select id="type" style="position:absolute;top:100;left:79;width:130" onchange="UpdateSizeControls()">
|
||||
<option value="C" selected>Character</option>
|
||||
<option value="N">Numeric</option>
|
||||
<option value="D">Date</option>
|
||||
<option value="L">Logical</option>
|
||||
<option value="M">Memo</option>
|
||||
<option value="S">Small Memo</option>
|
||||
<option value="T">DateTime</option>
|
||||
</select>
|
||||
<label style="position:absolute;top:104;left:49" onselectstart="return false">Type:</label>
|
||||
|
||||
<input id="len" type="text" value="0" style="position:absolute;top:100;left:274;width:40" maxlength="34">
|
||||
<label style="position:absolute;top:104;left:232" onselectstart="return false">Length:</label>
|
||||
|
||||
<input id="dec" type="text" value="0" style="position:absolute;top:100;left:379;width:40" maxlength="34" disabled>
|
||||
<label style="position:absolute;top:104;left:322" onselectstart="return false">Decimals:</label>
|
||||
|
||||
<input id="format" type="text" style="position:absolute;top:126;left:79;width:340" maxlength="382">
|
||||
<label style="position:absolute;top:130;left:36" onselectstart="return false">Format:</label>
|
||||
|
||||
<input id="linked_table" type="text" style="position:absolute;top:152;left:79;width:340" maxlength="382">
|
||||
<label style="position:absolute;top:156;left:8" onselectstart="return false">Linked table:</label>
|
||||
|
||||
<input id="key_field" type="text" style="position:absolute;top:178;left:79;width:110" maxlength="82">
|
||||
<label style="position:absolute;top:182;left:29" onselectstart="return false">Key field:</label>
|
||||
|
||||
<input id="filter_fixed_1" type="text" style="position:absolute;top:204;left:79;width:110" maxlength="102">
|
||||
<label style="position:absolute;top:208;left:20" onselectstart="return false">Filter fixed:</label>
|
||||
|
||||
<input id="filter_fixed_1_value" type="text" style="position:absolute;top:204;left:279;width:110" maxlength="102">
|
||||
<label style="position:absolute;top:208;left:244" onselectstart="return false">Value:</label>
|
||||
|
||||
<input id="filter_fixed_2" type="text" style="position:absolute;top:230;left:79;width:110" maxlength="102">
|
||||
<label style="position:absolute;top:234;left:20" onselectstart="return false">Filter fixed:</label>
|
||||
|
||||
<input id="filter_fixed_2_value" type="text" style="position:absolute;top:230;left:279;width:110" maxlength="102">
|
||||
<label style="position:absolute;top:234;left:244" onselectstart="return false">Value:</label>
|
||||
|
||||
<input id="filter_fixed_3" type="text" style="position:absolute;top:256;left:79;width:110" maxlength="102">
|
||||
<label style="position:absolute;top:260;left:20" onselectstart="return false">Filter fixed:</label>
|
||||
|
||||
<input id="filter_fixed_3_value" type="text" style="position:absolute;top:256;left:279;width:110" maxlength="102">
|
||||
<label style="position:absolute;top:260;left:244" onselectstart="return false">Value:</label>
|
||||
|
||||
<input id="read_field" type="text" style="position:absolute;top:282;left:79;width:90" maxlength="82">
|
||||
<label style="position:absolute;top:286;left:19" onselectstart="return false">Read field:</label>
|
||||
|
||||
<input id="combo_value" type="text" style="position:absolute;top:308;left:79;width:340" maxlength="382">
|
||||
<label style="position:absolute;top:312;left:16" onselectstart="return false">Combo val:</label>
|
||||
|
||||
<input id="advanced" type="checkbox" style="position:absolute;top:336;left:79;width:17" onclick="CheckAdvanced()">
|
||||
<label style="position:absolute;top:338;left:22" onselectstart="return false">Advanced:</label>
|
||||
|
||||
<input id="hidden_group" type="checkbox" style="position:absolute;top:336;left:208;width:18" onclick="CheckHiddenGroup()">
|
||||
<label style="position:absolute;top:338;left:126" onselectstart="return false">Hidden group:</label>
|
||||
|
||||
<input id="keep_on_prev_row" type="checkbox" style="position:absolute;top:336;left:375;width:18">
|
||||
<label style="position:absolute;top:338;left:250" onselectstart="return false">Keep on previous row:</label>
|
||||
|
||||
<input id="group" type="text" style="position:absolute;top:360;left:79;width:110" maxlength="382">
|
||||
<label style="position:absolute;top:364;left:41" onselectstart="return false">Group:</label>
|
||||
|
||||
<input id="filter_sequence" type="text" style="position:absolute;top:360;left:329;width:90" maxlength="5" onchange="TestSequence()">
|
||||
<label id="filter_sequence_label" style="position:absolute;top:364;left:270" onselectstart="return false">Sequence:</label>
|
||||
|
||||
<input id="tooltip" type="text" style="position:absolute;top:386;left:79;width:340" maxlength="382">
|
||||
<label style="position:absolute;top:390;left:39" onselectstart="return false">Tooltip:</label>
|
||||
|
||||
<input id="display_length" type="text" style="position:absolute;top:412;left:79;width:120" maxlength="6">
|
||||
<label style="position:absolute;top:415;left:14" onselectstart="return false">Display len:</label>
|
||||
|
||||
<input id="query_param" type="text" style="position:absolute;top:438;left:79;width:300" maxlength="382" onchange="QueryParamControls()">
|
||||
<label style="position:absolute;top:440;left:20" onselectstart="return false">Query par.:</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="height:20">
|
||||
<td valign="middle" align="right" nowrap onselectstart="return false;">
|
||||
<button style="width:50" onclick="SetField()" accesskey="o" class="bottoni"><u>O</u>K</button>
|
||||
<button style="width:50" onclick="CloseWindow();" accesskey="c" class="bottoni"><u>C</u>ancel</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
510
PortalStudio/SPR.mem
Normal file
@ -0,0 +1,510 @@
|
||||
* --- SitePainter Revolution Global Project Variables Vers. 4.1
|
||||
Isprmem.GlobalProjectVars
|
||||
ana=True
|
||||
ascii=False
|
||||
bat=False
|
||||
bigapp=False
|
||||
cli5dir='c:\clipper5\
|
||||
clipdir='c:\clipper\
|
||||
dbasedir='c:\dbase\
|
||||
dd='X:\PAL
|
||||
defmen='
|
||||
eve=False
|
||||
fil=False
|
||||
filmen='
|
||||
fowdir='
|
||||
foxdir='c:\fox\
|
||||
fxpdir='f:\language\fpd26\
|
||||
gendetail=True
|
||||
genmaster=True
|
||||
genmasterdetail=True
|
||||
helpdbf='cp__help
|
||||
helpidx='cp__help
|
||||
hlp=False
|
||||
lan=False
|
||||
language='JavaServlet
|
||||
linker='T
|
||||
log=False
|
||||
m_d=False
|
||||
macrotec='db_tec
|
||||
macrouser='db_user
|
||||
macrtftec='rtf_tec
|
||||
macrtfusr='rtfuser
|
||||
mainedit='Q.EXE
|
||||
make=True
|
||||
mas=False
|
||||
mb='*.prg
|
||||
men=False
|
||||
menudbf='cp__menu
|
||||
mov=False
|
||||
multiut=False
|
||||
nameexe='prog
|
||||
oldbig=False
|
||||
oldmulti=False
|
||||
optimize=False
|
||||
paintdir='C:\Sitepainter
|
||||
planfile='PLAN
|
||||
prjName='SitePainter Infinity PortalStudio
|
||||
pro=False
|
||||
project=Icpproject.CPProject
|
||||
file={
|
||||
css_box_preview_portlet.jsp
|
||||
Icpproject.CPFileProject
|
||||
comment='
|
||||
group='csseditor\
|
||||
location='csseditor\
|
||||
timestamp='20110725170828
|
||||
type='portlet
|
||||
I
|
||||
css_button_preview_portlet.jsp
|
||||
Icpproject.CPFileProject
|
||||
comment='
|
||||
group='csseditor\
|
||||
location='csseditor\
|
||||
timestamp='20110725170828
|
||||
type='portlet
|
||||
I
|
||||
css_default_preview_portlet.jsp
|
||||
Icpproject.CPFileProject
|
||||
comment='
|
||||
group='csseditor\
|
||||
location='csseditor\
|
||||
timestamp='20110725170828
|
||||
type='portlet
|
||||
I
|
||||
css_editor.jsp
|
||||
Icpproject.CPFileProject
|
||||
group='csseditor\
|
||||
location='csseditor\
|
||||
timestamp='20110725170828
|
||||
type='jsp
|
||||
I
|
||||
css_grid_preview_portlet.jsp
|
||||
Icpproject.CPFileProject
|
||||
comment='
|
||||
group='csseditor\
|
||||
location='csseditor\
|
||||
timestamp='20110725170828
|
||||
type='portlet
|
||||
I
|
||||
css_input_preview_portlet.jsp
|
||||
Icpproject.CPFileProject
|
||||
comment='
|
||||
group='csseditor\
|
||||
location='csseditor\
|
||||
timestamp='20110725170828
|
||||
type='portlet
|
||||
I
|
||||
css_label_preview_portlet.jsp
|
||||
Icpproject.CPFileProject
|
||||
comment='
|
||||
group='csseditor\
|
||||
location='csseditor\
|
||||
timestamp='20110725170828
|
||||
type='portlet
|
||||
I
|
||||
css_preview.jsp
|
||||
Icpproject.CPFileProject
|
||||
group='csseditor\
|
||||
location='csseditor\
|
||||
timestamp='20110725170828
|
||||
type='jsp
|
||||
I
|
||||
css_select.jsp
|
||||
Icpproject.CPFileProject
|
||||
group='visualweb\
|
||||
location='visualweb\
|
||||
timestamp='20110725170828
|
||||
type='jsp
|
||||
I
|
||||
css_tab_preview_portlet.jsp
|
||||
Icpproject.CPFileProject
|
||||
comment='
|
||||
group='csseditor\
|
||||
location='csseditor\
|
||||
timestamp='20110725170828
|
||||
type='portlet
|
||||
I
|
||||
demo.jsp
|
||||
Icpproject.CPFileProject
|
||||
group='jsp\
|
||||
location='jsp\
|
||||
timestamp='20110725170828
|
||||
type='jsp
|
||||
I
|
||||
editor.jsp
|
||||
Icpproject.CPFileProject
|
||||
group='moduleeditor\
|
||||
location='visualweb\
|
||||
timestamp='20110725170828
|
||||
type='jsp
|
||||
I
|
||||
gadget_explorer.jsp
|
||||
Icpproject.CPFileProject
|
||||
group='templateeditor\
|
||||
location='templateeditor\
|
||||
timestamp='20110725170828
|
||||
type='jsp
|
||||
I
|
||||
include_file.jsp
|
||||
Icpproject.CPFileProject
|
||||
group='pageeditor\popups\
|
||||
location='pageeditor\popups\
|
||||
timestamp='20110725170828
|
||||
type='jsp
|
||||
I
|
||||
index.jsp
|
||||
Icpproject.CPFileProject
|
||||
group='chart\
|
||||
location='visualquery\
|
||||
timestamp='20110725170828
|
||||
type='jsp
|
||||
I
|
||||
insert.jsp
|
||||
Icpproject.CPFileProject
|
||||
group='pagelet\
|
||||
location='visualweb\
|
||||
timestamp='20110725170828
|
||||
type='jsp
|
||||
I
|
||||
inserttemplate.jsp
|
||||
Icpproject.CPFileProject
|
||||
group='pageeditor\popups\
|
||||
location='pageeditor\popups\
|
||||
timestamp='20110725170828
|
||||
type='jsp
|
||||
I
|
||||
js_select.jsp
|
||||
Icpproject.CPFileProject
|
||||
group='visualweb\
|
||||
location='visualweb\
|
||||
timestamp='20110725170828
|
||||
type='jsp
|
||||
I
|
||||
moduleeditor.jsp
|
||||
Icpproject.CPFileProject
|
||||
group='moduleeditor\
|
||||
location='moduleeditor\
|
||||
timestamp='20110725170828
|
||||
type='jsp
|
||||
I
|
||||
multilang_edit.jsp
|
||||
Icpproject.CPFileProject
|
||||
group='planeditor\
|
||||
location='scaneditor\
|
||||
timestamp='20110725170828
|
||||
type='jsp
|
||||
I
|
||||
new.jsp
|
||||
Icpproject.CPFileProject
|
||||
group='portalzoom\
|
||||
location='portalzoom\
|
||||
timestamp='20110725170828
|
||||
type='jsp
|
||||
I
|
||||
open.jsp
|
||||
Icpproject.CPFileProject
|
||||
group='csseditor\
|
||||
location='portalstudio\
|
||||
timestamp='20110725170828
|
||||
type='jsp
|
||||
I
|
||||
openbytag.jsp
|
||||
Icpproject.CPFileProject
|
||||
group='portalstudio\
|
||||
location='portalstudio\
|
||||
timestamp='20110725170828
|
||||
type='jsp
|
||||
I
|
||||
pagelet_edit.jsp
|
||||
Icpproject.CPFileProject
|
||||
group='pagelet\
|
||||
location='pagelet\
|
||||
timestamp='20110725170828
|
||||
type='jsp
|
||||
I
|
||||
params_select.jsp
|
||||
Icpproject.CPFileProject
|
||||
group='visualweb\
|
||||
location='visualweb\
|
||||
timestamp='20110725170828
|
||||
type='jsp
|
||||
I
|
||||
plan.jsp
|
||||
Icpproject.CPFileProject
|
||||
group='planeditor\
|
||||
location='planeditor\
|
||||
timestamp='20110725170828
|
||||
type='jsp
|
||||
I
|
||||
portalstudio.jsp
|
||||
Icpproject.CPFileProject
|
||||
group='portalstudio\
|
||||
location='portalstudio\
|
||||
timestamp='20110725170828
|
||||
type='jsp
|
||||
I
|
||||
portalzoom_config_portlet.jsp
|
||||
Icpproject.CPFileProject
|
||||
comment='
|
||||
group='cmspanel\
|
||||
location='cmspanel\
|
||||
timestamp='20110725170828
|
||||
type='portlet
|
||||
I
|
||||
portletlist.jsp
|
||||
Icpproject.CPFileProject
|
||||
group='cmspanel\
|
||||
location='cmspanel\
|
||||
timestamp='20110725170828
|
||||
type='jsp
|
||||
I
|
||||
saveas.jsp
|
||||
Icpproject.CPFileProject
|
||||
group='chart\
|
||||
location='scaneditor\
|
||||
timestamp='20110725170828
|
||||
type='jsp
|
||||
I
|
||||
scaneditor.jsp
|
||||
Icpproject.CPFileProject
|
||||
group='scaneditor\
|
||||
location='scaneditor\
|
||||
timestamp='20110725170828
|
||||
type='jsp
|
||||
I
|
||||
select_layout.jsp
|
||||
Icpproject.CPFileProject
|
||||
group='planeditor\
|
||||
location='scaneditor\
|
||||
timestamp='20110725170828
|
||||
type='jsp
|
||||
I
|
||||
select_theme.jsp
|
||||
Icpproject.CPFileProject
|
||||
group='planeditor\
|
||||
location='scaneditor\
|
||||
timestamp='20110725170828
|
||||
type='jsp
|
||||
I
|
||||
spimagesreader_portlet.jsp
|
||||
Icpproject.CPFileProject
|
||||
comment='
|
||||
group='jsp\
|
||||
location='jsp\
|
||||
timestamp='20110725170828
|
||||
type='portlet
|
||||
I
|
||||
spmakevzmfromvqr_portlet.jsp
|
||||
Icpproject.CPFileProject
|
||||
comment='
|
||||
group='jsp-system\
|
||||
location='jsp-system\
|
||||
timestamp='20110725170828
|
||||
type='portlet
|
||||
I
|
||||
spmodfields_portlet.jsp
|
||||
Icpproject.CPFileProject
|
||||
comment='
|
||||
group='jsp-system\
|
||||
location='jsp-system\
|
||||
timestamp='20110725170828
|
||||
type='portlet
|
||||
I
|
||||
spportalzoom.jsp
|
||||
Icpproject.CPFileProject
|
||||
component='portalstudio
|
||||
group='jsp\
|
||||
location='jsp\
|
||||
timestamp='20081006174917
|
||||
type='jsp
|
||||
I
|
||||
spportalzoom_sx_tpl.jsp
|
||||
Icpproject.CPFileProject
|
||||
component='portalstudio
|
||||
group='jsp\
|
||||
location='jsp\
|
||||
timestamp='20081006174917
|
||||
type='pagelet
|
||||
I
|
||||
spportalzoom_tpl.jsp
|
||||
Icpproject.CPFileProject
|
||||
group='jsp\
|
||||
location='jsp\
|
||||
timestamp='20110725170828
|
||||
type='pagelet
|
||||
I
|
||||
spportalzoombase_portlet.jsp
|
||||
Icpproject.CPFileProject
|
||||
comment='
|
||||
component='portalstudio
|
||||
group='jsp\
|
||||
location='jsp\
|
||||
timestamp='20081006174917
|
||||
type='portlet
|
||||
I
|
||||
spportalzoomcolumnsettings_fieldselect_portlet.jsp
|
||||
Icpproject.CPFileProject
|
||||
comment='
|
||||
component='portalstudio
|
||||
group='jsp\
|
||||
location='jsp-system\
|
||||
timestamp='20081006174917
|
||||
type='portlet
|
||||
I
|
||||
spportalzoomcolumnsettings_portlet.jsp
|
||||
Icpproject.CPFileProject
|
||||
comment='
|
||||
component='portalstudio
|
||||
group='jsp\
|
||||
location='jsp-system\
|
||||
timestamp='20081006174917
|
||||
type='portlet
|
||||
I
|
||||
spportalzoomconfigurationbuilder_globaloptions_portlet.jsp
|
||||
Icpproject.CPFileProject
|
||||
comment='
|
||||
component='portalstudio
|
||||
group='jsp\
|
||||
location='jsp-system\
|
||||
timestamp='20081006174917
|
||||
type='portlet
|
||||
I
|
||||
spportalzoomconfigurationbuilder_portlet.jsp
|
||||
Icpproject.CPFileProject
|
||||
comment='
|
||||
component='portalstudio
|
||||
group='jsp\
|
||||
location='jsp-system\
|
||||
timestamp='20081006174917
|
||||
type='portlet
|
||||
I
|
||||
spportalzoomlink.jsp
|
||||
Icpproject.CPFileProject
|
||||
component='portalstudio
|
||||
group='jsp\
|
||||
location='jsp\
|
||||
timestamp='20081006174917
|
||||
type='pagelet
|
||||
I
|
||||
spportalzoomlink_tpl.jsp
|
||||
Icpproject.CPFileProject
|
||||
group='jsp\
|
||||
location='jsp\
|
||||
timestamp='20110725170828
|
||||
type='pagelet
|
||||
I
|
||||
spportalzoomload_portlet.jsp
|
||||
Icpproject.CPFileProject
|
||||
comment='
|
||||
component='portalstudio
|
||||
group='jsp\
|
||||
location='jsp-system\
|
||||
timestamp='20081006174917
|
||||
type='portlet
|
||||
I
|
||||
spportalzoomload_vzmselect_portlet.jsp
|
||||
Icpproject.CPFileProject
|
||||
comment='
|
||||
component='portalstudio
|
||||
group='jsp\
|
||||
location='jsp-system\
|
||||
timestamp='20081006174917
|
||||
type='portlet
|
||||
I
|
||||
spportalzoomoptions_portlet.jsp
|
||||
Icpproject.CPFileProject
|
||||
comment='
|
||||
component='portalstudio
|
||||
group='jsp\
|
||||
location='jsp-system\
|
||||
timestamp='20081006174917
|
||||
type='portlet
|
||||
I
|
||||
spportalzoomoptions_vqrselect_portlet.jsp
|
||||
Icpproject.CPFileProject
|
||||
comment='
|
||||
component='portalstudio
|
||||
group='jsp\
|
||||
location='jsp-system\
|
||||
timestamp='20081006174917
|
||||
type='portlet
|
||||
I
|
||||
spportalzoomparameters_portlet.jsp
|
||||
Icpproject.CPFileProject
|
||||
comment='Portlet che legge i filtri presenti in una configurazione di zoom VZM e la rappresenta in un portlet.
|
||||
component='portalstudio
|
||||
group='jsp\
|
||||
location='jsp\
|
||||
timestamp='20081006174917
|
||||
type='portlet
|
||||
I
|
||||
spportalzoomprint_portlet.jsp
|
||||
Icpproject.CPFileProject
|
||||
comment='
|
||||
component='portalstudio
|
||||
group='jsp\
|
||||
location='jsp-system\
|
||||
timestamp='20081006174917
|
||||
type='portlet
|
||||
I
|
||||
sql.jsp
|
||||
Icpproject.CPFileProject
|
||||
group='visualquery\
|
||||
location='visualquery\
|
||||
timestamp='20110725170828
|
||||
type='jsp
|
||||
I
|
||||
updatedef.jsp
|
||||
Icpproject.CPFileProject
|
||||
group='chart\
|
||||
location='chart\
|
||||
timestamp='20110725170828
|
||||
type='jsp
|
||||
I
|
||||
upload_img.jsp
|
||||
Icpproject.CPFileProject
|
||||
group='jsp\
|
||||
location='jsp\
|
||||
timestamp='20110725170828
|
||||
type='jsp
|
||||
I
|
||||
}
|
||||
font=Icpproject.CPFont
|
||||
font='Arial
|
||||
font_points=9
|
||||
I
|
||||
libraries=[
|
||||
'portlet
|
||||
'filelibrary
|
||||
'utilities
|
||||
]
|
||||
I
|
||||
protojust='0
|
||||
prt=False
|
||||
rtf=True
|
||||
saf=True
|
||||
self='*.def
|
||||
servletcontainer='tomcat
|
||||
sta=False
|
||||
tab=False
|
||||
tabledbf='tabelle
|
||||
tableidx='tabelle
|
||||
tec=False
|
||||
tec_doc='standard
|
||||
tmp=False
|
||||
tmpana='ordi
|
||||
tmpc=False
|
||||
tmpf=False
|
||||
tmpm=False
|
||||
tooledit='C:\UT\Q.EXE
|
||||
tpldir='C:\Sitepainter\JavaServletTpl\
|
||||
tpldirf='..\vfcstpl\
|
||||
usertimeout=60
|
||||
usr=True
|
||||
usr_doc='manual
|
||||
windir='
|
||||
zom=False
|
||||
I
|
||||
*--*
|
||||
*----*
|
||||
4757
PortalStudio/SPVisualPivot.js
Normal file
BIN
PortalStudio/SpThemes/images/portalzoom_addfilter.gif
Normal file
|
After Width: | Height: | Size: 358 B |
BIN
PortalStudio/SpThemes/images/portalzoom_addfilter.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
PortalStudio/SpThemes/images/portalzoom_autolinkedfilter.gif
Normal file
|
After Width: | Height: | Size: 990 B |
BIN
PortalStudio/SpThemes/images/portalzoom_calendar.gif
Normal file
|
After Width: | Height: | Size: 344 B |
BIN
PortalStudio/SpThemes/images/portalzoom_delete.gif
Normal file
|
After Width: | Height: | Size: 323 B |
BIN
PortalStudio/SpThemes/images/portalzoom_delete.png
Normal file
|
After Width: | Height: | Size: 953 B |
BIN
PortalStudio/SpThemes/images/portalzoom_edit.gif
Normal file
|
After Width: | Height: | Size: 131 B |
BIN
PortalStudio/SpThemes/images/portalzoom_edit.png
Normal file
|
After Width: | Height: | Size: 605 B |
BIN
PortalStudio/SpThemes/images/portalzoom_filter.gif
Normal file
|
After Width: | Height: | Size: 992 B |
BIN
PortalStudio/SpThemes/images/portalzoom_filter.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
PortalStudio/SpThemes/images/portalzoom_linkedfilter.gif
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
PortalStudio/SpThemes/images/portalzoom_print.gif
Normal file
|
After Width: | Height: | Size: 383 B |
BIN
PortalStudio/SpThemes/images/portalzoom_print.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
PortalStudio/SpThemes/images/portalzoom_reset.gif
Normal file
|
After Width: | Height: | Size: 1.0 KiB |