##// END OF EJS Templates
moved tooltip function from the for loop and from templates to helpers
marcink -
r990:7a1df013 beta
parent child Browse files
Show More
@@ -593,3 +593,13 b' def safe_unicode(str):'
593 u_str = unicode(str(str).encode('string_escape'))
593 u_str = unicode(str(str).encode('string_escape'))
594
594
595 return u_str
595 return u_str
596
597 def changed_tooltip(nodes):
598 if nodes:
599 pref = ': <br/> '
600 suf = ''
601 if len(nodes) > 30:
602 suf = '<br/>' + _(' and %s more') % (len(nodes) - 30)
603 return literal(pref + '<br/> '.join([x.path for x in nodes[:30]]) + suf)
604 else:
605 return ': ' + _('No Files')
@@ -62,22 +62,9 b''
62 </div>
62 </div>
63 <div class="right">
63 <div class="right">
64 <div class="changes">
64 <div class="changes">
65
65 <span class="removed tooltip" title="<b>${_('removed')}</b>${h.changed_tooltip(cs.removed)}">${len(cs.removed)}</span>
66 <%
66 <span class="changed tooltip" title="<b>${_('changed')}</b>${h.changed_tooltip(cs.changed)}">${len(cs.changed)}</span>
67 def changed_tooltip(cs):
67 <span class="added tooltip" title="<b>${_('added')}</b>${h.changed_tooltip(cs.added)}">${len(cs.added)}</span>
68 if cs:
69 pref = ': '
70 suf = ''
71 if len(cs) > 30:
72 suf='<br/>'+_(' and %s more') % (len(cs) - 30)
73 return pref+'<br/> '.join([x.path for x in cs[:30]]) + suf
74 else:
75 return ': '+_('No Files')
76 %>
77
78 <span class="removed tooltip" title="${_('removed')}${h.literal(changed_tooltip(cs.removed))}">${len(cs.removed)}</span>
79 <span class="changed tooltip" title="${_('changed')}${h.literal(changed_tooltip(cs.changed))}">${len(cs.changed)}</span>
80 <span class="added tooltip" title="${_('added')}${h.literal(changed_tooltip(cs.added))}">${len(cs.added)}</span>
81 </div>
68 </div>
82 %if len(cs.parents)>1:
69 %if len(cs.parents)>1:
83 <div class="merge">
70 <div class="merge">
General Comments 0
You need to be logged in to leave comments. Login now