BUGFIX #5216 Installer has issues with click handlers applied to the entire li, be more specific and apply it to the label and input instead (from r101167)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@111966 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2010-10-12 21:49:35 +00:00
parent 30d4bc29f9
commit f8a5282055

View File

@ -15,15 +15,16 @@ $(document).ready(function() {
/**
* Hide all existing database warnings, and show only current one
*/
$('#database_selection li').click(function(e) {
$('#database_selection li label, input').click(function(e) {
$('.dbfields').hide();
// only show fields if there's no db error
if(!$('.databaseError', this).length) $('.dbfields', this).show();
if(!$('.databaseError', $(this).parent()).length) $('.dbfields', $(this).parent()).show();
$('.databaseError').hide();
$('.databaseError', this).show();
$('.databaseError', $(this).parent()).show();
});
// Select first
$('#database_selection li input:checked').parents('li:first').click();
$('#database_selection li input:checked').siblings('label').click();
/**
* Install button