add help links to checkboxes, remove <select> default content

This commit is contained in:
Frédéric Péters 2012-01-17 13:52:58 +01:00 committed by Frédéric Péters
parent 7c72482315
commit d15bd101a2
1 changed files with 2 additions and 1 deletions

View File

@ -203,15 +203,16 @@ function setup_help_link(index, elem)
var parts = elem.id.split('-');
var fieldname = parts[parts.length-1];
var help_link = $('#aide-'+fieldname).clone();
console.log('help_link:', help_link);
if (help_link.length > 0) {
help_link.text('?');
$(elem).find('label.horizontal').append(help_link);
$(elem).find('span.option label').append(help_link);
}
}
(function($) {
$().ready(function() {
$('option[value="--NOVALUE--"]').text('');
$('div.field').each(setup_help_link);
});
})(jQuery);