From 92891ef3f2b5277ead025a076ca4176b83fdd01b Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Fri, 4 Jul 2003 18:06:44 +0000 Subject: [PATCH] Changed order of attrib format params SVN revision: 575 --- doc/config.html | 30 ++++++++++++++++-------------- src/elogd.c | 29 ++++++++++++++++------------- 2 files changed, 32 insertions(+), 27 deletions(-) diff --git a/doc/config.html b/doc/config.html index 64a47610..a74fe12e 100755 --- a/doc/config.html +++ b/doc/config.html @@ -817,11 +817,24 @@ listed here to display a date filter. Using that filter, the last day, week, mon on can be displayed.

-

  • Format <attribute> = <width>,<size>,<flags>,<css_class_name>,<css_class_value> +
  • Format <attribute> = <flags>,<css_class_name>,<css_class_value>,<width>,<size>
    Optional formatting parameters for attributes. Following items can be defined in the comma-separated list:

    +Values used for single message display page: +

    +

    + Values used for new message entry form:

    -Values used for single message display page: -

    -

    -Default is "80, 500, 0, attribname, attribvalue". +Default is "0, attribname, attribvalue, 80, 500". Trailing parameters can be ommitted, +so specifying for example only the flags is possible. diff --git a/src/elogd.c b/src/elogd.c index 01c20777..c0118271 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -6,6 +6,9 @@ Contents: Web server program for Electronic Logbook ELOG $Log$ + Revision 1.128 2003/07/04 18:06:44 midas + Changed order of attrib format params + Revision 1.127 2003/07/04 16:06:50 midas Removed width from attrname cells (should be in CSS now) @@ -5719,16 +5722,16 @@ char fl[8][NAME_LENGTH]; if (getcfg(lbs->name, str, format)) { n = strbreak(format, fl, 8); - if (n > 0 && atoi(fl[0]) > 0) - input_size = atoi(fl[0]); - if (n > 1 && atoi(fl[1]) > 0) - input_maxlen = atoi(fl[1]); + if (n > 0) + format_flags = atoi(fl[0]); + if (n > 1) + strlcpy(class_name, fl[1], sizeof(class_name)); if (n > 2) - format_flags = atoi(fl[2]); - if (n > 3) - strlcpy(class_name, fl[3], sizeof(class_name)); - if (n > 4) - strlcpy(class_value, fl[4], sizeof(class_value)); + strlcpy(class_value, fl[2], sizeof(class_value)); + if (n > 3 && atoi(fl[3]) > 0) + input_size = atoi(fl[3]); + if (n > 4 && atoi(fl[4]) > 0) + input_maxlen = atoi(fl[4]); } strcpy(star, (attr_flags[index] & AF_REQUIRED) ? "*" : ""); @@ -11050,10 +11053,10 @@ BOOL first; if (getcfg(lbs->name, str, format)) { n = strbreak(format, fl, 8); - if (n > 3) - strlcpy(class_name, fl[3], sizeof(class_name)); - if (n > 4) - strlcpy(class_value, fl[4], sizeof(class_value)); + if (n > 1) + strlcpy(class_name, fl[1], sizeof(class_name)); + if (n > 2) + strlcpy(class_value, fl[2], sizeof(class_value)); } if ((format_flags[i] & AFF_SAME_LINE) == 0)