Proyectos de Subversion Moodle

Rev

Autoría | Ultima modificación | Ver Log |

{"version":3,"file":"commands.min.js","sources":["../src/commands.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 * Tiny Media Manager commands.\n *\n * @module      tiny_accessibilitychecker/commands\n * @copyright   2022, Stevani Andolo <stevani@hotmail.com.au>\n * @license     http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\nimport {getString} from 'core/str';\nimport {\n    component,\n    accessbilityButtonName,\n    icon,\n} from './common';\nimport Checker from './checker';\n\nexport const getSetup = async() => {\n    const [\n        buttonTooltip,\n    ] = await Promise.all([\n        getString('pluginname', component),\n    ]);\n\n    return (editor) => {\n        // Register the Menu Button as a toggle.\n        editor.ui.registry.addButton(accessbilityButtonName, {\n            icon,\n            tooltip: buttonTooltip,\n            onAction: () => {\n                const checker = new Checker(editor);\n                checker.displayDialogue();\n            }\n        });\n\n        editor.ui.registry.addMenuItem(accessbilityButtonName, {\n            icon,\n            text: buttonTooltip,\n            onAction: () => {\n                const checker = new Checker(editor);\n                checker.displayDialogue();\n            }\n        });\n    };\n};\n"],"names":["async","buttonTooltip","Promise","all","component","editor","ui","registry","addButton","accessbilityButtonName","icon","tooltip","onAction","Checker","displayDialogue","addMenuItem","text"],"mappings":";;;;;;;kKA+BwBA,gBAEhBC,qBACMC,QAAQC,IAAI,EAClB,kBAAU,aAAcC,4BAGpBC,SAEJA,OAAOC,GAAGC,SAASC,UAAUC,+BAAwB,CACjDC,KAAAA,aACAC,QAASV,cACTW,SAAU,KACU,IAAIC,iBAAQR,QACpBS,qBAIhBT,OAAOC,GAAGC,SAASQ,YAAYN,+BAAwB,CACnDC,KAAAA,aACAM,KAAMf,cACNW,SAAU,KACU,IAAIC,iBAAQR,QACpBS"}