##// END OF EJS Templates
inline comment form is displayed now under all comments.
marcink -
r1704:3efc47f5 beta
parent child Browse files
Show More
@@ -3456,6 +3456,9 form.comment-inline-form {
3456 3456 color: #666;
3457 3457 font-size: 16px;
3458 3458 }
3459 .inline-comments-button .add-comment{
3460 margin:10px 5px !important;
3461 }
3459 3462 .notifications{
3460 3463 width:22px;
3461 3464 padding:2px;
@@ -217,8 +217,6
217 217 YUD.setStyle(comments[c],'display',show);
218 218 }
219 219 })
220
221
222 220
223 221 YUE.on(YUQ('.line'),'click',function(e){
224 222 var tr = e.currentTarget;
@@ -230,7 +228,12
230 228 var f_path = YUD.getAttribute(node,'path');
231 229 var lineno = getLineNo(tr);
232 230 var form = createInlineForm(tr, f_path, lineno);
233 YUD.insertAfter(form,tr);
231 var target_tr = tr;
232 if(YUD.hasClass(YUD.getNextSibling(tr),'inline-comments')){
233 target_tr = YUD.getNextSibling(tr);
234 }
235 YUD.insertAfter(form,target_tr);
236 YUD.get('text_'+lineno).focus()
234 237 });
235 238
236 239 // inject comments into they proper positions
@@ -241,12 +244,13
241 244 var inlines = box.children;
242 245 for(var i=0; i<inlines.length; i++){
243 246 try{
247
244 248 var inline = inlines[i];
245 249 var lineno = YUD.getAttribute(inlines[i],'line');
246 250 var lineid = "{0}_{1}".format(YUD.getAttribute(inline,'target_id'),lineno);
247 251 var target_line = YUD.get(lineid);
248 var comments = new YAHOO.util.Element(tableTr('inline-comments',inline.innerHTML))
249 YUD.insertAfter(comments,target_line.parentNode);
252 var comment = new YAHOO.util.Element(tableTr('inline-comments',inline.innerHTML))
253 YUD.insertAfter(comment,target_line.parentNode);
250 254 }catch(e){}
251 255 }
252 256 }
@@ -40,7 +40,7
40 40 <div class="clearfix">
41 41 <div class="comment-help">${_('Commenting on line')} {1} ${_('comments parsed using')}
42 42 <a href="${h.url('rst_help')}">RST</a> ${_('syntax')}</div>
43 ${h.textarea('text')}
43 <textarea id="text_{1}" name="text"></textarea>
44 44 </div>
45 45 <div class="comment-button">
46 46 <input type="hidden" name="f_path" value="{0}">
General Comments 0
You need to be logged in to leave comments. Login now