Index: admin/js/filters.js
===================================================================
--- admin/js/filters.js	(revision 226)
+++ 	(revision )
@@ -1,5 +1,0 @@
-$(function() {
-	$('#toggle-filters').click(function(e) {
-		$('#filters').toggle('slow');
-	});
-});
Index: admin/posts.php
===================================================================
--- admin/posts.php	(revision 228)
+++ admin/posts.php	(revision 158)
@@ -48,4 +48,5 @@
 	# Filter form we'll put in html_block
 	$users_combo = $categories_combo = array();
+	$users_combo['-'] = $categories_combo['-'] = '';
 	while ($users->fetch())
 	{
@@ -68,4 +69,5 @@
 	
 	$status_combo = array(
+	'-' => ''
 	);
 	foreach ($core->blog->getAllPostStatus() as $k => $v) {
@@ -74,4 +76,5 @@
 	
 	$selected_combo = array(
+	'-' => '',
 	__('selected') => '1',
 	__('not selected') => '0'
@@ -79,8 +82,10 @@
 	
 	# Months array
+	$dt_m_combo['-'] = '';
 	while ($dates->fetch()) {
 		$dt_m_combo[dt::str('%B %Y',$dates->ts())] = $dates->year().$dates->month();
 	}
 	
+	$lang_combo['-'] = '';
 	while ($langs->fetch()) {
 		$lang_combo[$langs->post_lang] = $langs->post_lang;
@@ -133,4 +138,15 @@
 /* Get posts
 -------------------------------------------------------- */
+$user_id = !empty($_GET['user_id']) ?	$_GET['user_id'] : '';
+$cat_id = !empty($_GET['cat_id']) ?	$_GET['cat_id'] : '';
+$status = isset($_GET['status']) ?	$_GET['status'] : '';
+$selected = isset($_GET['selected']) ?	$_GET['selected'] : '';
+$month = !empty($_GET['month']) ?		$_GET['month'] : '';
+$lang = !empty($_GET['lang']) ?		$_GET['lang'] : '';
+$sortby = !empty($_GET['sortby']) ?	$_GET['sortby'] : 'post_dt';
+$order = !empty($_GET['order']) ?		$_GET['order'] : 'desc';
+
+$show_filters = false;
+
 $page = !empty($_GET['page']) ? (integer) $_GET['page'] : 1;
 $nb_per_page =  30;
@@ -143,43 +159,59 @@
 }
 
-$params = new ArrayObject();
 $params['limit'] = array((($page-1)*$nb_per_page),$nb_per_page);
 $params['no_content'] = true;
 
-$filterSet = new dcFilterSet('posts.php');
-class monthComboFilter extends comboFilter {
-	public function applyFilter($params) {
-		$month=$this->values[0];
-		$params['post_month'] = substr($month,4,2);
-		$params['post_year'] = substr($month,0,4);
-	}
-}
-$filterSet
-	->addFilter(new comboFilter(
-		'users',__('Author'), 'user', $users_combo))
-	->addFilter(new comboFilter(
-		'category',__('Category'), 'cat_id', $categories_combo))
-	->addFilter(new comboFilter(
-		'post_status',__('Status'), 'post_status', $status_combo,array('singleval' => 1)))
-	->addFilter(new comboFilter(
-		'post_selected',__('Selected'), 'post_selected', $selected_combo))
-	->addFilter(new comboFilter(
-		'lang',__('Lang'), 'post_lang', $lang_combo))
-	->addFilter(new monthComboFilter(
-		'month',__('Month'), 'post_month', $dt_m_combo,array('singleval' => 1)));
-$filterSet->setValues($_GET);
+# - User filter
+if ($user_id !== '' && in_array($user_id,$users_combo)) {
+	$params['user_id'] = $user_id;
+	$show_filters = true;
+}
+
+# - Categories filter
+if ($cat_id !== '' && in_array($cat_id,$categories_combo)) {
+	$params['cat_id'] = $cat_id;
+	$show_filters = true;
+}
+
+# - Status filter
+if ($status !== '' && in_array($status,$status_combo)) {
+	$params['post_status'] = $status;
+	$show_filters = true;
+}
+
+# - Selected filter
+if ($selected !== '' && in_array($selected,$selected_combo)) {
+	$params['post_selected'] = $selected;
+	$show_filters = true;
+}
+
+# - Month filter
+if ($month !== '' && in_array($month,$dt_m_combo)) {
+	$params['post_month'] = substr($month,4,2);
+	$params['post_year'] = substr($month,0,4);
+	$show_filters = true;
+}
+
+# - Lang filter
+if ($lang !== '' && in_array($lang,$lang_combo)) {
+	$params['post_lang'] = $lang;
+	$show_filters = true;
+}
+
+# - Sortby and order filter
+if ($sortby !== '' && in_array($sortby,$sortby_combo)) {
+	if ($order !== '' && in_array($order,$order_combo)) {
+		$params['order'] = $sortby.' '.$order;
+	}
+	
+	if ($sortby != 'post_dt' || $order != 'desc') {
+		$show_filters = true;
+	}
+}
 
 # Get posts
 try {
-	$nfparams = $params->getArrayCopy();
-	$filtered = $filterSet->applyFilters($params);
 	$posts = $core->blog->getPosts($params);
 	$counter = $core->blog->getPosts($params,true);
-	if ($filtered) {
-		$totalcounter = $core->blog->getPosts($nfparams,true);
-		$page_title = sprintf(__('Entries / %s filtered out of %s'),$counter->f(0),$totalcounter->f(0));
-	} else {
-		$page_title = __('Entries');
-	}
 	$post_list = new adminPostList($core,$posts,$counter->f(0));
 } catch (Exception $e) {
@@ -190,6 +222,7 @@
 -------------------------------------------------------- */
 $starting_script = dcPage::jsLoad('js/_posts_list.js');
-
-$starting_script = $filterSet->header();
+if (!$show_filters) {
+	$starting_script .= dcPage::jsLoad('js/filter-controls.js');
+}
 
 dcPage::open(__('Entries'),$starting_script);
@@ -198,9 +231,48 @@
 {
 	echo 
-	'<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; '.$page_title.'</h2>'.
+	'<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; '.__('Entries').'</h2>'.
 	'<p class="top-add"><a class="button add" href="post.php">'.__('New entry').'</a></p>';
-
-	$filterSet->display();
-
+	
+	if (!$show_filters) {
+		echo '<p><a id="filter-control" class="form-control" href="#">'.
+		__('Filters').'</a></p>';
+	}
+	
+	echo
+	'<form action="posts.php" method="get" id="filters-form">'.
+	'<fieldset><legend>'.__('Filters').'</legend>'.
+	'<div class="three-cols">'.
+	'<div class="col">'.
+	'<label for="user_id">'.__('Author:').
+	form::combo('user_id',$users_combo,$user_id).'</label> '.
+	'<label for="cat_id">'.__('Category:').
+	form::combo('cat_id',$categories_combo,$cat_id).'</label> '.
+	'<label for="status">'.__('Status:').
+	form::combo('status',$status_combo,$status).'</label> '.
+	'</div>'.
+	
+	'<div class="col">'.
+	'<label for="selected">'.__('Selected:').
+	form::combo('selected',$selected_combo,$selected).'</label> '.
+	'<label for="month">'.__('Month:').
+	form::combo('month',$dt_m_combo,$month).'</label> '.
+	'<label for="lang">'.__('Lang:').
+	form::combo('lang',$lang_combo,$lang).'</label> '.
+	'</div>'.
+	
+	'<div class="col">'.
+	'<p><label for="sortby">'.__('Order by:').
+	form::combo('sortby',$sortby_combo,$sortby).'</label> '.
+	'<label for="order">'.__('Sort:').
+	form::combo('order',$order_combo,$order).'</label></p>'.
+	'<p><label for="nb" class="classic">'.	form::field('nb',3,3,$nb_per_page).' '.
+	__('Entries per page').'</label></p> '.
+	'<p><input type="submit" value="'.__('Apply filters').'" /></p>'.
+	'</div>'.
+	'</div>'.
+	'<br class="clear" />'. //Opera sucks
+	'</fieldset>'.
+	'</form>';
+	
 	# Show posts
 	$post_list->display($page,$nb_per_page,
@@ -215,5 +287,14 @@
 	form::combo('action',$combo_action).
 	'<input type="submit" value="'.__('ok').'" /></p>'.
-	$filterSet->getFormFieldsAsHidden().
+	form::hidden(array('user_id'),$user_id).
+	form::hidden(array('cat_id'),$cat_id).
+	form::hidden(array('status'),$status).
+	form::hidden(array('selected'),$selected).
+	form::hidden(array('month'),$month).
+	form::hidden(array('lang'),$lang).
+	form::hidden(array('sortby'),$sortby).
+	form::hidden(array('order'),$order).
+	form::hidden(array('page'),$page).
+	form::hidden(array('nb'),$nb_per_page).
 	$core->formNonce().
 	'</div>'.
Index: admin/style/default.css
===================================================================
--- admin/style/default.css	(revision 225)
+++ admin/style/default.css	(revision 217)
@@ -1080,7 +1080,4 @@
 label input, label select, label span {
 	display: block;
-}
-#filters-form label {
-	display: inline;
 }
 p.form-note {
@@ -1303,23 +1300,2 @@
 	background-color: #2373A8;
 }
-
-form#filters {font-size: 100%; background: #f0f0f0; padding: 1em; border-radius: .5em; border: 1px solid #ddd;}
-form#filters .margintop {padding-top: 1.33em;}
-form#filters ul {list-style-type:none;margin: 0; padding: 0; margin-left: 1em;}
-form#filters .col30 {border-left: 1px solid #999;}
-form#filters .col30 h3 {margin-left: 1em;}
-.line { position: relative; padding: 3px 0 0 28px; margin: 0 0 1em 0;}
-.line input[type=submit] {position: absolute; left:0;top:0; padding: 0 .1em; margin: 0;}
-.line input[type=checkbox] {position: absolute; left: 0; top: .2em; padding: 0 .1em; margin: 0;}
-.line select { margin-right: 2em;}
-.line label { display: block; width: 8em; float: left;}
-.line label img {margin-right: 8px;}
-.line label.or {
-	text-align: right;
-	margin-left: 5em;
-	font-weight: bold;
-}
-.line label.or + select {margin-left: 2em;}
-li.line { padding: 0 0 0 20px; height: 1em;}
-li.line label {width: auto;}
-#available_filters input[type=submit] {padding: 0 .1em; margin-left: .5em;}
Index: admin/user.php
===================================================================
--- admin/user.php	(revision 181)
+++ admin/user.php	(revision 230)
@@ -236,9 +236,9 @@
 '</label></p>'.
 
-'<p><label>'.__('Entry edit field height:').' '.
+'<p><label for="user_edit_size">'.__('Entry edit field height:').' '.
 form::field('user_edit_size',5,4,(integer) $user_options['edit_size'],'',12).
 '</label></p>'.
 
-'<p><label for="user_edit_size">'.__('User language:').' '.
+'<p><label for="user_lang">'.__('User language:').' '.
 form::combo('user_lang',$lang_combo,$user_lang,'l10n',13).
 '</label></p>'.
