X7ROOT File Manager
Current Path:
/home/cbholdings/pasukulu/grade/report/grader/amd/build
home
/
cbholdings
/
pasukulu
/
grade
/
report
/
grader
/
amd
/
build
/
📁
..
📁
collapse
📄
collapse.min.js
(12.85 KB)
📄
collapse.min.js.map
(28.28 KB)
📄
feedback_modal.min.js
(1.96 KB)
📄
feedback_modal.min.js.map
(4.61 KB)
📁
search
📄
search.min.js
(5.48 KB)
📄
search.min.js.map
(13.01 KB)
📄
stickycolspan.min.js
(1.8 KB)
📄
stickycolspan.min.js.map
(4.49 KB)
Editing: 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\nimport $ from 'jquery';\n\nconst SELECTORS = {\n GRADEPARENT: '.gradeparent',\n STUDENTHEADER: '#studentheader',\n TABLEHEADER: 'th.header',\n BEHAT: 'body.behat-site',\n USERDROPDOWN: '.userrow th .dropdown',\n AVERAGEROWHEADER: '.lastrow th',\n};\n\n/**\n * Initialize module\n */\nexport const init = () => {\n // The sticky positioning attributed to the user column cells affects the stacking context and makes the dropdowns\n // within these cells to be cut off. To solve this problem, whenever one of these action menus (dropdowns) is opened\n // we need to manually bump up the z-index value of the parent container element and revert once closed.\n $(SELECTORS.USERDROPDOWN).on('show.bs.dropdown hide.bs.dropdown', (e) => {\n // The closest heading element has sticky positioning which affects the stacking context in this case.\n e.target.closest(SELECTORS.TABLEHEADER).classList.toggle('actions-menu-active');\n });\n // Register an observer that will bump up the z-index value of the average overall row when it's pinned to prevent\n // the row being cut-off by the user column cells or other components within the report table that have higher\n // z-index values.\n const observer = new IntersectionObserver(\n ([e]) => e.target.closest('tr').classList.toggle('pinned', e.intersectionRatio < 1),\n {threshold: [1]}\n );\n observer.observe(document.querySelector(SELECTORS.AVERAGEROWHEADER));\n\n if (!document.querySelector(SELECTORS.BEHAT)) {\n const grader = document.querySelector(SELECTORS.GRADEPARENT);\n const tableHeaders = grader.querySelectorAll(SELECTORS.TABLEHEADER);\n const studentHeader = grader.querySelector(SELECTORS.STUDENTHEADER);\n const leftOffset = getComputedStyle(studentHeader).getPropertyValue('left');\n const rightOffset = getComputedStyle(studentHeader).getPropertyValue('right');\n\n tableHeaders.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};\n"],"names":["SELECTORS","on","e","target","closest","classList","toggle","IntersectionObserver","_ref","intersectionRatio","threshold","observe","document","querySelector","grader","tableHeaders","querySelectorAll","studentHeader","leftOffset","getComputedStyle","getPropertyValue","rightOffset","forEach","tableHeader","colSpan","addOffset","offsetWidth","window","right_to_left","style","right","left"],"mappings":";;;;;;;gJAyBMA,sBACW,eADXA,wBAEa,iBAFbA,sBAGW,YAHXA,gBAIK,kBAJLA,uBAKY,wBALZA,2BAMgB,4BAMF,yBAIdA,wBAAwBC,GAAG,qCAAsCC,IAE/DA,EAAEC,OAAOC,QAAQJ,uBAAuBK,UAAUC,OAAO,6BAK5C,IAAIC,sBACjBC,WAAEN,eAAOA,EAAEC,OAAOC,QAAQ,MAAMC,UAAUC,OAAO,SAAUJ,EAAEO,kBAAoB,KACjF,CAACC,UAAW,CAAC,KAERC,QAAQC,SAASC,cAAcb,8BAEnCY,SAASC,cAAcb,iBAAkB,OACpCc,OAASF,SAASC,cAAcb,uBAChCe,aAAeD,OAAOE,iBAAiBhB,uBACvCiB,cAAgBH,OAAOD,cAAcb,yBACrCkB,WAAaC,iBAAiBF,eAAeG,iBAAiB,QAC9DC,YAAcF,iBAAiBF,eAAeG,iBAAiB,SAErEL,aAAaO,SAASC,iBACdA,YAAYC,QAAU,EAAG,OACnBC,UAAaF,YAAYG,YAAcT,cAAcS,YACvDC,OAAOC,gBACPL,YAAYM,MAAMC,MAAQ,QAAUT,YAAc,MAAQI,UAAY,OAEtEF,YAAYM,MAAME,KAAO,QAAUb,WAAa,MAAQO,UAAY"}
Upload File
Create Folder