mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
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:
parent
23e18d620e
commit
5c7800ae2e
@ -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;
|
||||
}
|
||||
});
|
Loading…
Reference in New Issue
Block a user