elofgren:BUGFIX: Make deleting folders work again by replacing getElementsByTagName('a') with getElementsByTagName('button'). This was broken when the 'Delete' link was changed to a 'Delete' button.

(merged from branches/gsoc)


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@41865 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2007-09-15 01:01:24 +00:00
parent 23e18d620e
commit 5c7800ae2e

View File

@ -211,7 +211,7 @@ deletefolder = {
}
});
$('deletepage').getElementsByTagName('a')[0].onclick();
$('deletepage').getElementsByTagName('button')[0].onclick();
} else {
alert("Please select at least 1 page.");
@ -276,7 +276,7 @@ appendLoader(function () {
Observable.applyTo($('deletepage_options'));
if($('deletepage')) {
$('deletepage').onclick = deletefolder.button_onclick;
$('deletepage').getElementsByTagName('a')[0].onclick = function() { return false; };
$('deletepage').getElementsByTagName('button')[0].onclick = function() { return false; };
$('deletepage_options').onsubmit = deletefolder.form_submit;
}
});