also wrap date widgets in advanced search

This commit is contained in:
Frédéric Péters 2011-11-27 18:13:11 +01:00
parent 11cd6e33fb
commit b3b959b7f5
2 changed files with 10 additions and 1 deletions

View File

@ -99,6 +99,15 @@ function setup_sort_on(index, elem)
$('#formfield-document-widgets-l_topics').each(setup_appearance);
$('#formfield-document-widgets-l_polgroups').each(setup_appearance);
$('#formfield-document-widgets-sort_on').hide();
$('select.date-field').each(function() {
$(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);
});
$('div.advbox form').hide();
$('div.advbox h2').click(function() { $(this).parent().find('form').toggle(); });
});

View File

@ -158,7 +158,7 @@ function sync_from_checkboxes(elem, dummyinput)
function setup_appearance(index, elem)
{
var dummyinput = $('<input type="text" readonly="readonly"/>');
var dummyinput = $('<input class="dummyinput" type="text" readonly="readonly"/>');
sync_from_checkboxes(elem, dummyinput);
dummyinput.click(function() {
$(elem).find('div.droppedcheckboxes').toggle();