Commit 0a4106a8 authored by toaster's avatar toaster
Browse files

auto select collections for peer comparison

git-svn-id: https://subversion.umiacs.umd.edu/ace/trunk@131 f1b3a171-7291-4a19-a512-95ad0ad9394a
parent 425c899e
......@@ -52,7 +52,7 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
var partnerArray = [];
collectionArray[${pstatus.index + 1}] = partnerArray;
<c:forEach var="collection" items="${partner.collections}" varStatus="cstatus">
partnerArray[${cstatus.index}] = {'id':${collection.id}, 'name': '${collection.group} ${collection.name}', 'shortname':${collection.name}};
partnerArray[${cstatus.index}] = {'id':${collection.id}, 'name': '${collection.group} ${collection.name}', 'shortname':'${collection.name}'};
</c:forEach>
</c:forEach>
......@@ -73,16 +73,18 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
else
{
document.compareform.remotecollectionid.disabled = false;
var selectedIdx = 0;
for (i = 0; i < collectionArray[site].length ; i++)
{
var def = false;
if (collectionArray[site][i].shortname == ${workingCollection.collection.name})
if (collectionArray[site][i].shortname == "${workingCollection.collection.name}")
{
selectedIdx = i;
def = true
}
document.compareform.remotecollectionid[i] = new Option(collectionArray[site][i].name, collectionArray[site][i].id,def,false);
}
document.compareform.remotecollectionid.selectedIndex = selectedIdx;
elem.style.display = "block";
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment