Dotclear


Ignore:
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • admin/js/filter-controls.js

    r2128 r0  
    11$(function() { 
    2       
    3      $filtersform = $('#filters-form'); 
    4      $filtersform.before('<p><a id="filter-control" class="form-control" href="?" style="display:inline">'+dotclear.msg.filter_posts_list+'</a></p>') 
    5       
    6      if( dotclear.msg.show_filters == 'false' ) { 
    7           $filtersform.hide(); 
    8      } else { 
    9           $('#filter-control') 
    10                .addClass('open') 
    11                .text(dotclear.msg.cancel_the_filter); 
    12      } 
    13       
    14      $('#filter-control').click(function() { 
    15           if( $(this).hasClass('open') ) { 
    16                if( dotclear.msg.show_filters == 'true' ) { 
    17                     return true; 
    18                } else { 
    19                     $filtersform.hide(); 
    20                     $(this).removeClass('open') 
    21                             .text(dotclear.msg.filter_posts_list); 
    22                } 
    23           } else { 
    24                $filtersform.show(); 
    25                $(this).addClass('open') 
    26                        .text(dotclear.msg.cancel_the_filter); 
    27           } 
     2     var c = $('#filter-control'); 
     3     c.css('display','inline'); 
     4     $('#filters-form').hide(); 
     5     c.click(function() { 
     6          $('#filters-form').show(); 
     7          $(this).hide(); 
    288          return false; 
    299     }); 
  • admin/posts.php

    r2133 r2048  
    210210     /* DISPLAY 
    211211     -------------------------------------------------------- */ 
    212  
    213      dcPage::open(__('Entries'), 
    214           dcPage::jsLoad('js/_posts_list.js'). 
    215           dcPage::jsLoad('js/filter-controls.js'). 
    216           '<script type="text/javascript">'."\n". 
    217           "//<![CDATA["."\n". 
    218           dcPage::jsVar('dotclear.msg.show_filters', $show_filters ? 'true':'false')."\n". 
    219           dcPage::jsVar('dotclear.msg.filter_posts_list',__('Filter posts list'))."\n". 
    220           dcPage::jsVar('dotclear.msg.cancel_the_filter',__('Cancel the filter'))."\n". 
    221           "//]]>". 
    222           "</script>", 
     212     $starting_script = dcPage::jsLoad('js/_posts_list.js'); 
     213     if (!$show_filters) { 
     214          $starting_script .= dcPage::jsLoad('js/filter-controls.js'); 
     215     } 
     216 
     217     dcPage::open(__('Entries'),$starting_script, 
    223218          dcPage::breadcrumb( 
    224219               array( 
     
    235230     { 
    236231          echo 
    237           '<p class="top-add"><a class="button add" href="post.php">'.__('New entry').'</a></p>'. 
     232          '<p class="top-add"><a class="button add" href="post.php">'.__('New entry').'</a></p>'; 
     233           
     234          if (!$show_filters) { 
     235               echo '<p><a id="filter-control" class="form-control" href="#">'. 
     236               __('Filter posts list').'</a></p>'; 
     237          } 
     238           
     239          echo 
    238240          '<form action="posts.php" method="get" id="filters-form">'. 
    239           '<h3 class="out-of-screen-if-js">'.__('Filters and display options').'</h3>'. 
    240       
     241          '<h3 class="hidden">'.__('Filter posts list').'</h3>'. 
     242 
    241243          '<div class="table">'. 
    242244          '<div class="cell">'. 
     
    299301          $core->formNonce(). 
    300302          '</div>'. 
    301           '</form>', 
    302           $show_filters 
     303          '</form>' 
    303304          ); 
    304305     } 
  • admin/style/default.css

    r2133 r2053  
    12991299     color: #000; 
    13001300     } 
    1301 a.form-control.open { 
    1302      background: url(../images/hide.png) no-repeat 4px center; 
    1303      } 
    13041301#filters-form { 
    13051302     border: 1px dashed #999; 
  • inc/admin/lib.pager.php

    r2131 r2008  
    151151class adminPostList extends adminGenericList 
    152152{ 
    153      public function display($page,$nb_per_page,$enclose_block='',$filter=false) 
     153     public function display($page,$nb_per_page,$enclose_block='') 
    154154     { 
    155155          if ($this->rs->isEmpty()) 
    156156          { 
    157                if( $filter ) { 
    158                     echo '<p><strong>'.__('No entry matches the filter').'</strong></p>'; 
    159                } else { 
    160                     echo '<p><strong>'.__('No entry').'</strong></p>'; 
    161                } 
     157               echo '<p><strong>'.__('No entry').'</strong></p>'; 
    162158          } 
    163159          else 
     
    170166                    } 
    171167               } 
    172                $html_block  =  
     168               $html_block = 
    173169               '<div class="table-outer">'. 
    174                '<table class="clear">'; 
    175                 
    176                if( $filter ) { 
    177                     $html_block .= '<caption>'.sprintf(__('List of %s entries match the filter.'), $this->rs_count).'</caption>'; 
    178                } else { 
    179                     $html_block .= '<caption class="hidden">'.__('Entries list').'</caption>'; 
    180                } 
    181                           
    182                $html_block .= '<tr>'. 
     170               '<table><caption class="hidden">'.__('Entries list').'</caption><tr>'. 
    183171               '<th colspan="2" class="first">'.__('Title').'</th>'. 
    184172               '<th scope="col">'.__('Date').'</th>'. 
Note: See TracChangeset for help on using the changeset viewer.

Sites map