{"version":3,"sources":["https:\/\/dpielts.lk\/blocks\/settings\/amd\/src\/settingsblock.js"],"names":["define","$","Tree","init","instanceid","siteAdminNodeId","adminTree","siteAdminNode","treeRoot","find","siteAdminLink","children","first","replaceWith","html","finishExpandingGroup","item","prototype","call","Y","use","Global","fire","M","core","globalEvents","BLOCK_CONTENT_UPDATED","collapseGroup"],"mappings":"AAsBAA,OAAM,gCAAC,CAAC,QAAD,CAAW,WAAX,CAAD,CAA0B,SAASC,CAAT,CAAYC,CAAZ,CAAkB,CAC9C,MAAO,CACHC,IAAI,CAAE,cAASC,CAAT,CAAqBC,CAArB,CAAsC,CACxC,GAAIC,CAAAA,CAAS,CAAG,GAAIJ,CAAAA,CAAJ,CAAS,6BAAT,CAAhB,CACA,GAAIG,CAAJ,CAAqB,IACbE,CAAAA,CAAa,CAAGD,CAAS,CAACE,QAAV,CAAmBC,IAAnB,CAAwB,IAAMJ,CAA9B,CADH,CAEbK,CAAa,CAAGH,CAAa,CAACI,QAAd,CAAuB,GAAvB,EAA4BC,KAA5B,EAFH,CAGjBF,CAAa,CAACG,WAAd,CAA0B,wBAAwBH,CAAa,CAACI,IAAd,EAAxB,CAA+C,SAAzE,CACH,CACDR,CAAS,CAACS,oBAAV,CAAiC,SAASC,CAAT,CAAe,CAC5Cd,CAAI,CAACe,SAAL,CAAeF,oBAAf,CAAoCG,IAApC,CAAyC,IAAzC,CAA+CF,CAA\/C,EACAG,CAAC,CAACC,GAAF,CAAM,mBAAN,CAA2B,UAAW,CAClCD,CAAC,CAACE,MAAF,CAASC,IAAT,CAAcC,CAAC,CAACC,IAAF,CAAOC,YAAP,CAAoBC,qBAAlC,CAAyD,CACrDtB,UAAU,CAAEA,CADyC,CAAzD,CAGH,CAJD,CAKH,CAPD,CAQAE,CAAS,CAACqB,aAAV,CAA0B,SAASX,CAAT,CAAe,CACrCd,CAAI,CAACe,SAAL,CAAeU,aAAf,CAA6BT,IAA7B,CAAkC,IAAlC,CAAwCF,CAAxC,EACAG,CAAC,CAACC,GAAF,CAAM,mBAAN,CAA2B,UAAW,CAClCD,CAAC,CAACE,MAAF,CAASC,IAAT,CAAcC,CAAC,CAACC,IAAF,CAAOC,YAAP,CAAoBC,qBAAlC,CAAyD,CACrDtB,UAAU,CAAEA,CADyC,CAAzD,CAGH,CAJD,CAKH,CACJ,CAxBE,CA0BV,CA3BK,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 .\n\n\/**\n * Load the settings block tree javscript\n *\n * @module block_settings\/settingsblock\n * @copyright 2015 John Okely \n * @license http:\/\/www.gnu.org\/copyleft\/gpl.html GNU GPL v3 or later\n *\/\ndefine(['jquery', 'core\/tree'], function($, Tree) {\n return {\n init: function(instanceid, siteAdminNodeId) {\n var adminTree = new Tree(\".block_settings .block_tree\");\n if (siteAdminNodeId) {\n var siteAdminNode = adminTree.treeRoot.find('#' + siteAdminNodeId);\n var siteAdminLink = siteAdminNode.children('a').first();\n siteAdminLink.replaceWith('' + siteAdminLink.html() + '<\/span>');\n }\n adminTree.finishExpandingGroup = function(item) {\n Tree.prototype.finishExpandingGroup.call(this, item);\n Y.use('moodle-core-event', function() {\n Y.Global.fire(M.core.globalEvents.BLOCK_CONTENT_UPDATED, {\n instanceid: instanceid\n });\n });\n };\n adminTree.collapseGroup = function(item) {\n Tree.prototype.collapseGroup.call(this, item);\n Y.use('moodle-core-event', function() {\n Y.Global.fire(M.core.globalEvents.BLOCK_CONTENT_UPDATED, {\n instanceid: instanceid\n });\n });\n };\n }\n };\n});\n"],"file":"settingsblock.min.js"}