VirtualBox

Ignore:
Timestamp:
Jan 3, 2017 1:26:56 PM (8 years ago)
Author:
vboxsync
Message:

TestManager: always display some of the filter critera.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testmanager/webui/wuimain.py

    r65077 r65080  
    894894        # Now, generate a filter control panel for the side bar.
    895895        #
     896        if hasattr(oFilter, 'kiBranches'):
     897            oFilter.aCriteria[oFilter.kiBranches].fExpanded = True;
     898        if hasattr(oFilter, 'kiTestStatus'):
     899            oFilter.aCriteria[oFilter.kiTestStatus].fExpanded = True;
    896900        self._sPageFilter = self._generateResultFilter(oFilter, oResultLogic, tsEffective, sCurPeriod,
    897901                                                       enmResultsGroupingType = enmResultsGroupingType,
     
    929933        for oCrit in oFilter.aCriteria:
    930934            if len(oCrit.aoPossible) > 0:
    931                 sClass = 'sf-collapsable' if oCrit.sState == oCrit.ksState_Selected else 'sf-expandable';
    932                 sChar  = '▼'        if oCrit.sState == oCrit.ksState_Selected else '▶';
     935                if   oCrit.sState == oCrit.ksState_Selected \
     936                  or len(oCrit.aoPossible) <= 2 \
     937                  or oCrit.fExpanded is True:
     938                    sClass = 'sf-collapsable';
     939                    sChar  = '&#9660;';
     940                else:
     941                    sClass = 'sf-expandable';
     942                    sChar  = '&#9654;';
     943
    933944                sHtml += u'  <dt class="%s"><a href="javascript:void(0)" onclick="toggleCollapsableDtDd(this);">%s'\
    934945                         u' %s</a></dt>\n' \
     
    12301241        self._sPageBody = sNavi + self._sPageBody;
    12311242
     1243        if hasattr(oFilter, 'kiBranches'):
     1244            oFilter.aCriteria[oFilter.kiBranches].fExpanded = True;
    12321245        self._sPageFilter = self._generateResultFilter(oFilter, oModel, tsEffective, '%s hours' % (cHoursPerPeriod * cPeriods,));
    12331246        return True;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette