%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/vacivi36/ava/grade/report/grader/amd/build/
Upload File :
Create Path :
Current File : /home/vacivi36/ava/grade/report/grader/amd/build/stickycolspan.min.js.map

{"version":3,"file":"stickycolspan.min.js","sources":["../src/stickycolspan.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 * Javascript module for fixing the position of sticky headers with multiple colspans\n *\n * @module      gradereport_grader/stickycolspan\n * @copyright   2022 Bas Brands <bas@moodle.com>\n * @license     http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\nconst SELECTORS = {\n    GRADEPARENT: '.gradeparent',\n    STUDENTHEADER: '#studentheader',\n    TABLEHEADER: 'th.header',\n    BEHAT: 'body.behat-site'\n};\n\n/**\n * Initialize module\n */\nexport const init = () => {\n    if (document.querySelector(SELECTORS.BEHAT)) {\n        return;\n    }\n    const grader = document.querySelector(SELECTORS.GRADEPARENT);\n    const studentHeader = grader.querySelector(SELECTORS.STUDENTHEADER);\n    const leftOffset = getComputedStyle(studentHeader).getPropertyValue('left');\n    const rightOffset = getComputedStyle(studentHeader).getPropertyValue('right');\n\n    grader.querySelectorAll(SELECTORS.TABLEHEADER).forEach((tableHeader) => {\n        if (tableHeader.colSpan > 1) {\n            const addOffset = (tableHeader.offsetWidth - studentHeader.offsetWidth);\n            if (window.right_to_left()) {\n                tableHeader.style.right = 'calc(' + rightOffset + ' - ' + addOffset + 'px )';\n            } else {\n                tableHeader.style.left = 'calc(' + leftOffset + ' - ' + addOffset + 'px )';\n            }\n        }\n    });\n};\n"],"names":["SELECTORS","document","querySelector","grader","studentHeader","leftOffset","getComputedStyle","getPropertyValue","rightOffset","querySelectorAll","forEach","tableHeader","colSpan","addOffset","offsetWidth","window","right_to_left","style","right","left"],"mappings":";;;;;;;;MAuBMA,sBACW,eADXA,wBAEa,iBAFbA,sBAGW,YAHXA,gBAIK,gCAMS,QACZC,SAASC,cAAcF,8BAGrBG,OAASF,SAASC,cAAcF,uBAChCI,cAAgBD,OAAOD,cAAcF,yBACrCK,WAAaC,iBAAiBF,eAAeG,iBAAiB,QAC9DC,YAAcF,iBAAiBF,eAAeG,iBAAiB,SAErEJ,OAAOM,iBAAiBT,uBAAuBU,SAASC,iBAChDA,YAAYC,QAAU,EAAG,OACnBC,UAAaF,YAAYG,YAAcV,cAAcU,YACvDC,OAAOC,gBACPL,YAAYM,MAAMC,MAAQ,QAAUV,YAAc,MAAQK,UAAY,OAEtEF,YAAYM,MAAME,KAAO,QAAUd,WAAa,MAAQQ,UAAY"}

Zerion Mini Shell 1.0