ZABBIX BUGS AND ISSUES

Class bug in select field

Details

  • Zabbix ID:
    RTF

Description

/popup_trexpr.php - Trigger expression condition
"selectShorten" - duplicates in function select field

<select id="expr_type" class="input select selectShorten selectShorten selectShorten selectShorten selectShorten selectShorten selectShorten selectShorten selectShorten selectShorten selectShorten selectShorten selectShorten selectShorten selectShorten selectShorten selectShorten selectShorten selectShorten selectShorten selectShorten selectShorten selectShorten selectShorten selectShorten selectShorten selectShorten selectShorten selectShorten selectShorten selectShorten selectShorten selectShorten selectShorten" style="width: 373px;" onchange="submit()" size="1" name="expr_type">

Activity

Hide
Oleg Egorov added a comment -

RESOLVED IN svn://svn.zabbix.com/branches/dev/ZBX-5617

Show
Oleg Egorov added a comment - RESOLVED IN svn://svn.zabbix.com/branches/dev/ZBX-5617
Hide
Pavels Jelisejevs added a comment - - edited

(1) Your fix will not add the class if the element already has a class named selectShortenWhatever. It would be better to use the CTag::addClass() method and change it in a way, that would prevent it from adding duplicate class names.

Oleg Egorov Resolved in revision 30411

Pavels Jelisejevs CLOSED.

Show
Pavels Jelisejevs added a comment - - edited (1) Your fix will not add the class if the element already has a class named selectShortenWhatever. It would be better to use the CTag::addClass() method and change it in a way, that would prevent it from adding duplicate class names. Oleg Egorov Resolved in revision 30411 Pavels Jelisejevs CLOSED.
Hide
Pavels Jelisejevs added a comment - - edited

(2) Some coding style issues:
1. $ChkClass should start with a lower case letter;
2. $ChkClass=explode(' ', $this->getAttribute('class')); spaces are required around the equality sign;
3. the if clause can be replaced with just in_array($cssClass, $ChkClass);
4. a phpdoc comment is required for the CTag::hasClass() method.

Oleg Egorov RESOLVED

Pavels Jelisejevs I've made a couple of corrections in r30472. Please review.

Oleg Egorov CLOSED

Show
Pavels Jelisejevs added a comment - - edited (2) Some coding style issues: 1. $ChkClass should start with a lower case letter; 2. $ChkClass=explode(' ', $this->getAttribute('class')); spaces are required around the equality sign; 3. the if clause can be replaced with just in_array($cssClass, $ChkClass); 4. a phpdoc comment is required for the CTag::hasClass() method. Oleg Egorov RESOLVED Pavels Jelisejevs I've made a couple of corrections in r30472. Please review. Oleg Egorov CLOSED
Hide
Pavels Jelisejevs added a comment -

TESTED.

But please close (2) before merging.

Show
Pavels Jelisejevs added a comment - TESTED. But please close (2) before merging.
Hide
richlv added a comment - - edited

(3) there's a typo :
"Returns true if HTML class exist"

also, let's have a bit more descriptive changelog entry

Oleg Egorov RESOLVED

Show
richlv added a comment - - edited (3) there's a typo : "Returns true if HTML class exist" also, let's have a bit more descriptive changelog entry Oleg Egorov RESOLVED
Hide
Oleg Egorov added a comment -

Fixed in pre-2.0.4 r30722 and pre-2.1.0 (trunk) r30723.

Show
Oleg Egorov added a comment - Fixed in pre-2.0.4 r30722 and pre-2.1.0 (trunk) r30723.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: