Commit a93bb64a authored by toaster's avatar toaster
Browse files

javacript updates to status window (closable groups)

git-svn-id: https://subversion.umiacs.umd.edu/ace/trunk@63 f1b3a171-7291-4a19-a512-95ad0ad9394a
parent df8843a8
......@@ -26,12 +26,37 @@
<title>ACE Audit Manager</title>
<script type="text/javascript" SRC="srbFunctions.js" ></script>
<script type="text/javascript">
function toggleVisibility(id) {
function toggleVisibility(id,type) {
var t = document.getElementById(id);
if (t.style.display == "block") {
if (t.style.display == type) {
t.style.display = "none";
} else {
t.style.display = "block";
t.style.display = type;
}
}
function showGroup(id)
{
var divs = document.getElementsByTagName('tr');
for (i = 0; i < divs.length; i++)
{
if (divs[i].className.indexOf(id) != -1)
{
divs[i].style.display = "";
}
}
}
function hideGroup(id)
{
var divs = document.getElementsByTagName('tr');
for (i = 0; i < divs.length; i++)
{
if (divs[i].className.indexOf(id) != -1)
{
divs[i].style.display = "none";
}
}
}
</script>
......@@ -137,12 +162,19 @@
myp.innerHTML='${counttotal} / <c:choose><c:when test="${sizetotal > 0}"><d:FileSize value="${sizetotal}" /></c:when><c:otherwise>0 B</c:otherwise></c:choose>';
}
</script>
<tr><td class="groupheader" colspan="3">${item.collection.group}</td><td class="groupheader" colspan="3" id="group${item.collection.group}"></td></tr>
<tr>
<td class="groupheader" colspan="3" onclick="toggleVisibility('spexpand${item.collection.group}','inline'); toggleVisibility('sphide${item.collection.group}','inline');">
<span onclick="showGroup('grouptr${item.collection.group}')" id="spexpand${item.collection.group}" style="display:none;float: left;width: 25px;" >[+]</span>
<span onclick="hideGroup('grouptr${item.collection.group}')" id="sphide${item.collection.group}" style="display:inline;float: left;width: 25px;" >[-]</span>
${item.collection.group}
</td>
<td class="groupheader" colspan="3" id="group${item.collection.group}"></td>
</tr>
<c:set var="counttotal" value="0" />
<c:set var="sizetotal" value="0" />
</c:if>
<tr class="statusrow" >
<tr class="statusrow grouptr${item.collection.group}" >
<td>
<c:choose>
......@@ -202,7 +234,7 @@
myp.innerHTML='${counttotal} / <c:choose><c:when test="${sizetotal > 0}"><d:FileSize value="${sizetotal}" /></c:when><c:otherwise>0 B</c:otherwise></c:choose>';
</script>
<tr><td colspan="5"><br/><d:Auth role="Collection Modify" showUnauthenticated="true"><a href="ManageCollection">Add Collection</a></d:Auth> &nbsp;&nbsp;&nbsp&nbsp;&nbsp;
<tr><td colspan="5"><br/><d:Auth role="Collection Modify" showUnauthenticated="true"><a href="ManageCollection">Add Collection</a></d:Auth> &nbsp;&nbsp;&nbsp&nbsp;&nbsp;
<d:Auth role="Audit">
<c:choose>
<c:when test="${pause.paused}"><a href="Pause?pause=0">Enable Automated Auditing</a></c:when>
......
......@@ -160,7 +160,7 @@
<um:Auth role="Report"><td><a href="Report?collectionid=${workingCollection.collection.id}" title="Report"><img src="images/report.jpg" alt="Report"></a></td></um:Auth>
<td>
<fieldset id="dropmenu2" style="display: none; z-index: 2; position: absolute; background-color: #FFFFFF; width: 150px;">
<legend><span onclick="toggleVisibility('dropmenu1'); toggleVisibility('dropmenu2');">close</span></legend>
<legend><span onclick="toggleVisibility('dropmenu1','block'); toggleVisibility('dropmenu2','block');">close</span></legend>
<c:if test="${!(workingCollection.fileAuditRunning || workingCollection.tokenAuditRunning)}">
<um:Auth role="Collection Modify">
<a href="ManageCollection?collectionid=${workingCollection.collection.id}" title="Configure connection settings for this collection" >Collection Settings</a><br>
......@@ -190,7 +190,7 @@
</um:Auth>
</fieldset>
<div id="dropmenu1" style="display: block;" onclick="toggleVisibility('dropmenu1'); toggleVisibility('dropmenu2'); ">more...</div>
<div id="dropmenu1" style="display: block;" onclick="toggleVisibility('dropmenu1','block'); toggleVisibility('dropmenu2','block'); ">more...</div>
</td>
</tr>
......
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