From 3517782a8ced44176e2b540786c09b4b455a9e0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Tue, 17 May 2016 21:04:49 +0200 Subject: [PATCH] use new thesaurus popup --- tabellio/searchform/js_macros.pt | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tabellio/searchform/js_macros.pt b/tabellio/searchform/js_macros.pt index 661f280..d60fca1 100644 --- a/tabellio/searchform/js_macros.pt +++ b/tabellio/searchform/js_macros.pt @@ -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 = $('Ajouter une matière<' + '/a>'); + add_topic.prepOverlay({ + subtype: 'ajax', + filter: '#content>*', + urlmatch: '.*', + urlreplace: '/thesaurus/plone-popup/' + }); + $(add_topic).insertAfter(elem); + }); }); })(jQuery);