|
From: <sv...@de...> - 2005-06-14 18:02:55
|
Author: pcamacho
Date: 2005-06-14 14:02:49 -0400 (Tue, 14 Jun 2005)
New Revision: 1319
Added:
humano2/trunk/web/builder/site/js/form.js
Removed:
humano2/trunk/web/builder/site/js/formreport.js
humano2/trunk/web/builder/site/js/formview.js
humano2/trunk/web/builder/site/js/grafcomponents/expandform.js
Modified:
humano2/trunk/web/builder/site/js/createreport.js
humano2/trunk/web/builder/site/xsl/createreport.xsl
humano2/trunk/web/builder/site/xsl/createview.xsl
Log:
CHANGE: files name to begin factorisation. Beware!! Many things are perma=
nently broken!!
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-13 23:14:13=
UTC (rev 1318)
+++ humano2/trunk/web/builder/site/js/createreport.js 2005-06-14 18:02:49=
UTC (rev 1319)
@@ -9,11 +9,11 @@
// $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);
+ alert("lengthArray: " + lengthArray);
=20
var optionArray =3D new Array();
optionArray[0] =3D new Array();
Copied: humano2/trunk/web/builder/site/js/form.js (from rev 1316, humano2=
/trunk/web/builder/site/js/formreport.js)
Deleted: humano2/trunk/web/builder/site/js/formreport.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/formreport.js 2005-06-13 23:14:13 U=
TC (rev 1318)
+++ humano2/trunk/web/builder/site/js/formreport.js 2005-06-14 18:02:49 U=
TC (rev 1319)
@@ -1,113 +0,0 @@
-/*
-//
-// The Humano2 Business solution.
-// Copyright (C) 2004,5 Humano2 Chile S.A. (http://www.humano2.com)
-//
-// This program is free software; you can redistribute it and/or modify
-// 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
-//
-// $Id$
-*/
-
-////////////////////////////////////////////// Form Class //////////////=
///////////////////////////////////////////////
-function Form(formArray, classId) //, ReportParams)
-{
- //Fields
- this.attributeLeftArray =3D new Array();
- this.attributeRightArray =3D new Array();
- this.formArray =3D formArray;
- this.classId =3D classId;
- =20
- //Methods
- this.UpdateSubmitAll =3D FormUpdateSubmitAll;
- this.DeleteReport =3D FormDeleteReport;
-}
-
-function FormUpdateSubmitAll(rightColumn,sort,filter,persoColumns,having=
s)
-{
- //Get the ReportName
- var reportNameInput =3D GetNodeByTagNameAndAttName("input","reportNa=
meInput")[0];
- var reportName =3D reportNameInput.value;
- =20
- if(reportName =3D=3D "")
- {
- alert("You must enter the name of report."); =20
- return false;
- }
- =20
- //alert("reportName:" + reportName);
- =20
- //Get the classId
- var classId =3D this.classId;
- //alert("classId:" + classId);
- =20
- //Build the columnstr string
- //alert(rightColumn);
- var i;
- var sortedList =3D rightColumn.fSortedList;
- //alert(sortedList.Length());
- var columnsStr =3D "";
- for(i=3D0;i<sortedList.Length();i++)
- {
- columnsStr +=3D sortedList.GetItem(i).GetValue() + ",";
- }
- //Remove the last coma
- columnsStr =3D columnsStr;=20
- columnsStr =3D columnsStr.substring(0,columnsStr.length-1); =
=20
- //alert("columnsStr:" + columnsStr);
- =20
- //Now the sort
- //alert("sort SelfRefName:" + sort.GetSelfRefName());
- =20
- var orderStr =3D sort.ReturnValues();=20
- //alert("orderStr: " + orderStr);
- =20
- //The filter
- //alert("filter SelfRefName:" + filter.GetSelfRefName());
- var whereStr =3D filter.ReturnValues();
- //alert("whereStr: " + whereStr);
- =20
- var persoColumnsStr =3D persoColumns.ReturnValues();
- //alert("persoColumnsStr: " + persoColumnsStr);
- =20
- //var havingsStr =3D havings.ReturnValues(); Commented due to bug#12=
3
- var havingsStr =3D "";
- =20
- //Update the submit all TD
- var divSubmitAll =3D GetNodeByTagNameAndAttName("div","SubmitAll")[0=
];
- //alert(divSubmitAll);
- divSubmitAll.innerHTML +=3D=20
- =20
- "<input type=3D\"hidden\" name=3D\"sendCreateUpdate\" value=3D\"=
true\"></input>"
- +"<input type=3D\"hidden\" name=3D\"sendClassId\" value=3D\""+ c=
lassId +"\"></input>"
- +"<input type=3D\"hidden\" name=3D\"sendReportName\" value=3D\""=
+ reportName + "\"></input>"
- +"<input type=3D\"hidden\" name=3D\"sendColumnsStr\" value=3D\""=
+ columnsStr + "\"></input>"
- +"<input type=3D\"hidden\" name=3D\"sendOrderStr\" value=3D\"" +=
orderStr + "\"></input>"
- +"<input type=3D\"hidden\" name=3D\"sendWhereStr\" value=3D\"" +=
whereStr + "\"></input>"
- +"<input type=3D\"hidden\" name=3D\"sendPersoColumnsStr\" value=3D=
\"" + persoColumnsStr + "\"></input>"
- +"<input type=3D\"hidden\" name=3D\"sendHavingsStr\" value=3D\""=
+ havingsStr + "\"></input>";
- =20
- //alert(divSubmitAll.innerHTML);
- return true;
-}
-
-function FormDeleteReport(reportId)
-{
- if (confirm("Are you sure you want to delete the report?"))
- {
- var divSubmitAll =3D GetNodeByTagNameAndAttName("div","SubmitAll=
")[0];
- //alert(divSubmitAll);
- divSubmitAll.innerHTML +=3D "<input type=3D\"hidden\" name=3D=
\"delete\" value=3D\"true\"></input>";
- divSubmitAll.innerHTML +=3D "<input type=3D\"hidden\" name=3D=
\"reportId\" value=3D\"" + reportId + "\"></input>";
- return true; =20
- }
- else
- {
- return false; =20
- }
-}
-
-
-////////////////////////////////////////////// END: Form Class /////////=
////////////////////////////////////////////////
Deleted: humano2/trunk/web/builder/site/js/formview.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/formview.js 2005-06-13 23:14:13 UTC=
(rev 1318)
+++ humano2/trunk/web/builder/site/js/formview.js 2005-06-14 18:02:49 UTC=
(rev 1319)
@@ -1,442 +0,0 @@
-/*
-//
-// The Humano2 Business solution.
-// Copyright (C) 2004,5 Humano2 Chile S.A. (http://www.humano2.com)
-//
-// This program is free software; you can redistribute it and/or modify
-// 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
-//
-//
-*/
-
-
-/**
- * When you choose a class you have to update the buttons Crud
- */
-function UpdateHeader()
-{
- //Update crudbuttons =20
- var crudTag1 =3D GetNodeByTagNameAndAttName("div","CrudButtons1")[0]=
;
- =20
- crudTag1.innerHTML=3D
- "<input type=3D\"submit\" value=3D\"Create\" onclick=3D=
\"Form.UpdateSubmitAll(rightColumn,expandFormSort,expandFormFilter);\">"
- + "</input>";
- =20
- var crudTag2 =3D GetNodeByTagNameAndAttName("div","CrudButtons2")[0]=
;
- //alert("crudTag2: " + crudTag2);
- crudTag2.innerHTML =3D ""; //No delete button
- =20
- =20
- //update input viewname =20
- var viewNameDiv =3D GetNodeByTagNameAndAttName("div","ViewName")[0];
- viewNameDiv.innerHTML =3D=20
- "<input type=3D\"text\" id=3D \"viewNameInput\" name=3D\"vie=
wNameInput\">"
- +"</input>";
-}
-
-
-//////////////////////////////////////////////ViewParams Class /////////=
//////////////////////////////////////////////
-function ViewParams(columns,where,order)
-{
- =20
- //Fields
- this.columns =3D columns;
- this.where =3D where;
- this.order =3D order;
-
- //alert("columns.length: " + columns.length);
- =20
- //Methods
- this.GetColumns =3D ViewParamsGetColumns;
- this.GetWhere =3D ViewParamsGetWhere;
- this.GetOrder =3D ViewParamsGetOrder;
- this.Empty =3D ViewParamsEmpty;
-=20
-}
-
-function ViewParamsEmpty()
-{
- var res =3D ((this.GetColumns().length =3D=3D 0) && (this.where =3D=3D=
null) && (this.order =3D=3D null));
- //alert("ViewParamsEmpty: " + res);
- return res;
-}
-
-function ViewParamsGetColumns()
-{
- //Jump the first unuseful element (0,10035,10025) for example
- var res =3D new Array()
- for(i=3D1;i<this.columns.length;i++)
- {
- res[i-1] =3D this.columns[i]; =20
- }
- //alert("ViewParamsGetColumns: length=3D " + res.length);
- return res;
-}
-
-function ViewParamsGetWhere()
-{
- return this.where; =20
-}
-
-function ViewParamsGetOrder()
-{
- return this.order; =20
-}
-
-
-////////////////////////////////////////////// Form Class //////////////=
///////////////////////////////////////////////
-function Form(formArray, classId, ViewParams)
-{
- //Fields
- this.attributeLeftArray =3D new Array();
- this.attributeRightArray =3D new Array();
- this.formArray =3D formArray;
- this.classId =3D classId;
- this.ViewParams =3D ViewParams;
- =20
- =20
- //Methods
- this.UpdateAttributes =3D FormUpdateAttributes;
- this.GetRightAtt =3D FormGetRightAtt;
- this.GetLeftAtt =3D FormGetLeftAtt;
- this.UpdateList =3D FormUpdateList;
- this.UpdateLists =3D FormUpdateLists;
- this.SetToDefault =3D FormSetToDefault;
- this.UpdateSubmitAll =3D FormUpdateSubmitAll;
- this.DeleteView =3D FormDeleteView;
- this.GetSortArray =3D FormGetSortArray;
- this.GetFilterArray =3D FormGetFilterArray;
- this.UpdateSort =3D FormUpdateSort;
- this.UpdateFilter =3D FormUpdateFilter;
- this.GetNameOfAttribute =3D FormGetNameOfAttribute;
- =20
- //Update the attributes
- this.UpdateAttributes(this.classId);
-}
-
-function FormUpdateSubmitAll(rightColumn,sort,filter)
-{
- //Get the viewName
- var viewNameInput =3D GetNodeByTagNameAndAttName("input","viewNameIn=
put")[0];
- var viewName =3D viewNameInput.value;
- =20
- if(viewName =3D=3D "")
- {
- alert("You must enter the name of view."); =20
- return false;
- }
- =20
- //alert("viewName:" + viewName);
- =20
- //Get the classId
- var classId =3D this.classId;
- //alert("classId:" + classId);
- =20
- //Build the columnstr string
- //alert(rightColumn);
- var i;
- var sortedList =3D rightColumn.fSortedList;
- //alert(sortedList.Length());
- var columnsStr =3D "";
- for(i=3D0;i<sortedList.Length();i++)
- {
- columnsStr +=3D sortedList.GetItem(i).GetValue() + ",";
- }
- //Remove the last coma
- columnsStr =3D "0," + columnsStr; //Don't forget 0!
- columnsStr =3D columnsStr.substring(0,columnsStr.length-1); =
=20
- //alert("columnsStr:" + columnsStr);
- =20
- //Now the sort
- //alert("sort SelfRefName:" + sort.GetSelfRefName());
- =20
- //TODO: order is unavailable yet due to a problem in ViewTools
- var orderStr =3D sort.ReturnValues();=20
- //var orderStr=3D"";
- =20
- //The filter
- //alert("filter SelfRefName:" + filter.GetSelfRefName());
- var whereStr =3D filter.ReturnValues();
- =20
- //Update the submit all TD
- var divSubmitAll =3D GetNodeByTagNameAndAttName("div","SubmitAll")[0=
];
- //alert(divSubmitAll);
- divSubmitAll.innerHTML +=3D=20
- =20
- "<input type=3D\"hidden\" name=3D\"sendCreateUpdate\" value=3D\"=
true\"></input>"
- +"<input type=3D\"hidden\" name=3D\"sendClassId\" value=3D\""+ c=
lassId +"\"></input>"
- +"<input type=3D\"hidden\" name=3D\"sendViewName\" value=3D\"" +=
viewName + "\"></input>"
- +"<input type=3D\"hidden\" name=3D\"sendColumnsStr\" value=3D\""=
+ columnsStr + "\"></input>"
- +"<input type=3D\"hidden\" name=3D\"sendOrderStr\" value=3D\"" +=
orderStr + "\"></input>"
- +"<input type=3D\"hidden\" name=3D\"sendWhereStr\" value=3D\"" +=
whereStr + "\"></input>";
- =20
- //alert(divSubmitAll.innerHTML);
- return true;
-}
-
-function FormDeleteView(viewId)
-{
- if (confirm("Are you sure you want to delete the view?"))
- {
- var divSubmitAll =3D GetNodeByTagNameAndAttName("div","SubmitAll=
")[0];
- //alert(divSubmitAll);
- divSubmitAll.innerHTML +=3D "<input type=3D\"hidden\" name=3D=
\"delete\" value=3D\"true\"></input>";
- divSubmitAll.innerHTML +=3D "<input type=3D\"hidden\" name=3D=
\"viewId\" value=3D\"" + viewId + "\"></input>";
- return true; =20
- }
- else
- {
- return false; =20
- }
-}
-
-function FormGetRightAtt()
-{
- return this.attributeRightArray;
-}
-
-function FormGetLeftAtt()
-{
- return this.attributeLeftArray;
-}
-
-function FormUpdateList(list,classId,leftOrRight)
-{
- =20
- this.classId =3D classId; //stores classId
- this.UpdateAttributes(classId);
- =20
- var updateArray;
- if(leftOrRight =3D=3D "left")
- {
- updateArray =3D this.attributeLeftArray;
- }
- else
- {
- updateArray =3D this.attributeRightArray; =20
- }
- =20
- list.Set(updateArray);
-}
-
-function FormUpdateLists(left,right,classId)
-{
- this.UpdateList(left,classId,"left");
- this.UpdateList(right,classId,"right");
-}
-
-function FormSetToDefault(left,right)
-{
- this.UpdateLists(left,right,this.classId); =20
-}
-
-function FormGetSortArray(number)
-{
- var optionArray =3D new Array();
- =20
- if(number =3D=3D 1) // The attributes
- {
- var lengthArray =3D this.formArray[this.classId].length;
- //alert("lengthArray: " + lengthArray);
- =20
- optionArray[0] =3D new Array(); //Begin to second element
- optionArray[0]["value"] =3D "-1";
- optionArray[0]["text"] =3D "--Nothing--";
- =20
- for (var i =3D 0; i < lengthArray ;i++)
- {
- optionArray[i+1] =3D new Array(); //Begin to second element
- optionArray[i+1]["value"] =3D this.formArray[this.classId][i=
]["value"];
- optionArray[i+1]["text"] =3D this.formArray[this.classId][i=
]["name"];
- }
- }
- else // Asc Desc etc...
- {
- optionArray[0] =3D new Array();
- optionArray[0]["value"] =3D "-1";
- optionArray[0]["text"] =3D "--Nothing--";
- optionArray[1] =3D new Array();
- optionArray[1]["value"] =3D "0";
- optionArray[1]["text"] =3D "Ascendent";
- optionArray[2] =3D new Array();
- optionArray[2]["value"] =3D "1";
- optionArray[2]["text"] =3D "Descendent";
- }
- return optionArray;
-}
-
-
-function FormGetFilterArray(number)
-{
- var optionArray =3D new Array();
- =20
- if(number =3D=3D 1) // The attributes (as for sort)
- {
- var lengthArray =3D this.formArray[this.classId].length;
- //alert("lengthArray: " + lengthArray);
- =20
- 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 this.formArray[this.classId][i=
]["value"];
- optionArray[i+1]["text"] =3D this.formArray[this.classId][i=
]["name"];
- }
- }
- else // Asc Desc etc...
- {
- optionArray[0] =3D new Array();
- optionArray[0]["value"] =3D "-1";
- optionArray[0]["text"] =3D "--Nothing--";
- optionArray[1] =3D new Array();
- optionArray[1]["value"] =3D "0";
- optionArray[1]["text"] =3D "GreaterOrEqualThan";
- optionArray[2] =3D new Array();
- optionArray[2]["value"] =3D "1";
- optionArray[2]["text"] =3D "LessEqualThan";
- optionArray[3] =3D new Array();
- optionArray[3]["value"] =3D "2";
- optionArray[3]["text"] =3D "GreaterThan";
- optionArray[4] =3D new Array();
- optionArray[4]["value"] =3D "3";
- optionArray[4]["text"] =3D "LessThan";
- optionArray[5] =3D new Array();
- optionArray[5]["value"] =3D "4";
- optionArray[5]["text"] =3D "EqualTo";
- optionArray[6] =3D new Array();
- optionArray[6]["value"] =3D "5";
- optionArray[6]["text"] =3D "DistinctTo";
- optionArray[7] =3D new Array();
- optionArray[7]["value"] =3D "6";
- optionArray[7]["text"] =3D "BeginWith";
- optionArray[8] =3D new Array();
- optionArray[8]["value"] =3D "7";
- optionArray[8]["text"] =3D "ContainsTo";
- optionArray[9] =3D new Array();
- optionArray[9]["value"] =3D "8";
- optionArray[9]["text"] =3D "In";
- =20
- }
- =20
- return optionArray;
-}
-
-function FormUpdateSort(sort,classId)
-{
- this.classId =3D classId;
- sort.Update(this.GetSortArray(1),this.GetSortArray(2)); //TODO: sort=
doesn't work yet
-}
-
-function FormUpdateFilter(filter,classId)
-{
- this.classId =3D classId;
- filter.Update(this.GetFilterArray(1),this.GetFilterArray(2)); =20
-}
-
-function FormUpdateAttributes(classId)
-{
- //alert(classId);
- this.classId =3D classId; //stores classId
- this.attributeLeftArray =3D new Array();
- this.attributeRightArray =3D new Array();
- =20
- if(this.ViewParams.Empty() =3D=3D true) //In the case of creation of=
a class
- {
- =20
- //For the columns
- var maxAttNumber =3D this.formArray[classId].length;
- if(maxAttNumber < 3)
- {
- maxAttNumber =3D 0; =20
- }
- else
- {
- maxAttNumber =3D 3;
- }
- =20
- for (var i =3D 0; i < maxAttNumber ;i++)
- {
- var element =3D new ListElement( this.formArray[classId][i]=
["name"],
- this.formArray[classId][i]["=
value"],
- false);
- this.attributeRightArray[i] =3D element; =
=20
- }
- =20
- for (var i =3D 0; i < this.formArray[classId].length ;i++)
- {
- if(i<maxAttNumber)
- {
- var element =3D new ListElement( this.formArray[classId=
][i]["name"],
- this.formArray[classId][=
i]["value"],
- true);
- =20
- }
- else
- {
- var element =3D new ListElement( this.formArray[classId=
][i]["name"],
- this.formArray[classId][=
i]["value"],
- false);
- }
- this.attributeLeftArray[i] =3D element; =
=20
- }
- =20
- }
- else //In the case of update of a class
- {
- var j=3D0; //the counter for rightArray
- for(var i=3D0; i<this.formArray[classId].length;i++)
- {
- var idAttForm =3D this.formArray[classId][i]["value"];
- if(IsInArray(idAttForm,this.ViewParams.GetColumns()) =3D=3D =
true) //If the attribute is in the view
- {
- =20
- =20
- //The left array
- var element =3D new ListElement( this.formArray[classId=
][i]["name"],
- this.formArray[classId][=
i]["value"],
- true);
- this.attributeLeftArray[i] =3D element; =20
- //The right array: the element
- var element =3D new ListElement( this.formArray[classId=
][i]["name"],
- this.formArray[classId][=
i]["value"],
- false);
- this.attributeRightArray[j++] =3D element; =
=20
- =20
- }
- else
- {
- var element =3D new ListElement( this.formArray[classId=
][i]["name"],
- this.formArray[classId][=
i]["value"],
- false);
- //The left array
- this.attributeLeftArray[i] =3D element; =20
- =20
- //The right array: nothing
- =20
- }
- }
- }
-}
-
-
-/**
- * Returns the name of attribute give its id
- */
-function FormGetNameOfAttribute(idAtt)
-{
- for(i=3D0;i<this.formArray[classId].length;i++)
- {
- var elTab =3D this.formArray[classId][i];
- if(idAtt =3D=3D elTab["value"])
- {
- return elTab["name"];
- }
- }
- return "";
-}
-
-////////////////////////////////////////////// END: Form Class /////////=
////////////////////////////////////////////////
Deleted: 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-13 23:14:13 UTC (rev 1318)
+++ humano2/trunk/web/builder/site/js/grafcomponents/expandform.js 2005-0=
6-14 18:02:49 UTC (rev 1319)
@@ -1,464 +0,0 @@
-//
-// The Humano2 Business solution.
-// Copyright (C) 2004,5 Humano2 Chile S.A. (http://www.humano2.com)
-//
-// This program is free software; you can redistribute it and/or modify
-// 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
-//
-//
-
-
-/**
- * Constructor
- * class used to build an expand form with predeterminated values
- * @param selectedOption1Array the options selected for select tag #1
- * @param selectedOption2Array the options selected for select tag #2
- * @param inputTagValuesArray the input values
- */
-function InputValues(selectOption1Array,selectOption2Array,inputTagValue=
sArray)
-{
- //Fields
- this.selectOption1 =3D CopyArray(selectOption1Array);
- this.selectOption2 =3D CopyArray(selectOption2Array);
- this.inputTagValuesArray =3D CopyArray(inputTagValuesArray);
- =20
- //Methods
- this.GetTriplet =3D InputValuesGetTriplet; =20
- this.Size =3D InputValuesSize;
- =20
- if((this.selectOption1 !=3D null) &&=20
- (this.selectOption2 !=3D null))
- {
- return this; =20
- }
- else=20
- return null; =20
-}
- =20
-/**
- * @param index the index used for the free fields array of class
- * @returns a triplet (selected option 1, selected option2, input)
- */ =20
-function InputValuesGetTriplet(index)
-{
- var triplet =3D new Array();
- triplet["option1"] =3D this.selectOption1[index];
- triplet["option2"] =3D this.selectOption2[index];
- //alert("this.inputTagValuesArray: " + this.inputTagValuesArray);
- if(this.inputTagValuesArray !=3D null) //Only if there's a text of c=
ourse
- {
- triplet["input"] =3D this.inputTagValuesArray[index];
- }
- //alert("triplet[\"option1\"]:" + triplet["option1"] + " triplet[\"o=
ption2\"]: " + triplet["option2"] + "triplet[\"input\"]: " + triplet["inp=
ut"]);
- return triplet;
-}
-
-/**
- * @return size of one
- */
-function InputValuesSize()
-{
- //Whatever array minus the input one that may be empty
- return this.selectOption1.length; =20
-}
-
-
-/**
- * Constructor
- * with input: add an input as third field
- * @param htmlForm text: the form: no matters the Id of Name of the inpu=
ts / select, they will be renamed
- * @param withInput: add an <input> tag or not (depending on the value o=
f the boolean)
- * @param inputValues is an object ExpanFormInput that contains the sele=
cted options (1 & 2) and eventually the inputs
- */
-function ExpandForm(selfRefName,receptorNode,withInput,optionArray1,opti=
onArray2,title,inputValues)
-{
- //Fields
- this.selfRefName =3D selfRefName;
- this.receptorNode =3D receptorNode;
- this.withInput =3D withInput;
- this.optionArray1 =3D new Array();
- this.optionArray2 =3D new Array();
- this.title =3D title;
- this.inputValues =3D inputValues;
- =20
- //Methods
- this.PutAllComponents =3D ExpandFormPutAllComponents;
- this.AddLine =3D ExpandFormAddLine;
- this.RemoveLine =3D ExpandFormRemoveLine;
- this.ReturnValues =3D ExpandFormReturnValues;
- this.GetOptionsString =3D ExpandFormGetOptionsString;
- this.GetReceptorNode =3D ExpandFormGetReceptorNode;
- this.GetSelfRefName =3D ExpandFormGetSelfRefName;
- this.GetTitle =3D ExpandFormGetTitle;
- this.Update =3D ExpandFormUpdate;
- =20
- //Copy the arrays passed in parameters=20
- var i;
- for(i=3D0;i<optionArray1.length;i++)
- {
- this.optionArray1[i] =3D new Array();
- this.optionArray1[i]["text"] =3D optionArray1[i]["text"];
- this.optionArray1[i]["value"] =3D optionArray1[i]["value"];
- }
- =20
- for(i=3D0;i<optionArray2.length;i++)
- {
- this.optionArray2[i] =3D new Array();
- this.optionArray2[i]["text"] =3D optionArray2[i]["text"];
- this.optionArray2[i]["value"] =3D optionArray2[i]["value"];
- }
- //alert("inputValues=3D " + this.inputValues);
- //Update the current document
- this.PutAllComponents(receptorNode);
- =20
- return this; =20
-}
-
-function ExpandFormUpdate(optionArray1,optionArray2)
-{
- //Don't forget to clear the existing arrays
- this.optionArray1 =3D new Array();
- this.optionArray2 =3D new Array();
-
- //option tables
- //Copy the arrays passed in parameters=20
-
- var i;
- for(i=3D0;i<optionArray1.length;i++)
- {
- this.optionArray1[i] =3D new Array();
- this.optionArray1[i]["text"] =3D optionArray1[i]["text"];
- this.optionArray1[i]["value"] =3D optionArray1[i]["value"];
- }
- =20
- for(i=3D0;i<optionArray2.length;i++)
- {
- this.optionArray2[i] =3D new Array();
- this.optionArray2[i]["text"] =3D optionArray2[i]["text"];
- this.optionArray2[i]["value"] =3D optionArray2[i]["value"];
- }
- =20
- //Remove all lines but one
- var nbNodes =3D this.receptorNode.childNodes.length;
- while(nbNodes>0)
- {
- nbNodes =3D this.RemoveLine(); =20
- }
- =20
- //Add a line
- this.AddLine();
-}
-
-
-/**
- * This function adds a line to the expand form but
- * with preselect values
- * @param indexOption1=20
- * @param indexOption2
- * @param blank if true insert a blank form if not use the inputValues o=
bject and the index
- */
-function ExpandFormAddLine(index,blank)
-{
- var divReceptor =3D GetNodeByTagNameAndAttName("div",this.selfRefNam=
e)[0]; //Unique id in the document as every
- =
// graphical components should have unique identificator
- //alert("divReceptor: " + divReceptor);
- var lineNumber =3D divReceptor.childNodes.length;
- =20
- var option1String;
- var option2String;
- var inputValue;
- //alert("index:" + index + " blank: " + blank + " inputValues:" + th=
is.inputValues);
- if((this.inputValues!=3D null)=20
- && (blank =3D=3D false)) //Insert new line with preselected valu=
es
- {
- var triplet =3D this.inputValues.GetTriplet(index);
- option1String =3D this.GetOptionsString(1,triplet["option1"])
- option2String =3D this.GetOptionsString(2,triplet["option2"])
- inputValue =3D triplet["input"];
- }
- else
- {
- option1String =3D this.GetOptionsString(1,0) //first selected by=
default
- option2String =3D this.GetOptionsString(2,0) // idem
- inputValue =3D "";
- }
- =20
- var innerHtml =3D this.title + lineNumber + ": "
- + "<select style=3D\"width:100px;\" name=3D\"selec=
t1" + this.selfRefName + lineNumber + "\" class=3D\"drpdwn2\">"
- + option1String
- + "</select>"
- + "<select style=3D\"width:100px;\" name=3D\"selec=
t2" + this.selfRefName + lineNumber + "\" class=3D\"drpdwn2\">"
- + option2String
- + "</select>";=20
- =20
- if(this.withInput =3D=3D true) =
=20
- {
- innerHtml +=3D "<input name=3D\"input" + this.selfRefName + line=
Number + "\" value=3D\"" + inputValue + "\" id=3D\"\"></input>";
- }
- //alert("innerHtml:" + innerHtml);
- =20
- var divLine =3D document.createElement("div");
- =20
- divLine.innerHTML =3D innerHtml;
- =20
- //alert("divLine.childNodes.length: " + divLine.childNodes.length)
- =20
- //Add the line
- divReceptor.appendChild(divLine);
-}
-
-
-
-
-
-/**
- * Should be conform to viewtools norm
- */
-function ExpandFormReturnValues()
-{ =20
- var res =3D "";
- =20
- var divWithLines =3D GetNodeByTagNameAndAttName("div",this.selfRefNa=
me)[0]; //Unique id in the document as every
- =
// graphical components should have unique identificator
- var node =3D divWithLines.firstChild;
- //alert("divWithLines.firstChild.childNodes.length: " + divWithLines=
.firstChild.childNodes.length);
- //alert("divWithLines.firstChild.innerHTML: " + divWithLines.firstCh=
ild.innerHTML)
- while(node !=3D null)
- {
- if(this.withInput =3D=3D false)
- {
- //CAUTION: we start from the second child because the first =
is a text node (title) !!!!
- var divFirstSelect =3D node.firstChild.nextSibling;
- var divSecondSelect =3D divFirstSelect.nextSibling;
- =20
- if((divFirstSelect.value !=3D -1) && (divSecondSelect.value!=
=3D -1)) //Verify if something has been selected
- {
- //alert("divFirstSelect:" + divFirstSelect);
- res +=3D divFirstSelect.value + "|";
- //alert("divSecondSelect:" + divSecondSelect);
- res +=3D divSecondSelect.value;
- res +=3D ","; //Separator between two order
- }
- }
- else
- {
- //Here we must get the input value moreover
- //CAUTION: we start from the second child because the first =
is a text node (title) !!!!
- var divFirstSelect =3D node.firstChild.nextSibling;
- var divSecondSelect =3D divFirstSelect.nextSibling;
- =20
- if((divFirstSelect.value !=3D -1) && (divSecondSelect.value!=
=3D -1)) //Verify if something has been selected
- {
- //alert("divFirstSelect:" + divFirstSelect);
- res +=3D divFirstSelect.value + "|";
- =20
- //alert("divSecondSelect:" + divSecondSelect);
- res +=3D divSecondSelect.value + "|";
- =20
- var divInput =3D divSecondSelect.nextSibling;
- //alert("divInput:" + divInput);
- res +=3D "\'" + divInput.value + "\'";
- =20
- var queue =3D "";
- if(node.nextSibling =3D=3D null) //Last criteria ?
- {
- queue =3D "|0|0";
- }
- else=20
- {
- queue =3D "|1|0";
- }
- res +=3D queue;
- res+=3D ";"; //Separator between two where
- }
- }
- node =3D node.nextSibling;
- }
- //Leave last coma (caracter)
- if(res !=3D "") //In case select was put to nothing
- {
- res =3D res.substring(0,res.length-1);
- }
- //alert("res expand:" + res);
-
- return res;
-}
-
-function ExpandFormGetOptionsString(value,selectedValueIndex)
-{
- var optionsArray;
- =20
- if( value=3D=3D 1)
- {
- optionArray =3D this.optionArray1;
- }
- else
- {
- optionArray =3D this.optionArray2; =20
- }
- =20
- var resStr =3D "";
- =20
- for(i=3D0;i<optionArray.length;i++)
- {
- =20
- var selected =3D "";
- if (selectedValueIndex =3D=3D i)
- {
- selected =3D " selected ";
- }
- resStr +=3D "<option name=3D\"" + this.selfRefName + i + "\"=
value =3D\"" + optionArray[i]["value"] + "\"" + selected + ">"
- + optionArray[i]["text"] + "</option>";
- }
- //alert(resStr);
- return resStr;
-}
-
-function ExpandFormRemoveLine()
-{
- var divReceptor =3D GetNodeByTagNameAndAttName("div",this.selfRefNam=
e)[0]; //Unique id in the document as every
- =
// graphical components should have uni
- if(divReceptor.childNodes.length =3D=3D 0) //Nothing ot remove
- {
- return; =20
- }
- =20
- divReceptor.removeChild(divReceptor.lastChild); =20
- =20
- return divReceptor.childNodes.length;
-}
-
-function ExpandFormGetTitle()
-{
- return this.title; =20
-}
-
-function ExpandFormPutAllComponents()
-{
- var innerHtml =3D=20
- "<table>" =20
- + "<tr>"
- + "<td valign=3D\"top\">"
- + "<div id=3D\"" + this.selfRefName +"\" name=3D\"=
" + this.selfRefName + "\" >" //Id that will contain the form lines
- + "</div>"
- + "</td>"
- + "<td valign=3D\"top\">"
- + "<center>"
- + "<input type=3D\"button\" value=3D\"Add criteria=
\" onclick=3D\"" + this.selfRefName +".AddLine();\"></input>"
- + "<br/>"
- + "<input type=3D\"button\" value=3D\"Remove\" onc=
lick=3D\"" + this.selfRefName +".RemoveLine();\">"
- + "</center>";
- + "</td>"
- + "</tr>"
- + "</table>";
- =20
- //alert("innerHTML:" + innerHtml);
- this.receptorNode.innerHTML =3D innerHtml; =20
- =20
- //Add lines with preselected values if inputValues exists
- if(this.inputValues !=3D null)
- {
- var i;
- //alert("size inputs: " + this.inputValues.Size());
- for(i=3D0; i < this.inputValues.Size();i++)
- {
- this.AddLine(i,false);
- }
- }
- else
- {
- this.AddLine(); =20
- }
-}
-
-function ExpandFormGetReceptorNode()
-{
- return this.receptorNode; =20
-}
-
-function ExpandFormGetSelfRefName()
-{
- return this.selfRefName;
-}
-
-function ExpandFormTest()
-{
- ///////////////////////////////////////////////
- TestGroupWrite("ExpandFormTest");
- var divReceptor =3D GetNodeByTagNameAndAttName("div","ExpandForm")[0=
];=20
- var divInsideReceptor =3D document.createElement("div");
- divReceptor.appendChild(divInsideReceptor);
- =20
- var buttonShowValues =3D document.createElement("div");
- buttonShowValues.innerHTML =3D "<input type=3D\"button\" value=3D\"G=
et values\" onclick=3D\"aExpandForm.ReturnValues();\"></input>";
- =20
- divReceptor.appendChild(buttonShowValues);
- =20
- var optionArray1 =3D new Array();
- optionArray1[0] =3D new Array();
- optionArray1[0]["value"] =3D "17";
- optionArray1[0]["text"] =3D "email";
- optionArray1[1] =3D new Array();
- optionArray1[1]["value"] =3D "18";
- optionArray1[1]["text"] =3D "file";
- =20
- var optionArray2 =3D new Array();
- optionArray2[0] =3D new Array();
- optionArray2[0]["value"] =3D "asc";
- optionArray2[0]["text"] =3D "Ascendant";
- optionArray2[1] =3D new Array();
- optionArray2[1]["value"] =3D "desc";
- optionArray2[1]["text"] =3D "Descendant";
- =20
- aExpandForm =3D new ExpandForm("aExpandForm",divInsideReceptor,false=
,optionArray1,optionArray2,"Order");
- =20
- ////////////////////////////////////////////////////////////////////=
////////////////////////////////////
- =20
- =20
- //Build an expand form with preselected values
- var optionArray1 =3D new Array();
- optionArray1[0] =3D new Array();
- optionArray1[0]["value"] =3D "17";
- optionArray1[0]["text"] =3D "email";
- optionArray1[1] =3D new Array();
- optionArray1[1]["value"] =3D "18";
- optionArray1[1]["text"] =3D "file";
- optionArray1[2] =3D new Array();
- optionArray1[2]["value"] =3D "19";
- optionArray1[2]["text"] =3D "text";
- =20
- var optionArray2 =3D new Array();
- optionArray2[0] =3D new Array();
- optionArray2[0]["value"] =3D "0";
- optionArray2[0]["text"] =3D "<=3D";
- optionArray2[1] =3D new Array();
- optionArray2[1]["value"] =3D "1";
- optionArray2[1]["text"] =3D "=3D";
- =20
- var selectOption1Arr =3D new Array();
- selectOption1Arr[0] =3D 0; //select file by default
- selectOption1Arr[1] =3D 2; //select text by default
- =20
- var selectOption2Arr =3D new Array();
- selectOption2Arr[0] =3D 0; //asc
- selectOption2Arr[1] =3D 1; //desc
- =20
- var inputValuesArr =3D new Array();
- inputValuesArr[0] =3D "toto.xsl";
- inputValuesArr[1] =3D "texto... Hola";
- =20
- aInputValues =3D new InputValues(selectOption1Arr,selectOption2Arr,i=
nputValuesArr);
- otherExpandForm =3D new ExpandForm("otherExpandForm",divInsideRecept=
or,true,optionArray1,optionArray2,"TestExpand: ",aInputValues);
- Test("LENGTH","Size of inputValues",aInputValues.Size() =3D=3D 2); =
=20
- Test("GetTriplet","Call #1",aInputValues.GetTriplet(0)["option1"] =3D=
=3D 0=20
- && aInputValues.GetTriplet(0)["option2"]=
=3D=3D 0
- && aInputValues.GetTriplet(0)["input"] =3D=
=3D "toto.xsl");
- Test("GetTriplet","Call #2",aInputValues.GetTriplet(1)["option1"] =3D=
=3D 2=20
- && aInputValues.GetTriplet(1)["option2"]=
=3D=3D 1
- && aInputValues.GetTriplet(1)["input"] =3D=
=3D "texto... Hola");
- =20
-}
-
-
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-13 23:14:=
13 UTC (rev 1318)
+++ humano2/trunk/web/builder/site/xsl/createreport.xsl 2005-06-14 18:02:=
49 UTC (rev 1319)
@@ -19,9 +19,9 @@
<script language=3D"Javascript" src=3D"js/grafcomponents/sor=
tedgraphicallist.js"></script>
<script language=3D"Javascript" src=3D"js/grafcomponents/rad=
iobuttonexpand.js"></script>
<script language=3D"Javascript" src=3D"js/grafcomponents/inp=
utline.js"></script>
- <script language=3D"Javascript" src=3D"js/grafcomponents/exp=
andformreport.js"></script>
+ <script language=3D"Javascript" src=3D"js/grafcomponents/exp=
andform.js"></script>
<!-- Load this script before the next one -->
- <script language=3D"Javascript" src=3D"js/formreport.js" typ=
e=3D"text/javascript"></script>=20
+ <script language=3D"Javascript" src=3D"js/form.js" type=3D"t=
ext/javascript"></script>=20
<script language=3D"Javascript" src=3D"js/createreport.js" t=
ype=3D"text/javascript"></script>=20
<link href=3D"css/createinterface.css" rel=3D"stylesheet" ty=
pe=3D"text/css"></link>
=20
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-13 23:14:13=
UTC (rev 1318)
+++ humano2/trunk/web/builder/site/xsl/createview.xsl 2005-06-14 18:02:49=
UTC (rev 1319)
@@ -18,9 +18,11 @@
<script language=3D"Javascript" src=3D"js/grafcomponents/sor=
tedlist.js"></script>
<script language=3D"Javascript" src=3D"js/grafcomponents/sor=
tedgraphicallist.js"></script>
<script language=3D"Javascript" src=3D"js/grafcomponents/rad=
iobuttonexpand.js"></script>
+ <script language=3D"Javascript" src=3D"js/grafcomponents/inp=
utline.js"></script>
<script language=3D"Javascript" src=3D"js/grafcomponents/exp=
andform.js"></script>
+ <script language=3D"Javascript" src=3D"js/createreport.js" t=
ype=3D"text/javascript"></script> <!-- Fixme factorize it -->
<!-- Load this script before the next one -->
- <script language=3D"Javascript" src=3D"js/formview.js" type=3D=
"text/javascript"></script>=20
+ <script language=3D"Javascript" src=3D"js/form.js" type=3D"t=
ext/javascript"></script>
<link href=3D"css/createinterface.css" rel=3D"stylesheet" ty=
pe=3D"text/css"/>
=20
<!-- Here we create an array and use it as parameter for For=
m class constructor -->
@@ -28,7 +30,7 @@
=20
//////////////////////
//The view params
- =20
+ /*
//Columns
var viewColumnsArray =3D new Array();
var i=3D0;
@@ -37,40 +39,11 @@
</xsl:for-each>
//alert(viewColumnsArray.length);
var ViewParams =3D new ViewParams(viewColumnsArray,null,=
null);
- =20
- //Filters =20
- var selectOption1Array =3D new Array();
- var selectOption2Array =3D new Array();
- var inputTagValuesArray =3D new Array();
- =20
- var i=3D0;
- <xsl:for-each select=3D"/view/viewDatas/viewParams/condi=
tions/condition">
- selectOption1Array[i] =3D <xsl:value-of select=3D"i=
dAtt" />;
- selectOption2Array[i] =3D <xsl:value-of select=3D"o=
perator" />;
- inputTagValuesArray[i] =3D <xsl:value-of select=3D"=
value" />;
- i++;
- </xsl:for-each>
- =20
- var inputValuesFilter;
- inputValuesFilter =3D new InputValues(selectOption1Array=
,selectOption2Array,inputTagValuesArray);
- =20
- //Order
- var selectOption1ArrayOrder =3D new Array();
- var selectOption2ArrayOrder =3D new Array();
- var i=3D0;
- <xsl:for-each select=3D"/view/viewDatas/viewParams/order=
s/order">
- selectOption1ArrayOrder[i] =3D <xsl:value-of select=
=3D"idAtt" />;
- selectOption2ArrayOrder[i] =3D <xsl:value-of select=
=3D"ascOrDesc" />;
- i++;
- </xsl:for-each>
- var inputValuesOrder;
- inputValuesOrder =3D new InputValues(selectOption1ArrayO=
rder,selectOption2ArrayOrder,null);
- =20
+ */
////////////////////////
//The form
var formArray =3D new Array();
var i; //Counter
- =20
<xsl:for-each select=3D"/view/classes/class">
<xsl:variable name=3D"classId">
<xsl:value-of select=3D"id" />
@@ -86,10 +59,89 @@
</xsl:for-each>
=20
<xsl:if test=3D"/view/viewDatas/classId!=3D''">
- var Form =3D new Form(formArray,<xsl:value-of select=3D"=
/view/viewDatas/classId" />,ViewParams);
+ var Form =3D new Form(formArray,<xsl:value-of select=3D"=
/view/viewDatas/classId" />);
</xsl:if>
- //alert(Form.GetOptionString(0));
=20
+ =20
+ //////////////////
+ //Filter
+ =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"/view/classes/class[count(attrib=
utes)>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
+ //When updating: get the values back into interface
+ var selectOption0ArrayFilter =3D new Array();
+ var selectOption1ArrayFilter =3D new Array();
+ var inputTagValuesArrayFilter =3D new Array();
+ =20
+ var i=3D0;
+ <xsl:for-each select=3D"/view/viewDatas/viewParams/condi=
tions/condition">
+ selectOption0ArrayFilter[i] =3D <xsl:value-of selec=
t=3D"idAtt" />;
+ selectOption1ArrayFilter[i] =3D <xsl:value-of selec=
t=3D"operator" />;
+ inputTagValuesArrayFilter[i] =3D <xsl:value-of sele=
ct=3D"value" />;
+ i++;
+ </xsl:for-each>
+ =20
+ <xsl:if test=3D"/view/viewDatas/classId!=3D''">
+ var InputLineParamsFilters =3D
+ {
+ type: 'TWOSELECTANDINPUT',
+ select0: attList,
+ select1: OperatorsGetSelectArray(),
+ lineTitle: 'Filter',
+ input0: '',
+ PreselectedInput0: inputTagValuesArrayFilter,
+ PreselectedSelect0: selectOption0ArrayFilter,
+ PreselectedSelect1: selectOption1ArrayFilter,
+ refName: 'expandFormFilter'
+ }
+ var InputLineFilters =3D new InputLine(InputLinePara=
msFilters);
+ </xsl:if>
+ =20
+ //////////////
+ //Order
+ =20
+ //When updating: get the values of view back
+ var selectOption0ArrayOrder =3D new Array();
+ var selectOption1ArrayOrder =3D new Array();
+ var inputTagValuesArrayOrder =3D new Array();
+ =20
+ var i=3D0;
+ <xsl:for-each select=3D"/view/viewDatas/viewParams/order=
s/order">
+ selectOption0ArrayOrder[i] =3D <xsl:value-of select=
=3D"idAtt" />;
+ selectOption1ArrayOrder[i] =3D <xsl:value-of select=
=3D"ascOrDesc" />;
+ i++;
+ </xsl:for-each>
+ <xsl:if test=3D"/view/viewDatas/classId!=3D''">
+ var InputLineParamsOrders =3D
+ {
+ type: 'TWOSELECT',
+ select0: attList,
+ select1: OrderGetSelectArray(),
+ lineTitle: 'Order',
+ input0: '',
+ PreselectedInput0: null,
+ PreselectedSelect0: selectOption0ArrayOrder,
+ PreselectedSelect1: selectOption1ArrayOrder,
+ refName: 'expandFormOrder'
+ }
+ var InputLineOrders =3D new InputLine(InputLineParam=
sOrders);
+ </xsl:if>
+ =20
+ =20
///////////////
/// The columns of attributes
var attribsArr =3D new Array();
@@ -287,13 +339,11 @@
</table>
<script language=3D"Javascri=
pt">
var divFilter =3D GetNod=
eByTagNameAndAttName("div","Filter")[0];
+ =20
var expandFormFilter =3D=
new ExpandForm("expandFormFilter",
- =
divFilter,
- =
true,
- =
Form.GetFilterArray(1),
- =
Form.GetFilterArray(2),
- =
"Filter",
- =
inputValuesFilter);
+ =
divFilter,
+ =
"Filter",
+ =
InputLineFilters);
</script>
</td>
</tr>
@@ -423,15 +473,14 @@
</td>
</tr>
</table>
+ =20
<script language=3D"Javascri=
pt">
var divSort =3D GetNodeB=
yTagNameAndAttName("div","Sort")[0];
- var expandFormSort =3D n=
ew ExpandForm("expandFormSort",
- =
divSort,
- =
false,
- =
Form.GetSortArray(1),
- =
Form.GetSortArray(2),
- =
"Order",
- =
inputValuesOrder);
+ =20
+ var expandFormOrder =3D =
new ExpandForm("expandFormOrder",
+ =
divSort,
+ =
"Order",
+ =
InputLineOrders);
</script>
</td>
</tr>
@@ -460,7 +509,7 @@
<xsl=
:value-of select=3D"/view/viewDatas/saveName" />
</xsl:at=
tribute>
<xsl:att=
ribute name=3D"onclick">
- retu=
rn Form.UpdateSubmitAll(rightColumn,expandFormSort,expandFormFilter); //D=
on't forget to do the same in Form.UpdateHeader
+ retu=
rn Form.UpdateSubmitAll(rightColumn,expandFormOrder,expandFormFilter); //=
Don't forget to do the same in Form.UpdateHeader
</xsl:at=
tribute>
</input>
</div>
|