mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-10221 Simulating the HTTP DELETE method by using a URL param (action), because some web servers don't allow DELETE. AJAX Course and Block deletion now works as expected. Merged from MOODLE_19_STABLE
This commit is contained in:
parent
50569ba3ac
commit
49c4d8caa4
3 changed files with 10 additions and 3 deletions
|
@ -258,7 +258,7 @@ block_class.prototype.delete_button = function() {
|
|||
this.removeFromGroup('blocks');
|
||||
|
||||
// Remove from remote model.
|
||||
main.connect('DELETE', 'class=block&instanceId='+this.instanceId);
|
||||
main.connect('POST', 'class=block&action=DELETE&instanceId='+this.instanceId);
|
||||
|
||||
// Remove from view
|
||||
main.blocks.splice(main.get_block_index(this), 1);
|
||||
|
|
|
@ -818,7 +818,7 @@ resource_class.prototype.delete_button = function() {
|
|||
return false;
|
||||
}
|
||||
this.parentObj.remove_resource(this);
|
||||
main.connect('DELETE', 'class=resource&id='+this.id);
|
||||
main.connect('POST', 'class=resource&action=DELETE&id='+this.id);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue