Fix Planner sitemanager module no longer navigated.

Due to missing state variables mostly
This commit is contained in:
nathangray 2017-03-13 08:38:45 -06:00
parent c834830df0
commit 8f597194e0
2 changed files with 6 additions and 2 deletions

View File

@ -4047,6 +4047,7 @@ jQuery.extend(app.classes.calendar,{
return app.classes.calendar.views[app.calendar.state.planner_view].scroll.call(this,delta);
}
var d = new Date(app.calendar.state.date);
var days = 1;
// Yearly view, grouped by month - scroll 1 month
if(app.calendar.state.sortby === 'month')
@ -4062,7 +4063,7 @@ jQuery.extend(app.classes.calendar,{
if(app.calendar.state.first && app.calendar.state.last)
{
var diff = new Date(app.calendar.state.last) - new Date(app.calendar.state.first);
var days = Math.round(diff / (1000*3600*24));
days = Math.round(diff / (1000*3600*24));
}
d.setUTCDate(d.getUTCDate() + (days*delta));
if(days > 8)

View File

@ -338,7 +338,10 @@ class module_calendar_planner extends Module
$html .= '<script>'
. ' window.egw_LAB.wait(function() {jQuery(function() {'
. 'app.calendar.set_state(' . json_encode(array(
'owner' => $search_params['owner'],
'view' => 'planner',
'planner_view' => 'month',
'date' => Api\DateTime::to($ui->first, Api\DateTime::ET2),
'owner' => $search_params['owner'],
'sortby' => $ui->sortby,
'filter' => $arguments['filter']
)).');'