Disable default link action on notebooks list search results

This commit is contained in:
Thomas Bruederli 2014-06-27 10:50:16 +02:00
parent 2d3569d832
commit 8d2b943cb6
2 changed files with 8 additions and 1 deletions

View file

@ -134,6 +134,10 @@ function rcube_kolab_notes_ui(settings)
rcmail.http_post('list', { _do:'subscribe', _list:{ id:p.id, permanent:1 } });
}
});
notebookslist.addEventListener('click-item', function(p) {
// avoid link execution
return false;
});
notebookslist.addEventListener('search-complete', function(data) {
if (data.length)
rcmail.display_message(rcmail.gettext('nrnotebooksfound','kolab_notes').replace('$nr', data.length), 'voice');

View file

@ -110,7 +110,10 @@ function kolab_folderlist(node, p)
// forward event
if (prop = search_results[id]) {
e.data = prop;
me.triggerEvent('click-item', e);
if (me.triggerEvent('click-item', e) === false) {
e.stopPropagation();
return false;
}
}
});
}