Changeset - 1294f2baf2bc
[Not reviewed]
beta
0 3 0
Marcin Kuzminski - 15 years ago 2011-01-01 22:43:37
marcin@python-works.com
added wrapping of long tooltips in index page
3 files changed with 6 insertions and 6 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/helpers.py
Show inline comments
 
@@ -83,27 +83,27 @@ def recursive_replace(str, replace=' '):
 
    'Mighty-Mighty-Bo-sstones'
 
    """
 

	
 
    if str.find(replace * 2) == -1:
 
        return str
 
    else:
 
        str = str.replace(replace * 2, 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
 
        """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/>')
 

	
 
    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
 
        """
 

	
rhodecode/templates/base/base.html
Show inline comments
 
@@ -344,35 +344,35 @@ function onSuccess(){
 
    if(f.getAttribute('class')=='follow'){
 
        f.setAttribute('class','following');
 
        f.setAttribute('title',"${_('Stop following this repository')}");
 
    }
 
    else{
 
        f.setAttribute('class','follow');
 
        f.setAttribute('title',"${_('Start following this repository')}");
 
    }
 
}
 

	
 
function toggleFollowingUser(fallows_user_id,token){
 
    args = 'follows_user_id='+fallows_user_id;
 
    args+= '&auth_token='+token;
 
    args+= '&amp;auth_token='+token;
 
    YUC.asyncRequest('POST',base_url,{
 
        success:function(o){
 
        	onSuccess();
 
        }
 
    },args); return false;
 
}
 

	
 
function toggleFollowingRepo(fallows_repo_id,token){
 
    args = 'follows_repo_id='+fallows_repo_id;
 
    args+= '&auth_token='+token;
 
    args+= '&amp;auth_token='+token;
 
    YUC.asyncRequest('POST',base_url,{
 
        success:function(o){
 
        	onSuccess();
 
        }
 
    },args); return false;
 
}    
 
</script>
 

	
 
</%def>
 

	
 
<%def name="breadcrumbs()">
 
    <div class="breadcrumbs">
rhodecode/templates/index.html
Show inline comments
 
@@ -78,25 +78,25 @@
 
		            ##NAME   
 
		            ${h.link_to(repo['name'],
 
		                h.url('summary_home',repo_name=repo['name']),class_="repo_name")}
 
		            %if repo['repo'].dbrepo.fork:
 
		            	<a href="${h.url('summary_home',repo_name=repo['repo'].dbrepo.fork.repo_name)}">
 
		            	<img class="icon" alt="${_('fork')}"
 
		            	title="${_('Fork of')} ${repo['repo'].dbrepo.fork.repo_name}" 
 
		            	src="/images/icons/arrow_divide.png"/></a>
 
		            %endif
 
		            </div>
 
		            </td>
 
		            ##DESCRIPTION
 
		            <td><span class="tooltip" title="${repo['description']}">
 
		            <td><span class="tooltip" title="${h.tooltip(repo['description'])}">
 
		               ${h.truncate(repo['description'],60)}</span>
 
		            </td>
 
		            ##LAST CHANGE
 
		            <td>
 
		              <span class="tooltip" title="${repo['last_change']}">
 
		              ${h.age(repo['last_change'])}</span>
 
		            </td>
 
		            <td>
 
		            	%if repo['rev']>=0:
 
		            	${h.link_to('r%s:%s' % (repo['rev'],h.short_id(repo['tip'])),
 
		                h.url('changeset_home',repo_name=repo['name'],revision=repo['tip']),
 
		                class_="tooltip",
0 comments (0 inline, 0 general)