mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-14 20:33:48 +00:00
Added 'title bgcolor' and 'title fontcolor' in config file
SVN revision: 326
This commit is contained in:
parent
1776474c68
commit
1a86af617a
@ -11,6 +11,7 @@ Version 2.2.5, released Januar xxth, 2003
|
|||||||
- Added "Resource dir" and "Logbook dir"
|
- Added "Resource dir" and "Logbook dir"
|
||||||
- Replaced "Data dir" by "Subdir" in elogd.cfg
|
- Replaced "Data dir" by "Subdir" in elogd.cfg
|
||||||
- Put colors for group and logbook tabs into theme file
|
- Put colors for group and logbook tabs into theme file
|
||||||
|
- Added "Title bgcolor" and "Title fontcolor" in elogd.cfg
|
||||||
|
|
||||||
Version 2.2.4, released December 12th, 2002
|
Version 2.2.4, released December 12th, 2002
|
||||||
===========================================
|
===========================================
|
||||||
|
|||||||
@ -295,6 +295,14 @@ It contains all files for that theme. The format of these files is described und
|
|||||||
the <i>Themes</i> section.
|
the <i>Themes</i> section.
|
||||||
<p>
|
<p>
|
||||||
|
|
||||||
|
<LI><b><code>Title BGColor = <color></code></b>
|
||||||
|
<LI><b><code>Title Fontcolor = <color></code></b>
|
||||||
|
<br>
|
||||||
|
Determines the font and background colors of the title bar. Colors are specified
|
||||||
|
in the usual HTML format, like <i>white, black,</i> or <i>#808080</i> for hexadecimal
|
||||||
|
RGB values. See here for <a href="http://www.w3schools.com/html/html_colors.asp">more
|
||||||
|
examples</a>. The title colors are also used for the currently selected logbook tab.<p>
|
||||||
|
|
||||||
<LI><b><code>Date format = <string></code></b>
|
<LI><b><code>Date format = <string></code></b>
|
||||||
<br>
|
<br>
|
||||||
This option determines how the date of a logbook entry is displayed. The format
|
This option determines how the date of a logbook entry is displayed. The format
|
||||||
|
|||||||
44
elogd.c
44
elogd.c
@ -6,6 +6,9 @@
|
|||||||
Contents: Web server program for Electronic Logbook ELOG
|
Contents: Web server program for Electronic Logbook ELOG
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 2.127 2003/01/09 08:47:52 midas
|
||||||
|
Added 'title bgcolor' and 'title fontcolor' in config file
|
||||||
|
|
||||||
Revision 2.126 2003/01/08 16:01:57 midas
|
Revision 2.126 2003/01/08 16:01:57 midas
|
||||||
Fixed bug with style sheet
|
Fixed bug with style sheet
|
||||||
|
|
||||||
@ -3951,7 +3954,7 @@ int i;
|
|||||||
|
|
||||||
void show_standard_title(char *logbook, char *text, int printable)
|
void show_standard_title(char *logbook, char *text, int printable)
|
||||||
{
|
{
|
||||||
char str[256], ref[256];
|
char str[256], ref[256], bgcolor[32], fontcolor[32];
|
||||||
int i, j, n_grp, n_lb, nnum, level;
|
int i, j, n_grp, n_lb, nnum, level;
|
||||||
LBLIST clb, flb, nlb, lbl;
|
LBLIST clb, flb, nlb, lbl;
|
||||||
|
|
||||||
@ -4006,9 +4009,19 @@ LBLIST clb, flb, nlb, lbl;
|
|||||||
|
|
||||||
if (clb[i].member == NULL)
|
if (clb[i].member == NULL)
|
||||||
{
|
{
|
||||||
|
if (getcfg(clb[i].name, "Title BGcolor", str))
|
||||||
|
strlcpy(bgcolor, str, sizeof(bgcolor));
|
||||||
|
else
|
||||||
|
strlcpy(bgcolor, gt("LTab1 BGColor"), sizeof(bgcolor));
|
||||||
|
|
||||||
|
if (getcfg(clb[i].name, "Title Fontcolor", str))
|
||||||
|
strlcpy(fontcolor, str, sizeof(fontcolor));
|
||||||
|
else
|
||||||
|
strlcpy(fontcolor, gt("LTab1 Fontcolor"), sizeof(fontcolor));
|
||||||
|
|
||||||
rsprintf("<font size=3 face=verdana,arial,helvetica,sans-serif style=\"color:%s;background-color:%s\"> ",
|
rsprintf("<font size=3 face=verdana,arial,helvetica,sans-serif style=\"color:%s;background-color:%s\"> ",
|
||||||
gt("LTab1 Fontcolor"), gt("LTab1 BGColor"));
|
fontcolor, bgcolor);
|
||||||
rsprintf("<a style=\"text-decoration:none;color:%s\" href=\"../%s/\">", gt("LTab1 Fontcolor"), ref);
|
rsprintf("<a style=\"text-decoration:none;color:%s\" href=\"../%s/\">", fontcolor, ref);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -4033,6 +4046,7 @@ LBLIST clb, flb, nlb, lbl;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
strlcpy(str, clb[i].name, sizeof(str));
|
||||||
|
|
||||||
for (j=0 ; j<(int)strlen(str) ; j++)
|
for (j=0 ; j<(int)strlen(str) ; j++)
|
||||||
if (str[j] == ' ')
|
if (str[j] == ' ')
|
||||||
@ -4062,26 +4076,36 @@ LBLIST clb, flb, nlb, lbl;
|
|||||||
|
|
||||||
/*---- title row ----*/
|
/*---- title row ----*/
|
||||||
|
|
||||||
|
if (getcfg(logbook, "Title BGcolor", str))
|
||||||
|
strlcpy(bgcolor, str, sizeof(bgcolor));
|
||||||
|
else
|
||||||
|
strlcpy(bgcolor, gt("Title BGColor"), sizeof(bgcolor));
|
||||||
|
|
||||||
|
if (getcfg(logbook, "Title Fontcolor", str))
|
||||||
|
strlcpy(fontcolor, str, sizeof(fontcolor));
|
||||||
|
else
|
||||||
|
strlcpy(fontcolor, gt("Title Fontcolor"), sizeof(fontcolor));
|
||||||
|
|
||||||
rsprintf("<tr><td><table width=100%% border=0 cellpadding=%s cellspacing=0 bgcolor=#FFFFFF>\n",
|
rsprintf("<tr><td><table width=100%% border=0 cellpadding=%s cellspacing=0 bgcolor=#FFFFFF>\n",
|
||||||
gt("Title cellpadding"));
|
gt("Title cellpadding"));
|
||||||
|
|
||||||
/* left cell */
|
/* left cell */
|
||||||
rsprintf("<tr><td bgcolor=%s align=left>", gt("Title BGColor"));
|
rsprintf("<tr><td bgcolor=%s align=left>", bgcolor);
|
||||||
|
|
||||||
/* use comment as title if available, else logbook name */
|
/* use comment as title if available, else logbook name */
|
||||||
if (!getcfg(logbook, "Comment", str))
|
if (!getcfg(logbook, "Comment", str))
|
||||||
strcpy(str, logbook);
|
strcpy(str, logbook);
|
||||||
|
|
||||||
rsprintf("<font size=3 face=verdana,arial,helvetica,sans-serif color=%s><b> %s%s<b></font>\n",
|
rsprintf("<font size=3 face=verdana,arial,helvetica,sans-serif color=%s><b> %s%s<b></font>\n",
|
||||||
gt("Title fontcolor"), str, text);
|
fontcolor, str, text);
|
||||||
rsprintf(" </td>\n");
|
rsprintf(" </td>\n");
|
||||||
|
|
||||||
/* middle cell */
|
/* middle cell */
|
||||||
if (*getparam("full_name"))
|
if (*getparam("full_name"))
|
||||||
{
|
{
|
||||||
rsprintf("<td bgcolor=%s align=center>", gt("Title BGColor"));
|
rsprintf("<td bgcolor=%s align=center>", bgcolor);
|
||||||
rsprintf("<font size=3 face=verdana,arial,helvetica,sans-serif color=%s><b> %s \"%s\"<b></font></td>\n",
|
rsprintf("<font size=3 face=verdana,arial,helvetica,sans-serif color=%s><b> %s \"%s\"<b></font></td>\n",
|
||||||
gt("Title fontcolor"), loc("Logged in as"), getparam("full_name"));
|
fontcolor, loc("Logged in as"), getparam("full_name"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -4089,12 +4113,12 @@ LBLIST clb, flb, nlb, lbl;
|
|||||||
{
|
{
|
||||||
rsprintf("<td bgcolor=%s align=center>", gt("Title BGColor"));
|
rsprintf("<td bgcolor=%s align=center>", gt("Title BGColor"));
|
||||||
rsprintf("<font size=3 face=verdana,arial,helvetica,sans-serif color=%s><b> %s<b></font></td>\n",
|
rsprintf("<font size=3 face=verdana,arial,helvetica,sans-serif color=%s><b> %s<b></font></td>\n",
|
||||||
gt("Title fontcolor"), loc("Not logged in"));
|
fontcolor, loc("Not logged in"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* right cell */
|
/* right cell */
|
||||||
rsprintf("<td bgcolor=%s align=right>", gt("Title BGColor"));
|
rsprintf("<td bgcolor=%s align=right>", bgcolor);
|
||||||
|
|
||||||
if (*gt("Title image URL"))
|
if (*gt("Title image URL"))
|
||||||
rsprintf("<a href=\"%s\">\n", gt("Title image URL"));
|
rsprintf("<a href=\"%s\">\n", gt("Title image URL"));
|
||||||
@ -4103,7 +4127,7 @@ LBLIST clb, flb, nlb, lbl;
|
|||||||
rsprintf("<img border=0 src=\"%s\">", gt("Title image"));
|
rsprintf("<img border=0 src=\"%s\">", gt("Title image"));
|
||||||
else
|
else
|
||||||
rsprintf("<font size=3 face=verdana,arial,helvetica,sans-serif color=%s><b>ELOG V%s  </b></font>",
|
rsprintf("<font size=3 face=verdana,arial,helvetica,sans-serif color=%s><b>ELOG V%s  </b></font>",
|
||||||
gt("Title fontcolor"), VERSION);
|
fontcolor, VERSION);
|
||||||
|
|
||||||
if (*gt("Title image URL"))
|
if (*gt("Title image URL"))
|
||||||
rsprintf("</a>\n");
|
rsprintf("</a>\n");
|
||||||
|
|||||||
@ -12,14 +12,15 @@ Title image = elog.gif
|
|||||||
Title image URL = http://midas.psi.ch/elog
|
Title image URL = http://midas.psi.ch/elog
|
||||||
|
|
||||||
; Colors of logbook selection tabs
|
; Colors of logbook selection tabs
|
||||||
|
; L:Logbook, G:Group, 1:Selected, 2:Others
|
||||||
LTab1 BGColor = #486090
|
LTab1 BGColor = #486090
|
||||||
LTab1 Fontcolor = #FFFFFF
|
LTab1 Fontcolor = #FFFFFF
|
||||||
LTab2 BGColor = #E0E0E0
|
LTab2 BGColor = #E0E0E0
|
||||||
LTab2 Fontcolor = #FFFFFF
|
LTab2 Fontcolor = #606050
|
||||||
GTab1 BGColor = #486090
|
GTab1 BGColor = #486090
|
||||||
GTab1 Fontcolor = #FFFFFF
|
GTab1 Fontcolor = #FFFFFF
|
||||||
GTab2 BGColor = #FFFFB0
|
GTab2 BGColor = #D0E0C0
|
||||||
GTab2 Fontcolor = #C0C0C0
|
GTab2 Fontcolor = #606050
|
||||||
|
|
||||||
; Look of Menus
|
; Look of Menus
|
||||||
Merge menus = 1
|
Merge menus = 1
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user