##// END OF EJS Templates
ie8 fixes for inline comments :/
marcink -
r2698:4debfe3b beta
parent child Browse files
Show More
@@ -75,6 +75,20 b' if(!Array.prototype.indexOf) {'
75 };
75 };
76 }
76 }
77
77
78 // IE(CRAP) doesn't support previousElementSibling
79 var prevElementSibling = function( el ) {
80 if( el.previousElementSibling ) {
81 return el.previousElementSibling;
82 } else {
83 while( el = el.previousSibling ) {
84 if( el.nodeType === 1 ) return el;
85 }
86 }
87 }
88
89
90
91
78 /**
92 /**
79 * SmartColorGenerator
93 * SmartColorGenerator
80 *
94 *
@@ -483,7 +497,10 b' var injectInlineForm = function(tr){'
483 tooltip_activate();
497 tooltip_activate();
484 MentionsAutoComplete('text_'+lineno, 'mentions_container_'+lineno,
498 MentionsAutoComplete('text_'+lineno, 'mentions_container_'+lineno,
485 _USERS_AC_DATA, _GROUPS_AC_DATA);
499 _USERS_AC_DATA, _GROUPS_AC_DATA);
486 YUD.get('text_'+lineno).focus();
500 var _e = YUD.get('text_'+lineno);
501 if(_e){
502 _e.focus();
503 }
487 },10)
504 },10)
488 };
505 };
489
506
@@ -492,7 +509,7 b' var deleteComment = function(comment_id)'
492 var postData = {'_method':'delete'};
509 var postData = {'_method':'delete'};
493 var success = function(o){
510 var success = function(o){
494 var n = YUD.get('comment-tr-'+comment_id);
511 var n = YUD.get('comment-tr-'+comment_id);
495 var root = n.previousElementSibling.previousElementSibling;
512 var root = prevElementSibling(prevElementSibling(n));
496 n.parentNode.removeChild(n);
513 n.parentNode.removeChild(n);
497
514
498 // scann nodes, and attach add button to last one
515 // scann nodes, and attach add button to last one
@@ -1234,6 +1251,7 b' var MentionsAutoComplete = function (div'
1234 return [null, null];
1251 return [null, null];
1235 };
1252 };
1236
1253
1254 if (ownerAC.textboxKeyUpEvent){
1237 ownerAC.textboxKeyUpEvent.subscribe(function(type, args){
1255 ownerAC.textboxKeyUpEvent.subscribe(function(type, args){
1238
1256
1239 var ac_obj = args[0];
1257 var ac_obj = args[0];
@@ -1250,7 +1268,7 b' var MentionsAutoComplete = function (div'
1250 ownerAC.dataSource.mentionQuery = curr_search;
1268 ownerAC.dataSource.mentionQuery = curr_search;
1251
1269
1252 })
1270 })
1253
1271 }
1254 return {
1272 return {
1255 ownerDS: ownerDS,
1273 ownerDS: ownerDS,
1256 ownerAC: ownerAC,
1274 ownerAC: ownerAC,
General Comments 0
You need to be logged in to leave comments. Login now