AutorÃa | Ultima modificación | Ver Log |
{"version":3,"file":"edit.min.js","sources":["../src/edit.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 * Edit items in feedback module\n *\n * @module mod_feedback/edit\n * @copyright 2016 Marina Glancy\n */\ndefine(['jquery', 'core/ajax', 'core/str', 'core/notification'],\nfunction($, ajax, str, notification) {\n var manager = {
\n deleteItem: function(e) {\n e.preventDefault();\n var targetUrl = $(e.currentTarget).attr('href');\n\n str.get_strings([\n {\n key: 'confirmation',\n component: 'admin'\n },\n {\n key: 'confirmdeleteitem',\n component: 'mod_feedback'\n },\n {\n key: 'yes',\n component: 'moodle'\n },\n {\n key: 'no',\n component: 'moodle'\n }\n ])\n .then(function(s) {\n notification.confirm(s[0], s[1], s[2], s[3], function() {\n window.location = targetUrl;\n });\n\n return;\n })\n .catch();\n },\n\n setup: function() {\n $('body').delegate('[data-action
=\"delete\"]', 'click', manager.deleteItem);\n }\n };\n\n return {\n setup: manager.setup\n };\n});\n"],"names":["define","$","ajax","str","notification","manager","deleteItem","e","preventDefault","targetUrl","currentTarget","attr","get_strings","key","component","then","s","confirm","window","location","catch","setup","delegate"],"mappings":"AAqBAA,2BAAO,CAAC,SAAU,YAAa,WAAY,sBAC3C,SAASC,EAAGC,KAAMC,IAAKC,kBACfC,QAAU,CACVC,WAAY,SAASC,GACjBA,EAAEC,qBACEC,UAAYR,EAAEM,EAAEG,eAAeC,KAAK,QAExCR,IAAIS,YAAY,CACZ,CACIC,IAAY,eACZC,UAAY,SAEhB,CACID,IAAY,oBACZC,UAAY,gBAEhB,CACID,IAAY,MACZC,UAAY,UAEhB,CACID,IAAY,KACZC,UAAY,YAGnBC,MAAK,SAASC,GACXZ,aAAaa,QAAQD,EAAE,GAAIA,EAAE,GAAIA,EAAE,GAAIA,EAAE,IAAI,WACzCE,OAAOC,SAAWV,gBAKzBW,SAGLC,MAAO,WACHpB,EAAE,QAAQqB,SAAS,yBAA0B,QAASjB,QAAQC,oBAI/D,CACHe,MAAOhB,QAAQgB"}