Dotclear


Ignore:
Timestamp:
11/25/12 11:39:39 (13 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Add mass expand on posts and comments lists, should fixes #701. This function may cause a big stress on server side, depending on number of entries currently displayed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/js/_posts_list.js

    r995 r1033  
    1111      
    1212     td.insertBefore(img,td.firstChild); 
     13}; 
     14 
     15dotclear.postsExpander = function(line) { 
     16     var td = line.firstChild; 
     17 
     18     var img = document.createElement('img'); 
     19     img.src = dotclear.img_plus_src; 
     20     img.alt = dotclear.img_plus_alt; 
     21     img.className = 'expand'; 
     22     $(img).css('cursor','pointer'); 
     23     img.line = line; 
     24     img.onclick = function() { dotclear.viewPostsContent(this,this.line); }; 
     25 
     26     td.insertBefore(img,td.firstChild); 
     27}; 
     28 
     29dotclear.viewPostsContent = function(img,line) { 
     30     $('#form-entries tr.line').each(function() { 
     31          var td = this.firstChild; 
     32          td.firstChild.click(); 
     33     }); 
     34 
     35     if (img.alt == dotclear.img_plus_alt) { 
     36          img.src = dotclear.img_minus_src; 
     37          img.alt = dotclear.img_minus_alt; 
     38     } else { 
     39          img.src = dotclear.img_plus_src; 
     40          img.alt = dotclear.img_plus_alt; 
     41     } 
    1342}; 
    1443 
     
    74103     }); 
    75104 
     105     $('#form-entries tr:not(.line)').each(function() { 
     106          dotclear.postsExpander(this); 
     107     }); 
    76108     $('#form-entries tr.line').each(function() { 
    77109          dotclear.postExpander(this); 
Note: See TracChangeset for help on using the changeset viewer.

Sites map