|
From: <sv...@de...> - 2005-06-14 18:21:49
|
Author: pcamacho
Date: 2005-06-14 14:21:41 -0400 (Tue, 14 Jun 2005)
New Revision: 1321
Modified:
humano2/trunk/web/builder/site/js/createreport.js
humano2/trunk/web/builder/site/js/grafcomponents/expandform.js
humano2/trunk/web/builder/site/xsl/createreport.xsl
humano2/trunk/web/builder/site/xsl/createview.xsl
Log:
CHANGE: remove of unuseful function in createreport.js
Modified: humano2/trunk/web/builder/site/js/createreport.js
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- humano2/trunk/web/builder/site/js/createreport.js 2005-06-14 18:06:59=
UTC (rev 1320)
+++ humano2/trunk/web/builder/site/js/createreport.js 2005-06-14 18:21:41=
UTC (rev 1321)
@@ -9,26 +9,7 @@
// $Id$
//
=20
-//FIXME: now the use of classId, is not necessary as the class is select=
ed first
-function AttribsGetSelectArray(formArray,classId)
-{
- var lengthArray =3D formArray[classId].length;
- alert("lengthArray: " + lengthArray);
=20
- var optionArray =3D new Array();
- optionArray[0] =3D new Array();
- optionArray[0]["value"] =3D "-1";
- optionArray[0]["text"] =3D "--Nothing--"
- for (var i =3D 0; i < lengthArray ;i++)=20
- {
- optionArray[i+1] =3D new Array(); //Begin to second element
- optionArray[i+1]["value"] =3D formArray[classId][i]["value"];
- optionArray[i+1]["text"] =3D formArray[classId][i]["name"];
- }
- =20
- return optionArray;
-} =20
-
function OperatorsGetSelectArray()
{
var optionArray =3D new Array();
Modified: humano2/trunk/web/builder/site/js/grafcomponents/expandform.js
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- humano2/trunk/web/builder/site/js/grafcomponents/expandform.js 2005-0=
6-14 18:06:59 UTC (rev 1320)
+++ humano2/trunk/web/builder/site/js/grafcomponents/expandform.js 2005-0=
6-14 18:21:41 UTC (rev 1321)
@@ -6,8 +6,8 @@
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version. =20
-//
-//
+//=20
+// $Id$
=20
=20
/**
Property changes on: humano2/trunk/web/builder/site/js/grafcomponents/exp=
andform.js
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: humano2/trunk/web/builder/site/xsl/createreport.xsl
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- humano2/trunk/web/builder/site/xsl/createreport.xsl 2005-06-14 18:06:=
59 UTC (rev 1320)
+++ humano2/trunk/web/builder/site/xsl/createreport.xsl 2005-06-14 18:21:=
41 UTC (rev 1321)
@@ -149,7 +149,25 @@
</xsl:if>
=20
=20
- //Filters =20
+ //Filters =20
+ =20
+ //This array is used by filter and sort as both require =
the list of attributes for the class
+ var attList =3D new Array();
+ attList[0] =3D new Array();
+ attList[0]["value"] =3D "-1";
+ attList[0]["text"] =3D "--Nothing--"
+ var i=3D1; //The first line is by default
+ <xsl:for-each select=3D"/report/classes/class[count(attr=
ibutes)>0]/attributes/attribute"> //Get all attributes
+ <xsl:variable name=3D"classId">
+ <xsl:value-of select=3D"id" />
+ </xsl:variable>
+ attList[i] =3D new Array();
+ attList[i]["value"] =3D '<xsl:value-of select=3D"id"=
/>';
+ attList[i]["text"] =3D '<xsl:value-of select=3D"name=
"/>';
+ i++;
+ </xsl:for-each>
+ =20
+ =20
var selectOption0ArrayFilter =3D new Array();
var selectOption1ArrayFilter =3D new Array();
var inputTagValuesArrayFilter =3D new Array();
@@ -166,7 +184,7 @@
var InputLineParamsFilters =3D
{
type: 'TWOSELECTANDINPUT',
- select0: AttribsGetSelectArray(formArray,<xsl:va=
lue-of select=3D"/report/reportDatas/classId" />),
+ select0: attList,
select1: OperatorsGetSelectArray(),
lineTitle: 'Filter',
input0: '',
@@ -193,7 +211,7 @@
var InputLineParamsOrders =3D
{
type: 'TWOSELECT',
- select0: AttribsGetSelectArray(formArray,<xsl:va=
lue-of select=3D"/report/reportDatas/classId" />),
+ select0: attList,
select1: OrderGetSelectArray(),
lineTitle: 'Order',
input0: '',
@@ -205,7 +223,6 @@
var InputLineOrders =3D new InputLine(InputLineParam=
sOrders);
</xsl:if>
=20
- =20
//Personalized columns
var selectOption0ArrayPersoColumns =3D new Array();
var selectOption1ArrayPersoColumns =3D new Array();
@@ -220,7 +237,7 @@
var InputLineParamsPersoColumns =3D
{
type: 'TWOSELECT', //For the moment
- select0: AttribsGetSelectArray(formArray,<xsl:va=
lue-of select=3D"/report/reportDatas/classId" />),
+ select0: attList,
select1: FunctionsGetSelectArray(),
lineTitle: 'PersoCol',
input0: '',
@@ -253,7 +270,7 @@
var InputLineParamsHavings =3D
{
type: 'THREESELECTANDINPUT',
- select0: AttribsGetSelectArray(formArray,<xsl:va=
lue-of select=3D"/report/reportDatas/classId" />),
+ select0: attList,
select1: FunctionsGetSelectArray(),
select2: OperatorsGetSelectArray(),
lineTitle: 'GroupFilter',
Modified: humano2/trunk/web/builder/site/xsl/createview.xsl
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- humano2/trunk/web/builder/site/xsl/createview.xsl 2005-06-14 18:06:59=
UTC (rev 1320)
+++ humano2/trunk/web/builder/site/xsl/createview.xsl 2005-06-14 18:21:41=
UTC (rev 1321)
@@ -28,19 +28,6 @@
<!-- Here we create an array and use it as parameter for For=
m class constructor -->
<script language=3D"Javascript">
=20
- //////////////////////
- //The view params
- /*
- //Columns
- var viewColumnsArray =3D new Array();
- var i=3D0;
- <xsl:for-each select=3D"/view/viewDatas/viewParams/colum=
ns/column">
- viewColumnsArray[i++] =3D "<xsl:value-of select=3D"." />=
";
- </xsl:for-each>
- //alert(viewColumnsArray.length);
- var ViewParams =3D new ViewParams(viewColumnsArray,null,=
null);
- */
- ////////////////////////
//The form
var formArray =3D new Array();
var i; //Counter
|