Merge branch 'master' of ssh://git.kolabsys.com/git/roundcube
This commit is contained in:
commit
f715264956
6 changed files with 35 additions and 16 deletions
|
@ -2809,9 +2809,10 @@ function rcube_calendar_ui(settings)
|
||||||
};
|
};
|
||||||
|
|
||||||
// mark the given calendar folder as selected
|
// mark the given calendar folder as selected
|
||||||
this.select_calendar = function(id)
|
this.select_calendar = function(id, nolistupdate)
|
||||||
{
|
{
|
||||||
calendars_list.select(id);
|
if (!nolistupdate)
|
||||||
|
calendars_list.select(id);
|
||||||
|
|
||||||
// trigger event hook
|
// trigger event hook
|
||||||
rcmail.triggerEvent('selectfolder', { folder:id, prefix:'rcmlical' });
|
rcmail.triggerEvent('selectfolder', { folder:id, prefix:'rcmlical' });
|
||||||
|
@ -2872,7 +2873,7 @@ function rcube_calendar_ui(settings)
|
||||||
add_calendar_source(cal);
|
add_calendar_source(cal);
|
||||||
|
|
||||||
// check active calendars
|
// check active calendars
|
||||||
$('#rcmlical'+id+' > .calendar input').get(0).checked = active;
|
$('#rcmlical'+id+' > .calendar input').prop('checked', active);
|
||||||
|
|
||||||
if (active) {
|
if (active) {
|
||||||
event_sources.push(this.calendars[id]);
|
event_sources.push(this.calendars[id]);
|
||||||
|
@ -2897,9 +2898,11 @@ function rcube_calendar_ui(settings)
|
||||||
search_title: rcmail.gettext('calsearchresults','calendar')
|
search_title: rcmail.gettext('calsearchresults','calendar')
|
||||||
});
|
});
|
||||||
calendars_list.addEventListener('select', function(node) {
|
calendars_list.addEventListener('select', function(node) {
|
||||||
me.select_calendar(node.id);
|
if (node && node.id && me.calendars[node.id]) {
|
||||||
rcmail.enable_command('calendar-edit', 'calendar-showurl', true);
|
me.select_calendar(node.id, true);
|
||||||
rcmail.enable_command('calendar-remove', !me.calendars[node.id].readonly);
|
rcmail.enable_command('calendar-edit', 'calendar-showurl', true);
|
||||||
|
rcmail.enable_command('calendar-remove', !me.calendars[node.id].readonly);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
calendars_list.addEventListener('insert-item', function(p) {
|
calendars_list.addEventListener('insert-item', function(p) {
|
||||||
var cal = p.data;
|
var cal = p.data;
|
||||||
|
|
|
@ -84,8 +84,10 @@ function rcube_kolab_notes_ui(settings)
|
||||||
});
|
});
|
||||||
|
|
||||||
// initialize folder selectors
|
// initialize folder selectors
|
||||||
var li, id;
|
if (settings.selected_list && !me.notebooks[settings.selected_list]) {
|
||||||
for (id in me.notebooks) {
|
settings.selected_list = null;
|
||||||
|
}
|
||||||
|
for (var id in me.notebooks) {
|
||||||
if (me.notebooks[id].editable && !settings.selected_list) {
|
if (me.notebooks[id].editable && !settings.selected_list) {
|
||||||
settings.selected_list = id;
|
settings.selected_list = id;
|
||||||
}
|
}
|
||||||
|
|
|
@ -226,7 +226,7 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #777;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
.notesview #notedetailstitle .dates,
|
.notesview #notedetailstitle .dates,
|
||||||
|
|
|
@ -454,7 +454,7 @@ function rcube_libcalendaring(settings)
|
||||||
me.dismiss_alarm(me.dismiss_link.data('id'), 0);
|
me.dismiss_alarm(me.dismiss_link.data('id'), 0);
|
||||||
});
|
});
|
||||||
asnooze = $('<a href="#" class="alarm-action-snooze"></a>').html(rcmail.gettext('snooze','libcalendaring')).click(function(e){
|
asnooze = $('<a href="#" class="alarm-action-snooze"></a>').html(rcmail.gettext('snooze','libcalendaring')).click(function(e){
|
||||||
me.snooze_dropdown($(this));
|
me.snooze_dropdown($(this), e);
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
@ -463,6 +463,10 @@ function rcube_libcalendaring(settings)
|
||||||
$('<div>').addClass('alarm-item').html(html).append(actions).appendTo(this.alarm_dialog);
|
$('<div>').addClass('alarm-item').html(html).append(actions).appendTo(this.alarm_dialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
buttons[rcmail.gettext('close')] = function() {
|
||||||
|
$(this).dialog('close');
|
||||||
|
};
|
||||||
|
|
||||||
buttons[rcmail.gettext('dismissall','libcalendaring')] = function() {
|
buttons[rcmail.gettext('dismissall','libcalendaring')] = function() {
|
||||||
// submit dismissed event_ids to server
|
// submit dismissed event_ids to server
|
||||||
me.dismiss_alarm(me.alarm_ids.join(','), 0);
|
me.dismiss_alarm(me.alarm_ids.join(','), 0);
|
||||||
|
@ -476,6 +480,11 @@ function rcube_libcalendaring(settings)
|
||||||
dialogClass: 'alarms',
|
dialogClass: 'alarms',
|
||||||
title: rcmail.gettext('alarmtitle','libcalendaring'),
|
title: rcmail.gettext('alarmtitle','libcalendaring'),
|
||||||
buttons: buttons,
|
buttons: buttons,
|
||||||
|
open: function() {
|
||||||
|
setTimeout(function() {
|
||||||
|
me.alarm_dialog.parent().find('.ui-button:not(.ui-dialog-titlebar-close)').first().focus();
|
||||||
|
}, 5);
|
||||||
|
},
|
||||||
close: function() {
|
close: function() {
|
||||||
$('#alarm-snooze-dropdown').hide();
|
$('#alarm-snooze-dropdown').hide();
|
||||||
$(this).dialog('destroy').remove();
|
$(this).dialog('destroy').remove();
|
||||||
|
@ -487,13 +496,15 @@ function rcube_libcalendaring(settings)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.alarm_dialog.closest('div[role=dialog]').attr('role', 'alertdialog');
|
||||||
|
|
||||||
this.alarm_ids = event_ids;
|
this.alarm_ids = event_ids;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show a drop-down menu with a selection of snooze times
|
* Show a drop-down menu with a selection of snooze times
|
||||||
*/
|
*/
|
||||||
this.snooze_dropdown = function(link)
|
this.snooze_dropdown = function(link, event)
|
||||||
{
|
{
|
||||||
if (!this.snooze_popup) {
|
if (!this.snooze_popup) {
|
||||||
this.snooze_popup = $('#alarm-snooze-dropdown');
|
this.snooze_popup = $('#alarm-snooze-dropdown');
|
||||||
|
@ -511,13 +522,12 @@ function rcube_libcalendaring(settings)
|
||||||
|
|
||||||
// hide visible popup
|
// hide visible popup
|
||||||
if (this.snooze_popup.is(':visible') && this.snooze_popup.data('id') == link.data('id')) {
|
if (this.snooze_popup.is(':visible') && this.snooze_popup.data('id') == link.data('id')) {
|
||||||
this.snooze_popup.hide();
|
rcmail.command('menu-close', 'alarm-snooze-dropdown');
|
||||||
this.dismiss_link = null;
|
this.dismiss_link = null;
|
||||||
}
|
}
|
||||||
else { // open popup below the clicked link
|
else { // open popup below the clicked link
|
||||||
var pos = link.offset();
|
rcmail.command('menu-open', 'alarm-snooze-dropdown', link.get(0), event);
|
||||||
pos.top += link.height() + 2;
|
this.snooze_popup.data('id', link.data('id'));
|
||||||
this.snooze_popup.data('id', link.data('id')).css({ top:Math.floor(pos.top)+'px', left:Math.floor(pos.left)+'px' }).show();
|
|
||||||
this.dismiss_link = link;
|
this.dismiss_link = link;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -527,7 +537,7 @@ function rcube_libcalendaring(settings)
|
||||||
*/
|
*/
|
||||||
this.dismiss_alarm = function(id, snooze)
|
this.dismiss_alarm = function(id, snooze)
|
||||||
{
|
{
|
||||||
$('#alarm-snooze-dropdown').hide();
|
rcmail.command('menu-close', 'alarm-snooze-dropdown');
|
||||||
rcmail.http_post('utils/plugin.alarms', { action:'dismiss', data:{ id:id, snooze:snooze } });
|
rcmail.http_post('utils/plugin.alarms', { action:'dismiss', data:{ id:id, snooze:snooze } });
|
||||||
|
|
||||||
// remove dismissed alarm from list
|
// remove dismissed alarm from list
|
||||||
|
|
|
@ -580,6 +580,7 @@ class libcalendaring extends rcube_plugin
|
||||||
if (!$plugin['abort'] && !empty($plugin['alarms'])) {
|
if (!$plugin['abort'] && !empty($plugin['alarms'])) {
|
||||||
// make sure texts and env vars are available on client
|
// make sure texts and env vars are available on client
|
||||||
$this->add_texts('localization/', true);
|
$this->add_texts('localization/', true);
|
||||||
|
$this->rc->output->add_label('close');
|
||||||
$this->rc->output->set_env('snooze_select', $this->snooze_select());
|
$this->rc->output->set_env('snooze_select', $this->snooze_select());
|
||||||
$this->rc->output->command('plugin.display_alarms', $this->_alarms_output($plugin['alarms']));
|
$this->rc->output->command('plugin.display_alarms', $this->_alarms_output($plugin['alarms']));
|
||||||
}
|
}
|
||||||
|
|
|
@ -432,6 +432,9 @@ function rcube_tasklist_ui(settings)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.on('keydown', '.taskhead', function(e) {
|
.on('keydown', '.taskhead', function(e) {
|
||||||
|
if (e.target.nodeName == 'INPUT' && e.target.type == 'text')
|
||||||
|
return true;
|
||||||
|
|
||||||
var inc = 1;
|
var inc = 1;
|
||||||
switch (e.keyCode) {
|
switch (e.keyCode) {
|
||||||
case 13: // Enter
|
case 13: // Enter
|
||||||
|
|
Loading…
Add table
Reference in a new issue