Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
Message ID: 66002     Entry time: Tue Oct 14 10:29:34 2008
Icon: Question  Author: T. Ribbrock  Author Email: emgaron+elog@ribbrock.org 
Category: Question  OS: Linux  ELOG Version: 2.7.5-2130 
Subject: "Style" based on two MOptions - possible? 

We have a logbook in which we use two "Status" attributes, both of which are MOptions. What we want to do is have the corresponding line of the list change its colour depending on the combination of those attributes. I have done so successfully using "Style" for a single Options or MOptions or even two Options (using conditionals and a third attribute), but up until now I have no luck with two MOptions. Conditionals do not seem to work with MOptions (the manual only mentions Options and when I tried anyway, it did not work... ) and multiple "Style" statements also do not seem to work. I've tried the following:

MOptions StatusA = Status-A-red, Status-A-orange, Status-A
MOptions StatusB = Status-B-red, Status-B-orange, Status-B

Style StatusA Status-A-red = background-color:red
Style StatusA Status-A-red | Status-A-orange = background-color:red
Style StatusA Status-A-red | Status-A = background-color:red
Style StatusA Status-A-red | Status-A-orange | Status-A = background-color:red
Style StatusA Status-A-orange = background-color:orange
Style StatusA Status-A-orange | Status-A = background-color:orange
Style StatusB Status-B-red = background-color:red
Style StatusB Status-B-red | Status-B-orange = background-color:red
Style StatusB Status-B-red | Status-B = background-color:red
Style StatusB Status-B-red | Status-B-orange | Status-B = background-color:red
Style StatusB Status-B-orange = background-color:orange
Style StatusB Status-B-orange | Status-B = background-color:orange

As far as I can see, the "Style" statement for StatusB only gets evaluated if none of the statements for StatusA matches (i.e. StatusA = Status-A). What I would want to achieve is that any "red" condition in either StatusA or StatusB takes precedence over "orange" and "none" and that "orange" takes precedence over "none".

Is there any solution for this problem short of merging both status attributes into one (which would be very unwieldy, especially, as StatusB is not used at all in some cases)? Any suggestions are most welcome!

Thanks in advance,

Thomas

ELOG V3.1.5-fe60aaf