Fix initial load in planner sitemgr module never happened

This commit is contained in:
nathangray 2017-03-14 09:31:43 -06:00
parent 1992cd4e14
commit b1e053ac27

View File

@ -336,8 +336,8 @@ class module_calendar_planner extends Module
$tmpl->exec(__METHOD__, $content,$sel_options, array('__ALL__' => true),array(),2); $tmpl->exec(__METHOD__, $content,$sel_options, array('__ALL__' => true),array(),2);
$html .= ob_get_contents(); $html .= ob_get_contents();
$html .= '<script>' $html .= '<script>'
. ' window.egw_LAB.wait(function() {jQuery(function() {' . '(function() {jQuery("#calendar-planner").on("load",function() {'
. 'app.calendar.set_state(' . json_encode(array( . 'app.calendar.update_state(' . json_encode(array(
'view' => 'planner', 'view' => 'planner',
'planner_view' => 'month', 'planner_view' => 'month',
'date' => Api\DateTime::to($ui->first, Api\DateTime::ET2), 'date' => Api\DateTime::to($ui->first, Api\DateTime::ET2),
@ -345,7 +345,7 @@ class module_calendar_planner extends Module
'sortby' => $ui->sortby, 'sortby' => $ui->sortby,
'filter' => $arguments['filter'] 'filter' => $arguments['filter']
)).');' )).');'
. '});});' . '});})();'
. '</script>'; . '</script>';
ob_end_clean(); ob_end_clean();