Dotclear

Changeset 2609:c26642f775e2 for admin/js


Ignore:
Timestamp:
12/10/13 09:00:09 (12 years ago)
Author:
Dsls
Branch:
twig
Parents:
2468:d7fda5a0bd39 (diff), 2608:3365c9df16a6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge with default

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/js/_post.js

    r2313 r2593  
    1 dotclear.commentExpander = function(line) { 
    2      var td = line.firstChild; 
    3  
    4      var img = document.createElement('img'); 
    5      img.src = dotclear.img_plus_src; 
    6      img.alt = dotclear.img_plus_alt; 
    7      img.className = 'expand'; 
    8      $(img).css('cursor','pointer'); 
    9      img.line = line; 
    10      img.onclick = function() { dotclear.viewCommentContent(this,this.line); }; 
    11  
    12      td.insertBefore(img,td.firstChild); 
    13 }; 
    14  
    15 dotclear.viewCommentContent = function(img,line) { 
    16      var commentId = line.id.substr(1); 
    17  
     1dotclear.viewCommentContent = function(line,action) { 
     2     var commentId = $(line).attr('id').substr(1); 
    183     var tr = document.getElementById('ce'+commentId); 
    194 
     
    2611          tr.appendChild(td); 
    2712 
    28           img.src = dotclear.img_minus_src; 
    29           img.alt = dotclear.img_minus_alt; 
    30  
    3113          // Get comment content 
    3214          $.get('services.php',{f:'getCommentById',id: commentId},function(data) { 
     
    6042          $(tr).toggle(); 
    6143          $(line).toggleClass('expand'); 
    62           img.src = dotclear.img_minus_src; 
    63           img.alt = dotclear.img_minus_alt; 
    6444     } 
    6545     else 
     
    6747          $(tr).toggle(); 
    6848          $(line).toggleClass('expand'); 
    69           img.src = dotclear.img_plus_src; 
    70           img.alt = dotclear.img_plus_alt; 
    7149     } 
    7250}; 
     
    9068                    $(this).val(last_post_format); 
    9169               } 
    92                 
     70 
    9371               $('.format_control > *').addClass('hide'); 
    9472               $('.format_control:not(.control_no_'+$(this).val()+') > *').removeClass('hide'); 
     
    10280     if (document.getElementById('comment_content')) { 
    10381          var commentTb = new jsToolBar(document.getElementById('comment_content')); 
     82          commentTb.draw('xhtml'); 
    10483     } 
    10584 
     
    128107          a.className = 'button '; 
    129108          $(a).click(function() { 
    130                 
     109 
    131110               excerpt_content = $('#post_excerpt').css('display') != 'none' ? $('#post_excerpt').val() : $('#excerpt-area iframe').contents().find('body').html(); 
    132                post_content    = $('#post_content').css('display') != 'none' ? $('#post_content').val() : $('#content-area iframe').contents().find('body').html(); 
    133                 
     111               post_content   = $('#post_content').css('display') != 'none' ? $('#post_content').val() : $('#content-area iframe').contents().find('body').html(); 
     112 
    134113               var params = { 
    135114                    xd_check: dotclear.nonce, 
     
    146125                         return false; 
    147126                    } 
    148                           
     127 
    149128                    $('.message, .success, .error, .warning-msg').remove(); 
    150129 
     
    152131                         var p = document.createElement('p'); 
    153132                         p.id = 'markup-validator'; 
    154                           
     133 
    155134                         $(p).addClass('success'); 
    156135                         $(p).text(dotclear.msg.xhtml_valid); 
     
    162141                         var div = document.createElement('div'); 
    163142                         div.id = 'markup-validator'; 
    164                           
     143 
    165144                         $(div).addClass('error'); 
    166145                         $(div).html('<p><strong>' + dotclear.msg.xhtml_not_valid + '</strong></p>' + $(data).find('errors').text()); 
     
    185164 
    186165          a.appendChild(document.createTextNode(dotclear.msg.xhtml_validator)); 
    187            
     166 
    188167          $('.format_control > *').addClass('hide'); 
    189168          $('.format_control:not(.control_no_'+last_post_format+') > *').removeClass('hide'); 
     
    266245 
    267246     $('#comments').onetabload(function() { 
    268           $('#form-comments .comments-list tr.line').each(function() { 
    269                dotclear.commentExpander(this); 
     247          $.expandContent({ 
     248               lines:$('#form-comments .comments-list tr.line'), 
     249               callback:dotclear.viewCommentContent 
    270250          }); 
    271251          $('#form-comments .checkboxes-helpers').each(function() { 
     
    277257 
    278258     $('#trackbacks').onetabload(function() { 
    279           $('#form-trackbacks .comments-list tr.line').each(function() { 
    280                dotclear.commentExpander(this); 
     259          $.expandContent({ 
     260               lines:$('#form-trackbacks .comments-list tr.line'), 
     261               callback:dotclear.viewCommentContent 
    281262          }); 
    282263          $('#form-trackbacks .checkboxes-helpers').each(function() { 
Note: See TracChangeset for help on using the changeset viewer.

Sites map