Sindbad~EG File Manager
{"version":3,"file":"admin_settings.min.js","sources":["../src/admin_settings.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// Admin settings. Go back to the current tab after save.\n//\n// @module theme_adaptable/admin_settings\n// @copyright 2024 G J Barnard.\n// @author G J Barnard -\n// {@link https://moodle.org/user/profile.php?id=442195}\n// {@link https://gjbarnard.co.uk}\n// @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later.\n//\n\nimport log from 'core/log';\n\n/**\n * Initialise this module.\n */\nexport const init = () => {\n const stickyTabs = () => {\n const tabels = document.querySelectorAll('a[data-toggle=\"tab\"]');\n if (tabels.length) {\n const action = document.querySelector('form#adminsettings');\n tabels.forEach(tabel => {\n tabel.addEventListener(\n \"click\",\n (event) => {\n log.debug(\"Tab clicky! \" + event.target.href);\n action.setAttribute('action', event.target.href);\n },\n false,\n );\n });\n }\n };\n\n log.debug('Adaptable ES6 Admin settings init');\n if (document.readyState !== 'loading') {\n log.debug(\"Adaptable ES6 Admin settings JS DOM content already loaded\");\n stickyTabs();\n } else {\n log.debug(\"Adaptable ES6 Admin settings JS DOM content not loaded\");\n document.addEventListener('DOMContentLoaded', function() {\n log.debug(\"Adaptable ES6 Admin settings JS DOM content loaded\");\n stickyTabs();\n });\n }\n};\n"],"names":["stickyTabs","tabels","document","querySelectorAll","length","action","querySelector","forEach","tabel","addEventListener","event","debug","target","href","setAttribute","readyState"],"mappings":";;6IA+BoB,WACVA,WAAa,WACTC,OAASC,SAASC,iBAAiB,2BACrCF,OAAOG,OAAQ,OACTC,OAASH,SAASI,cAAc,sBACtCL,OAAOM,SAAQC,QACXA,MAAMC,iBACF,SACCC,qBACOC,MAAM,eAAiBD,MAAME,OAAOC,MACxCR,OAAOS,aAAa,SAAUJ,MAAME,OAAOC,SAE/C,qBAMZF,MAAM,qCACkB,YAAxBT,SAASa,yBACLJ,MAAM,8DACVX,4BAEIW,MAAM,0DACVT,SAASO,iBAAiB,oBAAoB,wBACtCE,MAAM,sDACVX"}
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists