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