take text nodes in the div date-field, and make sure it gets last

This commit is contained in:
Frédéric Péters 2011-11-25 18:09:38 +01:00
parent 709db8db8b
commit 11cd6e33fb
1 changed files with 7 additions and 1 deletions

View File

@ -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('<div class="date-field">');
$(this).parent().contents().filter(function() {
return (this.nodeType==3 || $(this).hasClass('date-field'));
}).wrapAll('<div class="date-field">');
});
$('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);