Current Path : C:/xampp/htdocs/moodle/admin/tool/lp/amd/build/ |
Current File : C:/xampp/htdocs/moodle/admin/tool/lp/amd/build/dragdrop-reorder.min.js.map |
{"version":3,"sources":["../src/dragdrop-reorder.js"],"names":["define","str","Y","dragDropInstance","proxyCallback","e","dragNode","drag","get","dropNode","drop","callback","getDOMNode","dragdrop","group","dragHandleText","sameNodeText","parentNodeText","sameNodeClass","parentNodeClass","dragHandleInsertClass","get_strings","key","component","done","use","destroy","M","tool_lp","dragdrop_reorder","bind"],"mappings":"AAuBAA,OAAM,4BAAC,CAAC,UAAD,CAAa,UAAb,CAAD,CAA2B,SAASC,CAAT,CAAcC,CAAd,CAAiB,IAQ1CC,CAAAA,CAAgB,CAAG,IARuB,CAe1CC,CAAa,CAAG,SAASC,CAAT,CAAY,IACxBC,CAAAA,CAAQ,CAAGD,CAAC,CAACE,IAAF,CAAOC,GAAP,CAAW,MAAX,CADa,CAExBC,CAAQ,CAAGJ,CAAC,CAACK,IAAF,CAAOF,GAAP,CAAW,MAAX,CAFa,CAG5B,KAAKG,QAAL,CAAcL,CAAQ,CAACM,UAAT,EAAd,CAAqCH,CAAQ,CAACG,UAAT,EAArC,CACH,CAnB6C,CAqB9C,MAAqD,CAcjDC,QAAQ,CAAE,kBAASC,CAAT,CACSC,CADT,CAESC,CAFT,CAGSC,CAHT,CAISC,CAJT,CAKSC,CALT,CAMSC,CANT,CAOST,CAPT,CAOmB,CAGzBV,CAAG,CAACoB,WAAJ,CAAgB,CACZ,CAACC,GAAG,CAAE,qBAAN,CAA6BC,SAAS,CAAE,QAAxC,CADY,CAEZ,CAACD,GAAG,CAAE,aAAN,CAAqBC,SAAS,CAAE,QAAhC,CAFY,CAGZ,CAACD,GAAG,CAAE,WAAN,CAAmBC,SAAS,CAAE,QAA9B,CAHY,CAAhB,EAIGC,IAJH,CAIQ,UAAW,CACftB,CAAC,CAACuB,GAAF,CAAM,iCAAN,CAAyC,UAAW,CAKhD,GAAItB,CAAJ,CAAsB,CAClBA,CAAgB,CAACuB,OAAjB,EACH,CACDvB,CAAgB,CAAGwB,CAAC,CAACC,OAAF,CAAUC,gBAAV,CAA2B,CAC1Cf,KAAK,CAAEA,CADmC,CAE1CC,cAAc,CAAEA,CAF0B,CAG1CC,YAAY,CAAEA,CAH4B,CAI1CC,cAAc,CAAEA,CAJ0B,CAK1CC,aAAa,CAAEA,CAL2B,CAM1CC,eAAe,CAAEA,CANyB,CAO1CC,qBAAqB,CAAEA,CAPmB,CAQ1CT,QAAQ,CAAET,CAAC,CAAC4B,IAAF,CAAO1B,CAAP,CAdA,CACVO,QAAQ,CAAEA,CADA,CAcA,CARgC,CAA3B,CAUtB,CAlBD,CAmBH,CAxBD,CAyBH,CAjDgD,CAoDxD,CAzEK,CAAN","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 * Drag and drop reorder via HTML5.\n *\n * @module tool_lp/dragdrop-reorder\n * @package tool_lp\n * @copyright 2015 Damyon Wiese <damyon@moodle.com>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine(['core/str', 'core/yui'], function(str, Y) {\n // Private variables and functions.\n\n /**\n * Store the current instance of the core drag drop.\n *\n * @property dragDropInstance M.tool_lp.dragdrop_reorder\n */\n var dragDropInstance = null;\n\n /**\n * Translate the drophit event from YUI\n * into simple drag and drop nodes.\n * @param {Y.Event} e The yui drop event.\n */\n var proxyCallback = function(e) {\n var dragNode = e.drag.get('node');\n var dropNode = e.drop.get('node');\n this.callback(dragNode.getDOMNode(), dropNode.getDOMNode());\n };\n\n return /** @alias module:tool_lp/dragdrop-reorder */ {\n // Public variables and functions.\n /**\n * Create an instance of M.tool_lp.dragdrop\n *\n * @param {String} group Unique string to identify this interaction.\n * @param {String} dragHandleText Alt text for the drag handle.\n * @param {String} sameNodeText Used in keyboard drag drop for the list of items target.\n * @param {String} parentNodeText Used in keyboard drag drop for the parent target.\n * @param {String} sameNodeClass class used to find the each of the list of items.\n * @param {String} parentNodeClass class used to find the container for the list of items.\n * @param {String} dragHandleInsertClass class used to find the location to insert the drag handles.\n * @param {function} callback Drop hit handler.\n */\n dragdrop: function(group,\n dragHandleText,\n sameNodeText,\n parentNodeText,\n sameNodeClass,\n parentNodeClass,\n dragHandleInsertClass,\n callback) {\n // Here we are wrapping YUI. This allows us to start transitioning, but\n // wait for a good alternative without having inconsistent UIs.\n str.get_strings([\n {key: 'emptydragdropregion', component: 'moodle'},\n {key: 'movecontent', component: 'moodle'},\n {key: 'tocontent', component: 'moodle'},\n ]).done(function() {\n Y.use('moodle-tool_lp-dragdrop-reorder', function() {\n\n var context = {\n callback: callback\n };\n if (dragDropInstance) {\n dragDropInstance.destroy();\n }\n dragDropInstance = M.tool_lp.dragdrop_reorder({\n group: group,\n dragHandleText: dragHandleText,\n sameNodeText: sameNodeText,\n parentNodeText: parentNodeText,\n sameNodeClass: sameNodeClass,\n parentNodeClass: parentNodeClass,\n dragHandleInsertClass: dragHandleInsertClass,\n callback: Y.bind(proxyCallback, context)\n });\n });\n });\n }\n\n };\n});\n"],"file":"dragdrop-reorder.min.js"}