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
 
@@ -2635,6 +2635,18 @@ BIN_FILENODE = 6
 
    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;
kallithea/templates/changelog/changelog.html
Show inline comments
 
@@ -259,9 +259,8 @@ ${self.repo_context_bar('changelog', c.f
 
                }
 

	
 
                $('.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);
kallithea/templates/compare/compare_cs.html
Show inline comments
 
@@ -32,7 +32,7 @@
 
        <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>
 
@@ -72,9 +72,8 @@
 

	
 
<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');
kallithea/tests/functional/test_compare.py
Show inline comments
 
@@ -42,7 +42,7 @@ def _commit_change(repo, filename, conte
 

	
 

	
 
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):
0 comments (0 inline, 0 general)