Changeset - 423a14349ef3
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 13 years ago 2012-09-03 17:33:21
marcin@python-works.com
Don't use .innerHTML for tr field, I'm looking at you IE
1 file changed with 8 insertions and 7 deletions:
0 comments (0 inline, 0 general)
rhodecode/public/js/rhodecode.js
Show inline comments
 
@@ -364,35 +364,36 @@ var q_filter = function(target,nodes,dis
 
       }	  	   
 

	
 
	   // if repo_count is set update the number
 
	   var cnt = YUD.get('repo_count');
 
	   if(cnt){
 
		   YUD.get('repo_count').innerHTML = showing;
 
	   }       
 
       
 
	}	
 
};
 

	
 
var tableTr = function(cls,body){
 
	var tr = document.createElement('tr');
 
	YUD.addClass(tr, cls);
 
	
 
	var _el = document.createElement('table');
 
	
 
	var cont = new YAHOO.util.Element(body);
 
	var comment_id = fromHTML(body).children[0].id.split('comment-')[1];
 
	tr.id = 'comment-tr-{0}'.format(comment_id);
 
	tr.innerHTML = '<td class="lineno-inline new-inline"></td>'+
 
	var id = 'comment-tr-{0}'.format(comment_id);
 
	var _html = ('tbody><tr id="{0}" class="{1}">'+
 
	              '<td class="lineno-inline new-inline"></td>'+
 
    				 '<td class="lineno-inline old-inline"></td>'+ 
 
                     '<td>{0}</td>'.format(body);
 
	return tr;
 
                  '<td>{2}</td>'+
 
                 '</tr>').format(id, cls, body);
 
	_el.innerHTML = _html;
 
	return _el.children[0].children[0];
 
};
 

	
 
/** comments **/
 
var removeInlineForm = function(form) {
 
	form.parentNode.removeChild(form);
 
};
 

	
 
var createInlineForm = function(parent_tr, f_path, line) {
 
	var tmpl = YUD.get('comment-inline-form-template').innerHTML;
 
	tmpl = tmpl.format(f_path, line);
 
	var form = tableTr('comment-form-inline',tmpl)
 
	
0 comments (0 inline, 0 general)