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
|
// open jquery UI dialog
|
||||||
$dialog.dialog({
|
$dialog.dialog({
|
||||||
modal: true,
|
modal: true,
|
||||||
|
@ -575,21 +580,12 @@ function rcube_calendar_ui(settings)
|
||||||
$dialog.parent().find('button:not(.ui-dialog-titlebar-close,.delete)').first().focus();
|
$dialog.parent().find('button:not(.ui-dialog-titlebar-close,.delete)').first().focus();
|
||||||
}, 5);
|
}, 5);
|
||||||
},
|
},
|
||||||
beforeClose: function(e) {
|
|
||||||
rcmail.command('menu-close', 'eventoptionsmenu', null, e);
|
|
||||||
},
|
|
||||||
close: function(e) {
|
close: function(e) {
|
||||||
$dialog.dialog('destroy').attr('aria-hidden', 'true').hide();
|
close_func(e);
|
||||||
$('.libcal-rsvp-replymode').hide();
|
$dialog.dialog('close');
|
||||||
},
|
|
||||||
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();
|
|
||||||
},
|
},
|
||||||
|
dragStart: close_func,
|
||||||
|
resizeStart: close_func,
|
||||||
buttons: buttons,
|
buttons: buttons,
|
||||||
minWidth: 320,
|
minWidth: 320,
|
||||||
width: 420
|
width: 420
|
||||||
|
@ -611,12 +607,12 @@ function rcube_calendar_ui(settings)
|
||||||
.attr({href: '#', 'class': 'dropdown-link btn btn-link options', 'data-popup-pos': 'top'})
|
.attr({href: '#', 'class': 'dropdown-link btn btn-link options', 'data-popup-pos': 'top'})
|
||||||
.text(rcmail.gettext('eventoptions','calendar'))
|
.text(rcmail.gettext('eventoptions','calendar'))
|
||||||
.click(function(e) {
|
.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'));
|
.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});
|
rcmail.triggerEvent('calendar-event-dialog', {dialog: $dialog});
|
||||||
};
|
};
|
||||||
|
@ -626,12 +622,14 @@ function rcube_calendar_ui(settings)
|
||||||
{
|
{
|
||||||
var cutype = $(this).attr('data-cutype'),
|
var cutype = $(this).attr('data-cutype'),
|
||||||
mailto = this.href.substr(7);
|
mailto = this.href.substr(7);
|
||||||
|
|
||||||
if (rcmail.env.calendar_resources && cutype == 'RESOURCE') {
|
if (rcmail.env.calendar_resources && cutype == 'RESOURCE') {
|
||||||
event_resources_dialog(mailto);
|
event_resources_dialog(mailto);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
rcmail.command('compose', mailto, e ? e.target : null, e);
|
rcmail.command('compose', mailto, e ? e.target : null, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -3179,9 +3177,9 @@ function rcube_calendar_ui(settings)
|
||||||
if (v.role != 'ORGANIZER') {
|
if (v.role != 'ORGANIZER') {
|
||||||
v.status = 'NEEDS-ACTION';
|
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