Changeset - e21ec97aca1f
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 14 years ago 2011-11-14 23:08:03
marcin@python-works.com
fixed issue with new files and removed files with using inline comments
1 file changed with 15 insertions and 8 deletions:
0 comments (0 inline, 0 general)
rhodecode/templates/changeset/changeset.html
Show inline comments
 
@@ -89,25 +89,31 @@
 
		                 <span class="tagtag"  title="${'%s %s' % (_('tag'),tag)}">
 
		                 ${h.link_to(tag,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}</span>
 
		             %endfor
 
		         </span>                                                                 
 
	                </div>              
 
	        </div>
 
	        <span style="font-size:1.1em;font-weight: bold">
 
	        ${_('%s files affected with %s additions and %s deletions.') % (len(c.changeset.affected_files),c.lines_added,c.lines_deleted)}
 
	        </span>
 
	        <div class="cs_files">
 
	                %for change,filenode,diff,cs1,cs2,stat in c.changes:
 
	                    <div class="cs_${change}">
 
		                    <div class="node">${h.link_to(h.safe_unicode(filenode.path),h.url.current(anchor=self.fid(filenode.changeset.raw_id,filenode.path)))}</div>
 
                            <div class="node">
 
                            %if change != 'removed':
 
                                ${h.link_to(h.safe_unicode(filenode.path),h.url.current(anchor=self.fid(filenode.changeset.raw_id,filenode.path)))}
 
                            %else:
 
                                ${h.link_to(h.safe_unicode(filenode.path),h.url.current(anchor=self.fid('',filenode.path)))}
 
                            %endif
 
                            </div>
 
		                    <div class="changes">${h.fancy_file_stats(stat)}</div>
 
	                    </div>
 
	                %endfor
 
	                % if c.cut_off:
 
	                  ${_('Changeset was too big and was cut off...')}
 
	                % endif
 
	        </div>         
 
	    </div>
 
	    
 
    </div>
 
    	
 
	%for change,filenode,diff,cs1,cs2,stat in c.changes:
 
@@ -233,27 +239,28 @@
 
        	  var f_path = YUD.getAttribute(node,'path');
 
        	  var lineno = getLineNo(tr);
 
        	  var form = createInlineForm(tr, f_path, lineno);
 
        	  YUD.insertAfter(form,tr);
 
          });
 
          
 
          // inject comments into they proper positions
 
          var file_comments = YUQ('.inline-comment-placeholder');
 
          
 
          for (f in file_comments){
 
        	  var box = file_comments[f];
 
        	  var inlines = box.children;
 
        	  
 
        	  for(var i=0; i<inlines.length; i++){
 
        		  var inline = inlines[i];
 
        		  var lineno = YUD.getAttribute(inlines[i],'line');
 
        		  var lineid = "a{0}_{1}".format(YUD.getAttribute(inline,'target_id'),lineno);
 
                  var target_line = YUD.get(lineid);
 
                  var comments = new YAHOO.util.Element(tableTr('inline-comments',inline.innerHTML))
 
                  YUD.insertAfter(comments,target_line.parentNode);        		  
 
        		  try{
 
          		    var inline = inlines[i];
 
          		    var lineno = YUD.getAttribute(inlines[i],'line');
 
          		    var lineid = "{0}_{1}".format(YUD.getAttribute(inline,'target_id'),lineno);
 
                    var target_line = YUD.get(lineid);
 
                    var comments = new YAHOO.util.Element(tableTr('inline-comments',inline.innerHTML))
 
                    YUD.insertAfter(comments,target_line.parentNode);
 
        		  }catch(e){}
 
        	  }
 
          }
 
      })
 
      
 
    </script> 
 
  </div>	
 
</%def>
0 comments (0 inline, 0 general)