Calendar: Fix Options menu in event info dialog (Bifrost#T254738)
This commit is contained in:
parent
1f836679c4
commit
a52e68c07d
1 changed files with 15 additions and 17 deletions
|
@ -563,6 +563,11 @@ function rcube_calendar_ui(settings)
|
|||
}
|
||||
});
|
||||
|
||||
var close_func = function(e) {
|
||||
rcmail.command('menu-close', 'eventoptionsmenu', null, e);
|
||||
$('.libcal-rsvp-replymode').hide();
|
||||
};
|
||||
|
||||
// open jquery UI dialog
|
||||
$dialog.dialog({
|
||||
modal: true,
|
||||
|
@ -575,21 +580,12 @@ function rcube_calendar_ui(settings)
|
|||
$dialog.parent().find('button:not(.ui-dialog-titlebar-close,.delete)').first().focus();
|
||||
}, 5);
|
||||
},
|
||||
beforeClose: function(e) {
|
||||
rcmail.command('menu-close', 'eventoptionsmenu', null, e);
|
||||
},
|
||||
close: function(e) {
|
||||
$dialog.dialog('destroy').attr('aria-hidden', 'true').hide();
|
||||
$('.libcal-rsvp-replymode').hide();
|
||||
},
|
||||
dragStart: function(e) {
|
||||
rcmail.command('menu-close', 'eventoptionsmenu', null, e);
|
||||
$('.libcal-rsvp-replymode').hide();
|
||||
},
|
||||
resizeStart: function(e) {
|
||||
rcmail.command('menu-close', 'eventoptionsmenu', null, e);
|
||||
$('.libcal-rsvp-replymode').hide();
|
||||
close_func(e);
|
||||
$dialog.dialog('close');
|
||||
},
|
||||
dragStart: close_func,
|
||||
resizeStart: close_func,
|
||||
buttons: buttons,
|
||||
minWidth: 320,
|
||||
width: 420
|
||||
|
@ -611,12 +607,12 @@ function rcube_calendar_ui(settings)
|
|||
.attr({href: '#', 'class': 'dropdown-link btn btn-link options', 'data-popup-pos': 'top'})
|
||||
.text(rcmail.gettext('eventoptions','calendar'))
|
||||
.click(function(e) {
|
||||
return rcmail.command('menu-open','eventoptionsmenu', this, e)
|
||||
return rcmail.command('menu-open','eventoptionsmenu', this, e);
|
||||
})
|
||||
.appendTo($dialog.parent().find('.ui-dialog-buttonset'));
|
||||
}
|
||||
|
||||
rcmail.enable_command('event-history', calendar.history)
|
||||
rcmail.enable_command('event-history', calendar.history);
|
||||
|
||||
rcmail.triggerEvent('calendar-event-dialog', {dialog: $dialog});
|
||||
};
|
||||
|
@ -626,12 +622,14 @@ function rcube_calendar_ui(settings)
|
|||
{
|
||||
var cutype = $(this).attr('data-cutype'),
|
||||
mailto = this.href.substr(7);
|
||||
|
||||
if (rcmail.env.calendar_resources && cutype == 'RESOURCE') {
|
||||
event_resources_dialog(mailto);
|
||||
}
|
||||
else {
|
||||
rcmail.command('compose', mailto, e ? e.target : null, e);
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
|
@ -3179,9 +3177,9 @@ function rcube_calendar_ui(settings)
|
|||
if (v.role != 'ORGANIZER') {
|
||||
v.status = 'NEEDS-ACTION';
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
event_edit_dialog('new', copy);
|
||||
setTimeout(function() { event_edit_dialog('new', copy); }, 50);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue