Changeset - abad971d21d1
[Not reviewed]
default
0 3 0
Mads Kiilerich - 11 years ago 2015-05-17 21:41:40
madski@unity3d.com
comments: more jQuery
3 files changed with 7 insertions and 8 deletions:
0 comments (0 inline, 0 general)
kallithea/public/js/base.js
Show inline comments
 
@@ -847,10 +847,9 @@ var renderInlineComments = function(file
 
/**
 
 * Double link comments
 
 */
 
var linkInlineComments = function(firstlinks, comments){
 
    var $comments = $(comments);
 
var linkInlineComments = function($firstlinks, $comments){
 
    if ($comments.length > 0) {
 
        $(firstlinks).html('<a href="#{0}">First comment</a>'.format($comments.attr('id')));
 
        $firstlinks.html('<a href="#{0}">First comment</a>'.format($comments.attr('id')));
 
    }
 
    if ($comments.length <= 1) {
 
        return;
 
@@ -859,12 +858,12 @@ var linkInlineComments = function(firstl
 
    $comments.each(function(i, e){
 
            var prev = '';
 
            if (i > 0){
 
                var prev_anchor = YUD.getAttribute(comments.item(i-1),'id');
 
                var prev_anchor = $($comments.get(i-1)).attr('id');
 
                prev = '<a href="#{0}">Previous comment</a>'.format(prev_anchor);
 
            }
 
            var next = '';
 
            if (i+1 < comments.length){
 
                var next_anchor = YUD.getAttribute(comments.item(i+1),'id');
 
            if (i+1 < $comments.length){
 
                var next_anchor = $($comments.get(i+1)).attr('id');
 
                next = '<a href="#{0}">Next comment</a>'.format(next_anchor);
 
            }
 
            var $div = $(('<div class="prev-next-comment">'+
kallithea/templates/changeset/changeset.html
Show inline comments
 
@@ -205,7 +205,7 @@ ${self.repo_context_bar('changelog', c.c
 
          var file_comments = $('.inline-comment-placeholder').toArray();
 
          renderInlineComments(file_comments);
 

	
 
          linkInlineComments(document.getElementsByClassName('firstlink'), document.getElementsByClassName("comment"));
 
          linkInlineComments($('.firstlink'), $('.comment'));
 

	
 
          pyroutes.register('changeset_home',
 
                            "${h.url('changeset_home', repo_name='%(repo_name)s', revision='%(revision)s')}",
kallithea/templates/pullrequests/pullrequest_show.html
Show inline comments
 
@@ -380,7 +380,7 @@ ${self.repo_context_bar('showpullrequest
 
          var file_comments = $('.inline-comment-placeholder').toArray();
 
          renderInlineComments(file_comments);
 

	
 
          linkInlineComments(document.getElementsByClassName('firstlink'), document.getElementsByClassName("comment"));
 
          linkInlineComments($('.firstlink'), $('.comment'));
 

	
 
          $('#updaterevs input').change(function(e){
 
              var update = !!e.target.value;
0 comments (0 inline, 0 general)