Changeset - 5f883a5be2d1
[Not reviewed]
default
0 4 0
Mads Kiilerich - 11 years ago 2014-07-18 19:22:01
madski@unity3d.com
comments: show icon to the left of the code, only visible and clickable when hovering the code
4 files changed with 27 insertions and 18 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/diffs.py
Show inline comments
 
@@ -720,7 +720,7 @@ class DiffProcessor(object):
 
                        'cc': code_class,
 
                        'inc': comments
 
                    })
 
                    _html.append('''\n\t\t<pre>%(code)s</pre>\n''' % {
 
                    _html.append('''\n\t\t<div class="add-bubble"><div>&nbsp;</div></div><pre>%(code)s</pre>\n''' % {
 
                        'code': change['line']
 
                    })
 

	
kallithea/public/css/style.css
Show inline comments
 
@@ -4915,6 +4915,7 @@ div.diffblock {
 
}
 
div.diffblock.margined {
 
    margin: 0px 20px 0px 20px;
 
    overflow: hidden;
 
}
 
div.diffblock .code-header {
 
    border-bottom: 1px solid #CCCCCC;
 
@@ -5085,19 +5086,27 @@ table.code-difftable .code pre {
 
    line-height: 17px;
 
}
 

	
 

	
 
.diffblock.margined.comm .line .code:hover {
 
    background-color: #FFFFCC !important;
 
    cursor: pointer !important;
 
    background-image: url("../images/icons/comment_add.png") !important;
 
    background-repeat: no-repeat !important;
 
    background-position: right !important;
 
    background-position: 0% 50% !important;
 
}
 
.diffblock.margined.comm .line .code.no-comment:hover {
 
    background-image: none !important;
 
    cursor: auto !important;
 
    background-color: inherit !important;
 
.add-bubble {
 
    display: none;
 
    float: left;
 
    width: 0px;
 
    height: 0px;
 
}
 

	
 
tr.line.add td.code:hover .add-bubble,
 
tr.line.del td.code:hover .add-bubble,
 
tr.line.unmod td.code:hover .add-bubble {
 
    display: inherit;
 
}
 

	
 
.add-bubble div {
 
    position: relative;
 
    left: -32px;
 
    width: 32px;
 
    top: -8px;
 
    height: 32px;
 
    background: url("../images/icons/comment_add.png") no-repeat 100% 50%;
 
    cursor: pointer;
 
}
 

	
 
div.comment:target>.comment-wrapp {
kallithea/templates/changeset/changeset.html
Show inline comments
 
@@ -197,12 +197,12 @@ ${self.repo_context_bar('changelog', c.c
 
               }
 
          })
 

	
 
          YUE.on(YUQ('.line'),'click',function(e){
 
          YUE.on(YUQ('.add-bubble'),'click',function(e){
 
              var tr = e.currentTarget;
 
              if(tr == null){
 
                  tr = this;
 
              }
 
              injectInlineForm(tr);
 
              injectInlineForm(tr.parentNode.parentNode);
 
          });
 

	
 
          // inject comments into they proper positions
kallithea/templates/pullrequests/pullrequest_show.html
Show inline comments
 
@@ -350,9 +350,9 @@ ${self.repo_context_bar('showpullrequest
 
               }
 
          })
 

	
 
          YUE.on(YUQ('.line'),'click',function(e){
 
          YUE.on(YUQ('.add-bubble'),'click',function(e){
 
              var tr = e.currentTarget;
 
              injectInlineForm(tr);
 
              injectInlineForm(tr.parentNode.parentNode);
 
          });
 

	
 
          // inject comments into they proper positions
0 comments (0 inline, 0 general)