Table Row Highlighting (SKINS)

Version 1.4

Feature
Finished

BETA - disabled by default only exists in "enhanced" skin at this time. When your mouse hovers over a row, that entire row will change to a darker background, to more easily track which value you're about to select. To enable, add the following to your directadmin.conf and restart DA: table_highlighting=1 The internal default is: table_highlighting=0 In a future version of DA, this will be enabled by default. It's disabled for now, for testing purposes. =================== SKINS: ------------ style.css: .listhighlight { BACKGROUND: #b8c0e2; white-space: nowrap; } .list2highlight { BACKGROUND: #b8c0e2; white-space: nowrap; } .listwraphighlight { BACKGROUND: #b8c0e2; white-space: wrap; } .listwrap2highlight { BACKGROUND: #b8c0e2; white-space: wrap; } ------------ header.html, in the <head> section: |*if TABLE_HIGHLIGHTING="1"| <script type="text/javascript"> <!-- // start preload code function tr_add_highlight() { add_highlight(this, 'list','listhighlight','list2','list2highlight','listwrap','listwraphighlight','listwrap2','listwrap2highlight'); } function tr_remove_highlight() { add_highlight(this, 'listhighlight','list','list2highlight','list2','listwraphighlight','listwrap','listwrap2highlight','listwrap2'); } function add_highlight(ob,h1,l1,h2,l2,h3,l3,h4,l4) { var tds = ob.getElementsByTagName('td'); for(var d=0; d<tds.length; d++) { switch (tds[d].className) { case h1 : tds[d].className = l1; break; case h2 : tds[d].className = l2; break; case h3 : tds[d].className = l3; break; case h4 : tds[d].className = l4; break; } } } function make_tables_highlightable() { var tables = document.getElementsByTagName('table'); for (var tbl=0; tbl<tables.length; tbl++) { if (tables[tbl].className.indexOf('table-highlight') != -1) { var trs = tables[tbl].getElementsByTagName('tr'); for(var tr=0; tr<trs.length; tr++) { trs[tr].onmouseover = tr_add_highlight; trs[tr].onmouseout = tr_remove_highlight; } } } } // done with preload code --> </script> |*endif| ------------ footer.html, just before </body>: |*if TABLE_HIGHLIGHTING="1"| <script type="text/javascript"> make_tables_highlightable(); </script> |*endif|

Interested to try DirectAdmin? Get a 30-day Free Trial!