Changeset - 79041f2d16f4
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 14 years ago 2011-06-02 15:11:13
marcin@python-works.com
wrap_paragraph was to slow for toolip generation and was removed.
1 file changed with 10 insertions and 7 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/helpers.py
Show inline comments
 
@@ -87,14 +87,13 @@ class _ToolTip(object):
 
        """Special function just to wrap our text into nice formatted
 
        autowrapped text
 

	
 
        :param tooltip_title:
 
        """
 

	
 
        return wrap_paragraphs(escape(tooltip_title), trim_at)\
 
                       .replace('\n', '<br/>')
 
        return escape(tooltip_title)
 

	
 
    def activate(self):
 
        """Adds tooltip mechanism to the given Html all tooltips have to have
 
        set class `tooltip` and set attribute `tooltip_title`.
 
        Then a tooltip will be generated based on that. All with yui js tooltip
 
        """
 
@@ -266,19 +265,23 @@ def pygmentize_annotation(repo_name, fil
 
            col = color_dict[cs]
 
        else:
 
            col = color_dict[cs] = cgenerator.next()
 
        return "color: rgb(%s)! important;" % (', '.join(col))
 

	
 
    def url_func(repo_name):
 

	
 
        def _url_func(changeset):
 
            tooltip_html = "<div style='font-size:0.8em'><b>Author:</b>" + \
 
            " %s<br/><b>Date:</b> %s</b><br/><b>Message:</b> %s<br/></div>"
 
            author = changeset.author
 
            date = changeset.date
 
            message = tooltip(changeset.message)
 

	
 
            tooltip_html = tooltip_html % (changeset.author,
 
                                                   changeset.date,
 
                                                   tooltip(changeset.message))
 
            tooltip_html = ("<div style='font-size:0.8em'><b>Author:</b>"
 
                            " %s<br/><b>Date:</b> %s</b><br/><b>Message:"
 
                            "</b> %s<br/></div>")
 

	
 
            tooltip_html = tooltip_html % (author, date, message)
 
            lnk_format = '%5s:%s' % ('r%s' % changeset.revision,
 
                                     short_id(changeset.raw_id))
 
            uri = link_to(
 
                    lnk_format,
 
                    url('changeset_home', repo_name=repo_name,
 
                        revision=changeset.raw_id),
0 comments (0 inline, 0 general)