Fix folder list operations when search is active
This commit is contained in:
parent
e7f1fd4082
commit
07f05a102b
3 changed files with 26 additions and 0 deletions
|
@ -3385,6 +3385,11 @@ function rcube_calendar_ui(settings)
|
|||
me.calendars[id].active = false;
|
||||
}
|
||||
|
||||
// adjust checked state of original list item
|
||||
if (calendars_list.is_search()) {
|
||||
calendars_list.container.find('input[value="'+id+'"]').prop('checked', this.checked);
|
||||
}
|
||||
|
||||
// add/remove event source
|
||||
fc.fullCalendar(action, me.calendars[id]);
|
||||
rcmail.http_post('calendar', { action:'subscribe', c:{ id:id, active:me.calendars[id].active?1:0 } });
|
||||
|
@ -3402,8 +3407,13 @@ function rcube_calendar_ui(settings)
|
|||
// init (delegate) event handler on quickview links
|
||||
.on('click', 'a.quickview', function(e) {
|
||||
var id = $(this).closest('li').attr('id').replace(/^rcmlical/, '');
|
||||
|
||||
if (calendars_list.is_search())
|
||||
id = id.replace(/--xsR$/, '');
|
||||
|
||||
if (me.calendars[id])
|
||||
me.quickview(id);
|
||||
|
||||
e.stopPropagation();
|
||||
return false;
|
||||
});
|
||||
|
|
|
@ -244,6 +244,9 @@ function kolab_folderlist(node, p)
|
|||
id = li.attr('id').replace(new RegExp('^'+p.id_prefix), ''),
|
||||
div = li.children().first();
|
||||
|
||||
if (me.is_search())
|
||||
id = id.replace(/--xsR$/, '');
|
||||
|
||||
if (p.id_decode)
|
||||
id = p.id_decode(id);
|
||||
|
||||
|
|
|
@ -197,6 +197,11 @@ function rcube_tasklist_ui(settings)
|
|||
if (!this.checked && focusview == id) {
|
||||
set_focusview(null);
|
||||
}
|
||||
|
||||
// adjust checked state of original list item
|
||||
if (tasklists_widget.is_search()) {
|
||||
tasklists_widget.container.find('input[value="'+id+'"]').prop('checked', this.checked);
|
||||
}
|
||||
}
|
||||
e.stopPropagation();
|
||||
})
|
||||
|
@ -212,6 +217,10 @@ function rcube_tasklist_ui(settings)
|
|||
// handler for clicks on quickview buttons
|
||||
tasklists_widget.container.on('click', '.quickview', function(e){
|
||||
var id = $(this).closest('li').attr('id').replace(/^rcmlitasklist/, '');
|
||||
|
||||
if (tasklists_widget.is_search())
|
||||
id = id.replace(/--xsR$/, '');
|
||||
|
||||
set_focusview(focusview == id ? null : id);
|
||||
e.stopPropagation();
|
||||
return false;
|
||||
|
@ -220,6 +229,10 @@ function rcube_tasklist_ui(settings)
|
|||
// register dbl-click handler to open calendar edit dialog
|
||||
tasklists_widget.container.on('dblclick', ':not(.virtual) > .tasklist', function(e){
|
||||
var id = $(this).closest('li').attr('id').replace(/^rcmlitasklist/, '');
|
||||
|
||||
if (tasklists_widget.is_search())
|
||||
id = id.replace(/--xsR$/, '');
|
||||
|
||||
list_edit_dialog(id);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue