mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
"MDL-21959, comments api, fixed javascript events"
This commit is contained in:
parent
be87881fd0
commit
2057b5ef50
@ -250,10 +250,13 @@ M.core_comment = {
|
||||
// page buttons
|
||||
Y.all('div.comment-content a').each(
|
||||
function(node, id) {
|
||||
var theid = node.get('id');
|
||||
var re = new RegExp("comment-delete-"+scope.client_id+"-(\\d+)", "i");
|
||||
var result = theid.match(re);
|
||||
if (result[1]) {
|
||||
Y.Event.purgeElement('#'+theid, false, 'click');
|
||||
}
|
||||
node.on('click', function(e, node) {
|
||||
var id = node.get('id');
|
||||
var re = new RegExp("comment-delete-"+this.client_id+"-(\\d+)", "i");
|
||||
var result = id.match(re);
|
||||
if (result[1]) {
|
||||
this.dodelete(result[1]);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user