Commit 00a11f40 authored by Garrett Boone's avatar Garrett Boone Committed by Andrew Nicols
Browse files

MDL-64640 feedback: Fix target link on deletion

parent 1717604f
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
......@@ -25,6 +25,7 @@ function($, ajax, str, notification) {
var manager = {
deleteItem: function(e) {
e.preventDefault();
var targetUrl = $(e.currentTarget).attr('href');
str.get_strings([
{
......@@ -43,11 +44,15 @@ function($, ajax, str, notification) {
key: 'no',
component: 'moodle'
}
]).done(function(s) {
notification.confirm(s[0], s[1], s[2], s[3], $.proxy(function() {
window.location = $(this).attr('href');
}, e.currentTarget));
});
])
.then(function(s) {
notification.confirm(s[0], s[1], s[2], s[3], function() {
window.location = targetUrl;
});
return;
})
.catch();
},
setup: function() {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment