first commit

This commit is contained in:
CHIEFSOFT\ameye
2024-09-30 18:11:26 -04:00
commit e592ca6823
27270 changed files with 5002257 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
define("block_settings/settingsblock",["exports","core_block/events","core/tree"],(function(_exports,_events,_tree){var obj;
/**
* Load the settings block tree javscript
*
* @module block_settings/settingsblock
* @copyright 2015 John Okely <john@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.init=void 0,_tree=(obj=_tree)&&obj.__esModule?obj:{default:obj};_exports.init=(instanceId,siteAdminNodeId)=>{const adminTree=new _tree.default(".block_settings .block_tree"),blockNode=document.querySelector('[data-instance-id="'.concat(instanceId,'"]'));if(siteAdminNodeId){const siteAdminLink=adminTree.treeRoot.get(0).querySelector("#".concat(siteAdminNodeId," a")),newContainer=document.createElement("span");newContainer.setAttribute("tabindex","0"),siteAdminLink.childNodes.forEach((node=>newContainer.appendChild(node))),siteAdminLink.replaceWith(newContainer)}adminTree.finishExpandingGroup=function(item){_tree.default.prototype.finishExpandingGroup.call(adminTree,item),(0,_events.notifyBlockContentUpdated)(blockNode)},adminTree.collapseGroup=function(item){_tree.default.prototype.collapseGroup.call(adminTree,item),(0,_events.notifyBlockContentUpdated)(blockNode)}}}));
//# sourceMappingURL=settingsblock.min.js.map
@@ -0,0 +1 @@
{"version":3,"file":"settingsblock.min.js","sources":["../src/settingsblock.js"],"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 * Load the settings block tree javscript\n *\n * @module block_settings/settingsblock\n * @copyright 2015 John Okely <john@moodle.com>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\nimport {notifyBlockContentUpdated} from 'core_block/events';\nimport Tree from 'core/tree';\n\nexport const init = (instanceId, siteAdminNodeId) => {\n const adminTree = new Tree(\".block_settings .block_tree\");\n const blockNode = document.querySelector(`[data-instance-id=\"${instanceId}\"]`);\n\n if (siteAdminNodeId) {\n const siteAdminLink = adminTree.treeRoot.get(0).querySelector(`#${siteAdminNodeId} a`);\n const newContainer = document.createElement('span');\n newContainer.setAttribute('tabindex', '0');\n siteAdminLink.childNodes.forEach(node => newContainer.appendChild(node));\n siteAdminLink.replaceWith(newContainer);\n }\n\n /**\n * The method to call when then the navtree finishes expanding a group.\n *\n * @method finishExpandingGroup\n * @param {Object} item\n * @fires event:blockContentUpdated\n */\n adminTree.finishExpandingGroup = function(item) {\n Tree.prototype.finishExpandingGroup.call(adminTree, item);\n notifyBlockContentUpdated(blockNode);\n };\n\n /**\n * The method to call whe then the navtree collapses a group\n *\n * @method collapseGroup\n * @param {Object} item\n * @fires event:blockContentUpdated\n */\n adminTree.collapseGroup = function(item) {\n Tree.prototype.collapseGroup.call(adminTree, item);\n notifyBlockContentUpdated(blockNode);\n };\n};\n"],"names":["instanceId","siteAdminNodeId","adminTree","Tree","blockNode","document","querySelector","siteAdminLink","treeRoot","get","newContainer","createElement","setAttribute","childNodes","forEach","node","appendChild","replaceWith","finishExpandingGroup","item","prototype","call","collapseGroup"],"mappings":";;;;;;;oJAyBoB,CAACA,WAAYC,yBACvBC,UAAY,IAAIC,cAAK,+BACrBC,UAAYC,SAASC,2CAAoCN,qBAE3DC,gBAAiB,OACXM,cAAgBL,UAAUM,SAASC,IAAI,GAAGH,yBAAkBL,uBAC5DS,aAAeL,SAASM,cAAc,QAC5CD,aAAaE,aAAa,WAAY,KACtCL,cAAcM,WAAWC,SAAQC,MAAQL,aAAaM,YAAYD,QAClER,cAAcU,YAAYP,cAU9BR,UAAUgB,qBAAuB,SAASC,oBACjCC,UAAUF,qBAAqBG,KAAKnB,UAAWiB,4CAC1Bf,YAU9BF,UAAUoB,cAAgB,SAASH,oBAC1BC,UAAUE,cAAcD,KAAKnB,UAAWiB,4CACnBf"}
+61
View File
@@ -0,0 +1,61 @@
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Load the settings block tree javscript
*
* @module block_settings/settingsblock
* @copyright 2015 John Okely <john@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
import {notifyBlockContentUpdated} from 'core_block/events';
import Tree from 'core/tree';
export const init = (instanceId, siteAdminNodeId) => {
const adminTree = new Tree(".block_settings .block_tree");
const blockNode = document.querySelector(`[data-instance-id="${instanceId}"]`);
if (siteAdminNodeId) {
const siteAdminLink = adminTree.treeRoot.get(0).querySelector(`#${siteAdminNodeId} a`);
const newContainer = document.createElement('span');
newContainer.setAttribute('tabindex', '0');
siteAdminLink.childNodes.forEach(node => newContainer.appendChild(node));
siteAdminLink.replaceWith(newContainer);
}
/**
* The method to call when then the navtree finishes expanding a group.
*
* @method finishExpandingGroup
* @param {Object} item
* @fires event:blockContentUpdated
*/
adminTree.finishExpandingGroup = function(item) {
Tree.prototype.finishExpandingGroup.call(adminTree, item);
notifyBlockContentUpdated(blockNode);
};
/**
* The method to call whe then the navtree collapses a group
*
* @method collapseGroup
* @param {Object} item
* @fires event:blockContentUpdated
*/
adminTree.collapseGroup = function(item) {
Tree.prototype.collapseGroup.call(adminTree, item);
notifyBlockContentUpdated(blockNode);
};
};