diff --git a/calendar/inc/class.calendar_ui.inc.php b/calendar/inc/class.calendar_ui.inc.php
index f81915f2d2..1229aa3903 100644
--- a/calendar/inc/class.calendar_ui.inc.php
+++ b/calendar/inc/class.calendar_ui.inc.php
@@ -91,9 +91,9 @@ class calendar_ui
*/
var $cat_id;
/**
- * @var int $filter session-state: selected filter, at the moment all or hideprivate
+ * @var int $status_filter session-state: selected filter, at the moment all or hideprivate
*/
- var $filter;
+ var $status_filter;
/**
* @var int/array $owner session-state: selected owner(s) of shown calendar(s)
*/
@@ -127,7 +127,7 @@ class calendar_ui
/**
* @var array $states_to_save all states that will be saved to the user prefs
*/
- var $states_to_save = array('owner','filter','cat_id','view','sortby','planner_days','weekend');
+ var $states_to_save = array('owner','status_filter','filter','cat_id','view','sortby','planner_days','weekend');
/**
* Constructor
@@ -248,7 +248,7 @@ class calendar_ui
* - cat_id: the selected category
* - owner: the owner of the displayed calendar
* - save_owner: the overriden owner of the planner
- * - filter: the used filter: all or hideprivate
+ * - status_filter: the used filter: all or hideprivate
* - sortby: category or user of planner
* - view: the actual view, where dialogs should return to or which they refresh
* @param array $set_states array to manualy set / change one of the states, default NULL = use $_REQUEST
@@ -289,7 +289,7 @@ class calendar_ui
foreach(array(
'date' => $this->bo->date2string($this->bo->now_su),
'cat_id' => 0,
- 'filter' => 'default',
+ 'status_filter' => 'default',
'owner' => $this->user,
'save_owner' => 0,
'sortby' => 'category',
@@ -710,7 +710,7 @@ class calendar_ui
'value' => $data['value']
);
}
- $sel_options['filter'] = array(
+ $sel_options['status_filter'] = array(
array('value' => 'default', 'label' => lang('Not rejected'), 'title' => lang('Show all status, but rejected')),
array('value' => 'accepted', 'label' => lang('Accepted'), 'title' => lang('Show only accepted events')),
array('value' => 'unknown', 'label' => lang('Invitations'), 'title' => lang('Show only invitations, not yet accepted or rejected')),
@@ -726,7 +726,7 @@ class calendar_ui
);
if($GLOBALS['egw_info']['server']['calendar_delete_history'])
{
- $sel_options['filter'][] = array('value' => 'deleted', 'label' => lang('Deleted'), 'title' => lang('Show events that have been deleted'));
+ $sel_options['status_filter'][] = array('value' => 'deleted', 'label' => lang('Deleted'), 'title' => lang('Show events that have been deleted'));
}
// Merge print
diff --git a/calendar/js/app.js b/calendar/js/app.js
index d946b7154a..34d32bebf5 100644
--- a/calendar/js/app.js
+++ b/calendar/js/app.js
@@ -63,7 +63,7 @@ app.classes.calendar = AppJS.extend(
owner: egw.user('account_id')
},
- states_to_save: ['owner','filter','cat_id','view','sortby','planner_days','weekend'],
+ states_to_save: ['owner','status_filter','filter','cat_id','view','sortby','planner_days','weekend'],
// If you are in one of these views and select a date in the sidebox, the view
// will change as needed to show the date. Other views will only change the
@@ -1982,9 +1982,6 @@ app.classes.calendar = AppJS.extend(
state.state.col_filter = {participant: state.state.owner};
state.state.search = state.state.keywords;
- // Pass status filter in as status filter, avoids conflicts with nm filter
- state.state.status_filter = state.state.filter;
- delete state.state.filter;
var nm = view.etemplates[0].widgetContainer.getWidgetById('nm');
@@ -2433,7 +2430,7 @@ app.classes.calendar = AppJS.extend(
// Participant must be an array or it won't work
col_filter: {participant: (typeof state.owner == 'string' || typeof state.owner == 'number' ? [state.owner] : state.owner)},
filter:'custom', // Must be custom to get start & end dates
- status_filter: state.filter,
+ status_filter: state.status_filter,
cat_id: cat_id,
csv_export: false
});
@@ -2870,8 +2867,13 @@ app.classes.calendar = AppJS.extend(
if(month_button)
{
var temp_date = new Date(date_widget.get_value());
+ temp_date.setUTCDate(1);
temp_date.setUTCMinutes(temp_date.getUTCMinutes() + temp_date.getTimezoneOffset());
month_button.set_label(egw.lang(date('F',temp_date)));
+
+ // Store current _displayed_ date in date button for clicking
+ temp_date.setUTCMinutes(temp_date.getUTCMinutes() - temp_date.getTimezoneOffset());
+ month_button.btn.attr('data-date', temp_date.toJSON());
}
// Dynamic resize to fill sidebox
diff --git a/calendar/templates/default/sidebox.xet b/calendar/templates/default/sidebox.xet
index e567a1d6d2..4df9c08d88 100644
--- a/calendar/templates/default/sidebox.xet
+++ b/calendar/templates/default/sidebox.xet
@@ -43,7 +43,7 @@ Egroupware
-
+
-->
-
+