Mercurial > public > src > rhodecode
changeset 292:c4caeca9dd66
fixed paragraphs wrapping for ultralong commit messages. Disabled tooltips for new repos without a last commit message. ie. when tooltip_title is empty (there is a strange bug on empty tooltip_title)
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Mon, 14 Jun 2010 00:17:08 +0200 |
parents | 0cf49c29c846 |
children | f8005b159621 42f5c36820ef |
files | pylons_app/lib/helpers.py pylons_app/templates/changelog/changelog.html |
diffstat | 2 files changed, 11 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/pylons_app/lib/helpers.py Sun Jun 13 23:56:33 2010 +0200 +++ b/pylons_app/lib/helpers.py Mon Jun 14 00:17:08 2010 +0200 @@ -112,11 +112,18 @@ showdelay:20, }); - //Mouse subscribe optional arguments + //Mouse Over event disabled for new repositories since they dont + //have last commit message myToolTips.contextMouseOverEvent.subscribe( function(type, args) { var context = args[0]; - return true; + var txt = context.getAttribute('tooltip_title'); + if(txt){ + return true; + } + else{ + return false; + } }); // Set the text for the tooltip just before we display it. Lazy method
--- a/pylons_app/templates/changelog/changelog.html Sun Jun 13 23:56:33 2010 +0200 +++ b/pylons_app/templates/changelog/changelog.html Mon Jun 14 00:17:08 2010 +0200 @@ -40,9 +40,8 @@ <div class="date">${_('commit')} ${cs.revision}: ${cs.raw_id}@${cs.date}</div> <div class="author">${cs.author}</div> <div id="chg_${cnt}" class="message"> - ${h.link_to(cs.message, - h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id), - title=cs.message)} + ${h.link_to(h.wrap_paragraphs(cs.message), + h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))} </div> <span class="logtags"> <span class="branchtag">${cs.branch}</span>