|
From: <sv...@de...> - 2005-06-13 22:42:36
|
Author: pcamacho
Date: 2005-06-13 18:41:05 -0400 (Mon, 13 Jun 2005)
New Revision: 1315
Modified:
humano2/trunk/web/builder/site/createreport.aspx.cs
humano2/trunk/web/builder/site/js/createreport.js
humano2/trunk/web/builder/site/js/grafcomponents/misc.js
humano2/trunk/web/builder/site/js/grafcomponents/sortedlist.js
humano2/trunk/web/builder/site/xsl/createreport.xsl
humano2/trunk/web/builder/site/xsl/createview.xsl
Log:
CHANGE:=20
* in the interface for creation of the builder, no use of ReportParam cl=
ass.
FIX:
* in report.aspx.cs: unuseful data about attributes from pertinence clas=
s was causing a trouble (same attrib was=20
appearing twice).
Modified: humano2/trunk/web/builder/site/createreport.aspx.cs
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/createreport.aspx.cs 2005-06-13 17:43:=
37 UTC (rev 1314)
+++ humano2/trunk/web/builder/site/createreport.aspx.cs 2005-06-13 22:41:=
05 UTC (rev 1315)
@@ -46,6 +46,7 @@
=20
private void Page_Load(object sender, System.EventArgs e)
{
+ Logger.Log("=3D=3D createreport.aspx.cs =3D=3D",LogLevel.Tra=
ce);
reportId =3D Convert.ToInt32(Request["reportId"]);
delete =3D Request["delete"];
receivedCreateUpdate =3D Request["sendCreateUpdate"];
@@ -129,13 +130,13 @@
//relacionadas...
if(Convert.ToInt32(classId) > 0)
{
- strXml +=3D formAttribList(Convert.ToInt32(classId));
+ strXml +=3D getXmlAttribListForClass(Convert.ToInt32(cla=
ssId));
}
strXml +=3D getClassList();
strXml +=3D "</classes>";
strXml +=3D "</report>";
=20
- //Logger.Log("ReportMain: createXml(): " + strXml, LogLevel.=
Trace);
+ Logger.Log("ReportMain: createXml(): " + strXml, LogLevel.Tr=
ace);
=20
return strXml;
}
@@ -771,8 +772,10 @@
=09
}
=20
- // Funcion agregada por negro que solo traera la informacion necesaria=
...
- private string formAttribList(int classId)=20
+ ///<summary>
+ ///Get the attributes of a class
+ ///</summary>
+ private string getXmlAttribListForClass(int classId)=20
{
string salida=3D"";
int attlogin =3D 0;
@@ -828,38 +831,7 @@
}
salida +=3D "</attributes>";
salida +=3D "</class>";
-
- foreach(DataRow row in dt.Select("attType=3D'pertinence'"))=20
- {
- idatt =3D Convert.ToInt32(row["id_entity"]);
- dtpert =3D userCred.CoreAdapter.GetClassesFromPertinence(idatt);
- =20
-
- foreach(DataRow dr in dtpert.Rows)
- {
- idClassRel =3D Convert.ToInt32(dr["to"].ToString());
- dtrel =3D userCred.CoreAdapter.GetAttributesFromClass(idClassRel);
- className =3D dbAdapter.GetClassNameById(idClassRel);
-
- salida +=3D "<class>";
- salida +=3D "<id>" + idClassRel + "</id>";
- salida +=3D "<name>" + className + "</name>";
- salida +=3D "<attributes>";
-
- foreach(DataRow row2 in dtrel.Rows)=20
- {
- string attName =3D Convert.ToString(row2["attName"]);
- className =3D Convert.ToString(dr["name"]);
- //res.Append("<option>"+className+":"+attName+"</option>");
- salida +=3D "<attribute>";
- salida +=3D "<id>" + idatt + "^" + row2["id_entity"].ToString() + =
"</id>";
- salida +=3D "<name>" + className + "." + attName + "</name>";
- salida +=3D "</attribute>";
- }
- salida +=3D "</attributes>";
- salida +=3D "</class>";
- }
- }
+ =20
return salida;
}
=20
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 17:43:37=
UTC (rev 1314)
+++ humano2/trunk/web/builder/site/js/createreport.js 2005-06-13 22:41:05=
UTC (rev 1315)
@@ -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
+// $Id$
//
-//
=20
=20
function AttribsGetSelectArray(formArray,classId)
Property changes on: humano2/trunk/web/builder/site/js/createreport.js
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: humano2/trunk/web/builder/site/js/grafcomponents/misc.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/misc.js 2005-06-13 1=
7:43:37 UTC (rev 1314)
+++ humano2/trunk/web/builder/site/js/grafcomponents/misc.js 2005-06-13 2=
2:41:05 UTC (rev 1315)
@@ -1,3 +1,15 @@
+//
+// 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$
+//
+
/**
* Gets a tag with its tag name and attribute name.
* Works in IE and Firefox
@@ -31,15 +43,14 @@
function IsInArray(element,tab)
{
var res =3D false;
+ var i;
for(i=3D0;i<tab.length;i++)
{
- //alert("tab" + tab[i] + "/ element: " + element);
if(tab[i] =3D=3D element) =20
{
return true; =20
}
}
- =20
return res;
}
=20
Property changes on: humano2/trunk/web/builder/site/js/grafcomponents/mis=
c.js
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: humano2/trunk/web/builder/site/js/grafcomponents/sortedlist.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/sortedlist.js 2005-0=
6-13 17:43:37 UTC (rev 1314)
+++ humano2/trunk/web/builder/site/js/grafcomponents/sortedlist.js 2005-0=
6-13 22:41:05 UTC (rev 1315)
@@ -1 +1 @@
-//=0D// The Humano2 Business solution.=0D// Copyright (C) 2004,5 Humano=
2 Chile S.A. (http://www.humano2.com)=0D//=0D// This program is free soft=
ware; you can redistribute it and/or modify=0D// it under the terms of th=
e GNU General Public License as published by=0D// the Free Software Found=
ation; either version 2 of the License, or=0D// (at your option) any late=
r version. =0D//=0D// $Id$=0D//=0D=0D/**=0D * Constructor of ListEleme=
nt=0D */=0Dfunction ListElement(name,value,disabled)=0D{=0D //Fields=0D=
this.name =3D name;=0D this.value =3D value;=0D this.disabled =3D=
disabled;=0D =0D //Methods=0D this.GetName =3D ListElementGetNa=
me;=0D this.GetValue =3D ListElementGetValue;=0D this.GetDisabled =3D=
ListElementGetDisabled;=0D this.SetDisabled =3D ListElementSetDisable=
d;=0D}=0D=0Dfunction ListElementGetDisabled()=0D{ =0D return this.di=
sabled;=0D}=0D=0Dfunction ListElementSetDisabled(disabled)=0D{=0D this=
.disabled =3D disabled; =0D}=0D=0Dfunction ListElementGetValue()=0D{=0D=
return this.value; =0D}=0D=0Dfunction ListElementGetName()=0D{=0D =
return this.name;=0D}=0D=0D=0Dfunction CopyList(src)=0D{=0D var dst=
=3D new Array(); =0D var i =3D 0;=0D for(i=3D0;i<src.length=
;i++)=0D {=0D dst[i] =3D new ListElement( src[i].GetName(),=0D=
src[i].GetValue(),=0D =
src[i].GetDisabled());=0D }=0D =0D return dst;=
=0D}=0D=0D/**=0D* Constructor of a sorted list=0D*/=0Dfunction SortedList=
(itemList)=0D{=0D =0D //Fields copy everything to be indepe=
ndent=0D this.itemList =3D new Array(); =0D =0D =
=0D //Public Methods=0D this.GetItem =3D SortedListGetItem=
;=0D this.ToString =3D SortedListToString;=0D this.ItemUp =3D=
SortedListItemUp;=0D this.ItemDown =3D SortedListItemDown;=0D =
this.Sort =3D SortedListSort;=0D this.ToTop =3D SortedListToTo=
p;=0D this.ToBottom =3D SortedListToBottom;=0D this.Add =3D=
SortedListAdd;=0D this.Replace =3D SortedListReplace;=0D t=
his.Remove =3D SortedListRemove;=0D this.Set =3D SortedListSet;=0D=
this.EnableAll =3D SortedListEnableAll;=0D this.RemoveAll =
=3D SortedListRemoveAll;=0D this.Length =3D SortedListLength;=0D =
=0D //Init the object=0D this.itemList =3D CopyList(i=
temList);=0D}=0D=0D=0D/**=0D* Used to debug=0D*/=0Dfunction SortedListToS=
tring()=0D{=0D str =3D "**** SORTED LIST ****<br>";=0D s=
tr +=3D "<b>itemList</b><br/>: ";=0D var i;=0D //alert("t=
his.itemList[i].length: " + this.itemList.length);=0D for(i=3D0;i=
<this.itemList.length;i++)=0D {=0D str +=3D "("+ i+=
")" + " name:" + this.itemList[i].GetName() + "<br/>";=0D }=0D =
=0D document.write(str);=0D}=0D=0D/**=0D * Get length of l=
ist=0D */=0Dfunction SortedListLength()=0D{=0D return this.itemLis=
t.length; =0D}=0D=0D/**=0D* Simple getter=0D*/=0Dfunction SortedLi=
stGetItem(indexOfItem)=0D{=0D return this.itemList[indexOfItem];=0D=
}=0D=0D=0D/**=0D* Sorts the list=0D*/=0Dfunction SortedListSort()=0D{=0D =
//Bubble sort=0D var sorted =3D false; =0D while( sorted =3D=
=3D false)=0D {=0D var i;=0D sorted =3D true;=0D =
for(i=3D0;i<this.itemList.length-1;i++) =0D {=0D if(=
this.itemList[i].name > this.itemList[i+1].name) //Invert elements=0D =
{=0D var aux =3D this.itemList[i];=0D =
this.itemList[i] =3D this.itemList[i+1];=0D this.ite=
mList[i+1] =3D aux;=0D sorted =3D false;=0D }=0D=
}=0D }=0D}=0D=0D/**=0D* Takes an item and make changes its pla=
ce from p to p-1 in the list=0D* @param indexOfItem the index of item to =
move=0D* @return the new index of item=0D*/=0Dfunction SortedListItemUp(i=
ndexOfItem)=0D{=0D if((indexOfItem =3D=3D 0) || (indexOfItem =3D=3D=
-1))=0D return indexOfItem;=0D var aux =3D this.item=
List[indexOfItem -1];=0D this.itemList[indexOfItem-1] =3D this.item=
List[indexOfItem];=0D this.itemList[indexOfItem] =3D aux;=0D =
=0D return (indexOfItem-1);=0D}=0D=0D=0D/**=0D* Takes an item and m=
ake changes its place from p to p+1 in the list=0D* @param indexOfItem th=
e index of item to move=0D* @return the new index of the item =0D*/ =0Dfu=
nction SortedListItemDown(indexOfItem)=0D{=0D=0D var lastIndex =3D=
this.itemList.length - 1;=0D =0D if( (indexOfItem =3D=3D=
lastIndex) =0D || (indexOfItem =3D=3D -1))=0D =
return indexOfItem;=0D =0D =0D var aux =3D =
this.itemList[indexOfItem+1];=0D this.itemList[indexOfItem+1] =3D =
this.itemList[indexOfItem];=0D this.itemList[indexOfItem] =3D aux;=
=0D =0D return (indexOfItem+1);=0D}=0D =0D/**=0D * Move an =
item to the top of the list=0D */=0Dfunction SortedListToTop(indexOfItem)=
=0D{=0D if((indexOfItem =3D=3D 0) || (indexOfItem =3D=3D -1))=0D =
return;=0D var topReached =3D indexOfItem;=0D =
while (topReached !=3D 0)=0D {=0D topReached =3D =
this.ItemUp(topReached);=0D }=0D}=0D=0Dfunction SortedListToBottom=
(indexOfItem)=0D{=0D if((indexOfItem =3D=3D (this.itemList.length-=
1)) || (indexOfItem =3D=3D -1) )=0D return;=0D var =
topReached =3D indexOfItem;=0D while (topReached !=3D (this.itemLi=
st.length-1))=0D {=0D topReached =3D this.ItemDown(=
topReached);=0D }=0D}=0D=0D/**=0D * Add a new element at the end o=
f the list=0D */=0Dfunction SortedListAdd(value)=0D{=0D //alert("Next =
index: " + this.itemList.length);=0D this.itemList[this.itemList.lengt=
h] =3D value;=0D}=0D=0D/**=0D * Looks for the element in the list that as=
the same id as element=0D * when found replace it by element=0D * if not=
found simply add element to the list=0D */=0Dfunction SortedListReplace(=
element)=0D{=0D var founded =3D false;=0D var i;=0D =0D for(i=
=3D0;i<this.itemList.length;i++)=0D {=0D if(this.itemList[i].Ge=
tValue() =3D=3D element.GetValue()) =0D {=0D founded=
=3D true;=0D this.itemList[i] =3D element;=0D retu=
rn;=0D }=0D }=0D =0D if (founded =3D=3D false)=0D {=0D =
this.Add(element);=0D }=0D}=0D=0D/**=0D * Set the list to a tab=
values=0D * doing a copy=0D */=0Dfunction SortedListSet(values)=0D{=0D =
this.itemList =3D CopyList(values);=0D}=0D=0D=0D/**=0D * Put the disabl=
ed attribute of every element to false=0D */=0Dfunction SortedListEnableA=
ll()=0D{=0D var i;=0D for(i=3D0;i<this.itemList.length;i++)=0D {=
=0D var element =3D this.itemList[i];=0D element.SetDisab=
led(false);=0D }=0D}=0D=0Dfunction SortedListRemoveAll()=0D{=0D thi=
s.itemList =3D new Array(); =0D}=0D=0D=0Dfunction SortedListRemove(ind=
exOfItem)=0D{=0D var newArray =3D new Array();=0D var indexNewArray=
=3D 0;=0D for(var i=3D0;i<this.itemList.length;i++)=0D {=0D =
if(i!=3DindexOfItem)=0D {=0D newArray[=
indexNewArray++] =3D this.itemList[i];=0D }=0D }=0D this=
.itemList =3D newArray;=0D}=0D=0D =0D//////////////////////////////////=0D=
// TESTS =0D/////////////////////////////////=0Dfunction SortedListTest()=
=0D{=0D =0D TestGroupWrite("SortedListTest");=0D =0D=
//ItemUp=0D var list =3D new SortedList( new Array( new =
ListElement("item1","",false),=0D =
new ListElement("item2","",false),=0D =
new ListElement("item3","",false)));=0D =0D =
list.ItemUp(1);=0D Test("ITEMUP","Push the second item up",li=
st.GetItem(0).GetName() =3D=3D 'item2' =0D =
&& list.GetItem(1).GetName() =3D=3D 'item1'=0D =
&& list.GetItem(2).GetName() =3D=3D 'item3');=0D =
list.ItemUp(0); =0D Tes=
t("ITEMUP","Push the first item up (no change)",list.GetItem(0).GetName()=
=3D=3D 'item2' =0D && list.GetIte=
m(1).GetName() =3D=3D 'item1'=0D &=
& list.GetItem(2).GetName() =3D=3D 'item3');=0D list.ItemUp(-1); =
=0D Test("ITEMUP","-1: no cha=
nge",list.GetItem(0).GetName() =3D=3D 'item2' =0D =
&& list.GetItem(1).GetName() =3D=3D 'item1'=0D =
&& list.GetItem(2).GetName() =3D=3D 'item3')=
;=0D =0D =0D =0D //ItemDown =
=0D var list =3D new SortedList(new Array(new ListEle=
ment("item1","",false),new ListElement("item2","",false),new ListElement(=
"item3","",false)));=0D =0D list.ItemDown(1);=0D Test("ITE=
MDOWN","Push the second item down",list.GetItem(0).GetName() =3D=3D 'item=
1' =0D && list.GetItem(1)=
.GetName() =3D=3D 'item3'=0D && =
list.GetItem(2).GetName() =3D=3D 'item2');=0D =
=0D list.ItemDown(2); =
=0D Test("ITEMDOWN","Push the last item down (no chan=
ge)", list.GetItem(0).GetName() =3D=3D 'item1' =0D =
&& list.GetItem(1).GetName() =3D=3D=
'item3'=0D && =
list.GetItem(2).GetName() =3D=3D 'item2');=0D =0D l=
ist.ItemDown(-1); =0D Test("=
ITEMDOWN","-1 :no change",list.GetItem(0).GetName() =3D=3D 'item1' =0D =
&& list.GetItem(1).GetName() =3D=3D =
'item3'=0D && list.GetItem(2).GetN=
ame() =3D=3D 'item2');=0D =0D //ToTop=0D var list =3D=
new SortedList(new Array(new ListElement("item1"),=0D =
new ListElement("item2"),=0D =
new ListElement("item3"),=0D =
new ListElement("item4")));=0D =0D l=
ist.ToTop(3);=0D Test("ITEMTOTOP","Push the last item to the top o=
f list",list.GetItem(0).GetName() =3D=3D 'item4' =0D =
&& list.GetItem(1).GetName() =3D=3D 'item1'=0D =
&& list.GetItem(2).GetName() =3D=3D 'item=
2'=0D && list.GetItem(3).GetName()=
=3D=3D 'item3');=0D =0D list.ToTop(0); =
=0D Test("ITEMTOTOP","Push the first item to th=
e top (no change)", list.GetItem(0).GetName() =3D=3D 'item4' =0D =
&& list.GetI=
tem(1).GetName() =3D=3D 'item1'=0D =
&& list.GetItem(2).GetName() =3D=3D 'item2'=
=0D && =
list.GetItem(3).GetName() =3D=3D 'item3');=0D list.ToTop(-1); =
=0D Test("ITEMTOTOP","-1: no c=
hange",list.GetItem(0).GetName() =3D=3D 'item4' =0D =
&& list.GetItem(1).GetName() =3D=3D 'item1'=0D =
&& list.GetItem(2).GetName() =3D=3D 'item2=
'=0D && list.GetItem(3).GetName() =
=3D=3D 'item3');=0D =0D =0D //ToBottom=0D var=
list =3D new SortedList(new Array(new ListElement("item1"),=0D =
new ListElement("item2"),=0D =
new ListElement("item3"),=0D =
new ListElement("item4")));=0D =0D=
list.ToBottom(0);=0D Test("ITEMTOBOTTOM","Push the first i=
tem to the bottom of list",list.GetItem(0).GetName() =3D=3D 'item2' =0D =
&& list.GetItem(1).GetName() =3D=3D=
'item3'=0D && list.GetItem(2).Get=
Name() =3D=3D 'item4'=0D && list.G=
etItem(3).GetName() =3D=3D 'item1');=0D =0D list.ToBottom(3=
); =0D Test("ITEMTOBOTTOM","=
Push the last item to the bottom (no change)",list.GetItem(0).GetName() =3D=
=3D 'item2' =0D && list.GetItem(1)=
.GetName() =3D=3D 'item3'=0D && li=
st.GetItem(2).GetName() =3D=3D 'item4'=0D =
&& list.GetItem(3).GetName() =3D=3D 'item1');=0D =0D =
list.ToBottom(-1); =0D Tes=
t("ITEMTOBOTTOM","-1: no change",list.GetItem(0).GetName() =3D=3D 'item2'=
=0D && list.GetItem(1).GetName() =
=3D=3D 'item3'=0D && list.GetItem(=
2).GetName() =3D=3D 'item4'=0D && =
list.GetItem(3).GetName() =3D=3D 'item1');=0D //Sort=0D var=
list =3D new SortedList(new Array(new ListElement("Marijn"),new ListElem=
ent("Sebastian"),new ListElement("Philippe")));=0D list.Sort();=0D=
Test("SORT","Sorts the list",list.GetItem(0).GetName()=3D=3D"Mari=
jn"=0D && list.GetItem(1).GetName(=
) =3D=3D "Philippe"=0D && list.Get=
Item(2).GetName() =3D=3D "Sebastian");=0D =0D =
//Add=0D var list =3D new SortedList(new Array(new ListElemen=
t("Marijn"),new ListElement("Sebastian"),new ListElement("Philippe")));=0D=
list.Add(new ListElement("Rodrigo"));=0D Test("ADD","Add a=
n element to the list",list.GetItem(0).GetName()=3D=3D"Marijn"=0D =
&& list.GetItem(1).GetName() =3D=3D "Seba=
stian"=0D && list.GetItem(2).GetNa=
me() =3D=3D "Philippe"=0D && list.=
GetItem(3).GetName() =3D=3D "Rodrigo"); =0D =
=0D //Remove=0D var list =3D new SortedList(n=
ew Array(new ListElement("Marijn"),new ListElement("Sebastian"),new ListE=
lement("Philippe")));=0D list.Remove(1);=0D Test("REMOVE","=
Remove an element from the list",list.GetItem(0).GetName()=3D=3D"Marijn"=0D=
&& list.GetItem(1=
).GetName() =3D=3D "Philippe")=0D =
=0D =
=0D //EnableAll =
=0D var list =3D new SortedList(new Array(new ListElement("=
Marijn","",true),=0D new ListE=
lement("Sebastian","",false),=0D =
new ListElement("Sebastian","",true)));=0D list.EnableAll();=0D=
Test("ENABLEALL","Enable all elements of the list", list.GetI=
tem(0).GetDisabled()=3D=3Dfalse=0D =
&& list.GetItem(1).GetDisabled()=3D=3Dfalse=0D =
&& list.GetItem(2=
).GetDisabled()=3D=3Dfalse); =0D =
=0D //RemoveAll =
=0D var list =3D new SortedList(new=
Array(new ListElement("Marijn"),new ListElement("Sebastian"),new ListEle=
ment("Philippe")));=0D list.RemoveAll();=0D Test("REMOVEALL=
","Remove all elements of the list",list.Length()=3D=3D0);=0D =0D =
=0D //SetToDefault=0D var list =3D new SortedList(ne=
w Array(new ListElement("Marijn"),new ListElement("Sebastian"),new ListEl=
ement("Philippe")));=0D list.Set(new Array(new ListElement("Paris"=
),new ListElement("Lyon"),new ListElement("Marseille")));=0D Test(=
"SET","Set the elements of the list",list.Length()=3D=3D3 =0D =
&& list.GetItem(0).GetName()=3D=3D=
"Paris"=0D && list.Get=
Item(1).GetName()=3D=3D"Lyon"=0D =
&& list.GetItem(2).GetName()=3D=3D"Marseille");=0D=0D /=
/Replace=0D var list =3D new SortedList(new Array(new ListElement(=
"Marijn","1",false),=0D new Li=
stElement("Sebastian","2",false),=0D =
new ListElement("Philippe","3",false)));=0D =0D var =
element =3D new ListElement("Mozart","1",false);=0D list.Replace(e=
lement); =0D Test("REPLACE","Replace the first element of t=
he list (1)",=0D li=
st.GetItem(0).GetName()=3D=3D"Mozart"=0D =
&& list.GetItem(1).GetName()=3D=3D"Sebastian"=0D =
&& list.GetItem(2).GetName(=
)=3D=3D"Philippe"); =0D element =3D new ListElement("Lulu","4",fal=
se); =0D list.R=
eplace(element); =0D Test("REPLACE","Replace the first element o=
f the list (2)", list.Length() =3D=3D 4 =0D =
&& list.GetItem(0).GetName()=3D=3D"Mozart"=0D =
&& list.GetItem(1).GetName(=
)=3D=3D"Sebastian"=0D =
&& list.GetItem(2).GetName()=3D=3D"Philippe"=0D =
&& list.GetItem(3).GetName()=3D=3D"Lulu");=0D =
=0D //Length =
=0D var list =3D new S=
ortedList(new Array(new ListElement("Marijn"),new ListElement("Sebastian"=
),new ListElement("Philippe")));=0D var length =3D list.Length();=0D=
Test("LENGTH","Length of list",length =3D=3D 3);=0D}=0D=20
\ No newline at end of file
+//=0D// The Humano2 Business solution.=0D// Copyright (C) 2004,5 Humano=
2 Chile S.A. (http://www.humano2.com)=0D//=0D// This program is free soft=
ware; you can redistribute it and/or modify=0D// it under the terms of th=
e GNU General Public License as published by=0D// the Free Software Found=
ation; either version 2 of the License, or=0D// (at your option) any late=
r version. =0D//=0D// $Id$=0D//=0D=0D/**=0D * Constructor of ListEleme=
nt=0D */=0Dfunction ListElement(name,value,disabled)=0D{=0D //Fields=0D=
this.name =3D name;=0D this.value =3D value;=0D this.disabled =3D=
disabled;=0D =0D //Methods=0D this.GetName =3D ListElementGetNa=
me;=0D this.GetValue =3D ListElementGetValue;=0D this.GetDisabled =3D=
ListElementGetDisabled;=0D this.SetDisabled =3D ListElementSetDisable=
d;=0D}=0D=0Dfunction ListElementGetDisabled()=0D{ =0D return this.di=
sabled;=0D}=0D=0Dfunction ListElementSetDisabled(disabled)=0D{=0D this=
.disabled =3D disabled; =0D}=0D=0Dfunction ListElementGetValue()=0D{=0D=
return this.value; =0D}=0D=0Dfunction ListElementGetName()=0D{=0D =
return this.name;=0D}=0D=0D=0Dfunction CopyList(src)=0D{=0D var dst=
=3D new Array(); =0D var i =3D 0;=0D =0D for(i=3D0;i<src=
.length;i++)=0D {=0D dst[i] =3D new ListElement( src[i].GetNam=
e(),=0D src[i].GetValue(),=0D =
src[i].GetDisabled());=0D }=0D =0D retu=
rn dst;=0D}=0D=0D/**=0D* Constructor of a sorted list=0D*/=0Dfunction Sor=
tedList(itemList)=0D{=0D =0D //Fields copy everything to be=
independent=0D this.itemList =3D new Array(); =0D =0D=
=0D //Public Methods=0D this.GetItem =3D SortedList=
GetItem;=0D this.ToString =3D SortedListToString;=0D this.I=
temUp =3D SortedListItemUp;=0D this.ItemDown =3D SortedListItemDow=
n;=0D this.Sort =3D SortedListSort;=0D this.ToTop =3D Sorte=
dListToTop;=0D this.ToBottom =3D SortedListToBottom;=0D thi=
s.Add =3D SortedListAdd;=0D this.Replace =3D SortedListReplace;=0D=
this.Remove =3D SortedListRemove;=0D this.Set =3D SortedLi=
stSet;=0D this.EnableAll =3D SortedListEnableAll;=0D this.R=
emoveAll =3D SortedListRemoveAll;=0D this.Length =3D SortedListLen=
gth;=0D =0D //Init the object=0D this.itemList =3D C=
opyList(itemList);=0D}=0D=0D=0D/**=0D* Used to debug=0D*/=0Dfunction Sort=
edListToString()=0D{=0D str =3D "**** SORTED LIST ****<br>";=0D =
str +=3D "<b>itemList</b><br/>: ";=0D var i;=0D /=
/alert("this.itemList[i].length: " + this.itemList.length);=0D fo=
r(i=3D0;i<this.itemList.length;i++)=0D {=0D str +=3D=
"("+ i+ ")" + " name:" + this.itemList[i].GetName() + "<br/>";=0D =
}=0D =0D document.write(str);=0D}=0D=0D/**=0D * Get len=
gth of list=0D */=0Dfunction SortedListLength()=0D{=0D return this=
.itemList.length; =0D}=0D=0D/**=0D* Simple getter=0D*/=0Dfunction =
SortedListGetItem(indexOfItem)=0D{=0D return this.itemList[indexOf=
Item];=0D}=0D=0D=0D/**=0D* Sorts the list=0D*/=0Dfunction SortedListSort(=
)=0D{=0D //Bubble sort=0D var sorted =3D false; =0D while( s=
orted =3D=3D false)=0D {=0D var i;=0D sorted =3D true;=0D=
for(i=3D0;i<this.itemList.length-1;i++) =0D {=0D =
if(this.itemList[i].name > this.itemList[i+1].name) //Invert elem=
ents=0D {=0D var aux =3D this.itemList[i];=0D =
this.itemList[i] =3D this.itemList[i+1];=0D =
this.itemList[i+1] =3D aux;=0D sorted =3D false;=0D =
}=0D }=0D }=0D}=0D=0D/**=0D* Takes an item and make change=
s its place from p to p-1 in the list=0D* @param indexOfItem the index of=
item to move=0D* @return the new index of item=0D*/=0Dfunction SortedLis=
tItemUp(indexOfItem)=0D{=0D if((indexOfItem =3D=3D 0) || (indexOfIt=
em =3D=3D -1))=0D return indexOfItem;=0D var aux =3D =
this.itemList[indexOfItem -1];=0D this.itemList[indexOfItem-1] =3D =
this.itemList[indexOfItem];=0D this.itemList[indexOfItem] =3D aux;=0D=
=0D return (indexOfItem-1);=0D}=0D=0D=0D/**=0D* Takes an ite=
m and make changes its place from p to p+1 in the list=0D* @param indexOf=
Item the index of item to move=0D* @return the new index of the item =0D*=
/ =0Dfunction SortedListItemDown(indexOfItem)=0D{=0D=0D var lastIn=
dex =3D this.itemList.length - 1;=0D =0D if( (indexOfIt=
em =3D=3D lastIndex) =0D || (indexOfItem =3D=3D -1))=0D =
return indexOfItem;=0D =0D =0D var=
aux =3D this.itemList[indexOfItem+1];=0D this.itemList[indexOfIte=
m+1] =3D this.itemList[indexOfItem];=0D this.itemList[indexOfItem]=
=3D aux;=0D =0D return (indexOfItem+1);=0D}=0D =0D/**=0D *=
Move an item to the top of the list=0D */=0Dfunction SortedListToTop(ind=
exOfItem)=0D{=0D if((indexOfItem =3D=3D 0) || (indexOfItem =3D=3D=
-1))=0D return;=0D var topReached =3D indexOfItem;=
=0D while (topReached !=3D 0)=0D {=0D topRea=
ched =3D this.ItemUp(topReached);=0D }=0D}=0D=0Dfunction SortedLis=
tToBottom(indexOfItem)=0D{=0D if((indexOfItem =3D=3D (this.itemLis=
t.length-1)) || (indexOfItem =3D=3D -1) )=0D return;=0D =
var topReached =3D indexOfItem;=0D while (topReached !=3D (th=
is.itemList.length-1))=0D {=0D topReached =3D this.=
ItemDown(topReached);=0D }=0D}=0D=0D/**=0D * Add a new element at =
the end of the list=0D */=0Dfunction SortedListAdd(value)=0D{=0D //ale=
rt("Next index: " + this.itemList.length);=0D this.itemList[this.itemL=
ist.length] =3D value;=0D}=0D=0D/**=0D * Looks for the element in the lis=
t that as the same id as element=0D * when found replace it by element=0D=
* if not found simply add element to the list=0D */=0Dfunction SortedLis=
tReplace(element)=0D{=0D var founded =3D false;=0D var i;=0D =0D=
for(i=3D0;i<this.itemList.length;i++)=0D {=0D if(this.itemL=
ist[i].GetValue() =3D=3D element.GetValue()) =0D {=0D =
founded =3D true;=0D this.itemList[i] =3D element;=0D =
return;=0D }=0D }=0D =0D if (founded =3D=3D false)=0D=
{=0D this.Add(element);=0D }=0D}=0D=0D/**=0D * Set the list=
to a tab values=0D * doing a copy=0D */=0Dfunction SortedListSet(values)=
=0D{=0D this.itemList =3D CopyList(values);=0D}=0D=0D=0D/**=0D * Put t=
he disabled attribute of every element to false=0D */=0Dfunction SortedLi=
stEnableAll()=0D{=0D var i;=0D for(i=3D0;i<this.itemList.length;i++=
)=0D {=0D var element =3D this.itemList[i];=0D element=
.SetDisabled(false);=0D }=0D}=0D=0Dfunction SortedListRemoveAll()=0D{=0D=
this.itemList =3D new Array(); =0D}=0D=0D=0Dfunction SortedListRem=
ove(indexOfItem)=0D{=0D var newArray =3D new Array();=0D var indexN=
ewArray =3D 0;=0D for(var i=3D0;i<this.itemList.length;i++)=0D {=0D=
if(i!=3DindexOfItem)=0D {=0D ne=
wArray[indexNewArray++] =3D this.itemList[i];=0D }=0D }=0D =
this.itemList =3D newArray;=0D}=0D=0D =0D/////////////////////////////=
/////=0D// TESTS =0D/////////////////////////////////=0Dfunction SortedLi=
stTest()=0D{=0D =0D TestGroupWrite("SortedListTest");=0D =
=0D //ItemUp=0D var list =3D new SortedList( new Arra=
y( new ListElement("item1","",false),=0D =
new ListElement("item2","",false),=0D =
new ListElement("item3","",false)));=0D =
=0D list.ItemUp(1);=0D Test("ITEMUP","Push the second ite=
m up",list.GetItem(0).GetName() =3D=3D 'item2' =0D =
&& list.GetItem(1).GetName() =3D=3D 'item1'=0D =
&& list.GetItem(2).GetName() =3D=3D 'item3'=
);=0D list.ItemUp(0); =0D =
Test("ITEMUP","Push the first item up (no change)",list.GetItem(0).G=
etName() =3D=3D 'item2' =0D && lis=
t.GetItem(1).GetName() =3D=3D 'item1'=0D =
&& list.GetItem(2).GetName() =3D=3D 'item3');=0D list.ItemU=
p(-1); =0D Test("ITEMUP","-1=
: no change",list.GetItem(0).GetName() =3D=3D 'item2' =0D =
&& list.GetItem(1).GetName() =3D=3D 'item1'=0D =
&& list.GetItem(2).GetName() =3D=3D =
'item3');=0D =0D =0D =0D //ItemDown =
=0D var list =3D new SortedList(new Array(new=
ListElement("item1","",false),new ListElement("item2","",false),new List=
Element("item3","",false)));=0D =0D list.ItemDown(1);=0D T=
est("ITEMDOWN","Push the second item down",list.GetItem(0).GetName() =3D=3D=
'item1' =0D && list.GetI=
tem(1).GetName() =3D=3D 'item3'=0D =
&& list.GetItem(2).GetName() =3D=3D 'item2');=0D =
=0D list.ItemDown(2); =
=0D Test("ITEMDOWN","Push the last item down (n=
o change)", list.GetItem(0).GetName() =3D=3D 'item1' =0D =
&& list.GetItem(1).GetName()=
=3D=3D 'item3'=0D && =
list.GetItem(2).GetName() =3D=3D 'item2');=0D =0D =
list.ItemDown(-1); =0D =
Test("ITEMDOWN","-1 :no change",list.GetItem(0).GetName() =3D=3D 'item1'=
=0D && list.GetItem(1).GetName() =
=3D=3D 'item3'=0D && list.GetItem(=
2).GetName() =3D=3D 'item2');=0D =0D //ToTop=0D var =
list =3D new SortedList(new Array(new ListElement("item1"),=0D =
new ListElement("item2"),=0D =
new ListElement("item3"),=0D =
new ListElement("item4")));=0D =0D =
list.ToTop(3);=0D Test("ITEMTOTOP","Push the last item to t=
he top of list",list.GetItem(0).GetName() =3D=3D 'item4' =0D =
&& list.GetItem(1).GetName() =3D=3D 'item1'=0D=
&& list.GetItem(2).GetName() =3D=3D=
'item2'=0D && list.GetItem(3).Get=
Name() =3D=3D 'item3');=0D =0D list.ToTop(0); =
=0D Test("ITEMTOTOP","Push the first item=
to the top (no change)", list.GetItem(0).GetName() =3D=3D 'item4' =0D =
&& lis=
t.GetItem(1).GetName() =3D=3D 'item1'=0D =
&& list.GetItem(2).GetName() =3D=3D '=
item2'=0D && =
list.GetItem(3).GetName() =3D=3D 'item3');=0D list.ToTop(-=
1); =0D Test("ITEMTOTOP","-1=
: no change",list.GetItem(0).GetName() =3D=3D 'item4' =0D =
&& list.GetItem(1).GetName() =3D=3D 'item1'=0D =
&& list.GetItem(2).GetName() =3D=3D =
'item2'=0D && list.GetItem(3).GetN=
ame() =3D=3D 'item3');=0D =0D =0D //ToBottom=0D =
var list =3D new SortedList(new Array(new ListElement("item1"),=0D =
new ListElement("item2"),=0D =
new ListElement("item3"),=0D =
new ListElement("item4")));=0D =
=0D list.ToBottom(0);=0D Test("ITEMTOBOTTOM","Push the f=
irst item to the bottom of list",list.GetItem(0).GetName() =3D=3D 'item2'=
=0D && list.GetItem(1).GetName() =
=3D=3D 'item3'=0D && list.GetItem(=
2).GetName() =3D=3D 'item4'=0D && =
list.GetItem(3).GetName() =3D=3D 'item1');=0D =0D list.ToBo=
ttom(3); =0D Test("ITEMTOBOT=
TOM","Push the last item to the bottom (no change)",list.GetItem(0).GetNa=
me() =3D=3D 'item2' =0D && list.Ge=
tItem(1).GetName() =3D=3D 'item3'=0D =
&& list.GetItem(2).GetName() =3D=3D 'item4'=0D =
&& list.GetItem(3).GetName() =3D=3D 'item1');=0D =0D=
list.ToBottom(-1); =0D =
Test("ITEMTOBOTTOM","-1: no change",list.GetItem(0).GetName() =3D=3D '=
item2' =0D && list.GetItem(1).GetN=
ame() =3D=3D 'item3'=0D && list.Ge=
tItem(2).GetName() =3D=3D 'item4'=0D =
&& list.GetItem(3).GetName() =3D=3D 'item1');=0D //Sort=0D =
var list =3D new SortedList(new Array(new ListElement("Marijn"),new Li=
stElement("Sebastian"),new ListElement("Philippe")));=0D list.Sort=
();=0D Test("SORT","Sorts the list",list.GetItem(0).GetName()=3D=3D=
"Marijn"=0D && list.GetItem(1).Get=
Name() =3D=3D "Philippe"=0D && lis=
t.GetItem(2).GetName() =3D=3D "Sebastian");=0D =0D=
//Add=0D var list =3D new SortedList(new Array(new ListEle=
ment("Marijn"),new ListElement("Sebastian"),new ListElement("Philippe")))=
;=0D list.Add(new ListElement("Rodrigo"));=0D Test("ADD","A=
dd an element to the list",list.GetItem(0).GetName()=3D=3D"Marijn"=0D =
&& list.GetItem(1).GetName() =3D=3D "=
Sebastian"=0D && list.GetItem(2).G=
etName() =3D=3D "Philippe"=0D && l=
ist.GetItem(3).GetName() =3D=3D "Rodrigo"); =0D =
=0D //Remove=0D var list =3D new SortedLi=
st(new Array(new ListElement("Marijn"),new ListElement("Sebastian"),new L=
istElement("Philippe")));=0D list.Remove(1);=0D Test("REMOV=
E","Remove an element from the list",list.GetItem(0).GetName()=3D=3D"Mari=
jn"=0D && list.Get=
Item(1).GetName() =3D=3D "Philippe")=0D =
=0D =
=0D //EnableAll =
=0D var list =3D new SortedList(new Array(new ListEle=
ment("Marijn","",true),=0D new=
ListElement("Sebastian","",false),=0D =
new ListElement("Sebastian","",true)));=0D list.EnableAll=
();=0D Test("ENABLEALL","Enable all elements of the list", lis=
t.GetItem(0).GetDisabled()=3D=3Dfalse=0D =
&& list.GetItem(1).GetDisabled()=3D=3Dfalse=0D=
&& list.GetI=
tem(2).GetDisabled()=3D=3Dfalse); =0D =
=0D //RemoveAll =
=0D var list =3D new SortedLis=
t(new Array(new ListElement("Marijn"),new ListElement("Sebastian"),new Li=
stElement("Philippe")));=0D list.RemoveAll();=0D Test("REMO=
VEALL","Remove all elements of the list",list.Length()=3D=3D0);=0D =
=0D =0D //SetToDefault=0D var list =3D new SortedLi=
st(new Array(new ListElement("Marijn"),new ListElement("Sebastian"),new L=
istElement("Philippe")));=0D list.Set(new Array(new ListElement("P=
aris"),new ListElement("Lyon"),new ListElement("Marseille")));=0D =
Test("SET","Set the elements of the list",list.Length()=3D=3D3 =0D =
&& list.GetItem(0).GetName()=3D=
=3D"Paris"=0D && list.=
GetItem(1).GetName()=3D=3D"Lyon"=0D =
&& list.GetItem(2).GetName()=3D=3D"Marseille");=0D=0D =
//Replace=0D var list =3D new SortedList(new Array(new ListEleme=
nt("Marijn","1",false),=0D new=
ListElement("Sebastian","2",false),=0D =
new ListElement("Philippe","3",false)));=0D =0D v=
ar element =3D new ListElement("Mozart","1",false);=0D list.Replac=
e(element); =0D Test("REPLACE","Replace the first element o=
f the list (1)",=0D =
list.GetItem(0).GetName()=3D=3D"Mozart"=0D =
&& list.GetItem(1).GetName()=3D=3D"Sebastian"=0D =
&& list.GetItem(2).GetNa=
me()=3D=3D"Philippe"); =0D element =3D new ListElement("Lulu","4",=
false); =0D lis=
t.Replace(element); =0D Test("REPLACE","Replace the first elemen=
t of the list (2)", list.Length() =3D=3D 4 =0D =
&& list.GetItem(0).GetName()=3D=3D"Mozart"=0D =
&& list.GetItem(1).GetNa=
me()=3D=3D"Sebastian"=0D =
&& list.GetItem(2).GetName()=3D=3D"Philippe"=0D =
&& list.GetItem(3).GetName()=3D=3D"Lulu");=0D=
=0D //Length =
=0D var list =3D new=
SortedList(new Array(new ListElement("Marijn"),new ListElement("Sebastia=
n"),new ListElement("Philippe")));=0D var length =3D list.Length()=
;=0D Test("LENGTH","Length of list",length =3D=3D 3);=0D}=0D=20
\ No newline at end of file
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 17:43:=
37 UTC (rev 1314)
+++ humano2/trunk/web/builder/site/xsl/createreport.xsl 2005-06-13 22:41:=
05 UTC (rev 1315)
@@ -25,22 +25,11 @@
<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
- =09
<!-- Here we create an array and use it as parameter for For=
m class constructor -->
<script language=3D"Javascript">
=20
- //////////////////////
- //The report params
+ var ReportParams =3D new ReportParams(new Array(),null,n=
ull); //To be removed
=20
- //Columns
- var reportColumnsArray =3D new Array();
- var i=3D0;
- <xsl:for-each select=3D"/report/reportDatas/reportParams=
/columns/column">
- reportColumnsArray[i++] =3D "<xsl:value-of select=3D=
"." />";
- </xsl:for-each>
- //alert(reportColumnsArray.length);
- var ReportParams =3D new ReportParams(reportColumnsArray=
,null,null);
- =20
////////////////////////
//The form
var formArray =3D new Array();
@@ -65,6 +54,103 @@
</xsl:if>
//alert(Form.GetOptionString(0));
=20
+ =20
+ ///////////////
+ /// The columns of attributes (group columns)
+ var attribsArr =3D new Array();
+ var item;
+ var i=3D0;
+ <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>
+ var item =3D new ListElement("<xsl:value-of select=3D=
"name" />","<xsl:value-of select=3D"id"/>",false);
+ attribsArr[i] =3D item;
+ i++;
+ </xsl:for-each>
+ var sizeAttribsArr =3D attribsArr.length;
+ <xsl:if test=3D"/report/reportDatas/name=3D''"> <!-- Cre=
ation -->
+ <![CDATA[
+ //Now builds left and right array for columns
+ var maxPreSelectedNum =3D sizeAttribsArr;
+ =20
+ if(maxPreSelectedNum < 3)
+ {
+ maxPreSelectedNum =3D 0;
+ }
+ else
+ {
+ maxPreSelectedNum =3D 3;=20
+ }
+ var leftAttribsArr =3D new Array();=20
+ var rightAttribsArr =3D new Array();
+ var i=3D0;
+ for(i=3D0;i<maxPreSelectedNum;i++)
+ {
+ rightAttribsArr[i] =3D new ListElement(attri=
bsArr[i].GetName(),attribsArr[i].GetValue(),false);
+ }
+ =20
+ var i=3D0;
+ for(i=3D0;i<sizeAttribsArr;i++)
+ {
+ leftAttribsArr[i] =3D new ListElement(attrib=
sArr[i].GetName(),attribsArr[i].GetValue(),false);
+ if(i<maxPreSelectedNum)
+ {
+ leftAttribsArr[i].SetDisabled(true);
+ }
+ }
+ ]]>
+ </xsl:if>
+ <xsl:if test=3D"report/reportDatas/name!=3D''"> <!-- Upd=
ate -->
+ =20
+ //Columns
+ var reportColumnsArray =3D new Array();
+ var i=3D0;
+ <xsl:for-each select=3D"/report/reportDatas/reportPa=
rams/columns/column">
+ reportColumnsArray[i++] =3D "<xsl:value-of selec=
t=3D"." />";
+ </xsl:for-each>
+ //alert(reportColumnsArray.length);
+ =20
+ <![CDATA[
+ var leftAttribsArr =3D new Array();
+ var rightAttribsArr =3D new Array();
+ var j=3D0;
+ var i=3D0;
+ //alert("size: " + sizeAttribsArr);
+ for(i=3D0;i<sizeAttribsArr;i++)
+ {
+ var idAtt =3D attribsArr[i].GetValue();
+ =20
+ if(IsInArray(idAtt,reportColumnsArray) =3D=3D=
true)
+ {
+ //The left array
+ var element =3D new ListElement( attrib=
sArr[i].GetName(),
+ attribsA=
rr[i].GetValue(),
+ true);
+ leftAttribsArr[i] =3D element; =20
+ //The right array: the element
+ //alert(attribsArr[i].GetName());
+ var element =3D new ListElement( attrib=
sArr[i].GetName(),
+ attribsA=
rr[i].GetValue(),
+ false);
+ this.rightAttribsArr[j++] =3D element; =
=20
+ }
+ else
+ {
+ //The left array
+ //alert(attribsArr[i].GetName());
+ var element =3D new ListElement( attrib=
sArr[i].GetName(),
+ attribsA=
rr[i].GetValue(),
+ false);
+ leftAttribsArr[i] =3D element; =20
+ //The right array: nothing=20
+ }
+ =20
+ }
+ ]]>
+ </xsl:if>
+ =20
+ =20
//Filters =20
var selectOption0ArrayFilter =3D new Array();
var selectOption1ArrayFilter =3D new Array();
@@ -371,53 +457,53 @@
<tr>
<td class=3D"smallgraytextnolink" c=
olspan=3D"2">
<table>
- <tr>
- <td>
- <div id=3D"ColumnsToShow=
Left" ondblclick=3D"leftColumn.Move(leftColumn.GetSelectedIndex(),rightCo=
lumn,false);">
- </div>
- </td>
- <td>
- <center>
- <input type=3D"butto=
n"=20
- width=3D"20"
- value=3D">>=
;"=20
- onclick =3D "lef=
tColumn.Move(leftColumn.GetSelectedIndex(),rightColumn,false);"></input>
+ <tr>
+ <td>
+ <div id=3D"ColumnsTo=
ShowLeft" ondblclick=3D"leftColumn.Move(leftColumn.GetSelectedIndex(),rig=
htColumn,false);">
+ </div>
+ </td>
+ <td>
+ <center>
+ <input type=3D"b=
utton"=20
+ width=3D"20"
+ value=3D">=
;>"=20
+ onclick =3D =
"leftColumn.Move(leftColumn.GetSelectedIndex(),rightColumn,false);"></inp=
ut>
+ <br/>
+ <input type=3D"=
button"=20
+ width=3D=
"20"
+ value=3D=
"<<"=20
+ onclick =
=3D "rightColumn.Move(rightColumn.GetSelectedIndex(),leftColumn,true);"><=
/input>
+ </center>
+ </td>
+ <td>
+ <div id=3D"ColumnsTo=
ShowRight" ondblclick=3D"rightColumn.Move(rightColumn.GetSelectedIndex(),=
leftColumn,true);">
+ </div>
+ </td>
+ <td>
+ <a href=3D"#" onclic=
k=3D"rightColumn.Top(rightColumn.GetSelectedIndex())">
+ <img src=3D"img/=
upuparrow.gif" border=3D"0"/>
+ </a>
<br/>
- <input type=3D"butt=
on"=20
- width=3D"20"
- value=3D"<=
;<"=20
- onclick =3D =
"rightColumn.Move(rightColumn.GetSelectedIndex(),leftColumn,true);"></inp=
ut>
- </center>
- </td>
- <td>
- <div id=3D"ColumnsToShow=
Right" ondblclick=3D"rightColumn.Move(rightColumn.GetSelectedIndex(),left=
Column,true);">
- </div>
- </td>
- <td>
- <a href=3D"#" onclick=3D=
"rightColumn.Top(rightColumn.GetSelectedIndex())">
- <img src=3D"img/upup=
arrow.gif" border=3D"0"/>
- </a>
- <br/>
- <a href=3D"#" onclick=3D=
"rightColumn.Up(rightColumn.GetSelectedIndex())">
- <img src=3D"img/upar=
row.gif" border=3D"0" />
- </a>
- <br/>
- <a href=3D"#" onclick=3D=
"rightColumn.Down(rightColumn.GetSelectedIndex())">
- <img src=3D"img/down=
arrow.gif" border=3D"0" />
- </a>
- <br/>
- <a href=3D"#" onclick=3D=
"rightColumn.Bottom(rightColumn.GetSelectedIndex())">
- <img src=3D"img/down=
downarrow.gif" border=3D"0" />
- </a>
- </td>
- <td>
- <input type=3D"button" v=
alue=3D"SetToDefault"=20
- onclick=3D"leftColum=
n.SetToDefault();rightColumn.SetToDefault();"></input>
- <br/>
- <!-- Do not forget to en=
able all item of the left list -->
- <input type=3D"button" v=
alue=3D"RemoveAll" onclick=3D"leftColumn.EnableAll();rightColumn.RemoveAl=
l();"></input>
- </td>
- </tr>
+ <a href=3D"#" onclic=
k=3D"rightColumn.Up(rightColumn.GetSelectedIndex())">
+ <img src=3D"img/=
uparrow.gif" border=3D"0" />
+ </a>
+ <br/>
+ <a href=3D"#" onclic=
k=3D"rightColumn.Down(rightColumn.GetSelectedIndex())">
+ <img src=3D"img/=
downarrow.gif" border=3D"0" />
+ </a>
+ <br/>
+ <a href=3D"#" onclic=
k=3D"rightColumn.Bottom(rightColumn.GetSelectedIndex())">
+ <img src=3D"img/=
downdownarrow.gif" border=3D"0" />
+ </a>
+ </td>
+ <td>
+ <input type=3D"butto=
n" value=3D"SetToDefault"=20
+ onclick=3D"leftC=
olumn.SetToDefault();rightColumn.SetToDefault();"></input>
+ <br/>
+ <!-- Do not forget t=
o enable all item of the left list -->
+ <input type=3D"butto=
n" value=3D"RemoveAll" onclick=3D"leftColumn.EnableAll();rightColumn.Remo=
veAll();"></input>
+ </td>
+ </tr>
</table>
<script>
//First List
@@ -426,7 +512,7 @@
{
divReceptor: divColumnsT=
oShowLeft,
showButtons: false,
- itemList: Form.GetLeftAt=
t(),
+ itemList: leftAttribsArr=
,
selfRefName: "leftColumn=
"
}
var leftColumn =3D new Sorte=
dGraphicalList(leftColumnParams);
@@ -437,7 +523,7 @@
{
divReceptor: divColumnsT=
oShowRight,
...
[truncated message content] |