new CSS classes

This commit is contained in:
Roland Gruber 2010-07-07 15:22:07 +00:00
parent c93ce1d983
commit 1428e79e3d
17 changed files with 93 additions and 125 deletions

View File

@ -24,7 +24,15 @@ This is a list of API changes for all LAM releases.
<br>
<h2>3.0.0 -&gt; 3.1.0</h2><span style="font-weight: bold;">Module interface:</span> There is a new object-oriented library to
<h2>3.1.0 -&gt; 3.2.0</h2><span style="font-weight: bold;">Account types:</span>The CSS classes have changed.
<ul>
<li>tr.TYPElist-over: removed without replacement</li>
<li>tr.TYPElist: renamed to tr.TYPElist-bright</li>
<li>tr.TYPElist-head: renamed to tr.TYPElist-dark</li>
</ul>
<br>
<br>
<br><h2>3.0.0 -&gt; 3.1.0</h2><span style="font-weight: bold;">Module interface:</span> 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

View File

@ -307,8 +307,8 @@ class lamList {
*/
protected function listPrintTableHeader() {
// print table header
echo "<table rules=\"all\" class=\"" . $this->type . "list\" width=\"100%\">\n";
echo "<tr class=\"" . $this->type . "list-head\">\n<th width=22 height=34></th>\n<th></th>\n";
echo "<table frame=\"box\" rules=\"none\" class=\"" . $this->type . "list\" width=\"100%\">\n";
echo "<tr class=\"" . $this->type . "list-dark\">\n<th width=22 height=34></th>\n<th></th>\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 "</tr>\n";
// print filter row
echo "<tr align=\"center\" class=\"" . $this->type . "list\">\n";
echo "<tr align=\"center\" class=\"" . $this->type . "list-bright\">\n";
echo "<td width=22 height=34>";
printHelpLink(getHelp('', '250'), '250');
echo "</td>\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("<tr class=\"" . $this->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("<tr class=\"$classes\" onMouseOver=\"list_over(this, '" . $rowID . "', '" . $this->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 . "&amp;DN=" . rawurlencode($info[$i]['dn']) . "'\">\n");
@ -381,7 +387,7 @@ class lamList {
}
// display select all link
$colspan = sizeof($this->attrArray) + 1;
echo "<tr class=\"" . $this->type . "list\">\n";
echo "<tr class=\"" . $this->type . "list-bright\">\n";
echo "<td align=\"center\"><img src=\"../../graphics/select.png\" alt=\"select all\"></td>\n";
echo "<td colspan=$colspan>&nbsp;<a href=\"#\" onClick=\"list_switchAccountSelection();\">" .
"<font color=\"black\"><b>" . _("Select all") . "</b></font></a></td>\n";

View File

@ -1237,18 +1237,18 @@ class accountContainer {
}
echo "<br>\n";
// create module menu
echo "<table class=\"".$this->type."list\" border=0 width=\"100%\" style=\"border-collapse: collapse;\">\n";
echo "<tr class=\"".$this->type."list\" valign=\"top\"><td style=\"border-bottom: 1px solid;padding:0px;\" colspan=2>";
echo "<table class=\"".$this->type."list-bright\" border=0 width=\"100%\" style=\"border-collapse: collapse;\">\n";
echo "<tr class=\"".$this->type."list-bright\" valign=\"top\"><td style=\"border-bottom: 1px solid;padding:0px;\" colspan=2>";
// tab menu
$this->printModuleTabs();
echo "</td></tr>\n";
// content header
echo "<tr class=\"" . $this->type . "list\">\n";
echo "<tr class=\"" . $this->type . "list-bright\">\n";
echo "<td style=\"padding:10px;\">\n";
$this->printContentHeader();
echo "</td>\n";
echo "</tr>\n";
echo "<tr class=\"" . $this->type . "list\">\n";
echo "<tr class=\"" . $this->type . "list-bright\">\n";
// content area
echo "<td width=\"100%\" style=\"padding:10px;\">";
// display html-code from modules
@ -1273,16 +1273,16 @@ class accountContainer {
}
// create module menu
echo "<br><table class=\"".$this->type."list\" border=0 width=\"100%\" style=\"border-collapse: collapse;\">\n";
echo "<tr class=\"" . $this->type . "list\">";
echo "<tr class=\"" . $this->type . "list-bright\">";
echo "<td nowrap>&nbsp;<img alt=\"key.png\" src=\"../../graphics/key.png\">&nbsp;</td> \n";
echo "<td nowrap>" . _("Set password") . "&nbsp;&nbsp;&nbsp;</td>";
echo "<td>\n";
printHelpLink(getHelp(null, 404), 404);
echo "</td><td width=\"100%\">&nbsp;</td>\n";
echo "<tr class=\"" . $this->type . "list\"><td colspan=4>\n";
echo "<tr class=\"" . $this->type . "list-bright\"><td colspan=4>\n";
echo "<hr class=\"modulePage\" noshade>\n";
echo "</td></tr>\n";
echo "<tr class=\"" . $this->type . "list\"><td colspan=4>\n";
echo "<tr class=\"" . $this->type . "list-bright\"><td colspan=4>\n";
echo "<table>\n";
echo "<tr><td>\n";
echo _('Password') . '</td><td><input type="password" name="newPassword1" tabindex=1>';

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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,19 +46,13 @@ table.userlist input, table.userlist select, table.userlist button {
background-color:#fff2a3;
}
/* color of entry rows */
tr.userlist {
/* 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 {
/* color of dark rows */
tr.userlist-dark {
background-color:#fff2a3;
}

View File

@ -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);
}
}

View File

@ -90,35 +90,35 @@ echo "<h1>" . _("Server information") . "</h1>\n";
echo "<table class=\"userlist\" rules=\"none\">\n";
echo "<tr class=\"userlist\"><td style=\"padding:10px;\"><b>" . _("Managed suffixes") . "</b>&nbsp;&nbsp;</td>";
echo "<tr class=\"userlist-bright\"><td style=\"padding:10px;\"><b>" . _("Managed suffixes") . "</b>&nbsp;&nbsp;</td>";
echo "<td style=\"padding:10px;\">" . $namingContexts . "</td></tr>";
echo "<tr class=\"userlist\"><td style=\"padding:10px;\"><b>" . _("LDAP version") . "</b>&nbsp;&nbsp;</td>";
echo "<tr class=\"userlist-bright\"><td style=\"padding:10px;\"><b>" . _("LDAP version") . "</b>&nbsp;&nbsp;</td>";
echo "<td style=\"padding:10px;\">" . $supportedldapversion . "</td></tr>";
if ($configcontext != '') {
echo "<tr class=\"userlist\"><td style=\"padding:10px;\"><b>" . _("Config suffix") . "</b>&nbsp;&nbsp;</td>";
echo "<tr class=\"userlist-bright\"><td style=\"padding:10px;\"><b>" . _("Config suffix") . "</b>&nbsp;&nbsp;</td>";
echo "<td style=\"padding:10px;\">" . $configcontext . "</td></tr>";
}
echo "<tr class=\"userlist\"><td style=\"padding:10px;\"><b>" . _("Schema suffix") . "</b>&nbsp;&nbsp;</td>";
echo "<tr class=\"userlist-bright\"><td style=\"padding:10px;\"><b>" . _("Schema suffix") . "</b>&nbsp;&nbsp;</td>";
echo "<td style=\"padding:10px;\">" . $subschemasubentry . "</td></tr>";
if ($dynamicSubtrees != '') {
echo "<tr class=\"userlist\"><td style=\"padding:10px;\"><b>" . _("Dynamic subtrees") . "</b>&nbsp;&nbsp;</td>";
echo "<tr class=\"userlist-bright\"><td style=\"padding:10px;\"><b>" . _("Dynamic subtrees") . "</b>&nbsp;&nbsp;</td>";
echo "<td style=\"padding:10px;\">" . $dynamicSubtrees . "</td></tr>";
}
echo "<tr class=\"userlist\"><td style=\"padding:10px;\"><b>" . _("SASL mechanisms") . "</b>&nbsp;&nbsp;</td>";
echo "<tr class=\"userlist-bright\"><td style=\"padding:10px;\"><b>" . _("SASL mechanisms") . "</b>&nbsp;&nbsp;</td>";
echo "<td style=\"padding:10px;\">" . $supportedsaslmechanisms . "</td></tr>";
if ($vendorname != '') {
echo "<tr class=\"userlist\"><td style=\"padding:10px;\"><b>" . _("Vendor name") . "</b>&nbsp;&nbsp;</td>";
echo "<tr class=\"userlist-bright\"><td style=\"padding:10px;\"><b>" . _("Vendor name") . "</b>&nbsp;&nbsp;</td>";
echo "<td style=\"padding:10px;\">" . $vendorname . "</td></tr>";
}
if ($vendorversion != '') {
echo "<tr class=\"userlist\"><td style=\"padding:10px;\"><b>" . _("Vendor version") . "</b>&nbsp;&nbsp;</td>";
echo "<tr class=\"userlist-bright\"><td style=\"padding:10px;\"><b>" . _("Vendor version") . "</b>&nbsp;&nbsp;</td>";
echo "<td style=\"padding:10px;\">" . $vendorversion . "</td></tr>";
}

View File

@ -47,10 +47,10 @@ echo "<h1>" . _("LAM tests") . "</h1>\n";
echo "<table class=\"userlist\" rules=\"none\">\n";
echo "<tr class=\"userlist\"><td style=\"padding:10px;\"><a href=\"lamdaemonTest.php\"><b>" . _("Lamdaemon test") . "</b>&nbsp;&nbsp;</a></td>";
echo "<tr class=\"userlist-bright\"><td style=\"padding:10px;\"><a href=\"lamdaemonTest.php\"><b>" . _("Lamdaemon test") . "</b>&nbsp;&nbsp;</a></td>";
echo "<td style=\"padding:10px;\">" . _("Check if quotas and homedirectories can be managed.") . "</td></tr>";
echo "<tr class=\"userlist\"><td style=\"padding:10px;\"><a href=\"schemaTest.php\"><b>" . _("Schema test") . "</b>&nbsp;&nbsp;</a></td>";
echo "<tr class=\"userlist-bright\"><td style=\"padding:10px;\"><a href=\"schemaTest.php\"><b>" . _("Schema test") . "</b>&nbsp;&nbsp;</a></td>";
echo "<td style=\"padding:10px;\">" . _("Check if the LDAP schema fits the requirements of the selected account modules.") . "</td></tr>";
echo "</table>\n";

View File

@ -125,7 +125,7 @@ function lamTestLamdaemon($command, $stopTest, $handle, $testText) {
$failImage = "<img width=16 height=16 src=\"../../graphics/fail.png\" alt=\"\">\n";
// run lamdaemon and get user quotas
if (!$stopTest) {
echo "<tr class=\"userlist\">\n<td nowrap>" . $testText . "&nbsp;&nbsp;</td>\n";
echo "<tr class=\"userlist-bright\">\n<td nowrap>" . $testText . "&nbsp;&nbsp;</td>\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 "<tr class=\"userlist\">\n<td colspan=\"3\" align=\"center\"><b>$serverTitle</b>\n</td>\n</tr>";
echo "<tr class=\"userlist-bright\">\n<td colspan=\"3\" align=\"center\"><b>$serverTitle</b>\n</td>\n</tr>";
// check script server and path
echo "<tr class=\"userlist\">\n<td nowrap>" . _("Lamdaemon server and path") . "&nbsp;&nbsp;</td>\n";
echo "<tr class=\"userlist-bright\">\n<td nowrap>" . _("Lamdaemon server and path") . "&nbsp;&nbsp;</td>\n";
if (!isset($serverName) || (strlen($serverName) < 3)) {
echo "<td>" . $failImage . "</td>\n";
echo "<td>" . _("No lamdaemon server set, please update your LAM configuration settings.") . "</td>";
@ -196,7 +196,7 @@ function lamRunLamdaemonTestSuite($serverName, $serverTitle, $testQuota) {
// check Unix account of LAM admin
if (!$stopTest) {
echo "<tr class=\"userlist\">\n<td nowrap>" . _("Unix account") . "&nbsp;&nbsp;</td>\n";
echo "<tr class=\"userlist-bright\">\n<td nowrap>" . _("Unix account") . "&nbsp;&nbsp;</td>\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 "<tr class=\"userlist\">\n<td nowrap>" . _("SSH connection") . "&nbsp;&nbsp;</td>\n";
echo "<tr class=\"userlist-bright\">\n<td nowrap>" . _("SSH connection") . "&nbsp;&nbsp;</td>\n";
flush();
$sshOk = false;
$handle = lamTestConnectSSH($serverName);

View File

@ -70,7 +70,7 @@ for ($i = 0; $i < sizeof($tools); $i++) {
continue;
}
// print tool
echo "<tr class=\"userlist\">\n";
echo "<tr class=\"userlist-bright\">\n";
echo "<td>&nbsp;&nbsp;&nbsp;</td>\n";
echo "<td><br>";
echo "<a href=\"" . $tools[$i]->getLink() . "\">";