mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 04:29:28 +01:00
Fix home favorite filters lost if you change sorting / filter
This commit is contained in:
parent
d1d150b7c7
commit
5291730724
@ -33,10 +33,6 @@ class home_favorite_portlet extends home_portlet
|
|||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $nm_settings = array(
|
protected $nm_settings = array(
|
||||||
'no_filter' => true,
|
|
||||||
'no_filter2' => true,
|
|
||||||
'no_cat' => true,
|
|
||||||
'no_search' => true,
|
|
||||||
'lettersearch' => false,
|
'lettersearch' => false,
|
||||||
'favorites' => false, // Hide favorite control
|
'favorites' => false, // Hide favorite control
|
||||||
);
|
);
|
||||||
@ -103,9 +99,11 @@ class home_favorite_portlet extends home_portlet
|
|||||||
$etemplate->set_dom_id($id);
|
$etemplate->set_dom_id($id);
|
||||||
|
|
||||||
$content = $this->context + array('nm' => $this->nm_settings);
|
$content = $this->context + array('nm' => $this->nm_settings);
|
||||||
|
$sel_options = $content['sel_options'] ? $content['sel_options'] : array();
|
||||||
|
unset($content['sel_options']);
|
||||||
$etemplate->setElementAttribute('nm', 'template',$this->nm_settings['template']);
|
$etemplate->setElementAttribute('nm', 'template',$this->nm_settings['template']);
|
||||||
|
|
||||||
$etemplate->exec(get_called_class() .'::process',$content);
|
$etemplate->exec(get_called_class() .'::process',$content,$sel_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function process($content = array())
|
public static function process($content = array())
|
||||||
|
@ -526,7 +526,7 @@ app.classes.home = AppJS.extend(
|
|||||||
var window_width = Math.max(580, width+20);
|
var window_width = Math.max(580, width+20);
|
||||||
var window_height = Math.max(350, height+70);
|
var window_height = Math.max(350, height+70);
|
||||||
|
|
||||||
// Open popup, but add 30 to the height for the toolbar
|
// Open popup, but add 70 to the height for the toolbar
|
||||||
egw.open_link(egw.link('/index.php',{
|
egw.open_link(egw.link('/index.php',{
|
||||||
menuaction: 'home.home_note_portlet.edit',
|
menuaction: 'home.home_note_portlet.edit',
|
||||||
id: id,
|
id: id,
|
||||||
|
@ -53,4 +53,4 @@
|
|||||||
background: rgba(0,0,0,.3);
|
background: rgba(0,0,0,.3);
|
||||||
border: 1px solid silver;
|
border: 1px solid silver;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
|
@ -31,20 +31,21 @@ class infolog_favorite_portlet extends home_favorite_portlet
|
|||||||
$ui = new infolog_ui();
|
$ui = new infolog_ui();
|
||||||
|
|
||||||
$this->context['template'] = 'infolog.index.rows';
|
$this->context['template'] = 'infolog.index.rows';
|
||||||
|
$this->context['sel_options'] = array(
|
||||||
|
'info_type' => $ui->bo->enums['type'],
|
||||||
|
'pm_id' => array(lang('No project')),
|
||||||
|
'info_priority' => $ui->bo->enums['priority'],
|
||||||
|
);
|
||||||
$this->nm_settings += array(
|
$this->nm_settings += array(
|
||||||
'get_rows' => 'infolog.infolog_ui.get_rows',
|
'get_rows' => 'infolog.infolog_ui.get_rows',
|
||||||
// Use a different template so it can be accessed from client side
|
// Use a different template so it can be accessed from client side
|
||||||
'template' => 'infolog.home',
|
'template' => 'infolog.home',
|
||||||
// Don't overwrite infolog
|
// Don't overwrite infolog
|
||||||
'session_for' => 'home',
|
'session_for' => 'home',
|
||||||
|
'no_filter2' => true,
|
||||||
|
'options-filter'=> $ui->filters,
|
||||||
// Allow add actions even when there's no rows
|
// Allow add actions even when there's no rows
|
||||||
'placeholder_actions' => array(),
|
'placeholder_actions' => array(),
|
||||||
'sel_options' => array(
|
|
||||||
'info_type' => $ui->bo->enums['type'],
|
|
||||||
'pm_id' => array(lang('No project')),
|
|
||||||
'info_priority' => $ui->bo->enums['priority'],
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user