Make sidebox calendar 'goto' stay in planner view

This commit is contained in:
nathangray 2016-06-07 16:44:25 -06:00
parent b3e8a5e38c
commit 147f9688e4

View File

@ -22,7 +22,7 @@ var change = {date: today.toJSON()};
app.calendar.update_state(change);
widget.getRoot().getWidgetById('date').set_value(today);
return false;"/>
<buttononly id="header_go" label="&#8629;" icon="nope" class="ui-corner-all" onclick="var change = {date: widget.btn.attr('data-date')}; if ( app.calendar.state.view == 'listview') {change.filter='month';} else {change.view = 'month';}app.calendar.update_state(change);" />
<buttononly id="header_go" label="&#8629;" icon="nope" class="ui-corner-all" onclick="var change = {date: widget.btn.attr('data-date')}; if ( app.calendar.state.view == 'listview') {change.filter='month';} else if (app.calendar.state.view == 'planner') {} else {change.view = 'month';}app.calendar.update_state(change);" />
<date id="date" class="et2_fullWidth" inline="true" onchange="var view_change = app.calendar.sidebox_changes_views.indexOf(app.calendar.state.view);
var update = {date:widget.getValue()};
if(view_change >= 0) {update.view = app.calendar.sidebox_changes_views[view_change ? view_change - 1 : view_change];} else if (app.calendar.state.view == 'listview') {update.filter = 'after';} else if (app.calendar.state.view =='planner') { update.planner_view = 'day'; } app.calendar.update_state(update);"/>