Mercurial > hg > fapweb
changeset 1070:e23057465ca2
Some more AJAX fixes.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 24 Jan 2017 17:37:50 +0200 |
parents | 5f92fa5e683a |
children | 76e11ae923a7 |
files | admajax.js.php admin.php |
diffstat | 2 files changed, 20 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/admajax.js.php Tue Jan 24 17:25:48 2017 +0200 +++ b/admajax.js.php Tue Jan 24 17:37:50 2017 +0200 @@ -1011,3 +1011,20 @@ { jsSendPOSTRequest("action=ctrl&type=skipToNextSlide"); } + + +document.addEventListener("DOMContentLoaded", +function () +{ + jsRegisterTab("CC", "Settings", "Settings"); + jsRegisterTab("CC", "News", "News"); + jsRegisterTab("CC", "Attendees", "Attendees"); + jsRegisterTab("CC", "Voting", "Voting"); + jsRegisterTab("CC", "Compos", "Compos"); + jsRegisterTab("CC", "Entries", "Entries"); + jsRegisterTab("CC", "InfoSys", "Infosystem"); + jsUpdateTabList("CC", + "<a class=\"admin\" href=\"admlogout.php\">Logout</a> " + + "<a class=\"admin\" href=\"about\">Mainpage</a>"); + jsSwitchActiveTab("CC", "Settings"); +});
--- a/admin.php Tue Jan 24 17:25:48 2017 +0200 +++ b/admin.php Tue Jan 24 17:37:50 2017 +0200 @@ -32,9 +32,7 @@ // Start output $pageCSS = "css/admin.css"; cmPrintPageHeader("FAPWeb Administration", - " <meta http-equiv=\"Pragma\" content=\"no-cache\" />\n". - " <script type=\"text/javascript\" src=\"admajax.js.php\"></script>\n". - " <script type=\"text/javascript\" src=\"genajax.js\"></script>\n", + " <meta http-equiv=\"Pragma\" content=\"no-cache\" />\n", FALSE); @@ -82,9 +80,8 @@ else { ?> -<script type="text/javascript" src="admin.js"></script> - -<!-- ========================== --> +<script type="text/javascript" src="admajax.js.php"></script> +<script type="text/javascript" src="genajax.js"></script> <div id="adminPopup"></div> <div id="adminContent"> @@ -96,21 +93,6 @@ <h1>Ehm, you need to enable JavaScript to use the admin interface.</h1> </noscript> </div> - - -<script type="text/javascript"> - jsRegisterTab("CC", "Settings", "Settings"); - jsRegisterTab("CC", "News", "News"); - jsRegisterTab("CC", "Attendees", "Attendees"); - jsRegisterTab("CC", "Voting", "Voting"); - jsRegisterTab("CC", "Compos", "Compos"); - jsRegisterTab("CC", "Entries", "Entries"); - jsRegisterTab("CC", "InfoSys", "Infosystem"); - jsUpdateTabList("CC", - "<a class=\"admin\" href=\"admlogout.php\">Logout</a> " + - "<a class=\"admin\" href=\"about\">Mainpage</a>"); - jsSwitchActiveTab("CC", "Settings"); -</script> <? }