diff --git a/doc/config.html b/doc/config.html index 37c409b9..2c36c225 100755 --- a/doc/config.html +++ b/doc/config.html @@ -2568,9 +2568,9 @@ Options Location = Main Building{a}, New Building{b}, Old Building{c} otherwise the first thread is displayed. Default for this setting is 1.
  • - Sort Attribute Options = 0|1
    - If this opeion is 1, all attribute options are sorted alphanumerically. This - can be handy when locating options from long lists in drop-down boxes in + Sort Attribute Options <attribute> = 0|1
    + If this opeion is 1, the options for this attribute are sorted alphanumerically. + This can be handy when locating options from long lists in drop-down boxes in quick filters for example. Default for this setting is 0.
  • diff --git a/src/elogd.c b/src/elogd.c index bfd7f921..1e96dfce 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -7105,7 +7105,7 @@ int scan_attributes(char *logbook) /* scan configuration file for attributes and fill attr_list, attr_options and attr_flags arrays */ { - char list[10000], str[NAME_LENGTH], type[NAME_LENGTH], tmp_list[MAX_N_ATTR][NAME_LENGTH]; + char list[10000], str[NAME_LENGTH], str2[NAME_LENGTH], type[NAME_LENGTH], tmp_list[MAX_N_ATTR][NAME_LENGTH]; int i, j, n, m, n_options; if (getcfg(logbook, "Attributes", list, sizeof(list))) { @@ -7158,7 +7158,8 @@ int scan_attributes(char *logbook) attr_flags[i] |= AF_ICON; } - if (n_options && getcfg(logbook, "Sort Attribute Options", str, sizeof(str)) && atoi(str) == 1) { + sprintf(str2, "Sort Attribute Options %s", attr_list[i]); + if (n_options && getcfg(logbook, str2, str, sizeof(str)) && atoi(str) == 1) { qsort(attr_options[i], n_options, NAME_LENGTH, ascii_compare2); } }