Prevented page from redirecting before JS had finished
This commit is contained in:
parent
3a63a6e00a
commit
5e29aebeb6
1 changed files with 7 additions and 2 deletions
9
yui/src/rearrange.js
vendored
9
yui/src/rearrange.js
vendored
|
@ -309,11 +309,16 @@ M.mod_customcert.rearrange = {
|
||||||
on: {
|
on: {
|
||||||
failure: function(tid, response) {
|
failure: function(tid, response) {
|
||||||
this.ajax_failure(response);
|
this.ajax_failure(response);
|
||||||
e.preventDefault();
|
},
|
||||||
|
success: function() {
|
||||||
|
var formNode = e.currentTarget.ancestor('form', true);
|
||||||
|
window.location = formNode.getAttribute('action') + '?' + Y.QueryString.stringify({cmid:formNode.one('[name=cmid]').get('value')});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
context: this
|
context: this
|
||||||
})
|
});
|
||||||
|
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue