public_html/layouts/basic/modules/Users/resources/VisitPurpose.min.js.map
{"version":3,"file":"VisitPurpose.min.js","sources":["VisitPurpose.js"],"sourcesContent":["/* {[The file is published on the basis of YetiForce Public License 6.5 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */\n'use strict';\n\n$.Class(\n\t'Users_VisitPurpose_JS',\n\t{},\n\t{\n\t\t/**\n\t\t * Modal container\n\t\t */\n\t\tcontainer: false,\n\n\t\t/**\n\t\t * Function to handle sending the AJAX form\n\t\t */\n\t\tregisterSave() {\n\t\t\tthis.container.find('.js-modal__save').on('click', (e) => {\n\t\t\t\tlet form = this.container.find('form');\n\t\t\t\te.preventDefault();\n\t\t\t\tif (form.validationEngine('validate')) {\n\t\t\t\t\tlet progress = $.progressIndicator({\n\t\t\t\t\t\tmessage: app.vtranslate('JS_SAVE_LOADER_INFO'),\n\t\t\t\t\t\tblockInfo: { enabled: true }\n\t\t\t\t\t});\n\t\t\t\t\tlet formData = form.serializeFormData();\n\t\t\t\t\tapp.saveAjax('', [], formData).done((data) => {\n\t\t\t\t\t\tif (data.result) {\n\t\t\t\t\t\t\tlet id = this.container.closest('.modalContainer').attr('id');\n\t\t\t\t\t\t\tapp.hideModalWindow(null, id);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\ttext: app.vtranslate('JS_ERROR'),\n\t\t\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\tprogress.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Register base events\n\t\t * @param {jQuery} modalContainer\n\t\t */\n\t\tregisterEvents(modalContainer) {\n\t\t\tthis.container = modalContainer;\n\t\t\tthis.registerSave();\n\t\t\tsetTimeout((_) => {\n\t\t\t\tthis.container.find('textarea').focus();\n\t\t\t}, 400);\n\t\t}\n\t}\n);\n"],"names":["$","Class","container","registerSave","_this","find","on","e","form","preventDefault","validationEngine","progress","progressIndicator","message","app","vtranslate","blockInfo","enabled","formData","serializeFormData","saveAjax","done","data","result","id","closest","attr","hideModalWindow","showNotify","text","type","mode","registerEvents","modalContainer","_this2","setTimeout","focus"],"mappings":";;AAAA,kKACA,YAAY,CAEZA,CAAC,CAACC,KAAK,CACN,uBAAuB,CACvB,EAAE,CACF;AAED;AACA,KACEC,SAAS,GAAO;AAGlB;AACA,KACEC,YAAY,CAAAA,SAAAA,YAAAA,EAAG,CAAAC,IAAAA,KAAA,MACd,IAAI,CAACF,SAAS,CAACG,IAAI,CAAC,iBAAiB,CAAC,CAACC,EAAE,CAAC,OAAO,CAAE,SAACC,CAAC,CAAK,CACzD,IAAIC,IAAI,CAAGJ,KAAI,CAACF,SAAS,CAACG,IAAI,CAAC,MAAM,CAAC,CAEtC,GADAE,CAAC,CAACE,cAAc,EAAE,CACdD,IAAI,CAACE,gBAAgB,CAAC,UAAU,CAAC,CAAE,CAClC,IAAAC,QAAQ,CAAGX,CAAC,CAACY,iBAAiB,CAAC,CAClCC,OAAO,CAAEC,GAAG,CAACC,UAAU,CAAC,qBAAqB,CAAC,CAC9CC,SAAS,CAAE,CAAEC,OAAO,CAAO,CAAA,CAAA,CAC5B,CAAC,CAAC,CACEC,QAAQ,CAAGV,IAAI,CAACW,iBAAiB,EAAE,CACvCL,GAAG,CAACM,QAAQ,CAAC,EAAE,CAAE,EAAE,CAAEF,QAAQ,CAAC,CAACG,IAAI,CAAC,SAACC,IAAI,CAAK,CAC7C,GAAIA,IAAI,CAACC,MAAM,CAAE,CAChB,IAAIC,EAAE,CAAGpB,KAAI,CAACF,SAAS,CAACuB,OAAO,CAAC,iBAAiB,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC,CAC7DZ,GAAG,CAACa,eAAe,CAAC,IAAI,CAAEH,EAAE,EAC7B,CAAC,KACAV,GAAG,CAACc,UAAU,CAAC,CACdC,IAAI,CAAEf,GAAG,CAACC,UA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