Mercurial > kallithea
diff rhodecode/templates/base/root.html @ 2187:b61e540122f2 beta
#415: Adding comment to changeset causes reload
- comments are now added via ajax and doesn't reload the page
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sat, 14 Apr 2012 22:13:07 +0200 |
parents | 85a64b981c07 |
children | 56e96d4e9f6e |
line wrap: on
line diff
--- a/rhodecode/templates/base/root.html Fri Apr 13 21:12:42 2012 +0200 +++ b/rhodecode/templates/base/root.html Sat Apr 14 22:13:07 2012 +0200 @@ -47,9 +47,13 @@ <script type="text/javascript"> var follow_base_url = "${h.url('toggle_following')}"; - var stop_follow_text = "${_('Stop following this repository')}"; - var start_follow_text = "${_('Start following this repository')}"; - + + //JS translations map + var TRANSLATION_MAP = { + 'add another comment':'${_("add another comment")}', + 'Stop following this repository':"${_('Stop following this repository')}", + 'Start following this repository':"${_('Start following this repository')}", + }; var onSuccessFollow = function(target){ var f = YUD.get(target.id); @@ -57,7 +61,7 @@ if(f.getAttribute('class')=='follow'){ f.setAttribute('class','following'); - f.setAttribute('title',stop_follow_text); + f.setAttribute('title',TRANSLATION_MAP['Stop following this repository']); if(f_cnt){ var cnt = Number(f_cnt.innerHTML)+1; @@ -66,7 +70,7 @@ } else{ f.setAttribute('class','follow'); - f.setAttribute('title',start_follow_text); + f.setAttribute('title',TRANSLATION_MAP['Start following this repository']); if(f_cnt){ var cnt = Number(f_cnt.innerHTML)+1; f_cnt.innerHTML = cnt;