Current Path : /var/www/ljmtc/cbt/message/amd/build/ |
Current File : /var/www/ljmtc/cbt/message/amd/build/message_drawer_view_contact.min.js.map |
{"version":3,"sources":["../src/message_drawer_view_contact.js"],"names":["define","$","Str","Templates","SELECTORS","CONTENT_CONTAINER","TEMPLATES","CONTENT","getContentContainer","root","find","render","profile","then","html","append","show","namespace","header","body","footer","contact","empty","description","get_string","fullname"],"mappings":"AAsBAA,OAAM,4CACN,CACI,QADJ,CAEI,UAFJ,CAGI,gBAHJ,CADM,CAMN,SACIC,CADJ,CAEIC,CAFJ,CAGIC,CAHJ,CAIE,IAEMC,CAAAA,CAAS,CAAG,CACZC,iBAAiB,CAAE,qCADP,CAFlB,CAMMC,CAAS,CAAG,CACZC,OAAO,CAAE,uDADG,CANlB,CAgBMC,CAAmB,CAAG,SAASC,CAAT,CAAe,CACrC,MAAOA,CAAAA,CAAI,CAACC,IAAL,CAAUN,CAAS,CAACC,iBAApB,CACV,CAlBH,CA2BMM,CAAM,CAAG,SAASF,CAAT,CAAeG,CAAf,CAAwB,CACjC,MAAOT,CAAAA,CAAS,CAACQ,MAAV,CAAiBL,CAAS,CAACC,OAA3B,CAAoCK,CAApC,EACFC,IADE,CACG,SAASC,CAAT,CAAe,CACjBN,CAAmB,CAACC,CAAD,CAAnB,CAA0BM,MAA1B,CAAiCD,CAAjC,EACA,MAAOA,CAAAA,CACV,CAJE,CAKV,CAjCH,CA+DE,MAAO,CACHE,IAAI,CAnBG,QAAPA,CAAAA,IAAO,CAASC,CAAT,CAAoBC,CAApB,CAA4BC,CAA5B,CAAkCC,CAAlC,CAA0CC,CAA1C,CAAmD,CAC1D,GAAIZ,CAAAA,CAAI,CAAGR,CAAC,CAACkB,CAAD,CAAZ,CAEAX,CAAmB,CAACC,CAAD,CAAnB,CAA0Ba,KAA1B,GACA,MAAOX,CAAAA,CAAM,CAACF,CAAD,CAAOY,CAAP,CAChB,CAaM,CAEHE,WAAW,CANG,QAAdA,CAAAA,WAAc,CAASd,CAAT,CAAeY,CAAf,CAAwB,CACtC,MAAOnB,CAAAA,CAAG,CAACsB,UAAJ,CAAe,0BAAf,CAA2C,cAA3C,CAA2DH,CAAO,CAACI,QAAnE,CACV,CAEM,CAIV,CA7EK,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 * Controls the contact page in the message drawer.\n *\n * @module core_message/message_drawer_view_contact\n * @copyright 2018 Ryan Wyllie <ryan@moodle.com>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine(\n[\n 'jquery',\n 'core/str',\n 'core/templates'\n],\nfunction(\n $,\n Str,\n Templates\n) {\n\n var SELECTORS = {\n CONTENT_CONTAINER: '[data-region=\"content-container\"]'\n };\n\n var TEMPLATES = {\n CONTENT: 'core_message/message_drawer_view_contact_body_content'\n };\n\n /**\n * Get the content container of the contact view container.\n *\n * @param {Object} root Contact container element.\n * @returns {Object} jQuery object\n */\n var getContentContainer = function(root) {\n return root.find(SELECTORS.CONTENT_CONTAINER);\n };\n\n /**\n * Render the contact profile in the content container.\n *\n * @param {Object} root Contact container element.\n * @param {Object} profile Contact profile details.\n * @returns {Object} jQuery promise\n */\n var render = function(root, profile) {\n return Templates.render(TEMPLATES.CONTENT, profile)\n .then(function(html) {\n getContentContainer(root).append(html);\n return html;\n });\n };\n\n /**\n * Setup the contact page.\n *\n * @param {string} namespace The route namespace.\n * @param {Object} header Contact header element.\n * @param {Object} body Contact body container element.\n * @param {Object} footer Contact footer container element.\n * @param {Object} contact The contact object.\n * @returns {Object} jQuery promise\n */\n var show = function(namespace, header, body, footer, contact) {\n var root = $(body);\n\n getContentContainer(root).empty();\n return render(root, contact);\n };\n\n /**\n * String describing this page used for aria-labels.\n *\n * @param {Object} root Contact container element.\n * @param {Object} contact The contact object.\n * @return {Object} jQuery promise\n */\n var description = function(root, contact) {\n return Str.get_string('messagedrawerviewcontact', 'core_message', contact.fullname);\n };\n\n return {\n show: show,\n description: description\n };\n});\n"],"file":"message_drawer_view_contact.min.js"}