changeset 2789:d3e5c259fe71 beta

Fixing inline comment for IE.
author Marcin Kuzminski <marcin@python-works.com>
date Mon, 03 Sep 2012 18:21:42 +0200
parents 2d6d6c346f66
children 3c0ae44557c4
files rhodecode/public/js/rhodecode.js
diffstat 1 files changed, 5 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/public/js/rhodecode.js	Mon Sep 03 17:52:51 2012 +0200
+++ b/rhodecode/public/js/rhodecode.js	Mon Sep 03 18:21:42 2012 +0200
@@ -373,18 +373,17 @@
 };
 
 var tableTr = function(cls, body){
-	var _el = document.createElement('table');
-	
+	var _el = document.createElement('div');
 	var cont = new YAHOO.util.Element(body);
 	var comment_id = fromHTML(body).children[0].id.split('comment-')[1];
 	var id = 'comment-tr-{0}'.format(comment_id);
-	var _html = ('tbody><tr id="{0}" class="{1}">'+
+	var _html = ('<table><tbody><tr id="{0}" class="{1}">'+
 	              '<td class="lineno-inline new-inline"></td>'+
     			  '<td class="lineno-inline old-inline"></td>'+ 
                   '<td>{2}</td>'+
-                 '</tr>').format(id, cls, body);
+                 '</tr></tbody></table>').format(id, cls, body);
 	_el.innerHTML = _html;
-	return _el.children[0].children[0];
+	return _el.children[0].children[0].children[0];
 };
 
 /** comments **/
@@ -445,13 +444,11 @@
 		  }
 	  }	  
 	  YUD.insertAfter(form,parent);
-	  
 	  var f = YUD.get(form);
-	  
 	  var overlay = YUD.getElementsByClassName('overlay',null,f)[0];
 	  var _form = YUD.getElementsByClassName('inline-form',null,f)[0];
 	  
-	  form.on('submit',function(e){
+	  YUE.on(YUD.get(_form), 'submit',function(e){
 		  YUE.preventDefault(e);
 		  
 		  //ajax submit