fix selection of metatype on saved searches (#4053)

This commit is contained in:
Frédéric Péters 2013-12-03 15:18:54 +01:00
parent cb24ef7c29
commit a731d3d115
1 changed files with 3 additions and 3 deletions

View File

@ -180,11 +180,11 @@ function select_metatype(elem)
$(this).parent().parent().find(':checked').each(function() {
var portal_type = $(this).val();
var checkbox = $('.subtype-fieldset').find('[data-portaltype="' + portal_type + '"]');
if ($(checkbox).parents('.docs')) {
if ($(checkbox).parents('.docs').length == 1) {
select_metatype($('.metatypes [data-type="docs"]'));
} else if ($(checkbox).parents('.tasks')) {
} else if ($(checkbox).parents('.tasks').length == 1) {
select_metatype($('.metatypes [data-type="tasks"]'));
} else if ($(checkbox).parents('.contacts')) {
} else if ($(checkbox).parents('.contacts').length == 1) {
select_metatype($('.metatypes [data-type="contacts"]'));
}
$(checkbox).click();