mirror of
https://github.com/moodle/moodle.git
synced 2025-01-29 19:50:14 +01:00
Merge branch 'MDL-82909-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE
This commit is contained in:
commit
003d6ee817
2
lib/amd/build/inplace_editable.min.js
vendored
2
lib/amd/build/inplace_editable.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -36,14 +36,14 @@ define(
|
||||
'core/config',
|
||||
'core/url',
|
||||
'core/form-autocomplete',
|
||||
'core/loadingicon',
|
||||
'core/pending',
|
||||
'core/local/inplace_editable/events',
|
||||
],
|
||||
function($, ajax, templates, notification, str, cfg, url, autocomplete, Pending, Events) {
|
||||
function($, ajax, templates, notification, str, cfg, url, autocomplete, LoadingIcon, Pending, Events) {
|
||||
|
||||
const removeSpinner = function(element) {
|
||||
element.removeClass('updating');
|
||||
element.find('img.spinner').hide();
|
||||
element.find('.loading-icon').hide();
|
||||
};
|
||||
|
||||
/**
|
||||
@ -61,9 +61,10 @@ define(
|
||||
mainelement.attr('data-component'),
|
||||
mainelement.attr('data-itemtype'),
|
||||
].join('-');
|
||||
var pendingPromise = new Pending(pendingId);
|
||||
|
||||
addSpinner(mainelement);
|
||||
var pendingPromise = new Pending(pendingId);
|
||||
LoadingIcon.addIconToContainerRemoveOnCompletion(mainelement, pendingPromise);
|
||||
|
||||
ajax.call([{
|
||||
methodname: 'core_update_inplace_editable',
|
||||
args: {
|
||||
@ -104,20 +105,6 @@ define(
|
||||
});
|
||||
};
|
||||
|
||||
const addSpinner = function(element) {
|
||||
element.addClass('updating');
|
||||
var spinner = element.find('img.spinner');
|
||||
if (spinner.length) {
|
||||
spinner.show();
|
||||
} else {
|
||||
spinner = $('<img/>')
|
||||
.attr('src', url.imageUrl('i/loading_small'))
|
||||
.addClass('spinner').addClass('smallicon')
|
||||
;
|
||||
element.append(spinner);
|
||||
}
|
||||
};
|
||||
|
||||
$('body').on('click keypress', '[data-inplaceeditable] [data-inplaceeditablelink]', function(e) {
|
||||
if (e.type === 'keypress' && e.keyCode !== 13) {
|
||||
return;
|
||||
|
@ -71,7 +71,7 @@ table {
|
||||
}
|
||||
}
|
||||
|
||||
.table-dynamic .loading-icon {
|
||||
.table-dynamic > .loading-icon {
|
||||
position: absolute;
|
||||
left: calc(50% - 1.5rem);
|
||||
top: 200px;
|
||||
|
@ -35125,12 +35125,12 @@ table .sticky-column {
|
||||
background-color: inherit;
|
||||
}
|
||||
|
||||
.table-dynamic .loading-icon {
|
||||
.table-dynamic > .loading-icon {
|
||||
position: absolute;
|
||||
left: calc(50% - 1.5rem);
|
||||
top: 200px;
|
||||
}
|
||||
.table-dynamic .loading-icon .icon {
|
||||
.table-dynamic > .loading-icon .icon {
|
||||
max-height: 3rem;
|
||||
max-width: 3rem;
|
||||
font-size: 3rem;
|
||||
|
@ -35125,12 +35125,12 @@ table .sticky-column {
|
||||
background-color: inherit;
|
||||
}
|
||||
|
||||
.table-dynamic .loading-icon {
|
||||
.table-dynamic > .loading-icon {
|
||||
position: absolute;
|
||||
left: calc(50% - 1.5rem);
|
||||
top: 200px;
|
||||
}
|
||||
.table-dynamic .loading-icon .icon {
|
||||
.table-dynamic > .loading-icon .icon {
|
||||
max-height: 3rem;
|
||||
max-width: 3rem;
|
||||
font-size: 3rem;
|
||||
|
Loading…
x
Reference in New Issue
Block a user