From 1428e79e3d3412740cfecf553a1ca1d544fc82f9 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Wed, 7 Jul 2010 15:22:07 +0000 Subject: [PATCH] new CSS classes --- lam/docs/devel/upgrade.htm | 10 +++++++++- lam/lib/lists.inc | 16 +++++++++++----- lam/lib/modules.inc | 14 +++++++------- lam/style/500_layout.css | 6 ++++++ lam/style/600_type_asteriskExt.css | 15 +++++---------- lam/style/600_type_dhcp.css | 14 +++++--------- lam/style/600_type_group.css | 15 +++++---------- lam/style/600_type_host.css | 15 +++++---------- lam/style/600_type_mailAlias.css | 15 +++++---------- lam/style/600_type_netgroup.css | 15 +++++---------- lam/style/600_type_smbDomain.css | 15 +++++---------- lam/style/600_type_user.css | 20 +++++++------------- lam/templates/lib/list.js | 16 ++-------------- lam/templates/serverInfo.php | 16 ++++++++-------- lam/templates/tests/index.php | 4 ++-- lam/templates/tests/lamdaemonTest.php | 10 +++++----- lam/templates/tools.php | 2 +- 17 files changed, 93 insertions(+), 125 deletions(-) diff --git a/lam/docs/devel/upgrade.htm b/lam/docs/devel/upgrade.htm index d6cec5e2..bf40688d 100644 --- a/lam/docs/devel/upgrade.htm +++ b/lam/docs/devel/upgrade.htm @@ -24,7 +24,15 @@ This is a list of API changes for all LAM releases.
-

3.0.0 -> 3.1.0

Module interface: There is a new object-oriented library to +

3.1.0 -> 3.2.0

Account types:The CSS classes have changed. + +
+
+

3.0.0 -> 3.1.0

Module interface: There is a new object-oriented library to generate HTML for the account modules (e.g. used for display_html_attributes()). This will allow additional functionality like client side validation. Please see lib/html.inc or package diff --git a/lam/lib/lists.inc b/lam/lib/lists.inc index 946c1677..3e427dcb 100644 --- a/lam/lib/lists.inc +++ b/lam/lib/lists.inc @@ -307,8 +307,8 @@ class lamList { */ protected function listPrintTableHeader() { // print table header - echo "type . "list\" width=\"100%\">\n"; - echo "type . "list-head\">\n\n\n"; + echo "
type . "list\" width=\"100%\">\n"; + echo "type . "list-dark\">\n\n\n"; // table header for ($k = 0; $k < sizeof($this->descArray); $k++) { if (strtolower($this->attrArray[$k]) == $this->sortColumn) { @@ -326,7 +326,7 @@ class lamList { echo "\n"; // print filter row - echo "type . "list\">\n"; + echo "type . "list-bright\">\n"; echo "\n"; @@ -362,7 +362,13 @@ class lamList { // print account list for ($i = $table_begin; $i < $table_end; $i++) { $rowID = base64_encode($info[$i]['dn']); - echo("type . "list\" onMouseOver=\"list_over(this, '" . $rowID . "', '" . $this->type . "')\"\n" . + if ((($i - $table_begin) % 2) == 1) { + $classes = ' ' . $this->type . 'list-bright'; + } + else { + $classes = ' ' . $this->type . 'list-dark'; + } + echo("type . "')\"\n" . " onMouseOut=\"list_out(this, '" . $rowID . "', '" . $this->type . "')\"\n" . " onClick=\"list_click(this, '" . $rowID . "', '" . $this->type . "')\"\n" . " onDblClick=\"top.location.href='../account/edit.php?type=" . $this->type . "&DN=" . rawurlencode($info[$i]['dn']) . "'\">\n"); @@ -381,7 +387,7 @@ class lamList { } // display select all link $colspan = sizeof($this->attrArray) + 1; - echo "type . "list\">\n"; + echo "type . "list-bright\">\n"; echo "\n"; echo "\n"; diff --git a/lam/lib/modules.inc b/lam/lib/modules.inc index 19ca3c2d..424f2284 100644 --- a/lam/lib/modules.inc +++ b/lam/lib/modules.inc @@ -1237,18 +1237,18 @@ class accountContainer { } echo "
\n"; // create module menu - echo "
"; printHelpLink(getHelp('', '250'), '250'); echo "
\"select " . "" . _("Select all") . "
type."list\" border=0 width=\"100%\" style=\"border-collapse: collapse;\">\n"; - echo "type."list\" valign=\"top\">
"; + echo "type."list-bright\" border=0 width=\"100%\" style=\"border-collapse: collapse;\">\n"; + echo "type."list-bright\" valign=\"top\">\n"; // content header - echo "type . "list\">\n"; + echo "type . "list-bright\">\n"; echo "\n"; echo "\n"; - echo "type . "list\">\n"; + echo "type . "list-bright\">\n"; // content area echo "
"; // tab menu $this->printModuleTabs(); echo "
\n"; $this->printContentHeader(); echo "
"; // display html-code from modules @@ -1273,16 +1273,16 @@ class accountContainer { } // create module menu echo "
type."list\" border=0 width=\"100%\" style=\"border-collapse: collapse;\">\n"; - echo "type . "list\">"; + echo "type . "list-bright\">"; echo " \n"; echo ""; echo "\n"; - echo "type . "list\">type . "list-bright\">\n"; - echo "type . "list\">type . "list-bright\">
 \"key.png\" " . _("Set password") . "   \n"; printHelpLink(getHelp(null, 404), 404); echo " 
\n"; + echo "
\n"; echo "
\n"; echo "
\n"; + echo "
\n"; echo "\n"; echo "\n\n"; + echo "\n\n"; flush(); $lamdaemonOk = false; $output = $handle->exec("sudo " . $_SESSION['config']->get_scriptPath() . ' ' . escapeshellarg($command)); @@ -173,10 +173,10 @@ function lamRunLamdaemonTestSuite($serverName, $serverTitle, $testQuota) { flush(); $stopTest = false; - echo "\n\n"; + echo "\n\n"; // check script server and path - echo "\n\n"; + echo "\n\n"; if (!isset($serverName) || (strlen($serverName) < 3)) { echo "\n"; echo ""; @@ -196,7 +196,7 @@ function lamRunLamdaemonTestSuite($serverName, $serverTitle, $testQuota) { // check Unix account of LAM admin if (!$stopTest) { - echo "\n\n"; + echo "\n\n"; $credentials = $_SESSION['ldap']->decrypt_login(); $unixOk = false; $sr = @ldap_read($_SESSION['ldap']->server(), $credentials[0], "objectClass=posixAccount", array('uid')); @@ -223,7 +223,7 @@ function lamRunLamdaemonTestSuite($serverName, $serverTitle, $testQuota) { // check SSH login if (!$stopTest) { - echo "\n\n"; + echo "\n\n"; flush(); $sshOk = false; $handle = lamTestConnectSSH($serverName); diff --git a/lam/templates/tools.php b/lam/templates/tools.php index 6d7ed1c8..6b6f67e3 100644 --- a/lam/templates/tools.php +++ b/lam/templates/tools.php @@ -70,7 +70,7 @@ for ($i = 0; $i < sizeof($tools); $i++) { continue; } // print tool - echo "\n"; + echo "\n"; echo "\n"; echo "
\n"; echo _('Password') . ''; diff --git a/lam/style/500_layout.css b/lam/style/500_layout.css index 7aea2352..f059b9a2 100644 --- a/lam/style/500_layout.css +++ b/lam/style/500_layout.css @@ -74,6 +74,12 @@ legend { color:blue; } +tr.highlight { + border-color: red; + border-style: dotted; + border-width: 1px 0px 1px 0px; +} + table.settingsTab { border-width:0px; border-style:solid; diff --git a/lam/style/600_type_asteriskExt.css b/lam/style/600_type_asteriskExt.css index c3ce532d..5d668b5a 100644 --- a/lam/style/600_type_asteriskExt.css +++ b/lam/style/600_type_asteriskExt.css @@ -2,7 +2,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2009 Roland Gruber + Copyright (C) 2009 - 2010 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -68,13 +68,13 @@ table.asteriskExtlist input, table.asteriskExtlist select, table.asteriskExtlist background-color:#ffe27f; } -/* color of entry rows */ -tr.asteriskExtlist { +/* color of bright rows */ +tr.asteriskExtlist-bright { background-color:#fff3c8; } -/* color of head row */ -tr.asteriskExtlist-head { +/* color of dark rows */ +tr.asteriskExtlist-dark { background-color:#ffe27f; } @@ -83,11 +83,6 @@ th.asteriskExtlist-sort { background-color:#fff3c8; } -/* color of rows on mouseOver */ -tr.asteriskExtlist-over { - background-color:#ffe27f; -} - /* color of checked rows */ tr.asteriskExtlist-checked { background-color:#f27c71; diff --git a/lam/style/600_type_dhcp.css b/lam/style/600_type_dhcp.css index a9cc69ff..bf4117b3 100644 --- a/lam/style/600_type_dhcp.css +++ b/lam/style/600_type_dhcp.css @@ -3,6 +3,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) Copyright (C) 2008 Thomas Manninger + 2010 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -68,13 +69,13 @@ table.dhcplist input, table.dhcplist select, table.dhcplist button { background-color:#bde178; } -/* color of entry rows */ -tr.dhcplist { +/* color of bright rows */ +tr.dhcplist-bright { background-color:#d4f19b; } -/* color of head row */ -tr.dhcplist-head { +/* color of dark rows */ +tr.dhcplist-dark { background-color:#9fc653; } @@ -83,11 +84,6 @@ th.dhcplist-sort { background-color:#bce077; } -/* color of rows on mouseOver */ -tr.dhcplist-over { - background-color:#f3ffdc; -} - /* color of checked rows */ tr.dhcplist-checked { background-color:#a2bf6b; diff --git a/lam/style/600_type_group.css b/lam/style/600_type_group.css index f45efa82..c7fc2a40 100644 --- a/lam/style/600_type_group.css +++ b/lam/style/600_type_group.css @@ -2,7 +2,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2005-2006 Roland Gruber + Copyright (C) 2005-2010 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -68,13 +68,13 @@ table.grouplist input, table.grouplist select, table.grouplist button { background-color:#a8c3ff; } -/* color of entry rows */ -tr.grouplist { +/* color of bright rows */ +tr.grouplist-bright { background-color:#d6e3ff; } -/* color of head row */ -tr.grouplist-head { +/* color of dark rows */ +tr.grouplist-dark { background-color:#a8c3ff; } @@ -83,11 +83,6 @@ th.grouplist-sort { background-color:#d6e3ff; } -/* color of rows on mouseOver */ -tr.grouplist-over { - background-color:#a8c3ff; -} - /* color of checked rows */ tr.grouplist-checked { background-color:#f27c71; diff --git a/lam/style/600_type_host.css b/lam/style/600_type_host.css index f475f4c8..1d14203f 100644 --- a/lam/style/600_type_host.css +++ b/lam/style/600_type_host.css @@ -2,7 +2,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2005-2006 Roland Gruber + Copyright (C) 2005-2010 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -68,13 +68,13 @@ table.hostlist input, table.hostlist select, table.hostlist button { background-color:#ffc4ba; } -/* color of entry rows */ -tr.hostlist { +/* color of bright rows */ +tr.hostlist-bright { background-color:#ffe2dd; } -/* color of head row */ -tr.hostlist-head { +/* color of dark rows */ +tr.hostlist-dark { background-color:#ffc4ba; } @@ -83,11 +83,6 @@ th.hostlist-sort { background-color:#ffe2dd; } -/* color of rows on mouseOver */ -tr.hostlist-over { - background-color:#ffc4ba; -} - /* color of checked rows */ tr.hostlist-checked { background-color:#f27c71; diff --git a/lam/style/600_type_mailAlias.css b/lam/style/600_type_mailAlias.css index c9d2cbe4..978a47dc 100644 --- a/lam/style/600_type_mailAlias.css +++ b/lam/style/600_type_mailAlias.css @@ -2,7 +2,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2005-2006 Roland Gruber + Copyright (C) 2005-2010 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -68,13 +68,13 @@ table.mailAliaslist input, table.mailAliaslist select, table.mailAliaslist butto background-color:#ffe27f; } -/* color of entry rows */ -tr.mailAliaslist { +/* color of bright rows */ +tr.mailAliaslist-bright { background-color:#fff3c8; } -/* color of head row */ -tr.mailAliaslist-head { +/* color of dark rows */ +tr.mailAliaslist-dark { background-color:#ffe27f; } @@ -83,11 +83,6 @@ th.mailAliaslist-sort { background-color:#fff3c8; } -/* color of rows on mouseOver */ -tr.mailAliaslist-over { - background-color:#ffe27f; -} - /* color of checked rows */ tr.mailAliaslist-checked { background-color:#f27c71; diff --git a/lam/style/600_type_netgroup.css b/lam/style/600_type_netgroup.css index 46283eb4..975e8990 100644 --- a/lam/style/600_type_netgroup.css +++ b/lam/style/600_type_netgroup.css @@ -2,7 +2,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2009 Roland Gruber + Copyright (C) 2009 - 2010 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -68,13 +68,13 @@ table.netgrouplist input, table.netgrouplist select, table.netgrouplist button { background-color:#a8c3ff; } -/* color of entry rows */ -tr.netgrouplist { +/* color of bright rows */ +tr.netgrouplist-bright { background-color:#d6e3ff; } -/* color of head row */ -tr.netgrouplist-head { +/* color of dark rows */ +tr.netgrouplist-dark { background-color:#a8c3ff; } @@ -83,11 +83,6 @@ th.netgrouplist-sort { background-color:#d6e3ff; } -/* color of rows on mouseOver */ -tr.netgrouplist-over { - background-color:#a8c3ff; -} - /* color of checked rows */ tr.netgrouplist-checked { background-color:#f27c71; diff --git a/lam/style/600_type_smbDomain.css b/lam/style/600_type_smbDomain.css index 3428998b..b40c0a02 100644 --- a/lam/style/600_type_smbDomain.css +++ b/lam/style/600_type_smbDomain.css @@ -2,7 +2,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2005-2006 Roland Gruber + Copyright (C) 2005-2010 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -68,13 +68,13 @@ table.smbDomainlist input, table.smbDomainlist select, table.smbDomainlist butto background-color:#a8ddbf; } -/* color of entry rows */ -tr.smbDomainlist { +/* color of bright rows */ +tr.smbDomainlist-bright { background-color:#c9ddd2; } -/* color of head row */ -tr.smbDomainlist-head { +/* color of dark rows */ +tr.smbDomainlist-dark { background-color:#a8ddbf; } @@ -83,11 +83,6 @@ th.smbDomainlist-sort { background-color:#c9ddd2; } -/* color of rows on mouseOver */ -tr.smbDomainlist-over { - background-color:#a8ddbf; -} - /* color of checked rows */ tr.smbDomainlist-checked { background-color:#f27c71; diff --git a/lam/style/600_type_user.css b/lam/style/600_type_user.css index 9e083656..ba6a3554 100644 --- a/lam/style/600_type_user.css +++ b/lam/style/600_type_user.css @@ -2,7 +2,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2005-2006 Roland Gruber + Copyright (C) 2005-2010 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -46,20 +46,14 @@ table.userlist input, table.userlist select, table.userlist button { background-color:#fff2a3; } -/* color of entry rows */ -tr.userlist { - background-color:#fffde2; +/* color of bright rows */ +tr.userlist-bright { + background-color:#fffde2; } -/* color of head row */ -tr.userlist-head { - background-color:#fff2a3; - font-weight:bold; -} - -/* color of rows on mouseOver */ -tr.userlist-over { - background-color:#fff2a3; +/* color of dark rows */ +tr.userlist-dark { + background-color:#fff2a3; } /* color of checked rows */ diff --git a/lam/templates/lib/list.js b/lam/templates/lib/list.js index eff00f18..28802af3 100644 --- a/lam/templates/lib/list.js +++ b/lam/templates/lib/list.js @@ -23,32 +23,20 @@ $Id$ function list_over(list, box, scope) { - cbox = document.getElementsByName(box)[0]; - if (cbox.checked == false) { - list.setAttribute('className', scope + 'list-over', 0); - list.setAttribute('class', scope + 'list-over', 0); - } + jQuery(list).addClass('highlight'); } function list_out(list, box, scope) { - cbox = document.getElementsByName(box)[0]; - if (cbox.checked == false) { - list.setAttribute('className', scope + 'list', 0); - list.setAttribute('class', scope + 'list', 0); - } + jQuery(list).removeClass('highlight'); } function list_click(list, box, scope) { cbox = document.getElementsByName(box)[0]; if (cbox.checked == true) { cbox.checked = false; - list.setAttribute('className', scope + 'list-over', 0); - list.setAttribute('class', scope + 'list-over', 0); } else { cbox.checked = true; - list.setAttribute('className', scope + 'list-checked', 0); - list.setAttribute('class', scope + 'list-checked', 0); } } diff --git a/lam/templates/serverInfo.php b/lam/templates/serverInfo.php index a7d8fbb9..2754d77b 100644 --- a/lam/templates/serverInfo.php +++ b/lam/templates/serverInfo.php @@ -90,35 +90,35 @@ echo "

" . _("Server information") . "

\n"; echo "\n"; -echo ""; +echo ""; echo ""; -echo ""; +echo ""; echo ""; if ($configcontext != '') { - echo ""; + echo ""; echo ""; } -echo ""; +echo ""; echo ""; if ($dynamicSubtrees != '') { - echo ""; + echo ""; echo ""; } -echo ""; +echo ""; echo ""; if ($vendorname != '') { - echo ""; + echo ""; echo ""; } if ($vendorversion != '') { - echo ""; + echo ""; echo ""; } diff --git a/lam/templates/tests/index.php b/lam/templates/tests/index.php index 9c1e77bd..7d26b162 100644 --- a/lam/templates/tests/index.php +++ b/lam/templates/tests/index.php @@ -47,10 +47,10 @@ echo "

" . _("LAM tests") . "

\n"; echo "
" . _("Managed suffixes") . "  
" . _("Managed suffixes") . "  " . $namingContexts . "
" . _("LDAP version") . "  
" . _("LDAP version") . "  " . $supportedldapversion . "
" . _("Config suffix") . "  
" . _("Config suffix") . "  " . $configcontext . "
" . _("Schema suffix") . "  
" . _("Schema suffix") . "  " . $subschemasubentry . "
" . _("Dynamic subtrees") . "  
" . _("Dynamic subtrees") . "  " . $dynamicSubtrees . "
" . _("SASL mechanisms") . "  
" . _("SASL mechanisms") . "  " . $supportedsaslmechanisms . "
" . _("Vendor name") . "  
" . _("Vendor name") . "  " . $vendorname . "
" . _("Vendor version") . "  
" . _("Vendor version") . "  " . $vendorversion . "
\n"; -echo ""; +echo ""; echo ""; -echo ""; +echo ""; echo ""; echo "
" . _("Lamdaemon test") . "  
" . _("Lamdaemon test") . "  " . _("Check if quotas and homedirectories can be managed.") . "
" . _("Schema test") . "  
" . _("Schema test") . "  " . _("Check if the LDAP schema fits the requirements of the selected account modules.") . "
\n"; diff --git a/lam/templates/tests/lamdaemonTest.php b/lam/templates/tests/lamdaemonTest.php index dbfd3a8a..417e192b 100644 --- a/lam/templates/tests/lamdaemonTest.php +++ b/lam/templates/tests/lamdaemonTest.php @@ -125,7 +125,7 @@ function lamTestLamdaemon($command, $stopTest, $handle, $testText) { $failImage = "\"\"\n"; // run lamdaemon and get user quotas if (!$stopTest) { - echo "
" . $testText . "  
" . $testText . "  
$serverTitle\n
$serverTitle\n
" . _("Lamdaemon server and path") . "  
" . _("Lamdaemon server and path") . "  " . $failImage . "" . _("No lamdaemon server set, please update your LAM configuration settings.") . "
" . _("Unix account") . "  
" . _("Unix account") . "  
" . _("SSH connection") . "  
" . _("SSH connection") . "  
   
"; echo "getLink() . "\">";