|
From: <sv...@de...> - 2005-06-13 15:52:03
|
Author: pcamacho
Date: 2005-06-13 11:51:49 -0400 (Mon, 13 Jun 2005)
New Revision: 1312
Added:
humano2/trunk/web/builder/site/xsl/createfolder.xsl
Modified:
humano2/trunk/web/builder/site/foldermanagement.aspx
humano2/trunk/web/builder/site/foldermanagement.aspx.cs
humano2/trunk/web/builder/site/formmanagement.aspx
humano2/trunk/web/builder/site/js/formreport.js
humano2/trunk/web/builder/site/js/grafcomponents/sortedgraphicallist.j=
s
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: change of interface for "SortedGraphicalList" component.
Modified: humano2/trunk/web/builder/site/foldermanagement.aspx
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/foldermanagement.aspx 2005-06-13 14:27=
:13 UTC (rev 1311)
+++ humano2/trunk/web/builder/site/foldermanagement.aspx 2005-06-13 15:51=
:49 UTC (rev 1312)
@@ -112,19 +112,31 @@
</table>
=20
<script>
- var rigthElements =3D new Array(<% html_getA=
ttrList(2); %>);
+ var rightElements =3D new Array(<% html_getA=
ttrList(2); %>);
var leftElements =3D new Array(<% html_getAt=
trList(1); %>);
=20
//First List
var divColumnsToShowLeft =3D GetNodeByTagNam=
eAndAttName("div","ColumnsToShowLeft")[0]; =20
- var leftColumn =3D new SortedGraphicalList(l=
eftElements,
- divC=
olumnsToShowLeft,"leftColumn"); =20
+ var leftColumnParams =3D=20
+ {
+ selfRefName: "leftColumn",
+ itemList: leftElements,
+ divReceptor: divColumnsToShowLeft,
+ showButtons: false
+ }
+ =20
+ var leftColumn =3D new SortedGraphicalList(l=
eftColumnParams); =20
=
=20
//Second List
var divColumnsToShowRight =3D GetNodeByTagNa=
meAndAttName("div","ColumnsToShowRight")[0]; =20
- var rightColumn =3D new SortedGraphicalList(=
rigthElements,
- divC=
olumnsToShowRight,"rightColumn"); =
=20
- =20
+ var rightColumnParams =3D=20
+ {
+ selfRefName: "rightColumn",
+ itemList: rightElements,
+ divReceptor: divColumnsToShowRight,
+ showButtons: false
+ }
+ var rightColumn =3D new SortedGraphicalList(=
rightColumnParams); =20
</script>
</td> =20
</tr>
Modified: humano2/trunk/web/builder/site/foldermanagement.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/foldermanagement.aspx.cs 2005-06-13 14=
:27:13 UTC (rev 1311)
+++ humano2/trunk/web/builder/site/foldermanagement.aspx.cs 2005-06-13 15=
:51:49 UTC (rev 1312)
@@ -535,11 +535,7 @@
{
Response.Write("0");
}
- public void html_sendMessage()
- {
- Response.Write(htmlMsgError);
- }
-
+ =09
#endregion=20
}
}
Modified: humano2/trunk/web/builder/site/formmanagement.aspx
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/formmanagement.aspx 2005-06-13 14:27:1=
3 UTC (rev 1311)
+++ humano2/trunk/web/builder/site/formmanagement.aspx 2005-06-13 15:51:4=
9 UTC (rev 1312)
@@ -126,18 +126,31 @@
</table>
<script>
=20
- var rigthElements =3D new Array(<% html_getAttrL=
ist(2); %>);
+ var rightElements =3D new Array(<% html_getAttrL=
ist(2); %>);
var leftElements =3D new Array(<% html_getAttrLi=
st(1); %>);
=20
//First List
var divColumnsToShowLeft =3D GetNodeByTagNameAnd=
AttName("div","ColumnsToShowLeft")[0]; =20
- var leftColumn =3D new SortedGraphicalList(leftE=
lements,
- divColumnsToShowLeft,"leftColumn"); =20
=20
+ var leftColumnParams =3D=20
+ {
+ selfRefName: "leftColumn",
+ itemList: leftElements,
+ divReceptor: divColumnsToShowLeft,
+ showButtons: false
+ }
+ var leftColumn =3D new SortedGraphicalList(leftC=
olumnParams); =20
+ =20
//Second List
var divColumnsToShowRight =3D GetNodeByTagNameAn=
dAttName("div","ColumnsToShowRight")[0]; =20
- var rightColumn =3D new SortedGraphicalList(rigt=
hElements,
- divColumnsToShowRight,"rightColumn"); =
=20
+ var rightColumnParams =3D=20
+ {
+ selfRefName: "rightColumn",
+ itemList: rightElements,
+ divReceptor: divColumnsToShowRight,
+ showButtons: false
+ }
+ var rightColumn =3D new SortedGraphicalList(righ=
tColumnParams); =20
=20
</script>
</td>
Modified: 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 14:27:13 U=
TC (rev 1311)
+++ humano2/trunk/web/builder/site/js/formreport.js 2005-06-13 15:51:49 U=
TC (rev 1312)
@@ -256,7 +256,6 @@
}
this.attributeLeftArray[i] =3D element; =
=20
}
- =20
}
else //In the case of update of a class
{
Modified: humano2/trunk/web/builder/site/js/grafcomponents/sortedgraphica=
llist.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/sortedgraphicallist.=
js 2005-06-13 14:27:13 UTC (rev 1311)
+++ humano2/trunk/web/builder/site/js/grafcomponents/sortedgraphicallist.=
js 2005-06-13 15:51:49 UTC (rev 1312)
@@ -7,81 +7,82 @@
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version. =20
//
-// $Id: $
+// $Id$
//
=20
+
/**
* Constructor of SortedGraphicalList
- * @param itemList The list items
- * @param showInput boolean, to know if the inputs (to update and delete=
) are used
+ * @param itemList The list items (array)
+ * @param showButtons boolean, to know if the buttons (to update and del=
ete) are used
*/
-function SortedGraphicalList(itemList,divReceptor,selfRefName,showButton=
s)
+function SortedGraphicalList(params)
{
- //Fields
- this.selfRefName =3D selfRefName;
- this.fSortedList =3D new SortedList(itemList);
- this.showButtons =3D showButtons;
- =20
- //Graphical elements
- this.listBoxElement =3D document.createElement('div');
- this.sortButton =3D document.createElement('div');
- this.downButton =3D document.createElement('div');
- this.upButton =3D document.createElement('div');
- this.topButton =3D document.createElement('div');
- this.bottomButton =3D document.createElement('div');
- =20
- //Methods
- this.RefreshListBox =3D SortedGraphicalListRefreshListBox;
- this.GetSelectedIndex =3D SortedGraphicalListGetSelectedIndex;
- this.CreateButton =3D SortedGraphicalListCreateButton; =20
- this.PutAllComponents =3D SortedGraphicalListPutAllComponents;
- this.Sort =3D SortedGraphicalListSort;
- this.Up =3D SortedGraphicalListUp;
- this.Down =3D SortedGraphicalListDown;
- this.Top =3D SortedGraphicalListTop;
- this.Bottom =3D SortedGraphicalListBottom;
- this.AddElement =3D SortedGraphicalListAddElement;
- this.ReplaceElement =3D SortedGraphicalListReplaceElement;
- this.RemoveElement =3D SortedGraphicalListRemoveElement;
- this.EnableAll =3D SortedGraphicalListEnableAll;
- this.RemoveAll =3D SortedGraphicalListRemoveAll;
- this.Set =3D SortedGraphicalListSet;
- this.Move =3D SortedGraphicalListMove;
- =20
- //Update the current document
- this.PutAllComponents(divReceptor);
- =20
- return this;
+ //Fields
+ this.selfRefName =3D params.selfRefName;
+ this.fSortedList =3D new SortedList(params.itemList);
+ this.showButtons =3D params.showButtons;
+ =20
+ //Graphical elements
+ this.listBoxElement =3D document.createElement('div');
+ this.sortButton =3D document.createElement('div');
+ this.downButton =3D document.createElement('div');
+ this.upButton =3D document.createElement('div');
+ this.topButton =3D document.createElement('div');
+ this.bottomButton =3D document.createElement('div');
+ =20
+ //Methods
+ this.RefreshListBox =3D SortedGraphicalListRefreshListBox;
+ this.GetSelectedIndex =3D SortedGraphicalListGetSelectedIndex;
+ this.CreateButton =3D SortedGraphicalListCreateButton; =20
+ this.PutAllComponents =3D SortedGraphicalListPutAllComponents;
+ this.Sort =3D SortedGraphicalListSort;
+ this.Up =3D SortedGraphicalListUp;
+ this.Down =3D SortedGraphicalListDown;
+ this.Top =3D SortedGraphicalListTop;
+ this.Bottom =3D SortedGraphicalListBottom;
+ this.AddElement =3D SortedGraphicalListAddElement;
+ this.ReplaceElement =3D SortedGraphicalListReplaceElement;
+ this.RemoveElement =3D SortedGraphicalListRemoveElement;
+ this.EnableAll =3D SortedGraphicalListEnableAll;
+ this.RemoveAll =3D SortedGraphicalListRemoveAll;
+ this.Set =3D SortedGraphicalListSet;
+ this.Move =3D SortedGraphicalListMove;
+ =20
+ //Update the current document
+ this.PutAllComponents(params.divReceptor);
+ =20
+ return this;
}
=20
function SortedGraphicalListSort()
{
- this.fSortedList.Sort();
- this.RefreshListBox(); =20
+ this.fSortedList.Sort();
+ this.RefreshListBox(); =20
}
=20
function SortedGraphicalListUp(index)
{
- this.fSortedList.ItemUp(index);
- this.RefreshListBox(); =20
+ this.fSortedList.ItemUp(index);
+ this.RefreshListBox(); =20
}
=20
function SortedGraphicalListDown(index)
{
- this.fSortedList.ItemDown(index);
- this.RefreshListBox(); =20
+ this.fSortedList.ItemDown(index);
+ this.RefreshListBox(); =20
}
=20
function SortedGraphicalListTop(index)
{
- this.fSortedList.ToTop(index);
- this.RefreshListBox(); =20
+ this.fSortedList.ToTop(index);
+ this.RefreshListBox(); =20
}
=20
function SortedGraphicalListBottom(index)
{
- this.fSortedList.ToBottom(index);
- this.RefreshListBox(); =20
+ this.fSortedList.ToBottom(index);
+ this.RefreshListBox(); =20
}
=20
/**
@@ -250,24 +251,24 @@
=20
function SortedGraphicalListPutAllComponents(divReceptor)
{
- this.RefreshListBox();
- divReceptor.appendChild(this.listBoxElement);
- =20
- =20
- if(this.showButtons =3D=3D true)
- {
- this.CreateButton("Up");
- this.CreateButton("Down");
- this.CreateButton("Top");
- this.CreateButton("Bottom");
- this.CreateButton("Sort");
- }
- =20
- divReceptor.appendChild(this.sortButton);
- divReceptor.appendChild(this.upButton);
- divReceptor.appendChild(this.downButton);
- divReceptor.appendChild(this.topButton);
- divReceptor.appendChild(this.bottomButton);
+ this.RefreshListBox();
+ divReceptor.appendChild(this.listBoxElement);
+ =20
+ =20
+ if(this.showButtons =3D=3D true)
+ {
+ this.CreateButton("Up");
+ this.CreateButton("Down");
+ this.CreateButton("Top");
+ this.CreateButton("Bottom");
+ this.CreateButton("Sort");
+ }
+ =20
+ divReceptor.appendChild(this.sortButton);
+ divReceptor.appendChild(this.upButton);
+ divReceptor.appendChild(this.downButton);
+ divReceptor.appendChild(this.topButton);
+ divReceptor.appendChild(this.bottomButton);
} =20
=20
function SortedGraphicalListGetSelectedIndex()
@@ -281,6 +282,15 @@
function SortedGraphicalListTest()
{
TestGroupWrite("SortedGraphicalListTest");
+ =20
+ =20
+ =20
+ Test("GetDefaultItemList","an empty line", EmptyLineHtml =3D=3D =
'');
+ =20
+ Test("");
+ =20
+ =20
+ /*
//var newDiv =3D document.createElement('div');
//var node =3D document.getElementsByTagName("body")[0]; =20
//node.appendChild(newDiv);
@@ -292,7 +302,6 @@
anotherSortedGraphicalList =3D new SortedGraphicalList(new Array=
(new ListElement("France"), new ListElement("Chili"), new ListElement("Pe=
rou")),
divRef,"aSortedG=
raphicalList",false); =20
=20
- =20
//CreateButtonRemove
var divRemoveButton =3D document.createElement("div");
divRemoveButton.innerHTML =3D "<div>"
@@ -336,4 +345,6 @@
+ "</div>";
divRef.appendChild(divMove);
=20
-}
\ No newline at end of file
+ */
+ =20
+}
Property changes on: humano2/trunk/web/builder/site/js/grafcomponents/sor=
tedgraphicallist.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 14:27:13 UTC (rev 1311)
+++ humano2/trunk/web/builder/site/js/grafcomponents/sortedlist.js 2005-0=
6-13 15:51:49 UTC (rev 1312)
@@ -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: viewmain.aspx.cs 795 2005-05-04 14:26:33Z p=
camacho $=0D//=0D=0D/**=0D * Constructor of ListElement=0D */=0Dfunction =
ListElement(name,value,disabled)=0D{=0D //Fields=0D this.name =3D n=
ame;=0D this.value =3D value;=0D this.disabled =3D disabled;=0D =
=0D //Methods=0D this.GetName =3D ListElementGetName;=0D this.Ge=
tValue =3D ListElementGetValue;=0D this.GetDisabled =3D ListElementGet=
Disabled;=0D this.SetDisabled =3D ListElementSetDisabled;=0D}=0D=0Dfun=
ction ListElementGetDisabled()=0D{ =0D return this.disabled;=0D}=0D=0D=
function ListElementSetDisabled(disabled)=0D{=0D this.disabled =3D dis=
abled; =0D}=0D=0Dfunction ListElementGetValue()=0D{=0D return this.=
value; =0D}=0D=0Dfunction ListElementGetName()=0D{=0D return this.n=
ame;=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 independent=0D t=
his.itemList =3D new Array(); =0D =0D =0D //Pub=
lic Methods=0D this.GetItem =3D SortedListGetItem;=0D this.=
ToString =3D SortedListToString;=0D this.ItemUp =3D SortedListItem=
Up;=0D this.ItemDown =3D SortedListItemDown;=0D this.Sort =3D=
SortedListSort;=0D this.ToTop =3D SortedListToTop;=0D this=
.ToBottom =3D SortedListToBottom;=0D this.Add =3D SortedListAdd;=0D=
this.Replace =3D SortedListReplace;=0D this.Remove =3D Sor=
tedListRemove;=0D this.Set =3D SortedListSet;=0D this.Enabl=
eAll =3D SortedListEnableAll;=0D this.RemoveAll =3D SortedListRemo=
veAll;=0D this.Length =3D SortedListLength;=0D =0D /=
/Init the object=0D this.itemList =3D CopyList(itemList);=0D}=0D=0D=
=0D/**=0D* Used to debug=0D*/=0Dfunction SortedListToString()=0D{=0D =
str =3D "**** SORTED LIST ****<br>";=0D str +=3D "<b>itemLis=
t</b><br/>: ";=0D var i;=0D //alert("this.itemList[i].len=
gth: " + this.itemList.length);=0D for(i=3D0;i<this.itemList.leng=
th;i++)=0D {=0D str +=3D "("+ i+ ")" + " name:" + t=
his.itemList[i].GetName() + "<br/>";=0D }=0D =0D =
document.write(str);=0D}=0D=0D/**=0D * Get length of list=0D */=0Dfunctio=
n SortedListLength()=0D{=0D return this.itemList.length; =0D=
}=0D=0D/**=0D* Simple getter=0D*/=0Dfunction SortedListGetItem(indexOfIte=
m)=0D{=0D return this.itemList[indexOfItem];=0D}=0D=0D=0D/**=0D* S=
orts 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.item=
List.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.itemList[i+1] =3D aux;=0D=
sorted =3D false;=0D }=0D }=0D }=0D}=
=0D=0D/**=0D* Takes an item and make changes its place from p to p-1 in t=
he list=0D* @param indexOfItem the index of item to move=0D* @return the =
new index of item=0D*/=0Dfunction SortedListItemUp(indexOfItem)=0D{=0D =
if((indexOfItem =3D=3D 0) || (indexOfItem =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 (ind=
exOfItem-1);=0D}=0D=0D=0D/**=0D* Takes an item and make changes its place=
from p to p+1 in the list=0D* @param indexOfItem the index of item to mo=
ve=0D* @return the new index of the item =0D*/ =0Dfunction SortedListItem=
Down(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[index=
OfItem+1];=0D this.itemList[indexOfItem+1] =3D this.itemList[index=
OfItem];=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 retu=
rn;=0D var topReached =3D indexOfItem;=0D while (topReached=
!=3D 0)=0D {=0D topReached =3D this.ItemUp(topReac=
hed);=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 index=
OfItem;=0D while (topReached !=3D (this.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 */=0Df=
unction SortedListAdd(value)=0D{=0D //alert("Next index: " + this.item=
List.length);=0D this.itemList[this.itemList.length] =3D value;=0D}=0D=
=0D/**=0D * Looks for the element in the list that as the same id as elem=
ent=0D * when found replace it by element=0D * if not found simply add el=
ement to the list=0D */=0Dfunction SortedListReplace(element)=0D{=0D v=
ar founded =3D false;=0D var i;=0D =0D for(i=3D0;i<this.itemList=
.length;i++)=0D {=0D if(this.itemList[i].GetValue() =3D=3D elem=
ent.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(elem=
ent);=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 disabled attribute of ever=
y element to false=0D */=0Dfunction SortedListEnableAll()=0D{=0D var i=
;=0D for(i=3D0;i<this.itemList.length;i++)=0D {=0D var elem=
ent =3D this.itemList[i];=0D element.SetDisabled(false);=0D }=0D=
}=0D=0Dfunction SortedListRemoveAll()=0D{=0D this.itemList =3D new Arr=
ay(); =0D}=0D=0D=0Dfunction SortedListRemove(indexOfItem)=0D{=0D va=
r newArray =3D new Array();=0D var indexNewArray =3D 0;=0D for(var =
i=3D0;i<this.itemList.length;i++)=0D {=0D if(i!=3DindexOfIt=
em)=0D {=0D newArray[indexNewArray++] =3D t=
his.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 ListEleme=
nt("item2","",false),=0D n=
ew ListElement("item3","",false)));=0D =0D list.ItemUp(1);=0D=
Test("ITEMUP","Push the second item up",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(0); =
=0D Test("ITEMUP","Push the fi=
rst item up (no change)",list.GetItem(0).GetName() =3D=3D 'item2' =0D =
&& list.GetItem(1).GetName() =3D=3D '=
item1'=0D && list.GetItem(2).GetNa=
me() =3D=3D 'item3');=0D list.ItemUp(-1); =
=0D Test("ITEMUP","-1: no change",list.GetItem(0).Ge=
tName() =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 ListElement("item3","",false)));=0D=
=0D list.ItemDown(1);=0D Test("ITEMDOWN","Push the second=
item down",list.GetItem(0).GetName() =3D=3D 'item1' =0D =
&& list.GetItem(1).GetName() =3D=3D 'item=
3'=0D && list.GetItem(2).=
GetName() =3D=3D 'item2');=0D =0D =
list.ItemDown(2); =0D =
Test("ITEMDOWN","Push the last item down (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 list.ItemDown(-1); =
=0D Test("ITEMDOWN","-1 :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 //ToTop=0D var list =3D new SortedList(new A=
rray(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 the 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).GetName() =3D=3D 'item3');=0D =
=0D list.ToTop(0); =0D=
Test("ITEMTOTOP","Push the first item to the top (no change)", l=
ist.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).GetNa=
me() =3D=3D 'item3');=0D list.ToTop(-1); =
=0D Test("ITEMTOTOP","-1: no change",list.GetItem(0).=
GetName() =3D=3D 'item4' =0D && li=
st.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 SortedLis=
t(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 item to the bottom of li=
st",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.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 && 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).GetName() =3D=3D 'item3'=0D =
&& list.GetItem(2).GetName() =3D=3D 'ite=
m4'=0D && list.GetItem(3).GetName(=
) =3D=3D 'item1');=0D //Sort=0D var list =3D new SortedList=
(new Array(new ListElement("Marijn"),new ListElement("Sebastian"),new Lis=
tElement("Philippe")));=0D list.Sort();=0D Test("SORT","Sor=
ts the list",list.GetItem(0).GetName()=3D=3D"Marijn"=0D =
&& list.GetItem(1).GetName() =3D=3D "Philippe"=0D =
&& list.GetItem(2).GetName() =3D=3D=
"Sebastian");=0D =0D //Add=0D var=
list =3D new SortedList(new Array(new ListElement("Marijn"),new ListElem=
ent("Sebastian"),new ListElement("Philippe")));=0D list.Add(new Li=
stElement("Rodrigo"));=0D Test("ADD","Add an element to the list",=
list.GetItem(0).GetName()=3D=3D"Marijn"=0D =
&& list.GetItem(1).GetName() =3D=3D "Sebastian"=0D =
&& list.GetItem(2).GetName() =3D=3D "Philippe"=0D=
&& list.GetItem(3).GetName() =3D=3D=
"Rodrigo"); =0D =0D //=
Remove=0D var list =3D new SortedList(new Array(new ListElement("M=
arijn"),new ListElement("Sebastian"),new ListElement("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 "Phili=
ppe")=0D =0D =
=0D //EnableAll =
=0D var lis=
t =3D new SortedList(new Array(new ListElement("Marijn","",true),=0D =
new ListElement("Sebastian","",fal=
se),=0D new ListElement("Sebas=
tian","",true)));=0D list.EnableAll();=0D Test("ENABLEALL",=
"Enable all elements of the list", list.GetItem(0).GetDisabled()=3D=3D=
false=0D && l=
ist.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("Ma=
rijn"),new ListElement("Sebastian"),new ListElement("Philippe")));=0D =
list.RemoveAll();=0D Test("REMOVEALL","Remove all elements of =
the list",list.Length()=3D=3D0);=0D =0D =0D //SetToD=
efault=0D var list =3D new SortedList(new Array(new ListElement("M=
arijn"),new ListElement("Sebastian"),new ListElement("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.GetItem(1).GetName()=3D=3D"Ly=
on"=0D && list.GetItem=
(2).GetName()=3D=3D"Marseille");=0D=0D //Replace=0D var lis=
t =3D new SortedList(new Array(new ListElement("Marijn","1",false),=0D =
new ListElement("Sebastian","2",=
false),=0D new ListElement("Ph=
ilippe","3",false)));=0D =0D var element =3D new ListElemen=
t("Mozart","1",false);=0D list.Replace(element); =0D =
Test("REPLACE","Replace the first element of the list (1)",=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 =
element =3D new ListElement("Lulu","4",false); =
=0D list.Replace(element); =0D =
Test("REPLACE","Replace the first element of the list (2)", list.Leng=
th() =3D=3D 4 =0D && l=
ist.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 SortedList(new Array(new Li=
stElement("Marijn"),new ListElement("Sebastian"),new ListElement("Philipp=
e")));=0D var length =3D list.Length();=0D Test("LENGTH","L=
ength 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 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
Property changes on: humano2/trunk/web/builder/site/js/grafcomponents/sor=
tedlist.js
___________________________________________________________________
Name: svn:keywords
+ Id
Added: humano2/trunk/web/builder/site/xsl/createfolder.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/createfolder.xsl 2005-06-13 14:27:=
13 UTC (rev 1311)
+++ humano2/trunk/web/builder/site/xsl/createfolder.xsl 2005-06-13 15:51:=
49 UTC (rev 1312)
@@ -0,0 +1,149 @@
+<!-- $Id$ -->
+<html>
+ <head>
+ <title>Folders</title>
+ <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-=
8859-1">
+ <script src=3D"js/functions.js"></script>
+ <script language=3D"javascript" src=3D"js/grafcomponents/misc.js"></sc=
ript>
+ <script language=3D"javascript" src=3D"js/grafcomponents/test.js"></sc=
ript>
+ <script language=3D"Javascript" src=3D"js/grafcomponents/sortedlist.js=
"></script>
+ <script language=3D"Javascript" src=3D"js/grafcomponents/sortedgraphic=
allist.js"></script>
+ <script language=3D"Javascript" src=3D"js/grafcomponents/radiobuttonex=
pand.js"></script>
+ <!-- Load this script before the next one -->
+ <script language=3D"Javascript" src=3D"js/form.js"></script>
+ <script src=3D"js/fn_formsmng.js"></script>
+ <link href=3D"css/createinterface.css" rel=3D"stylesheet" type=3D=
"text/css">
+ </head>
+ <body>
+ <form name=3D"formulario" action=3D"#" method=3D"post">
+ <input type=3D"hidden" name=3D"opaction" id=3D"opaction" value=3D"<% =
html_getAction(); %>">
+ <input type=3D"hidden" name=3D"folderid" id=3D"folderid" value=3D"<% =
html_getFolderId(); %>">
+ <input type=3D"hidden" name=3D"LstAttrib" id=3D"LstAttrib">
+ <input type=3D"hidden" name=3D"classId" id=3D"classId" value=3D"1400"=
>
+ <input type=3D"hidden" name=3D"first" id=3D"first" value=3D"<% html_g=
etFirst(); %>">
+ <table width=3D"100%" class=3D"conttablecenter2">
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <td class=3D"smallgraytextnolink">
+ Folder Name:
+ </td>
+ <td class=3D"smallgraytextnolink">
+ <input id=3D"formName" type=3D"text"=
name=3D"formName" value=3D"<% html_getFolderName(); %>">
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Folder Father:=20
+ </td>
+ <td>
+ <select name=3D"select" size=3D"1" i=
d=3D"folderparent" onChange=3D"fn_setFolderParentId(this.options[this.sel=
ectedIndex].value);">
+ <% html_getFolderParent();%>
+ </select>
+ <input type=3D"hidden" id=3D"folderp=
arentid" name=3D"folderparentid" value=3D"<% html_getFolderParentId(); %>=
">
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ =20
+ <tr>
+ <td>
+ <table width=3D"100%" border=3D"0" cellSpacing=3D=
"0" cellPadding=3D"0">
+ <tr>
+ <td width=3D"100%" colspan=3D"2" class=3D=
"separatorLine">
+ </td>
+ </tr>
+ <tr>
+ <td class=3D"lev1head" valign=3D"top"><f=
ont size=3D"2">Items for Folder</font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan=3D"2">
+ <table>
+ <tr>
+ <td>Available Columns</td>
+ <td></td>
+ <td>Your Columns</td>
+ </tr>
+ <tr>
+ <td rowspan=3D"4">
+ <div id=3D"ColumnsToShowLeft" ondblc=
lick=3D"leftColumn.Move(leftColumn.GetSelectedIndex(),rightColumn,false);=
" ></div>
+ </td>
+ <td rowspan=3D"4">
+ <input onclick=3D"leftColumn.Move(le=
ftColumn.GetSelectedIndex(),rightColumn,false);" type=3D"button"
+ value=3D"Add">
+ <br>
+ <input onclick=3D"rightColumn.Move(r=
ightColumn.GetSelectedIndex(),leftColumn,true);" type=3D"button"
+ value=3D"Remove">
+ </td>
+ <td rowspan=3D"4">
+ <div id=3D"ColumnsToShowRight" ondbl=
click=3D"rightColumn.Move(rightColumn.GetSelectedIndex(),leftColumn,true)=
;"></div>
+ </td>
+ <td rowspan=3D"4">
+ <a onclick=3D"rightColumn.Top(rightC=
olumn.GetSelectedIndex())" href=3D"#">
+ <img src=3D"img/upuparrow.gif">
+ </a>
+ <br>
+ <a onclick=3D"rightColumn.Up(rightCo=
lumn.GetSelectedIndex())" href=3D"#">
+ <img src=3D"img/uparrow.gif">
+ </a>
+ <br>
+ <a onclick=3D"rightColumn.Down(right=
Column.GetSelectedIndex())" href=3D"#">
+ <img src=3D"img/downarrow.gif">
+ </a>
+ <br>
+ <a onclick=3D"rightColumn.Bottom(rig=
htColumn.GetSelectedIndex())" href=3D"#">
+ <img src=3D"img/downdownarrow.gi=
f">
+ ...
[truncated message content] |