mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-04 12:30:04 +01:00
Fix empty meeting request display in mail, caused by default handling in et2_ready
This commit is contained in:
parent
7f01ef37ed
commit
7c141d1c65
@ -152,6 +152,8 @@ app.classes.calendar = AppJS.extend(
|
||||
break;
|
||||
case 'home.legacy':
|
||||
break;
|
||||
case 'calendar.meeting':
|
||||
break;
|
||||
case 'calendar.list':
|
||||
this.filter_change();
|
||||
// Fall through
|
||||
@ -161,7 +163,7 @@ app.classes.calendar = AppJS.extend(
|
||||
// Record the templates for the views so we can switch between them
|
||||
for(var view in app.classes.calendar.views)
|
||||
{
|
||||
var index = app.classes.calendar.views[view].etemplates.indexOf(_name)
|
||||
var index = app.classes.calendar.views[view].etemplates.indexOf(_name);
|
||||
if(index > -1)
|
||||
{
|
||||
app.classes.calendar.views[view].etemplates[index] = _et2;
|
||||
@ -340,7 +342,7 @@ app.classes.calendar = AppJS.extend(
|
||||
// Put owners into row IDs
|
||||
app.classes.calendar.views[state.view].etemplates[0].widgetContainer.iterateOver(function(widget) {
|
||||
widget.div.parents('tr').attr('data-owner',widget.options.owner);
|
||||
},this,et2_calendar_timegrid)
|
||||
},this,et2_calendar_timegrid);
|
||||
},
|
||||
stop: function ()
|
||||
{
|
||||
@ -405,7 +407,7 @@ app.classes.calendar = AppJS.extend(
|
||||
start = new Date(app.calendar.state.first);
|
||||
end = new Date(app.calendar.state.last);
|
||||
// Get the number of days
|
||||
delta = (Math.round(Math.max(1,end - start)/(24*3600*1000)))*24*3600*1000
|
||||
delta = (Math.round(Math.max(1,end - start)/(24*3600*1000)))*24*3600*1000;
|
||||
// Adjust
|
||||
start = new Date(start.valueOf() + (delta * direction ));
|
||||
end = new Date(end.valueOf() + (delta * direction));
|
||||
@ -1395,8 +1397,8 @@ app.classes.calendar = AppJS.extend(
|
||||
}
|
||||
}
|
||||
// Include first & last dates in state, mostly for server side processing
|
||||
if(state.state.first && state.state.first.toJSON) state.state.first = state.state.first.toJSON()
|
||||
if(state.state.last && state.state.last.toJSON) state.state.last = state.state.last.toJSON()
|
||||
if(state.state.first && state.state.first.toJSON) state.state.first = state.state.first.toJSON();
|
||||
if(state.state.last && state.state.last.toJSON) state.state.last = state.state.last.toJSON();
|
||||
|
||||
// Show the templates for the current view
|
||||
for(var i = 0; i < view.etemplates.length; i++)
|
||||
@ -1418,7 +1420,7 @@ app.classes.calendar = AppJS.extend(
|
||||
this.egw.jsonq('calendar_uiviews::ajax_get_todos', [state.state.date, state.state.owner[0]], function(data) {
|
||||
this.getWidgetById('label').set_value(data.label||'');
|
||||
this.getWidgetById('todos').set_value(data.todos||'');
|
||||
},view.etemplates[1].widgetContainer)
|
||||
},view.etemplates[1].widgetContainer);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -1576,8 +1578,8 @@ app.classes.calendar = AppJS.extend(
|
||||
* Check to see if any of the selected is an event widget
|
||||
* Used to separate grid actions from event actions
|
||||
*
|
||||
* @param {egwAction} _egw
|
||||
* @param {egwActioObject[]} _widget
|
||||
* @param {egwAction} _action
|
||||
* @param {egwActioObject[]} _selected
|
||||
* @returns {boolean} Is any of the selected an event widget
|
||||
*/
|
||||
is_event: function(_action, _selected)
|
||||
@ -1593,11 +1595,11 @@ app.classes.calendar = AppJS.extend(
|
||||
// Also check classes, usually indicating permission
|
||||
if(_action.data && _action.data.enableClass)
|
||||
{
|
||||
is_widget = is_widget && ($j( _selected[i].iface.getDOMNode()).hasClass(_action.data.enableClass))
|
||||
is_widget = is_widget && ($j( _selected[i].iface.getDOMNode()).hasClass(_action.data.enableClass));
|
||||
}
|
||||
if(_action.data && _action.data.disableClass)
|
||||
{
|
||||
is_widget = is_widget && !($j( _selected[i].iface.getDOMNode()).hasClass(_action.data.disableClass))
|
||||
is_widget = is_widget && !($j( _selected[i].iface.getDOMNode()).hasClass(_action.data.disableClass));
|
||||
}
|
||||
|
||||
}
|
||||
@ -1748,9 +1750,9 @@ app.classes.calendar = AppJS.extend(
|
||||
if(date)
|
||||
{
|
||||
date.input_date.datepicker("option", {
|
||||
showButtonPanel: false,
|
||||
showButtonPanel: false
|
||||
// TODO: We could include tooltips for holidays
|
||||
})
|
||||
});
|
||||
}
|
||||
// Show / Hide weekends based on preference of weekends should be shown
|
||||
egw.css('#'+date.input_date.attr('id') + ' .ui-datepicker-week-end',
|
||||
@ -1907,7 +1909,7 @@ jQuery.extend(app.classes.calendar,{
|
||||
// Always 7 days, we just turn weekends on or off
|
||||
d.setUTCHours(24*7-1);
|
||||
return d;
|
||||
},
|
||||
}
|
||||
}),
|
||||
month: app.classes.calendar.prototype.View.extend({
|
||||
header: function(state)
|
||||
@ -1917,19 +1919,19 @@ jQuery.extend(app.classes.calendar,{
|
||||
return egw.lang('Month view') + ':' + egw.lang(date('F',formatDate)) + ' ' + date('Y',formatDate);
|
||||
},
|
||||
start_date: function(state) {
|
||||
var d = app.calendar.View.start_date.call(this,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) {
|
||||
var d = app.calendar.View.end_date.call(this,state)
|
||||
var d = app.calendar.View.end_date.call(this,state);
|
||||
d = new Date(d.getFullYear(),d.getUTCMonth() + 1, 0);
|
||||
var week_start = app.calendar.date.start_of_week(d);
|
||||
if(week_start < d) week_start.setUTCHours(24*7);
|
||||
week_start.setUTCHours(week_start.getUTCHours()-1);
|
||||
return week_start;
|
||||
},
|
||||
}
|
||||
}),
|
||||
|
||||
planner: app.classes.calendar.prototype.View.extend({
|
||||
|
Loading…
Reference in New Issue
Block a user