Index: openacs-4/packages/xowiki/www/admin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/admin/index.tcl,v diff -u -r1.28.4.2 -r1.28.4.3 --- openacs-4/packages/xowiki/www/admin/index.tcl 10 Sep 2015 08:10:41 -0000 1.28.4.2 +++ openacs-4/packages/xowiki/www/admin/index.tcl 13 Sep 2016 08:46:31 -0000 1.28.4.3 @@ -35,9 +35,21 @@ AnchorField instances -label [_ xowiki.instances] -html {align center} AnchorField edit -CSSclass add-item-button -label [_ xowiki.add] -html {align center} AnchorField delete -CSSclass delete-item-button -label [_ xowiki.delete_all] \ - -html {align center onClick "return(confirm('#xowiki.delete_all_confirm#'));"} + -html {align center class delete-all} } +template::add_body_script -script [subst { + var confirmIt = function (e) { + if (!confirm('[_ xowiki.delete_all_confirm]')) e.preventDefault(); + }; + var el = document.getElementsByTagName('td'); + for (i = 0; i < el.length; i++) { + if (el\[i\].className == 'delete-all') { + el\[i\].addEventListener('click', confirmIt, false); + } + }; +}] + set base [::$package_id package_url] foreach object_type $object_types { set return_url [export_vars -base ${base}admin {object_type}]