From 5c7800ae2eeacb8544b35b1054f16ab5e99204e6 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Sat, 15 Sep 2007 01:01:24 +0000 Subject: [PATCH] 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 --- javascript/AssetAdmin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/javascript/AssetAdmin.js b/javascript/AssetAdmin.js index 7b6e8545..2f6b1c00 100755 --- a/javascript/AssetAdmin.js +++ b/javascript/AssetAdmin.js @@ -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; } }); \ No newline at end of file