mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-70165 course: always import inplace editable module.
It's required on the course participants table for the roles/groups columns, but isn't always loaded after adding the first participant.
This commit is contained in:
parent
0d0e66d37c
commit
2b6d4c3077
2
user/amd/build/participants.min.js
vendored
2
user/amd/build/participants.min.js
vendored
@ -1,2 +1,2 @@
|
||||
function _typeof(a){"@babel/helpers - typeof";if("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator){_typeof=function(a){return typeof a}}else{_typeof=function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a}}return _typeof(a)}define ("core_user/participants",["exports","core_table/dynamic","core/str","core/checkbox-toggleall","core/custom_interaction_events","core_table/local/dynamic/selectors","core/modal_events","core/notification","core/pending","jquery","core_user/local/participants/bulkactions"],function(a,b,c,d,e,f,g,h,i,j,k){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.init=void 0;b=n(b);c=n(c);d=l(d);e=l(e);f=l(f);g=l(g);h=l(h);i=l(i);j=l(j);function l(a){return a&&a.__esModule?a:{default:a}}function m(){if("function"!=typeof WeakMap)return null;var a=new WeakMap;m=function(){return a};return a}function n(a){if(a&&a.__esModule){return a}if(null===a||"object"!==_typeof(a)&&"function"!=typeof a){return{default:a}}var b=m();if(b&&b.has(a)){return b.get(a)}var c={},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var e in a){if(Object.prototype.hasOwnProperty.call(a,e)){var f=d?Object.getOwnPropertyDescriptor(a,e):null;if(f&&(f.get||f.set)){Object.defineProperty(c,e,f)}else{c[e]=a[e]}}}c.default=a;if(b){b.set(a,c)}return c}function o(a,b){return t(a)||s(a,b)||q(a,b)||p()}function p(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function q(a,b){if(!a)return;if("string"==typeof a)return r(a,b);var c=Object.prototype.toString.call(a).slice(8,-1);if("Object"===c&&a.constructor)c=a.constructor.name;if("Map"===c||"Set"===c)return Array.from(c);if("Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return r(a,b)}function r(a,b){if(null==b||b>a.length)b=a.length;for(var c=0,d=Array(b);c<b;c++){d[c]=a[c]}return d}function s(a,b){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(a)))return;var c=[],d=!0,e=!1,f=void 0;try{for(var g=a[Symbol.iterator](),h;!(d=(h=g.next()).done);d=!0){c.push(h.value);if(b&&c.length===b)break}}catch(a){e=!0;f=a}finally{try{if(!d&&null!=g["return"])g["return"]()}finally{if(e)throw f}}return c}function t(a){if(Array.isArray(a))return a}var u={bulkActionSelect:"#formactionid",bulkUserSelectedCheckBoxes:"input[data-togglegroup='participants-table'][data-toggle='slave']:checked",checkCountButton:"#checkall",showCountText:"[data-region=\"participant-count\"]",showCountToggle:"[data-action=\"showcount\"]",stateHelpIcon:"[data-region=\"state-help-icon\"]",tableForm:function tableForm(a){return"form[data-table-unique-id=\"".concat(a,"\"]")}};a.init=function init(a){var l=a.uniqueid,m=a.noteStateNames,n=void 0===m?{}:m,p=document.querySelector(u.tableForm(l)),q=function(a){return p.querySelector(f.default.main.fromRegionId(a))},r=function(){e.default.define(u.bulkActionSelect,[e.default.events.accessibleChange]);(0,j.default)(u.bulkActionSelect).on(e.default.events.accessibleChange,function(a){var b=a.target.closest("select"),c=b.value,d=q(l),e=d.querySelectorAll(u.bulkUserSelectedCheckBoxes),f=new i.default("core_user/participants:bulkActionSelect");if(-1!==c.indexOf("#")){a.preventDefault();var j=[];e.forEach(function(a){j.push(a.getAttribute("name").replace("user",""))});var m;if("#messageselect"===c){m=(0,k.showSendMessage)(j)}else if("#addgroupnote"===c){m=(0,k.showAddNote)(p.dataset.courseId,j,n,p.querySelector(u.stateHelpIcon))}if(m){var o=new i.default("core_user/participants:bulkActionSelected");m.then(function(a){a.getRoot().on(g.default.hidden,function(){b.focus()});o.resolve();return a}).catch(h.default.exception)}}else if(""!==c&&e.length){b.form.submit()}s(b);f.resolve()});p.addEventListener("click",function(a){var c=p.querySelector(u.checkCountButton),e=c&&c.contains(a.target);if(e){a.preventDefault();var f=q(l);b.setPageSize(f,c.dataset.targetPageSize).then(function(a){d.default.setGroupState(p,"participants-table",!0);return a}).catch(h.default.exception)}});p.addEventListener(b.Events.tableContentRefreshed,function(a){var b=p.querySelector(u.checkCountButton),e=a.target,f=parseInt(e.dataset.tableDefaultPerPage,10),g=parseInt(e.dataset.tablePageSize,10),i=parseInt(e.dataset.tableTotalRows,10);d.default.updateSlavesFromMasterState(p,"participants-table");var j=[{key:"countparticipantsfound",component:"core_user",param:i}];if(i<=f){if(b){b.classList.add("hidden")}}else if(i<=g){j.push({key:"selectalluserswithcount",component:"core",param:f});if(b){b.classList.add("hidden")}}else{j.push({key:"selectalluserswithcount",component:"core",param:i});if(b){b.classList.remove("hidden")}}c.get_strings(j).then(function(a){var c=o(a,2),d=c[0],e=c[1],f=p.querySelector(u.showCountText);f.innerHTML=d;if(e&&b){b.value=e}}).catch(h.default.exception)})},s=function(a){a.value=""};r()}});
|
||||
function _typeof(a){"@babel/helpers - typeof";if("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator){_typeof=function(a){return typeof a}}else{_typeof=function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a}}return _typeof(a)}define ("core_user/participants",["exports","core_table/dynamic","core/str","core/checkbox-toggleall","core/custom_interaction_events","core_table/local/dynamic/selectors","core/modal_events","core/notification","core/pending","jquery","core_user/local/participants/bulkactions","core/inplace_editable"],function(a,b,c,d,e,f,g,h,i,j,k){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.init=void 0;b=n(b);c=n(c);d=l(d);e=l(e);f=l(f);g=l(g);h=l(h);i=l(i);j=l(j);function l(a){return a&&a.__esModule?a:{default:a}}function m(){if("function"!=typeof WeakMap)return null;var a=new WeakMap;m=function(){return a};return a}function n(a){if(a&&a.__esModule){return a}if(null===a||"object"!==_typeof(a)&&"function"!=typeof a){return{default:a}}var b=m();if(b&&b.has(a)){return b.get(a)}var c={},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var e in a){if(Object.prototype.hasOwnProperty.call(a,e)){var f=d?Object.getOwnPropertyDescriptor(a,e):null;if(f&&(f.get||f.set)){Object.defineProperty(c,e,f)}else{c[e]=a[e]}}}c.default=a;if(b){b.set(a,c)}return c}function o(a,b){return t(a)||s(a,b)||q(a,b)||p()}function p(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function q(a,b){if(!a)return;if("string"==typeof a)return r(a,b);var c=Object.prototype.toString.call(a).slice(8,-1);if("Object"===c&&a.constructor)c=a.constructor.name;if("Map"===c||"Set"===c)return Array.from(c);if("Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return r(a,b)}function r(a,b){if(null==b||b>a.length)b=a.length;for(var c=0,d=Array(b);c<b;c++){d[c]=a[c]}return d}function s(a,b){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(a)))return;var c=[],d=!0,e=!1,f=void 0;try{for(var g=a[Symbol.iterator](),h;!(d=(h=g.next()).done);d=!0){c.push(h.value);if(b&&c.length===b)break}}catch(a){e=!0;f=a}finally{try{if(!d&&null!=g["return"])g["return"]()}finally{if(e)throw f}}return c}function t(a){if(Array.isArray(a))return a}var u={bulkActionSelect:"#formactionid",bulkUserSelectedCheckBoxes:"input[data-togglegroup='participants-table'][data-toggle='slave']:checked",checkCountButton:"#checkall",showCountText:"[data-region=\"participant-count\"]",showCountToggle:"[data-action=\"showcount\"]",stateHelpIcon:"[data-region=\"state-help-icon\"]",tableForm:function tableForm(a){return"form[data-table-unique-id=\"".concat(a,"\"]")}};a.init=function init(a){var l=a.uniqueid,m=a.noteStateNames,n=void 0===m?{}:m,p=document.querySelector(u.tableForm(l)),q=function(a){return p.querySelector(f.default.main.fromRegionId(a))},r=function(){e.default.define(u.bulkActionSelect,[e.default.events.accessibleChange]);(0,j.default)(u.bulkActionSelect).on(e.default.events.accessibleChange,function(a){var b=a.target.closest("select"),c=b.value,d=q(l),e=d.querySelectorAll(u.bulkUserSelectedCheckBoxes),f=new i.default("core_user/participants:bulkActionSelect");if(-1!==c.indexOf("#")){a.preventDefault();var j=[];e.forEach(function(a){j.push(a.getAttribute("name").replace("user",""))});var m;if("#messageselect"===c){m=(0,k.showSendMessage)(j)}else if("#addgroupnote"===c){m=(0,k.showAddNote)(p.dataset.courseId,j,n,p.querySelector(u.stateHelpIcon))}if(m){var o=new i.default("core_user/participants:bulkActionSelected");m.then(function(a){a.getRoot().on(g.default.hidden,function(){b.focus()});o.resolve();return a}).catch(h.default.exception)}}else if(""!==c&&e.length){b.form.submit()}s(b);f.resolve()});p.addEventListener("click",function(a){var c=p.querySelector(u.checkCountButton),e=c&&c.contains(a.target);if(e){a.preventDefault();var f=q(l);b.setPageSize(f,c.dataset.targetPageSize).then(function(a){d.default.setGroupState(p,"participants-table",!0);return a}).catch(h.default.exception)}});p.addEventListener(b.Events.tableContentRefreshed,function(a){var b=p.querySelector(u.checkCountButton),e=a.target,f=parseInt(e.dataset.tableDefaultPerPage,10),g=parseInt(e.dataset.tablePageSize,10),i=parseInt(e.dataset.tableTotalRows,10);d.default.updateSlavesFromMasterState(p,"participants-table");var j=[{key:"countparticipantsfound",component:"core_user",param:i}];if(i<=f){if(b){b.classList.add("hidden")}}else if(i<=g){j.push({key:"selectalluserswithcount",component:"core",param:f});if(b){b.classList.add("hidden")}}else{j.push({key:"selectalluserswithcount",component:"core",param:i});if(b){b.classList.remove("hidden")}}c.get_strings(j).then(function(a){var c=o(a,2),d=c[0],e=c[1],f=p.querySelector(u.showCountText);f.innerHTML=d;if(e&&b){b.value=e}}).catch(h.default.exception)})},s=function(a){a.value=""};r()}});
|
||||
//# sourceMappingURL=participants.min.js.map
|
||||
|
File diff suppressed because one or more lines are too long
@ -32,6 +32,7 @@ import Notification from 'core/notification';
|
||||
import Pending from 'core/pending';
|
||||
import jQuery from 'jquery';
|
||||
import {showAddNote, showSendMessage} from 'core_user/local/participants/bulkactions';
|
||||
import 'core/inplace_editable';
|
||||
|
||||
const Selectors = {
|
||||
bulkActionSelect: "#formactionid",
|
||||
|
Loading…
x
Reference in New Issue
Block a user