# HG changeset patch # User Matti Hamalainen # Date 1385327373 -7200 # Node ID 85d74b8b7ae8d9a225a8208da785bd631cde02a4 # Parent 50e52dc439161a0e34333dc4927b6805a4763072 Use CSS instead of a table for votekey admin. diff -r 50e52dc43916 -r 85d74b8b7ae8 admajax.php --- a/admajax.php Sun Nov 24 23:03:14 2013 +0200 +++ b/admajax.php Sun Nov 24 23:09:33 2013 +0200 @@ -299,14 +299,13 @@ $keyLen = stGetSetting("userKeyLength"); $index = 0; - echo "\n"; foreach (stExecSQL($sql) as $item) { if ($index == 0) echo "\n"; // This funny code is to ensure that the cells are of uniform width - printf(""; - - if ($index++ >= 5) - { - echo "\n"; - $index = 0; - } + echo ""; } - if ($index > 0) - echo "\n"; - - echo "
%03d : ". "%s", $item["id"], @@ -318,18 +317,8 @@ $item["active"], "", "class=\"keyactive\" onClick=\"voteKeyActivated(".$item["id"].")\"", "xx")."\n"; } - echo "
\n"; break; case VOTE_ASSIGN: diff -r 50e52dc43916 -r 85d74b8b7ae8 admin.css --- a/admin.css Sun Nov 24 23:03:14 2013 +0200 +++ b/admin.css Sun Nov 24 23:09:33 2013 +0200 @@ -79,12 +79,10 @@ } -table.votekeys { +div.votekey { + display: inline-block; + margin: 0px; - padding: 0px; -} - -table.votekeys td { text-align: center; padding: 0.5em; background: black; @@ -93,10 +91,10 @@ border-bottom: 1pt dashed green; } -table.votekeys span.keyid { +div.votekey span.keyid { font-weight: bold; } -.keyactive { +div.votekeys .keyactive { margin-left: 1em; }