Changeset c745fd in indico


Ignore:
Timestamp:
03/28/11 14:20:39 (2 years ago)
Author:
Jose Benito <jose.benito.gonzalez@…>
Branches:
master, burotel, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.98b1, v0.98b2, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, 0da0c1403bae8e51d8229f460181c71b9e6dda72
Children:
4ac79f9
Parents:
ca9b88
git-author:
Adrian Moennich <jerome.ernst.monnich@…> (03/22/11 09:24:50)
git-committer:
Jose Benito <jose.benito.gonzalez@…> (03/28/11 14:20:39)
Message:

[FIX] Fix ugly legend display in categOverview

  • truncate category name
  • display full category name in tooltip
  • fixes #699
Location:
indico/MaKaC/webinterface
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • indico/MaKaC/webinterface/pages/category.py

    r824614 rc745fd  
    4242from MaKaC.common.timezoneUtils import DisplayTZ,nowutc 
    4343from pytz import timezone 
     44from MaKaC.common.TemplateExec import truncateTitle 
    4445 
    4546 
     
    824825                categ=cm.getById(str(icon)) 
    825826                otherOW = self._ow.getOverviewOtherCateg(categ) 
    826                 a=(""" <a href="%s" style="font-size: 1.0em;"><img src="%s" width="16" height="16" border="0">&nbsp;%s</a>  <br/>""" %(\ 
    827                                         vars["categOverviewURLGen"]( otherOW ),\ 
    828                                         urlHandlers.UHCategoryIcon.getURL(categ),\ 
    829                                         categ.getName().replace(" ","&nbsp;"))) 
     827                a=(""" <a href="%s" style="font-size: 1.0em;" onmouseover="IndicoUI.Widgets.Generic.tooltip(this, event, '%s')"><img src="%s" width="16" height="16" border="0">&nbsp;%s</a>  <br/>""" %( 
     828                                        vars["categOverviewURLGen"]( otherOW ), 
     829                                        categ.getName(), 
     830                                        urlHandlers.UHCategoryIcon.getURL(categ), 
     831                                        truncateTitle(categ.getName(), 20))) 
    830832                if not a in l: 
    831833                    l.append(a) 
     
    15961598                selected = "selected" 
    15971599            if topcat.getId() != "0": 
    1598                 from MaKaC.common.TemplateExec import truncateTitle 
    15991600                vis.append("""<option value="%s" %s>%s</option>""" % (level, selected, truncateTitle(topcat.getName(), 70))) 
    16001601            topcat = topcat.getOwner() 
  • indico/MaKaC/webinterface/tpls/CategoryOverview.tpl

    r9ac2af7 rc745fd  
    4949                            <% if key: %> 
    5050                                <br><h1><%= _("Legend") %>:</h1> 
    51                                 <div style="margin: 10px 0 30px 10px;width:180px;"><%= key %></div> 
     51                                <div style="margin: 10px 0 30px 10px;width:180px;overflow:hidden;white-space:nowrap;"><%= key %></div> 
    5252                            <% end %> 
    5353                        </div> 
Note: See TracChangeset for help on using the changeset viewer.