Sindbad~EG File Manager
{"version":3,"file":"rearrange_tab_handler-lazy.min.js","sources":["../src/rearrange_tab_handler-lazy.js"],"sourcesContent":["/**\n * 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 * @package\n * @author David Castro <david.castro@openlms.net>\n * @copyright Copyright (c) 2018 Open LMS (https://www.openlms.net)\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\n/**\n * @module theme_snap/rearrange_tab_handler-lazy\n */\ndefine(function() {\n /**\n * Applies tab and shift+tab event handling so focus is fixed.\n *\n * @param {(jQuery)} currNode\n * @param {(jQuery)} nextNode\n * @param {(jQuery)} prevNode\n */\n var applyTabOrder = function(currNode, nextNode, prevNode) {\n currNode.on('keydown', function(event) {\n var code = event.keyCode || event.which;\n if (code === 9) {\n if (!event.shiftKey && nextNode !== undefined) {\n event.preventDefault();\n nextNode.focus();\n } else if (event.shiftKey && prevNode !== undefined) {\n event.preventDefault();\n prevNode.focus();\n }\n }\n });\n };\n\n return {\n /**\n * Initialising function.\n * @param {array} nodes\n */\n init: function(nodes) {\n for (var i = 0; i < nodes.length; i++) {\n applyTabOrder(nodes[i], nodes[i + 1], nodes[i - 1]);\n }\n }\n };\n }\n);\n"],"names":["define","applyTabOrder","currNode","nextNode","prevNode","on","event","keyCode","which","shiftKey","undefined","preventDefault","focus","init","nodes","i","length"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAyBAA,gDAAO,eAQKC,cAAgB,SAASC,SAAUC,SAAUC,UAC7CF,SAASG,GAAG,WAAW,SAASC,OAEf,KADFA,MAAMC,SAAWD,MAAME,SAEzBF,MAAMG,eAAyBC,IAAbP,SAGZG,MAAMG,eAAyBC,IAAbN,WACzBE,MAAMK,iBACNP,SAASQ,UAJTN,MAAMK,iBACNR,SAASS,oBASlB,CAKHC,KAAM,SAASC,WACN,IAAIC,EAAI,EAAGA,EAAID,MAAME,OAAQD,IAC9Bd,cAAca,MAAMC,GAAID,MAAMC,EAAI,GAAID,MAAMC,EAAI"}
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists