diff --git a/rhodecode/lib/helpers.py b/rhodecode/lib/helpers.py
--- a/rhodecode/lib/helpers.py
+++ b/rhodecode/lib/helpers.py
@@ -64,20 +64,20 @@ def recursive_replace(str, replace=' '):
return str
else:
str = str.replace(replace * 2, replace)
- return recursive_replace(str, replace)
+ return recursive_replace(str, replace)
class _ToolTip(object):
-
+
def __call__(self, tooltip_title, trim_at=50):
"""
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', '
')
-
+
def activate(self):
"""
Adds tooltip mechanism to the given Html all tooltips have to have
@@ -85,7 +85,7 @@ class _ToolTip(object):
Then a tooltip will be generated based on that
All with yui js tooltip
"""
-
+
js = '''
YAHOO.util.Event.onDOMReady(function(){
function toolTipsId(){
@@ -190,19 +190,19 @@ class _ToolTip(object):
});
});
- '''
+ '''
return literal(js)
tooltip = _ToolTip()
class _FilesBreadCrumbs(object):
-
+
def __call__(self, repo_name, rev, paths):
url_l = [link_to(repo_name, url('files_home',
repo_name=repo_name,
revision=rev, f_path=''))]
paths_l = paths.split('/')
-
+
for cnt, p in enumerate(paths_l, 1):
if p != '':
url_l.append(link_to(p, url('files_home',
@@ -236,12 +236,12 @@ def pygmentize_annotation(filenode, **kw
pygmentize function for annotation
:param filenode:
"""
-
+
color_dict = {}
def gen_color():
"""generator for getting 10k of evenly distibuted colors using hsv color
and golden ratio.
- """
+ """
import colorsys
n = 10000
golden_ratio = 0.618033988749895
@@ -252,21 +252,21 @@ def pygmentize_annotation(filenode, **kw
h %= 1
HSV_tuple = [h, 0.95, 0.95]
RGB_tuple = colorsys.hsv_to_rgb(*HSV_tuple)
- yield map(lambda x:str(int(x * 256)), RGB_tuple)
+ yield map(lambda x:str(int(x * 256)), RGB_tuple)
cgenerator = gen_color()
-
+
def get_color_string(cs):
if color_dict.has_key(cs):
col = color_dict[cs]
else:
col = color_dict[cs] = cgenerator.next()
return "color: rgb(%s)! important;" % (', '.join(col))
-
+
def url_func(changeset):
tooltip_html = "