BUGFIX #5176 Javascript error in IE for the installer - use "this" instead of e.target which doesn't work

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100866 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2010-03-11 03:33:13 +00:00 committed by Sam Minnee
parent 6cf5a055e6
commit a887aa3042

View File

@ -316,13 +316,12 @@ foreach($locales as $code => $details) {
<script type="text/javascript">
var children = $('database_selection').childNodes;
var disabledAdapterClick = function(e) {
if (!e) e = window.event;
// Hide all existing warnings
var elements = getElementsByClassName('databaseError');
for(var i = 0; i < elements.length; i++) elements[i].style.display = 'none';
if (e.target.parentNode.childNodes[0].getAttribute('notavailable')) {
if (this.parentNode.childNodes[0].getAttribute('notavailable')) {
// Show the warning for this adapter
getElementsByClassName('databaseError', e.target.parentNode)[0].style.display = 'block';
getElementsByClassName('databaseError', this.parentNode)[0].style.display = 'block';
return false;
}
}