From 41f1b0932b3f5441312d08d9035de4a4b3cf4c9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Wed, 18 May 2016 10:16:51 +0200 Subject: [PATCH] don't use $.data() as it strips leading zeros --- pfwb_thesaurus/templates/thesaurus/plone_popup.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pfwb_thesaurus/templates/thesaurus/plone_popup.html b/pfwb_thesaurus/templates/thesaurus/plone_popup.html index 5676a61..80cc745 100644 --- a/pfwb_thesaurus/templates/thesaurus/plone_popup.html +++ b/pfwb_thesaurus/templates/thesaurus/plone_popup.html @@ -16,10 +16,10 @@ function thesaurus_popup_init() { var orig_link = $('a[rel=#' + $(this).parents('.overlay-ajax').attr('id') + ']'); var orig_input = $(orig_link).parent().find('input')[0]; var orig_ac_input = $(orig_link).parent().find('input')[1]; - $(orig_input).val($(orig_input).val() + ' ' + $(this).data('term-id')); + $(orig_input).val($(orig_input).val() + ' ' + $(this).attr('data-term-id')); var labelbox = create_labelbox( orig_ac_input, - $(this).data('term-id'), + $(this).attr('data-term-id'), $(this).parent().find('h2').text()); $(orig_link).before(labelbox); $('.close').click();