Ignore:
Timestamp:
19/12/06 12:29:21 (15 years ago)
Author:
lawrence
Message:

Modifications to support tooltips on the inrecord icon links

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI07-MOLES/trunk/PythonCode/browse/portal/cgi/browse/htmlUtilities.py

    r1182 r1895  
    1616    return '<span class="%s">%s</span>'%(id,x) 
    1717 
    18 def hyperlink(n,u): 
     18def hyperlink(n,u,t=None): 
    1919    ''' Make a hyperlink ... provided there is an address to jump to ''' 
    2020    if u !='': 
    21         return '<a href="%s">%s</a>'%(u,n) 
     21        if t is None: 
     22            return '<a href="%s">%s</a>'%(u,n) 
     23        else: 
     24            return '<a href="%s" title="%s">%s</a>'%(u,n,t) 
    2225    else: return n 
    2326     
    24 def image(l,a): 
    25     return '<img src="%s" alt="%s"/>'%(l,a) 
     27def image(l,a,t=None): 
     28    if t is None: 
     29        return '<img src="%s" alt="%s"/>'%(l,a) 
     30    else: 
     31        return '<img src="%s" alt="%s" title="%s"/>'%(l,a,t) 
    2632 
    2733def abbreviate(string,newlen): 
Note: See TracChangeset for help on using the changeset viewer.