From: cap2501 Date: Sun, 17 Sep 2006 18:20:43 +0000 (+0000) Subject: Added dialog to confirm deletion of activity. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=1752e584de7e6da75bfab36ee3100b1426cf9123;p=moodle.git Added dialog to confirm deletion of activity. --- diff --git a/lib/ajax/section-resource_classes.js b/lib/ajax/section-resource_classes.js index a56048230b..edbb1bb2cb 100755 --- a/lib/ajax/section-resource_classes.js +++ b/lib/ajax/section-resource_classes.js @@ -548,6 +548,10 @@ resource_class.prototype.toggle_hide = function(target,e,superficial,force){ resource_class.prototype.delete_button = function(){ if(this.debug)YAHOO.log("Deleteing "+this.getEl().id+"from parent "+this.parentObj.getEl().id); + if(!confirm('Are you sure you wish to delete this '+this.is+"?")){ + return false; + } + this.getEl().parentNode.removeChild(this.getEl()); this.parentObj.remove_resource(this);