Changeset 2531:2daf216ff255 for admin/js/_post.js
- Timestamp:
- 11/09/13 11:40:06 (12 years ago)
- Branch:
- 2.6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/js/_post.js
r2527 r2531 1 dotclear.commentExpander = function(line) {2 $('<a href="#"><img src="'+dotclear.img_plus_src+'" alt="'+dotclear.img_plus_alt+'"/></a>')3 .click(function(e) {4 dotclear.toggleArrow(this);5 dotclear.viewCommentContent(line);6 e.preventDefault();7 })8 .prependTo($(line).children().get(0)); // first td9 };10 11 dotclear.toggleArrow = function(link,action) {12 action = action || '';13 var img = $(link).children().get(0);14 if (action=='') {15 if (img.alt==dotclear.img_plus_alt) {16 action = 'open';17 } else {18 action = 'close';19 }20 }21 22 if (action=='open') {23 img.src = dotclear.img_minus_src;24 img.alt = dotclear.img_minus_alt;25 } else {26 img.src = dotclear.img_plus_src;27 img.alt = dotclear.img_plus_alt;28 }29 30 return action;31 }32 33 1 dotclear.viewCommentContent = function(line,action) { 34 2 var commentId = $(line).attr('id').substr(1); … … 140 108 141 109 excerpt_content = $('#post_excerpt').css('display') != 'none' ? $('#post_excerpt').val() : $('#excerpt-area iframe').contents().find('body').html(); 142 post_content 110 post_content = $('#post_content').css('display') != 'none' ? $('#post_content').val() : $('#content-area iframe').contents().find('body').html(); 143 111 144 112 var params = { … … 276 244 277 245 $('#comments').onetabload(function() { 278 $('#form-comments .comments-list tr.line').each(function() { 279 dotclear.commentExpander(this); 246 $.expandContent({ 247 lines:$('#form-comments .comments-list tr.line'), 248 callback:dotclear.viewCommentContent 280 249 }); 281 250 $('#form-comments .checkboxes-helpers').each(function() { … … 287 256 288 257 $('#trackbacks').onetabload(function() { 289 $('#form-trackbacks .comments-list tr.line').each(function() { 290 dotclear.commentExpander(this); 258 $.expandContent({ 259 lines:$('#form-trackbacks .comments-list tr.line'), 260 callback:dotclear.viewCommentContent 291 261 }); 292 262 $('#form-trackbacks .checkboxes-helpers').each(function() {
Note: See TracChangeset
for help on using the changeset viewer.