rendered paste body{ literal }
<script type="text/javascript">
var conn = new XHConn();
if(!conn) {
exit;
}
var fnWhenDone = function domDeleteRow(oXML) {
resp = oXML.responseText.split("|");
if(resp[0] == 'true') {
child = document.getElementById("row_" + resp[1]);
try {
child.parentNode.removeChild(child);
}
catch(e) { alert("Entry still deleted, but refresh the page to see updated list"); }
}
else {
alert("Unable to delete. Debug: " + resp[1]);
}};
</script>
{ /literal }
<div id="confirmation" style="display: none; background: #f0f;">
<h3 style="margin: 25px 5px 5px 5px; font-size: 14px;">Are you sure you want to delete this issue?</h3>
<form style="margin: 0 auto; padding: 0; width: 100%; text-align: center;">
<input type="button" value="Yes" onclick="javascript:conn.connect('ajax.php?func=delete', 'GET', 'id={ $issue[0] }&table=issues', fnWhenDone)" />
<input type="button" value="No" onclick="javascript:hideIbox();" />
</form>
</div>
<table id="manage_issues" cellspacing="0">
<tr id="headers">
<td>ID</td> <!-- Comment this out when done with debugging -->
<td>Issue #</td>
<td>Issue Date</td>
<td>Creation Date</td>
<td>Functions</td>
</tr>
{ foreach from=$issues item=issue }
<tr id="row_{ $issue[0] }" class="standard_row" style="background: {cycle name="background" values="#ff571a,#ffffff"}; color: {cycle name="font_color" values="#fff,#000"};">
<!-- ID --><td>{ $issue[0] }</td><!-- Comment this out when done debugging -->
<!-- Issue # --><td>{ $issue[1] }</td>
<!-- Issue Date --><td>{ $issue[2]|date_format:"%d %b %Y" }</td>
<!-- Creation Date --><td>{ $issue[3]|date_format:"%d %b %Y" }</td>
<!-- Functions with iBox --> <td><a href="#confirmation" rel="ibox&height=100&width=300"><img src="templates/{ $template_name }/images/icons/file_(delete)_16x16.gif" alt="Delete" /></a></td>
<!-- Functions<td><a href="#" onclick="javascript:conn.connect('ajax.php?func=delete', 'GET', 'id={ $issue[0] }&table=issues', fnWhenDone)">Delete</a></td> -->
</tr>
{ /foreach }
</table>