Author: nathangray
New Revision: 55700
URL: http://svn.stylite.de/viewvc/egroupware?rev=55700&view=rev
Log:
Fix clicking all day non-blocking section under day title went to day view instead of creating a new event
Modified:
trunk/calendar/js/et2_widget_daycol.js
— trunk/calendar/js/et2_widget_daycol.js (original)
+++ trunk/calendar/js/et2_widget_daycol.js Mon Apr 11 16:37:04 2016
@@ -998,20 +998,37 @@
click: function(_ev)
{
// Click on the title
-
if ($j(_ev.target).hasClass('calendar_calAddEvent') && !_ev.target.dataset.whole_day)
-
{
-
// Default handler to open a new event at the selected time
-
var options = {
-
date: _ev.target.dataset.date || this.options.date,
-
hour: _ev.target.dataset.hour || this._parent.options.day_start,
-
minute: _ev.target.dataset.minute || 0
-
};
-
if (this.options.owner != app.calendar.state.owner)
-
{
-
options.owner = this.options.owner;
-
}
-
this.egw().open(null, 'calendar', 'add', options, '_blank');
-
return false;
-
if ($j(_ev.target).hasClass('calendar_calAddEvent'))
-
{
-
if(!_ev.target.dataset.whole_day)
-
{
-
// Default handler to open a new event at the selected time
-
var options = {
-
date: _ev.target.dataset.date || this.options.date,
-
hour: _ev.target.dataset.hour || this._parent.options.day_start,
-
minute: _ev.target.dataset.minute || 0
-
};
-
if (this.options.owner != app.calendar.state.owner)
-
{
-
options.owner = this.options.owner;
-
}
-
this.egw().open(null, 'calendar', 'add', options, '_blank');
-
return false;
-
}
-
// Header, all day non-blocking
-
else if (this.header.has(_ev.target).length && !$j('.hiddenEventBefore',this.header).has(_ev.target).length ||
-
this.header.is(_ev.target)
-
)
-
{
-
// Click on the header, but not the title. That's an all-day non-blocking
-
var end = this.date.getFullYear() + '-' + (this.date.getUTCMonth()+1) + '-' + this.date.getUTCDate() + 'T23:59';
-
this.egw().open(null, 'calendar', 'add', {
-
start: this.date.toJSON(),
-
end: end,
-
non_blocking: true
-
} , '_blank');
-
return false;
-
}
}
// Day label
else if(this.title.is(_ev.target) || this.title.has(_ev.target))
@@ -1019,20 +1036,7 @@
app.calendar.update_state({view: ‘day’,date: this.date.toJSON()});
return false;
}
-
// Header, but not the hidden event indicators that are in there
-
else if (this.header.has(_ev.target).length && !$j('.hiddenEventBefore',this.header).has(_ev.target).length ||
-
this.header.is(_ev.target)
-
)
-
{
-
// Click on the header, but not the title. That's an all-day non-blocking
-
var end = this.date.getFullYear() + '-' + (this.date.getUTCMonth()+1) + '-' + this.date.getUTCDate() + 'T23:59';
-
this.egw().open(null, 'calendar', 'add', {
-
start: this.date.toJSON(),
-
end: end,
-
non_blocking: true
-
} , '_blank');
-
return false;
-
}
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial! http://pubads.g.doubleclick.net/
gampad/clk?id=1444514301&iu=/ca-pub-7940484522588532
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs