Changeset - f22d103ba9e8
[Not reviewed]
default
0 4 0
Mads Kiilerich - 11 years ago 2014-07-18 18:45:54
madski@unity3d.com
changelog: use css for message expand and make it toggle so it also can be collapsed again
4 files changed with 16 insertions and 6 deletions:
0 comments (0 inline, 0 general)
kallithea/public/css/style.css
Show inline comments
 
@@ -2632,12 +2632,24 @@ BIN_FILENODE = 6
 
    white-space: pre-wrap;
 
    padding: 0;
 
    overflow: hidden;
 
    height: 1.1em;
 
}
 

	
 
#graph_content_pr .compare_view_commits .message {
 
    white-space: normal !important;
 
    padding: 0 !important;
 
    height: 1.1em;
 
}
 

	
 
#graph_content .container .mid .message.expanded,
 
#graph_content_pr .compare_view_commits .message.expanded {
 
    height: auto;
 
    margin: 4px 0px 4px 0px;
 
}
 

	
 
#graph_content .container .extra-container {
 
    display: block;
 
    position: absolute;
 
    top: -15px;
 
    right: 0;
 
    padding-left: 5px;
kallithea/templates/changelog/changelog.html
Show inline comments
 
@@ -256,15 +256,14 @@ ${self.repo_context_bar('changelog', c.f
 
                        YUD.setStyle(m.nextElementSibling,'display','block');
 
                        YUD.setStyle(m.nextElementSibling,'margin-top',offset+'px');
 
                    };
 
                }
 

	
 
                $('.expand_commit').on('click',function(e){
 
                    $(this).children('i').hide();
 
                    var cid = $(this).attr('commit_id');
 
                    $('#C-'+cid).css({'height': 'auto', 'margin': '4px 0px 4px 0px'})
 
                    $('#C-'+cid).toggleClass('expanded');
 

	
 
                    //redraw the graph, r and jsdata are bound outside function
 
                    r.render(jsdata,100);
 
                });
 

	
 
                // change branch filter
kallithea/templates/compare/compare_cs.html
Show inline comments
 
@@ -29,13 +29,13 @@
 
        <span class="branchtag">${cs.branch}</span>
 
        %endif
 
        </td>
 
        <td class="expand_commit" commit_id="${cs.raw_id}" title="${_('Expand commit message')}">
 
            <i class="icon-resize-vertical" style="color:#DDD"></i>
 
        </td>
 
        <td><div id="C-${cs.raw_id}" class="message" style="white-space:normal; height:1.1em; padding:0">${h.urlify_commit(cs.message, c.repo_name)}</div></td>
 
        <td><div id="C-${cs.raw_id}" class="message">${h.urlify_commit(cs.message, c.repo_name)}</div></td>
 
        </tr>
 
    %endfor
 
    </table>
 
    %if c.as_form:
 
      <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">
 
      ## links should perhaps use ('rev', c.org_rev) instead ...
 
@@ -69,15 +69,14 @@
 
    %endif
 
  %endif
 
</div>
 

	
 
<script>
 
$('.expand_commit').on('click',function(e){
 
    $(this).children('i').hide();
 
    var cid = $(this).attr('commit_id');
 
    $('#C-'+cid).css({'height': 'auto','width': 'auto', 'white-space': 'pre'})
 
    $('#C-'+cid).toggleClass('expanded');
 
});
 
$('.gravatar').on('click',function(e){
 
    var cid = $(this).attr('commit_id');
 
    $('#row-'+cid).toggleClass('hl', !$('#row-'+cid).hasClass('hl'));
 
});
 
</script>
kallithea/tests/functional/test_compare.py
Show inline comments
 
@@ -39,13 +39,13 @@ def _commit_change(repo, filename, conte
 
            f_path=filename
 
        )
 
    return cs
 

	
 

	
 
def _commit_div(sha, msg):
 
    return """<div id="C-%s" class="message" style="white-space:normal; height:1.1em; padding:0">%s</div>""" % (sha, msg)
 
    return """<div id="C-%s" class="message">%s</div>""" % (sha, msg)
 

	
 

	
 
class TestCompareController(TestController):
 

	
 
    def setUp(self):
 
        self.r1_id = None
0 comments (0 inline, 0 general)