Skip to content
Snippets Groups Projects
Commit fba8af4a authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Minor change to make usinf sorted tables (sorttable.js) easier; rather

then putting in javascript below each sorted table, instead call
AddSortedTable($table_id), which will cause a block of javascript to
get spit out in the page footer.
parent 7b25feb8
No related branches found
No related tags found
No related merge requests found
......@@ -13,6 +13,7 @@ $autorefresh = 0;
$javascript_debug = 0;
$currentusage = 1;
$currently_busy = 0;
$sortedtables = array();
$bodyclosestring = "";
#
......@@ -42,6 +43,13 @@ else {
$nextsidebarcl = "";
$nextsubmenucl = "";
# Add a table id to the list of sorted tables to initialize on current page.
function AddSortedTable($id) {
global $sortedtables;
$sortedtables[] = $id;
}
#
# TOPBARCELL - Make a cell for the topbar. Actually, the name lies, it can be
# used for cells in a bottombar too.
......@@ -967,6 +975,15 @@ function PAGEFOOTER($view = NULL) {
# Plug the home site from all others.
echo "\n<p><a href=\"www.emulab.net/netemu.php3\"></a>\n";
# Prime all the sortable tables.
if (count($sortedtables)) {
echo "<script type='text/javascript' language='javascript'>\n";
foreach ($sortedtables as $i => $id) {
echo "sorttable.makeSortable(getObjbyName('$id'));\n";
}
echo "</script>\n";
}
# This has to be after all the tooltip definitions.
echo "<script type='text/javascript' src='${TBBASE}/js/wz_tooltip.js'>".
"</script>";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment