use new thesaurus popup

This commit is contained in:
Frédéric Péters 2016-05-17 21:04:49 +02:00
parent b3aea0ef35
commit 3517782a8c
1 changed files with 12 additions and 2 deletions

View File

@ -67,8 +67,18 @@ if(typeof(String.prototype.trim) === "undefined") {
'cacheLength': 0, 'matchContains': true, 'scroll': true, 'max': 30}).result(autocomplete_ready);
$('.polgroup-autocomplete').each(sync_polgroups).autocomplete(PORTAL_URL+'/listPolgroups', {
}).result(autocomplete_ready);
$('.topic-autocomplete').each(sync_topics).autocomplete(PORTAL_URL+'/listTopics', {
'cacheLength': 0, 'matchContains': true, 'scroll': true, 'max': 30}).result(autocomplete_ready);
$('.topic-autocomplete').each(sync_topics);
$('.topic-autocomplete').each(function(index, elem) {
$(elem).hide();
var add_topic = $('<a class="add-topic-link" href="#"' + '>Ajouter une matière<' + '/a>');
add_topic.prepOverlay({
subtype: 'ajax',
filter: '#content>*',
urlmatch: '.*',
urlreplace: '/thesaurus/plone-popup/'
});
$(add_topic).insertAfter(elem);
});
});
})(jQuery);
</script>