equal
deleted
inserted
replaced
72 |
72 |
73 html += '<h3>' + $lang.get('comment_heading') + '</h3>'; |
73 html += '<h3>' + $lang.get('comment_heading') + '</h3>'; |
74 |
74 |
75 var ns = ENANO_PAGE_TYPE; |
75 var ns = ENANO_PAGE_TYPE; |
76 |
76 |
77 // Counters |
77 // Counters |
78 if ( data.auth_mod_comments ) |
78 if ( data.auth_mod_comments ) |
79 { |
79 { |
80 var cnt = ( data.auth_mod_comments ) ? data.count_total : data.count_appr; |
80 var cnt = ( data.auth_mod_comments ) ? data.count_total : data.count_appr; |
81 |
81 |
82 var subst = { |
82 var subst = { |
120 html += commentpages.html; |
120 html += commentpages.html; |
121 } |
121 } |
122 |
122 |
123 if ( data.auth_post_comments ) |
123 if ( data.auth_post_comments ) |
124 { |
124 { |
125 |
|
126 // Posting form |
125 // Posting form |
127 |
126 |
128 html += '<h3>' + $lang.get('comment_postform_title') + '</h3>'; |
127 html += '<h3>' + $lang.get('comment_postform_title') + '</h3>'; |
129 html += '<p>' + $lang.get('comment_postform_blurb'); |
128 html += '<p>' + $lang.get('comment_postform_blurb'); |
130 if ( data.approval_needed ) |
129 if ( data.approval_needed ) |
147 html += ' </td></tr>'; |
146 html += ' </td></tr>'; |
148 } |
147 } |
149 html += ' <tr><td colspan="2" style="text-align: center;"><input type="button" onclick="submitComment();" value="' + $lang.get('comment_postform_btn_submit') + '" /></td></tr>'; |
148 html += ' <tr><td colspan="2" style="text-align: center;"><input type="button" onclick="submitComment();" value="' + $lang.get('comment_postform_btn_submit') + '" /></td></tr>'; |
150 html += ' </table>'; |
149 html += ' </table>'; |
151 html += '</div>'; |
150 html += '</div>'; |
152 |
|
153 } |
151 } |
154 |
152 |
155 document.getElementById('ajaxEditContainer').innerHTML = html; |
153 document.getElementById('ajaxEditContainer').innerHTML = html; |
156 |
154 |
157 for ( i = 0; i < data.comments.length; i++ ) |
155 for ( i = 0; i < data.comments.length; i++ ) |
243 tplvars.USER_LEVEL += '<br /><b>' + $lang.get('comment_on_foe_list') + '</b>'; |
241 tplvars.USER_LEVEL += '<br /><b>' + $lang.get('comment_on_foe_list') + '</b>'; |
244 |
242 |
245 parser.assign_vars(tplvars); |
243 parser.assign_vars(tplvars); |
246 parser.assign_bool(tplbool); |
244 parser.assign_bool(tplbool); |
247 |
245 |
248 return '<div id="comment_holder_' + i + '"><input type="hidden" value="'+this_comment.comment_id+'" /><input type="hidden" id="comment_source_'+i+'" />' + parser.run() + '</div>'; |
246 var ret = '<div id="comment_holder_' + i + '">'; |
|
247 ret += '<input type="hidden" value="'+this_comment.comment_id+'" />'; |
|
248 ret += '<input type="hidden" id="comment_source_'+i+'" />'; |
|
249 ret += parser.run(); |
|
250 ret += '</div>'; |
|
251 return ret; |
249 } |
252 } |
250 |
253 |
251 function displayCommentForm() |
254 function displayCommentForm() |
252 { |
255 { |
253 document.getElementById('leave_comment_button').style.display = 'none'; |
256 document.getElementById('leave_comment_button').style.display = 'none'; |
386 { |
389 { |
387 document.getElementById('comment_source_' + data.id).value = data.src; |
390 document.getElementById('comment_source_' + data.id).value = data.src; |
388 } |
391 } |
389 if ( data.ip_addr ) |
392 if ( data.ip_addr ) |
390 { |
393 { |
391 var span = $('comment_ip_' + data.local_id).object; |
394 var span = $dynano('comment_ip_' + data.local_id).object; |
392 if ( !span ) |
395 if ( !span ) |
393 return false; |
396 return false; |
394 span.innerHTML = $lang.get('comment_msg_ip_address') + ' <a href="#rdns" onclick="ajaxReverseDNS(this); return false;">' + data.ip_addr + '</a>'; |
397 span.innerHTML = $lang.get('comment_msg_ip_address') + ' <a href="#rdns" onclick="ajaxReverseDNS(this); return false;">' + data.ip_addr + '</a>'; |
395 } |
398 } |
396 } |
399 } |
603 } |
606 } |
604 |
607 |
605 function viewCommentIP(id, local_id) |
608 function viewCommentIP(id, local_id) |
606 { |
609 { |
607 // set "loading" indicator on IP button |
610 // set "loading" indicator on IP button |
608 var span = $('comment_ip_' + local_id).object; |
611 var span = $dynano('comment_ip_' + local_id).object; |
609 if ( !span ) |
612 if ( !span ) |
610 return false; |
613 return false; |
611 span.innerHTML = '<img alt="..." src="' + ajax_load_icon + '" />'; |
614 span.innerHTML = '<img alt="..." src="' + ajax_load_icon + '" />'; |
612 |
615 |
613 var parms = { |
616 var parms = { |