From 11cd6e33fbdb620f3e4e4bcf48a49f1476ad558c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Fri, 25 Nov 2011 18:09:38 +0100 Subject: [PATCH] take text nodes in the div date-field, and make sure it gets last --- tabellio/searchform/docsearchpfb.pt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tabellio/searchform/docsearchpfb.pt b/tabellio/searchform/docsearchpfb.pt index f194c4b..e59e846 100644 --- a/tabellio/searchform/docsearchpfb.pt +++ b/tabellio/searchform/docsearchpfb.pt @@ -202,7 +202,13 @@ function setup_help_icon(index, elem) $('#adopteddocument-widgets-session').each(setup_default_session); $('div.formHelp').each(setup_help_icon); $('select.date-field').each(function() { - $(this).parent().find('.date-field').wrapAll('
'); + $(this).parent().contents().filter(function() { + return (this.nodeType==3 || $(this).hasClass('date-field')); + }).wrapAll('
'); + }); + $('div.date-field').each(function() { + var parent = $(this).parent(); + $(this).detach().appendTo(parent); }); $('#formfield-adopteddocument-widgets-l_doctypes').each(setup_appearance); $('#formfield-adopteddocument-widgets-l_topics').each(setup_appearance);