diff --git a/rhodecode/public/css/style.css b/rhodecode/public/css/style.css --- a/rhodecode/public/css/style.css +++ b/rhodecode/public/css/style.css @@ -3342,6 +3342,10 @@ form.comment-form { } +.show-inline-comments{ + position: relative; + top:1px +} /** comment inline form **/ diff --git a/rhodecode/templates/changeset/changeset.html b/rhodecode/templates/changeset/changeset.html --- a/rhodecode/templates/changeset/changeset.html +++ b/rhodecode/templates/changeset/changeset.html @@ -113,8 +113,8 @@ %for change,filenode,diff,cs1,cs2,stat in c.changes: %if change !='removed':
-
-
+
+
${h.link_to_if(change!='removed',h.safe_unicode(filenode.path),h.url('files_home',repo_name=c.repo_name, @@ -126,6 +126,12 @@ h.url('files_diff_home',repo_name=c.repo_name,f_path=h.safe_unicode(filenode.path),diff2=cs2,diff1=cs1,diff='raw'))} » ${h.link_to(_('download diff'), h.url('files_diff_home',repo_name=c.repo_name,f_path=h.safe_unicode(filenode.path),diff2=cs2,diff1=cs1,diff='download'))} + + +
@@ -192,6 +198,20 @@ } YUE.onDOMReady(function(){ + + YUE.on(YUQ('.show-inline-comments'),'change',function(e){ + var show = 'none'; + var target = e.currentTarget; + if(target.checked){ + var show = '' + } + var boxid = YUD.getAttribute(target,'id_for'); + var comments = YUQ('#{0} .inline-comments'.format(boxid)); + for(c in comments){ + YUD.setStyle(comments[c],'display',show); + } + }) + YUE.on(YUQ('.line'),'mouseenter',function(e){ var tr = e.currentTarget; if(YUD.hasClass(tr,'form-open') || YUD.hasClass(tr,'context')){