Do not change selected date when going to week or month view.

This commit is contained in:
Nathan Gray 2015-10-29 20:33:04 +00:00
parent f3d166a6c5
commit 7d12993e1a
3 changed files with 2 additions and 4 deletions

View File

@ -2979,7 +2979,6 @@ jQuery.extend(app.classes.calendar,{
start_date: function(state) {
var d = app.calendar.View.start_date.call(this,state);
d.setUTCDate(1);
state.date = app.calendar.date.toString(d);
return app.calendar.date.start_of_week(d);
},
end_date: function(state) {

View File

@ -645,8 +645,7 @@ var et2_calendar_daycol = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResizea
// Click on the title
if(this.title.is(_ev.target))
{
this._parent.set_start_date(this.date);
this._parent.set_end_date(this.date);
app.calendar.update_state({view: 'day',date: this.date.toJSON()});
return false;
}
else if ($j(_ev.target).hasClass('calendar_calAddEvent'))

View File

@ -20,7 +20,7 @@ Egroupware
<rows>
<row class="view_row">
<calendar-timegrid id="${row}"
onchange="var state = {date:widget.options.start_date}; if(widget.options.start_date == widget.options.end_date) state.view = 'day'; app.calendar.update_state(state);"
onchange="var state = {}; if(widget.options.start_date == widget.options.end_date) state.view = 'day'; app.calendar.update_state(state);"
onevent_change="app.calendar.event_change"
>
</calendar-timegrid>