Permalink
Browse files

Merge branch 'MDL-60633-master' of git://github.com/andrewnicols/moodle

  • Loading branch information...
dmonllao committed Nov 2, 2017
2 parents 2a542d0 + 314b809 commit 6e3314f044f5f847704965e9b083e4c2eb38f3a9
Showing with 10 additions and 1 deletion.
  1. +1 −1 lib/amd/build/inplace_editable.min.js
  2. +9 −0 lib/amd/src/inplace_editable.js

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -67,6 +67,13 @@ define(['jquery',
};
var updateValue = function(mainelement, value) {
var pendingId = [
mainelement.attr('data-itemid'),
mainelement.attr('data-component'),
mainelement.attr('data-itemtype'),
].join('-');
M.util.js_pending(pendingId);
addSpinner(mainelement);
ajax
.call([{
@@ -84,6 +91,7 @@ define(['jquery',
templates.replaceNode(mainelement, newelement, js);
newelement.find('[data-inplaceeditablelink]').focus();
newelement.trigger({type: 'updated', ajaxreturn: data, oldvalue: oldvalue});
M.util.js_complete(pendingId);
});
},
fail: function(ex) {
@@ -92,6 +100,7 @@ define(['jquery',
newvalue: value
});
removeSpinner(mainelement);
M.util.js_complete(pendingId);
mainelement.trigger(e);
if (!e.isDefaultPrevented()) {
notification.exception(ex);

0 comments on commit 6e3314f

Please sign in to comment.