Proyectos de Subversion Moodle

Rev

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

{"version":3,"file":"workshopview.min.js","sources":["../src/workshopview.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 * Sets the equal height to the user plan widget boxes.\n *\n * @module      mod_workshop/workshopview\n * @category    output\n * @copyright   Loc Nguyen <loc.nguyendinh@harveynash.vn>\n * @license     http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine(['jquery'], function($) {\n\n    /**\n     * Sets the equal height to all elements in the group.\n     *\n     * @param {jQuery} group List of nodes.\n     */\n    function equalHeight(group) {\n        var tallest = 0;\n        group.height('auto');\n        group.each(function() {\n            var thisHeight = $(this).height();\n            if (thisHeight > tallest) {\n                tallest = thisHeight;\n            }\n        });\n        group.height(tallest);\n    }\n\n    return /** @alias module:mod_workshop/workshopview */ {\n        init: function() {\n            var $dt = $('.path-mod-workshop .userplan dt');\n            var $dd = $('.path-mod-workshop .userplan dd');\n            equalHeight($dt);\n            equalHeight($dd);\n            $(window).on(\"resize\", function() {\n                equalHeight($dt);\n                equalHeight($dd);\n            });\n        }\n    };\n});\n"],"names":["define","$","equalHeight","group","tallest","height","each","thisHeight","this","init","$dt","$dd","window","on"],"mappings":";;;;;;;;AAuBAA,mCAAO,CAAC,WAAW,SAASC,YAOfC,YAAYC,WACbC,QAAU,EACdD,MAAME,OAAO,QACbF,MAAMG,MAAK,eACHC,WAAaN,EAAEO,MAAMH,SACrBE,WAAaH,UACbA,QAAUG,eAGlBJ,MAAME,OAAOD,eAGqC,CAClDK,KAAM,eACEC,IAAMT,EAAE,mCACRU,IAAMV,EAAE,mCACZC,YAAYQ,KACZR,YAAYS,KACZV,EAAEW,QAAQC,GAAG,UAAU,WACnBX,YAAYQ,KACZR,YAAYS"}