mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 16:04:25 +02:00
Merge branch 'MDL-59845-master' of git://github.com/andrewnicols/moodle
This commit is contained in:
commit
2566b18a31
2
admin/tool/lp/amd/build/planactions.min.js
vendored
2
admin/tool/lp/amd/build/planactions.min.js
vendored
File diff suppressed because one or more lines are too long
@ -130,6 +130,11 @@ define(['jquery',
|
||||
* @return {Promise}
|
||||
*/
|
||||
PlanActions.prototype._callAndRefresh = function(calls, planData) {
|
||||
// Because this function causes a refresh, we must track the JS completion from start to finish to prevent
|
||||
// stale reference issues in Behat.
|
||||
var callKey = 'tool_lp/planactions:_callAndRefresh-' + Math.floor(Math.random() * Math.floor(1000));
|
||||
M.util.js_pending(callKey);
|
||||
|
||||
var self = this;
|
||||
calls.push({
|
||||
methodname: self._contextMethod,
|
||||
@ -141,7 +146,10 @@ define(['jquery',
|
||||
.then(function() {
|
||||
return self._renderView(arguments[arguments.length - 1]);
|
||||
})
|
||||
.fail(notification.exception);
|
||||
.fail(notification.exception)
|
||||
.always(function() {
|
||||
return M.util.js_complete(callKey);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user