If any of the selected events is a series, ask if you want to delete just the one or the whole series

This commit is contained in:
Nathan Gray 2013-01-09 21:45:55 +00:00
parent 7ef3861b50
commit 8ba410eacb

View File

@ -93,9 +93,18 @@ function cal_open(_action, _senders)
*/
function cal_delete(_action, _senders)
{
var id = _senders[0].id;
var matches = id.match(/^(?:calendar::)?([0-9]+):([0-9]+)$/);
var backup = _action.data;
var matches = false;
// Loop so we ask if any of the selected entries is part of a series
for(var i = 0; i < _senders.length; i++)
{
var id = _senders[i].id;
if(!matches)
{
matches = id.match(/^(?:calendar::)?([0-9]+):([0-9]+)$/);
}
}
if (matches)
{
var id = matches[1];