Permalink
Browse files

Merge branch 'MDL-60633-33' of git://github.com/andrewnicols/moodle i…

…nto MOODLE_33_STABLE
  • Loading branch information...
dmonllao committed Nov 2, 2017
2 parents b09c936 + 0afb1ec commit ffb59960605b43104af073b7885f4ef94a357303
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.
@@ -60,6 +60,13 @@ define(['jquery', 'core/ajax', 'core/templates', 'core/notification', 'core/str'
};
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([{
@@ -77,6 +84,7 @@ define(['jquery', 'core/ajax', 'core/templates', 'core/notification', 'core/str'
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) {
@@ -85,6 +93,7 @@ define(['jquery', 'core/ajax', 'core/templates', 'core/notification', 'core/str'
newvalue: value
});
removeSpinner(mainelement);
M.util.js_complete(pendingId);
mainelement.trigger(e);
if (!e.isDefaultPrevented()) {
notification.exception(ex);

0 comments on commit ffb5996

Please sign in to comment.