Changes in [2061:77a99aa76c10:2133:5ba259352620]
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/js/filter-controls.js
r0 r2128 1 1 $(function() { 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(); 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 } 8 28 return false; 9 29 }); -
admin/posts.php
r2048 r2133 210 210 /* DISPLAY 211 211 -------------------------------------------------------- */ 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, 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>", 218 223 dcPage::breadcrumb( 219 224 array( … … 230 235 { 231 236 echo 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 237 '<p class="top-add"><a class="button add" href="post.php">'.__('New entry').'</a></p>'. 240 238 '<form action="posts.php" method="get" id="filters-form">'. 241 '<h3 class=" hidden">'.__('Filter posts list').'</h3>'.242 239 '<h3 class="out-of-screen-if-js">'.__('Filters and display options').'</h3>'. 240 243 241 '<div class="table">'. 244 242 '<div class="cell">'. … … 301 299 $core->formNonce(). 302 300 '</div>'. 303 '</form>' 301 '</form>', 302 $show_filters 304 303 ); 305 304 } -
admin/style/default.css
r2053 r2133 1299 1299 color: #000; 1300 1300 } 1301 a.form-control.open { 1302 background: url(../images/hide.png) no-repeat 4px center; 1303 } 1301 1304 #filters-form { 1302 1305 border: 1px dashed #999; -
inc/admin/lib.pager.php
r2008 r2131 151 151 class adminPostList extends adminGenericList 152 152 { 153 public function display($page,$nb_per_page,$enclose_block='' )153 public function display($page,$nb_per_page,$enclose_block='',$filter=false) 154 154 { 155 155 if ($this->rs->isEmpty()) 156 156 { 157 echo '<p><strong>'.__('No entry').'</strong></p>'; 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 } 158 162 } 159 163 else … … 166 170 } 167 171 } 168 $html_block =172 $html_block = 169 173 '<div class="table-outer">'. 170 '<table><caption class="hidden">'.__('Entries list').'</caption><tr>'. 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>'. 171 183 '<th colspan="2" class="first">'.__('Title').'</th>'. 172 184 '<th scope="col">'.__('Date').'</th>'.
Note: See TracChangeset
for help on using the changeset viewer.