mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 07:56:06 +02:00
Merge branch 'MDL-72813-master' of git://github.com/andrewnicols/moodle
This commit is contained in:
commit
894a6b4500
2
admin/tool/usertours/amd/build/tour.min.js
vendored
2
admin/tool/usertours/amd/build/tour.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
@ -21,6 +21,14 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
/**
|
||||
* A list of steps.
|
||||
*
|
||||
* @typedef {Object[]} StepList
|
||||
* @property {Number} stepId The id of the step in the database
|
||||
* @property {Number} position The position of the step within the tour (zero-indexed)
|
||||
*/
|
||||
|
||||
import $ from 'jquery';
|
||||
import * as Aria from 'core/aria';
|
||||
import Popper from 'core/popper';
|
||||
@ -361,8 +369,7 @@ const Tour = class {
|
||||
/**
|
||||
* Get potentially visible steps in a tour.
|
||||
*
|
||||
* @return {{stepId: number, position: number}[]} An associative array with stepNumber as keys
|
||||
* and an object of stepId and position as values.
|
||||
* @returns {StepList} A list of ordered steps
|
||||
*/
|
||||
getPotentiallyVisibleSteps() {
|
||||
let position = 1;
|
||||
@ -1219,11 +1226,11 @@ const Tour = class {
|
||||
let viewportHeight = $(window).height();
|
||||
let targetNode = this.getStepTarget(stepConfig);
|
||||
|
||||
parent = $(window);
|
||||
let scrollParent = $(window);
|
||||
if (targetNode.parents('[data-usertour="scroller"]').length) {
|
||||
parent = targetNode.parents('[data-usertour="scroller"]');
|
||||
scrollParent = targetNode.parents('[data-usertour="scroller"]');
|
||||
}
|
||||
let scrollTop = parent.scrollTop();
|
||||
let scrollTop = scrollParent.scrollTop();
|
||||
|
||||
if (stepConfig.placement === 'top') {
|
||||
// If the placement is top, center scroll at the top of the target.
|
||||
@ -1447,7 +1454,8 @@ const Tour = class {
|
||||
|
||||
let drawertop = 0;
|
||||
if (targetNode.parents('[data-usertour="scroller"]').length) {
|
||||
drawertop = targetNode.parents('[data-usertour="scroller"]').scrollTop(); background.css({
|
||||
drawertop = targetNode.parents('[data-usertour="scroller"]').scrollTop();
|
||||
background.css({
|
||||
position: 'fixed'
|
||||
});
|
||||
}
|
||||
@ -1467,7 +1475,7 @@ const Tour = class {
|
||||
});
|
||||
}
|
||||
|
||||
if ((targetNode.offset().top + drawertop) < buffer) {
|
||||
if ((targetNode.offset().top + drawertop) < buffer) {
|
||||
background.css({
|
||||
height: targetNode.outerHeight() + targetNode.offset().top + buffer,
|
||||
top: targetNode.offset().top,
|
||||
|
File diff suppressed because one or more lines are too long
@ -16,7 +16,7 @@
|
||||
/**
|
||||
* Column selector js.
|
||||
*
|
||||
* @package qbank_comment
|
||||
* @module qbank_comment/comment
|
||||
* @copyright 2021 Catalyst IT Australia Pty Ltd
|
||||
* @author Safat Shahin <safatshahin@catalyst-au.net>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
@ -32,9 +32,9 @@ import Notification from 'core/notification';
|
||||
* Event listeners for the module.
|
||||
*
|
||||
* @method clickEvent
|
||||
* @param {int} questionId
|
||||
* @param {int} courseID
|
||||
* @param {int} contextId
|
||||
* @param {Number} questionId
|
||||
* @param {Number} courseID
|
||||
* @param {Number} contextId
|
||||
*/
|
||||
const commentEvent = (questionId, courseID, contextId) => {
|
||||
let args = {
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"sources":["../src/repository.js"],"names":["define","$","Ajax","submitTagCreateUpdateForm","questionId","contextId","formdata","call","methodname","args","questionid","contextid"],"mappings":"AAwBAA,OAAM,gCAAC,CAAC,QAAD,CAAW,WAAX,CAAD,CAA0B,SAASC,CAAT,CAAYC,CAAZ,CAAkB,CAwB9C,MAAO,CACHC,yBAAyB,CAdG,QAA5BA,CAAAA,yBAA4B,CAASC,CAAT,CAAqBC,CAArB,CAAgCC,CAAhC,CAA0C,CAUtE,MAAOJ,CAAAA,CAAI,CAACK,IAAL,CAAU,CATH,CACVC,UAAU,CAAE,oCADF,CAEVC,IAAI,CAAE,CACFC,UAAU,CAAEN,CADV,CAEFO,SAAS,CAAEN,CAFT,CAGFC,QAAQ,CAAEA,CAHR,CAFI,CASG,CAAV,EAAqB,CAArB,CACV,CAEM,CAGV,CA3BK,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * A javascript module to handle question ajax actions.\n *\n * @module qbank_tagquestion/repository\n * @class repository\n * @package qbank_tagquestion\n * @copyright 2017 Simey Lameze <lameze@moodle.com>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine(['jquery', 'core/ajax'], function($, Ajax) {\n\n /**\n * Submit the form data for the question tags form.\n *\n * @method submitTagCreateUpdateForm\n * @param {int} questionId\n * @param {int} contextId\n * @param {string} formdata The URL encoded values from the form\n * @return {promise}\n */\n var submitTagCreateUpdateForm = function(questionId, contextId, formdata) {\n var request = {\n methodname: 'qbank_tagquestion_submit_tags_form',\n args: {\n questionid: questionId,\n contextid: contextId,\n formdata: formdata\n }\n };\n\n return Ajax.call([request])[0];\n };\n\n return {\n submitTagCreateUpdateForm: submitTagCreateUpdateForm\n };\n});\n"],"file":"repository.min.js"}
|
||||
{"version":3,"sources":["../src/repository.js"],"names":["define","$","Ajax","submitTagCreateUpdateForm","questionId","contextId","formdata","call","methodname","args","questionid","contextid"],"mappings":"AAuBAA,OAAM,gCAAC,CAAC,QAAD,CAAW,WAAX,CAAD,CAA0B,SAASC,CAAT,CAAYC,CAAZ,CAAkB,CAwB9C,MAAO,CACHC,yBAAyB,CAdG,QAA5BA,CAAAA,yBAA4B,CAASC,CAAT,CAAqBC,CAArB,CAAgCC,CAAhC,CAA0C,CAUtE,MAAOJ,CAAAA,CAAI,CAACK,IAAL,CAAU,CATH,CACVC,UAAU,CAAE,oCADF,CAEVC,IAAI,CAAE,CACFC,UAAU,CAAEN,CADV,CAEFO,SAAS,CAAEN,CAFT,CAGFC,QAAQ,CAAEA,CAHR,CAFI,CASG,CAAV,EAAqB,CAArB,CACV,CAEM,CAGV,CA3BK,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * A javascript module to handle question ajax actions.\n *\n * @module qbank_tagquestion/repository\n * @class repository\n * @copyright 2017 Simey Lameze <lameze@moodle.com>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine(['jquery', 'core/ajax'], function($, Ajax) {\n\n /**\n * Submit the form data for the question tags form.\n *\n * @method submitTagCreateUpdateForm\n * @param {Number} questionId\n * @param {Number} contextId\n * @param {string} formdata The URL encoded values from the form\n * @return {promise}\n */\n var submitTagCreateUpdateForm = function(questionId, contextId, formdata) {\n var request = {\n methodname: 'qbank_tagquestion_submit_tags_form',\n args: {\n questionid: questionId,\n contextid: contextId,\n formdata: formdata\n }\n };\n\n return Ajax.call([request])[0];\n };\n\n return {\n submitTagCreateUpdateForm: submitTagCreateUpdateForm\n };\n});\n"],"file":"repository.min.js"}
|
@ -1 +1 @@
|
||||
{"version":3,"sources":["../src/selectors.js"],"names":["define","actions","save","edittags","containers","loadingIcon"],"mappings":"AAuBAA,OAAM,+BAAC,EAAD,CAAK,UAAW,CAClB,MAAO,CACHC,OAAO,CAAE,CACLC,IAAI,CAAE,wBADD,CAELC,QAAQ,CAAE,4BAFL,CADN,CAKHC,UAAU,CAAE,CACRC,WAAW,CAAE,0CADL,CALT,CASV,CAVK,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * The purpose of this module is to centralize selectors related to question.\n *\n * @module qbank_tagquestion/question_selectors\n * @package qbank_tagquestion\n * @copyright 2018 Simey Lameze <lameze@moodle.com>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine([], function() {\n return {\n actions: {\n save: '[data-action=\"save\"]',\n edittags: '[data-action=\"edittags\"]',\n },\n containers: {\n loadingIcon: '[data-region=\"overlay-icon-container\"]',\n },\n };\n});\n"],"file":"selectors.min.js"}
|
||||
{"version":3,"sources":["../src/selectors.js"],"names":["define","actions","save","edittags","containers","loadingIcon"],"mappings":"AAsBAA,OAAM,+BAAC,EAAD,CAAK,UAAW,CAClB,MAAO,CACHC,OAAO,CAAE,CACLC,IAAI,CAAE,wBADD,CAELC,QAAQ,CAAE,4BAFL,CADN,CAKHC,UAAU,CAAE,CACRC,WAAW,CAAE,0CADL,CALT,CASV,CAVK,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * The purpose of this module is to centralize selectors related to question.\n *\n * @module qbank_tagquestion/question_selectors\n * @copyright 2018 Simey Lameze <lameze@moodle.com>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine([], function() {\n return {\n actions: {\n save: '[data-action=\"save\"]',\n edittags: '[data-action=\"edittags\"]',\n },\n containers: {\n loadingIcon: '[data-region=\"overlay-icon-container\"]',\n },\n };\n});\n"],"file":"selectors.min.js"}
|
@ -18,7 +18,6 @@
|
||||
*
|
||||
* @module qbank_tagquestion/repository
|
||||
* @class repository
|
||||
* @package qbank_tagquestion
|
||||
* @copyright 2017 Simey Lameze <lameze@moodle.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
@ -28,8 +27,8 @@ define(['jquery', 'core/ajax'], function($, Ajax) {
|
||||
* Submit the form data for the question tags form.
|
||||
*
|
||||
* @method submitTagCreateUpdateForm
|
||||
* @param {int} questionId
|
||||
* @param {int} contextId
|
||||
* @param {Number} questionId
|
||||
* @param {Number} contextId
|
||||
* @param {string} formdata The URL encoded values from the form
|
||||
* @return {promise}
|
||||
*/
|
||||
|
@ -17,7 +17,6 @@
|
||||
* The purpose of this module is to centralize selectors related to question.
|
||||
*
|
||||
* @module qbank_tagquestion/question_selectors
|
||||
* @package qbank_tagquestion
|
||||
* @copyright 2018 Simey Lameze <lameze@moodle.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user