Edgewall Software
Modify

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#11414 closed enhancement (fixed)

Highlight rows in wiki tables on hover

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Milestone: 1.0.2
Component: wiki system Version: 1.0-stable
Severity: normal Keywords: css, highlight, hover, trac.ini
Cc: Branch:
Release Notes:

Zebra striping is applied to the tables output by the TracIni macro.

API Changes:
Internal Changes:

Description

It would be useful to have the row of tables produced by the TracIni macro highlighted on hover-over. I'll investigate applying the necessary rules to table.wiki.

See also related tickets #11052 and #11410.

Attachments (0)

Change History (6)

comment:1 by Ryan J Ollos, 7 years ago

Milestone: 1.1.31.0.3
Owner: set to Ryan J Ollos
Status: newassigned

comment:2 by Ryan J Ollos, 7 years ago

The issue I was trying to address is that it's difficult to see which option a default value is aligned with. Therefore adding striping to the table might work better than changing the background-color of the row on hover.

  • trac/htdocs/css/trac.css

    commit ec430297dff0d54e510ea13ac26f4459259f35d4
    Author: rjollos <ryan.j.ollos@gmail.com>
    Date:   Tue Dec 24 19:31:13 2013 -0800
    
        Add striping to rows of tables output from TracIni macro.
    
    diff --git a/trac/htdocs/css/trac.css b/trac/htdocs/css/trac.css
    index c860bbb..9da7289 100644
    a b table.wiki th {  
    539539 padding: .1em .25em;
    540540 background-color: #f7f7f7;
    541541}
     542table.wiki tbody tr.even { background-color: #fcfcfc }
     543table.wiki tbody tr.odd { background-color: #f7f7f7 }
    542544
    543545.wikitoolbar {
    544546 margin-top: 0.3em;
  • trac/wiki/macros.py

    diff --git a/trac/wiki/macros.py b/trac/wiki/macros.py
    index 9737394..623aff3 100644
    a b class TracIniMacro(WikiMacroBase):  
    781781                 tag.tr(tag.td(tag.tt(option.name)),
    782782                        tag.td(format_to_oneliner(
    783783                            self.env, formatter.context, getdoc(option))),
    784                         default_cell(option))
    785                  for option in sorted(options.get(section, {}).itervalues(),
    786                                       key=lambda o: o.name)
     784                        default_cell(option),
     785                        class_='odd' if idx % 2 else 'even')
     786                 for idx, option in \
     787                    enumerate(sorted(options.get(section, {}).itervalues(),
     788                                     key=lambda o: o.name))
    787789                 if option.name.startswith(key_filter))))
    788790            for section, section_doc in sorted(sections.iteritems()))

comment:3 by Ryan J Ollos, 7 years ago

Milestone: 1.0.31.0.2
Release Notes: modified (diff)
Resolution: fixed
Status: assignedclosed

Committed to 1.0-stable in [12377], merged to trunk in [12378].

comment:4 by Ryan J Ollos, 7 years ago

Resolution: fixed
Status: closedreopened

Stupid me, I need to modify the expected output of some test cases.

----------------------------------------------------------------------
Ran 1641 tests in 280.587s

FAILED (failures=3)

comment:5 by Ryan J Ollos, 7 years ago

Resolution: fixed
Status: reopenedclosed

Fix for unit tests committed to 1.0-stable in [12382] and merged to trunk in [12383].

comment:6 by Ryan J Ollos, 7 years ago

Keywords: trac.ini added; tracini removed

Normalizing keywords.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Ryan J Ollos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.