Fix Category filter option 'All' gets added each submit

This commit is contained in:
Nathan Gray 2014-02-27 20:20:15 +00:00
parent a7c306d649
commit bf0f3f6141

View File

@ -204,7 +204,6 @@ class addressbook_ui extends addressbook_bo
'never_hide' => True, // I never hide the nextmatch-line if less then maxmatch entrie 'never_hide' => True, // I never hide the nextmatch-line if less then maxmatch entrie
'start' => 0, // IO position in list 'start' => 0, // IO position in list
'cat_id' => '', // IO category, if not 'no_cat' => True 'cat_id' => '', // IO category, if not 'no_cat' => True
'options-cat_id' => array(lang('none')),
'search' => '', // IO search pattern 'search' => '', // IO search pattern
'order' => 'n_family', // IO name of the column to sort after (optional for the sortheaders) 'order' => 'n_family', // IO name of the column to sort after (optional for the sortheaders)
'sort' => 'ASC', // IO direction of the sort: 'ASC' or 'DESC' 'sort' => 'ASC', // IO direction of the sort: 'ASC' or 'DESC'
@ -241,6 +240,8 @@ class addressbook_ui extends addressbook_bo
$content['nm'] = array_merge($content['nm'],$state); $content['nm'] = array_merge($content['nm'],$state);
} }
} }
$content['nm']['options-cat_id'] = array(lang('none'));
// Delete list action depends on permissions // Delete list action depends on permissions
if($this->get_lists(EGW_ACL_EDIT)) if($this->get_lists(EGW_ACL_EDIT))
{ {
@ -1148,7 +1149,13 @@ window.egw_LAB.wait(function() {
if (!$id_only && !$query['csv_export']) // do NOT store state for csv_export or querying id's (no regular view) if (!$id_only && !$query['csv_export']) // do NOT store state for csv_export or querying id's (no regular view)
{ {
$old_state = egw_session::appsession($what,'addressbook',$query); $store_query = $query;
// Do not store these
foreach(array('options-cat_id','actions') as $key)
{
unset($store_query[$key]);
}
$old_state = egw_session::appsession($what,'addressbook',$store_query);
} }
else else
{ {