Dotclear

Changeset 1551:3fd7a893ddf9


Ignore:
Timestamp:
08/23/13 20:09:40 (10 years ago)
Author:
Nicolas <nikrou77@…>
Branch:
default
Message:

Issue #1541 : combo box for category that can received entries is only show if a category with entries is selected to be removed

Location:
admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • admin/categories.php

    r1547 r1551  
    152152     { 
    153153          $attr = 'id="cat_'.$rs->cat_id.'"'; 
    154           if ($rs->nb_total == 0) { 
    155                $attr .= ' class="deletable"'; 
    156           } 
    157154 
    158155          if ($rs->level > $level) { 
     
    168165          echo 
    169166          '<p>'. 
    170           form::checkbox(array('categories[]','cat-'.$rs->cat_id),$rs->cat_id). 
     167          form::checkbox(array('categories[]','cat-'.$rs->cat_id),$rs->cat_id,null,$rs->nb_total>0?'notempty':''). 
    171168          '<label class="classic" for="cat-'.$rs->cat_id.'"><a href="category.php?id='.$rs->cat_id.'">'.html::escapeHTML($rs->cat_title).'</a></label>'. 
    172169          ' (<a href="posts.php?cat_id='.$rs->cat_id.'">'. 
  • admin/js/_categories.js

    r1547 r1551  
    2020     $('#mov_cat').parent().hide(); 
    2121     $('input[name="categories[]"]').click(function() { 
    22           $('#mov_cat').parent().show(); 
     22          if ($('input[name="categories[]"].notempty:checked').length>0) { 
     23               $('#mov_cat').parent().show().parent().removeClass('two-cols').addClass('three-cols'); 
     24          } else { 
     25               $('#mov_cat').parent().hide().parent().removeClass('three-cols').addClass('two-cols'); 
     26          } 
    2327     }); 
    2428 
Note: See TracChangeset for help on using the changeset viewer.

Sites map