]> git.mjollnir.org Git - moodle.git/commitdiff
Added dialog to confirm deletion of activity.
authorcap2501 <cap2501>
Sun, 17 Sep 2006 18:20:43 +0000 (18:20 +0000)
committercap2501 <cap2501>
Sun, 17 Sep 2006 18:20:43 +0000 (18:20 +0000)
lib/ajax/section-resource_classes.js

index a56048230bf5287504588081282a7088024d19e6..edbb1bb2cb91ae43553609047db5fab195b33fa4 100755 (executable)
@@ -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);