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

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101167 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2010-03-16 23:58:24 +00:00 committed by Sam Minnee
parent 3dbf07f031
commit 4b191bdaba

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