Dotclear


Ignore:
Location:
admin
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • admin/categories.php

    r1553 r1563  
    183183     if (count($combo_action)>0) { 
    184184           echo 
    185            '<div class="two-cols">'. 
     185           '<div class="three-cols">'. 
    186186           '<p class="col checkboxes-helpers"></p>'. 
    187            '<div class="col right">'. 
    188            '<p class="cat-actions"><label for="action" class="classic">'.__('Selected categories action:').'</label> '. 
    189            form::combo('action',$combo_action).' '. 
    190            '<span id="mov-cat"><label for="mov_cat">'.__('Choose the category which will receive its entries:').'</label> '. 
    191            form::combo('mov_cat',array_merge(array(__('(No cat)') => ''),$categories_combo),'','').' </span>'. 
     187           '<div class="col" id="mov-cat">'. 
     188           '<label for="mov_cat">'.__('Choose the category which will receive its entries:').'</label> '. 
     189           form::combo('mov_cat',array_merge(array(__('(No cat)') => ''),$categories_combo),'',''). 
     190           '</div>'. 
     191           '<div class="col">'. 
    192192           $core->formNonce(). 
    193            '<input type="submit" value="'.__('OK').'" /></p>'. 
     193           '<input type="submit" value="'.__('Delete').'"/>'. 
    194194           '</div>'. 
    195195           '</div>'. 
  • admin/js/_categories.js

    r1551 r1563  
    1818     }); 
    1919 
    20      $('#mov_cat').parent().hide(); 
    21      $('input[name="categories[]"]').click(function() { 
    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           } 
    27      }); 
    28  
    2920     dotclear.categoriesActionsHelper(); 
    3021 
  • admin/js/_post.js

    r1530 r1562  
    115115          // Confirm post deletion 
    116116          $('input[name="delete"]').click(function() { 
    117                return window.confirm(dotclear.msg.confirm_delete_post); 
     117                    return window.confirm(dotclear.msg.confirm_delete_post); 
    118118          }); 
    119119 
     
    121121          $('#notes-area label').toggleWithLegend($('#notes-area').children().not('label'),{ 
    122122               cookie: 'dcx_post_notes', 
    123                   hide: $('#post_notes').val() == '', 
    124                   legend_click: true 
     123               hide: $('#post_notes').val() == '' 
    125124          }); 
    126125          $('#create_cat').toggleWithLegend( 
    127126               $('#create_cat').parent().children().not('#create_cat'), 
    128                {legend_click: true} // no cookie on new category as we don't use this every day 
     127               {} // no cookie on new category as we don't use this every day 
    129128          ); 
    130129          $('#post_lang').parent().toggleWithLegend($('#post_lang'),{ 
    131               cookie: 'dcx_post_lang', 
    132               legend_click: true 
     130               cookie: 'dcx_post_lang' 
    133131          }); 
    134132          $('#post_password').parent().toggleWithLegend($('#post_password'),{ 
    135133               cookie: 'dcx_post_password', 
    136               hide: $('#post_password').val() == '', 
    137               legend_click: true 
     134               hide: $('#post_password').val() == '' 
    138135          }); 
    139136          $('#post_status').parent().toggleWithLegend($('#post_status'),{ 
    140                   cookie: 'dcx_post_status', 
    141               legend_click: true 
     137               cookie: 'dcx_post_status' 
    142138          }); 
    143139          $('#post_dt').parent().toggleWithLegend($('#post_dt').parent().children().not('label'),{ 
    144               cookie: 'dcx_post_dt', 
    145               legend_click: true 
     140               cookie: 'dcx_post_dt' 
    146141          }); 
    147142          $('#post_format').parent().toggleWithLegend($('#post_format').parent().children().not('label').add($('#post_format').parents('p').next()),{ 
    148               cookie: 'dcx_post_format', 
    149               legend_click: true 
     143               cookie: 'dcx_post_format' 
    150144          }); 
    151145          $('#cat_id').parent().toggleWithLegend($('#cat_id'),{ 
    152               cookie: 'cat_id', 
    153               legend_click: true 
     146               cookie: 'cat_id' 
    154147          }); 
    155148          $('#post_url').parent().toggleWithLegend($('#post_url').parent().children().not('label'),{ 
    156               cookie: 'post_url', 
    157               legend_click: true 
     149               cookie: 'post_url' 
    158150          }); 
    159151          // We load toolbar on excerpt only when it's ready 
     
    166158          contentTb.switchMode(formatField.value); 
    167159          excerptTb.switchMode(formatField.value); 
    168            
     160 
    169161          // Replace attachment remove links by a POST form submit 
    170162          $('a.attachment-remove').click(function() { 
  • admin/js/common.js

    r1556 r1563  
    304304     categoriesActionsHelper: function() { 
    305305          $('#form-categories').submit(function() { 
    306                var action = $(this).find('select[name="action"]').val(); 
    307                var checked = false; 
    308  
    309                $(this).find('input[name="categories[]"]').each(function() { 
    310                     if (this.checked) { 
    311                          checked = true; 
    312                     } 
    313                }); 
    314  
    315                if (!checked) { return false; } 
    316  
    317                if (action == 'delete') { 
    318                     return window.confirm(dotclear.msg.confirm_delete_categories.replace('%s',$('input[name="categories[]"]:checked').size())); 
    319                } 
    320  
    321                return true; 
     306              var nb_ckecked = $('input[name="categories[]"]:checked').length; 
     307              if (nb_ckecked==0) { 
     308               return false; 
     309              } 
     310 
     311              return window.confirm(dotclear.msg.confirm_delete_categories.replace('%s',nb_ckecked)); 
    322312          }); 
    323313     }, 
Note: See TracChangeset for help on using the changeset viewer.

Sites map