Fix so when switching from compose to calendar confirmation alert will be displayed (#530)
This commit is contained in:
parent
fbd78c4fc5
commit
2f570dd126
2 changed files with 8 additions and 5 deletions
|
@ -295,6 +295,8 @@ window.rcmail && rcmail.addEventListener('init', function(evt) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rcmail.register_command('plugin.calendar', function() { rcmail.switch_task('calendar'); }, true);
|
||||||
|
|
||||||
rcmail.addEventListener('plugin.ping_url', function(p){
|
rcmail.addEventListener('plugin.ping_url', function(p){
|
||||||
var action = p.action;
|
var action = p.action;
|
||||||
p.action = p.event = null;
|
p.action = p.event = null;
|
||||||
|
|
|
@ -48,10 +48,11 @@ class calendar_ui
|
||||||
|
|
||||||
// add taskbar button
|
// add taskbar button
|
||||||
$this->cal->add_button(array(
|
$this->cal->add_button(array(
|
||||||
'name' => 'calendar',
|
'name' => 'calendar',
|
||||||
'class' => 'button-calendar',
|
'class' => 'button-calendar',
|
||||||
'label' => 'calendar.calendar',
|
'label' => 'calendar.calendar',
|
||||||
'href' => './?_task=calendar',
|
'href' => './?_task=calendar',
|
||||||
|
'onclick' => sprintf("%s.command('plugin.calendar');return false", JS_OBJECT_NAME),
|
||||||
), 'taskbar');
|
), 'taskbar');
|
||||||
|
|
||||||
// load basic client script (which - unfortunately - requires fullcalendar)
|
// load basic client script (which - unfortunately - requires fullcalendar)
|
||||||
|
|
Loading…
Add table
Reference in a new issue