diff --git a/public_html/install/tpl/resources/Index.min.js b/public_html/install/tpl/resources/Index.min.js index b5769d2c039c..a7273e01c0b9 100644 --- a/public_html/install/tpl/resources/Index.min.js +++ b/public_html/install/tpl/resources/Index.min.js @@ -8,5 +8,5 @@ * Portions created by vtiger are Copyright (C) vtiger. * All Rights Reserved. * Contributor(s): YetiForce S.A. - ************************************************************************************/jQuery.Class("Install_Index_Js",{fieldsCached:["db_server","db_username","db_name","currency_name","firstname","lastname","admin_email","dateformat","default_timezone"],checkUsername:function checkUsername(field){var fieldValue=field.val(),result=/^[a-zA-Z0-9_.@-]{3,64}$/.test(fieldValue);if(!result)return app.vtranslate("JS_CONTAINS_ILLEGAL_CHARACTERS");var logins=JSON.parse($("#not_allowed_logins").val());if(-1!==$.inArray(fieldValue,logins))return app.vtranslate("LBL_INVALID_USERNAME_ERROR")},checkDbUsername:function checkDbUsername(field){var fieldValue=field.val(),result=/^[_a-zA-Z0-9.,:-]+$/.test(fieldValue);if(!result)return app.vtranslate("JS_CONTAINS_ILLEGAL_CHARACTERS")},checkDbName:function checkDbName(field){var fieldValue=field.val(),result=/^[^\\/?%*:|\\\"<>.\s]{1,64}$/.test(fieldValue);if(!result)return app.vtranslate("JS_CONTAINS_ILLEGAL_CHARACTERS")}},{registerEventForStep1:function registerEventForStep1(){jQuery(".bt_install").on("click",function(){jQuery("input[name=\"mode\"]").val("step2"),jQuery("form[name=\"step1\"]").submit();}),jQuery(".bt_migrate").on("click",function(){jQuery("input[name=\"mode\"]").val("mStep0"),jQuery("form[name=\"step1\"]").submit();});},registerEventForStep2:function registerEventForStep2(){var modalContainer=$(".js-license-modal");modalContainer.on("shown.bs.modal",function(){app.registerDataTables(modalContainer.find(".js-data-table"),{lengthMenu:[[10,25,50,-1],[10,25,50,app.vtranslate("JS_ALL")]],retrieve:!0});});},showBuyModal:function showBuyModal(event){$.get("Install.php?mode=showBuyModal&product=".concat($(event.currentTarget).data("product"))).done(function(data){app.showModalWindow(data,"",function(modalContainer){new window.Settings_YetiForce_Shop_Js().registerBuyModalEvents(modalContainer);});});},registerEventForStepChooseHost:function registerEventForStepChooseHost(){var _this=this;$(".js-buy-modal").on("click",this.showBuyModal),$(".js-product-modal").on("click",function(e){$.get("Install.php?mode=showProductModal&product=".concat($(e.currentTarget).data("product"))).done(function(data){app.showModalWindow(data,"",function(modalContainer){modalContainer.find(".js-modal__save").on("click",function(){app.hideModalWindow(),_this.showBuyModal(e);});});});});},registerEventForStep3:function registerEventForStep3(){$("#recheck").on("click",function(){window.location.reload();});var elements=jQuery(".js-wrong-status");$(".js-confirm").on("submit",function(e){0pass.length?(jQuery("#passwordError").html(app.vtranslate("LBL_PASS_TO_SHORT")),error=!0):32.\s]{1,64}$/.test(fieldValue);if(!result)return app.vtranslate("JS_CONTAINS_ILLEGAL_CHARACTERS")}},{registerEventForStep1:function registerEventForStep1(){jQuery(".bt_install").on("click",function(){jQuery("input[name=\"mode\"]").val("step2"),jQuery("form[name=\"step1\"]").submit();}),jQuery(".bt_migrate").on("click",function(){jQuery("input[name=\"mode\"]").val("mStep0"),jQuery("form[name=\"step1\"]").submit();});},registerEventForStep2:function registerEventForStep2(){var modalContainer=$(".js-license-modal");modalContainer.on("shown.bs.modal",function(){app.registerDataTables(modalContainer.find(".js-data-table"),{lengthMenu:[[10,25,50,-1],[10,25,50,app.vtranslate("JS_ALL")]],retrieve:!0});});},registerEventForStep3:function registerEventForStep3(){$("#recheck").on("click",function(){window.location.reload();});var elements=jQuery(".js-wrong-status");$(".js-confirm").on("submit",function(e){0pass.length?(jQuery("#passwordError").html(app.vtranslate("LBL_PASS_TO_SHORT")),error=!0):32.\\s]{1,64}$/,\n\t\t\t\tresult = negativeRegex.test(fieldValue);\n\t\t\tif (!result) {\n\t\t\t\treturn app.vtranslate('JS_CONTAINS_ILLEGAL_CHARACTERS');\n\t\t\t}\n\t\t}\n\t},\n\t{\n\t\tregisterEventForStep1: function () {\n\t\t\tjQuery('.bt_install').on('click', function (e) {\n\t\t\t\tjQuery('input[name=\"mode\"]').val('step2');\n\t\t\t\tjQuery('form[name=\"step1\"]').submit();\n\t\t\t});\n\t\t\tjQuery('.bt_migrate').on('click', function (e) {\n\t\t\t\tjQuery('input[name=\"mode\"]').val('mStep0');\n\t\t\t\tjQuery('form[name=\"step1\"]').submit();\n\t\t\t});\n\t\t},\n\t\tregisterEventForStep2: function () {\n\t\t\tlet modalContainer = $('.js-license-modal');\n\t\t\tmodalContainer.on('shown.bs.modal', function (e) {\n\t\t\t\tapp.registerDataTables(modalContainer.find('.js-data-table'), {\n\t\t\t\t\tlengthMenu: [\n\t\t\t\t\t\t[10, 25, 50, -1],\n\t\t\t\t\t\t[10, 25, 50, app.vtranslate('JS_ALL')]\n\t\t\t\t\t],\n\t\t\t\t\tretrieve: true\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\tshowBuyModal(event) {\n\t\t\t$.get(`Install.php?mode=showBuyModal&product=${$(event.currentTarget).data('product')}`).done((data) => {\n\t\t\t\tapp.showModalWindow(data, '', (modalContainer) => {\n\t\t\t\t\tnew window.Settings_YetiForce_Shop_Js().registerBuyModalEvents(modalContainer);\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\tregisterEventForStepChooseHost() {\n\t\t\t$('.js-buy-modal').on('click', this.showBuyModal);\n\t\t\t$('.js-product-modal').on('click', (e) => {\n\t\t\t\t$.get(`Install.php?mode=showProductModal&product=${$(e.currentTarget).data('product')}`).done((data) => {\n\t\t\t\t\tapp.showModalWindow(data, '', (modalContainer) => {\n\t\t\t\t\t\tmodalContainer.find('.js-modal__save').on('click', (_) => {\n\t\t\t\t\t\t\tapp.hideModalWindow();\n\t\t\t\t\t\t\tthis.showBuyModal(e);\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\tregisterEventForStep3: function () {\n\t\t\t$('#recheck').on('click', function () {\n\t\t\t\twindow.location.reload();\n\t\t\t});\n\t\t\tlet elements = jQuery('.js-wrong-status');\n\t\t\t$('.js-confirm').on('submit', function (e) {\n\t\t\t\tif (elements.length > 0) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tapp.showConfirmModal({\n\t\t\t\t\t\ticon: 'fas fa-exclamation-triangle',\n\t\t\t\t\t\ttext: app.vtranslate('LBL_SETTINGS_WARNING'),\n\t\t\t\t\t\tconfirmedCallback: () => {\n\t\t\t\t\t\t\telements = false;\n\t\t\t\t\t\t\t$('form[name=\"step3\"]').trigger('submit');\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tcheckPwdEvent: function () {\n\t\t\tvar thisInstance = this;\n\t\t\tjQuery('input[name=\"password\"]').on('blur', function () {\n\t\t\t\tthisInstance.checkPwd(jQuery(this).val());\n\t\t\t});\n\t\t},\n\t\tcheckPwd: function (pass) {\n\t\t\tlet error = false;\n\n\t\t\tif (pass.length < 8) {\n\t\t\t\tjQuery('#passwordError').html(app.vtranslate('LBL_PASS_TO_SHORT'));\n\t\t\t\terror = true;\n\t\t\t} else if (pass.length > 32) {\n\t\t\t\tjQuery('#passwordError').html(app.vtranslate('LBL_PASS_TO_LONG'));\n\t\t\t\terror = true;\n\t\t\t} else if (pass.search(/\\d/) == -1) {\n\t\t\t\tjQuery('#passwordError').html(app.vtranslate('LBL_PASS_NO_NUM'));\n\t\t\t\terror = true;\n\t\t\t} else if (pass.search(/[A-Z]/) == -1) {\n\t\t\t\tjQuery('#passwordError').html(app.vtranslate('LBL_PASS_LACK_OF_CAPITAL_LETTERS'));\n\t\t\t\terror = true;\n\t\t\t} else if (pass.search(/[a-z]/) == -1) {\n\t\t\t\tjQuery('#passwordError').html(app.vtranslate('LBL_PASS_LACK_OF_LOWERCASE_LETTERS'));\n\t\t\t\terror = true;\n\t\t\t}\n\n\t\t\treturn error;\n\t\t},\n\t\tregisterEventForStep4: function () {\n\t\t\tvar config = JSON.parse(localStorage.getItem('yetiforce_install'));\n\t\t\tInstall_Index_Js.fieldsCached.forEach(function (field) {\n\t\t\t\tif (config && typeof config[field] !== 'undefined') {\n\t\t\t\t\tvar formField = jQuery('[name=\"' + field + '\"]');\n\t\t\t\t\tif ('SELECT' == jQuery(formField).prop('tagName')) {\n\t\t\t\t\t\tjQuery(formField).val(config[field]);\n\t\t\t\t\t\tjQuery(formField).select2('destroy');\n\t\t\t\t\t\tApp.Fields.Picklist.showSelect2ElementView(jQuery(formField));\n\t\t\t\t\t} else if ('INPUT' == jQuery(formField).prop('tagName') && 'checkbox' == jQuery(formField).attr('type')) {\n\t\t\t\t\t\tif (true == config[field]) {\n\t\t\t\t\t\t\tjQuery(formField).prop('checked', true);\n\t\t\t\t\t\t\tjQuery('.config-table tr.d-none').removeClass('d-none');\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tjQuery(formField).val(config[field]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tfunction clearPasswordError() {\n\t\t\t\tjQuery('#passwordError').html('');\n\t\t\t}\n\n\t\t\tfunction setPasswordError() {\n\t\t\t\tjQuery('#passwordError').html(app.vtranslate('LBL_PASS_REENTER_ERROR'));\n\t\t\t}\n\n\t\t\tjQuery('input[name=\"retype_password\"]').on('blur', function (e) {\n\t\t\t\tvar element = jQuery(e.currentTarget);\n\t\t\t\tvar password = jQuery('input[name=\"password\"]').val();\n\t\t\t\tif (password !== element.val()) {\n\t\t\t\t\tsetPasswordError();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tjQuery('input[name=\"password\"]').on('blur', function (e) {\n\t\t\t\tvar retypePassword = jQuery('input[name=\"retype_password\"]');\n\t\t\t\tif (retypePassword.val() != '' && retypePassword.val() !== jQuery(e.currentTarget).val()) {\n\t\t\t\t\tjQuery('#passwordError').html(app.vtranslate('LBL_PASS_REENTER_ERROR'));\n\t\t\t\t} else {\n\t\t\t\t\tclearPasswordError();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tjQuery('input[name=\"retype_password\"]').on('keypress', function (e) {\n\t\t\t\tclearPasswordError();\n\t\t\t});\n\t\t\t$('form[name=\"step4\"]').on('submit', (e) => {\n\t\t\t\tif (this.checkForm()) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t} else {\n\t\t\t\t\t$('form[name=\"step4\"]').off('submit');\n\t\t\t\t\tthis.submitForm();\n\t\t\t\t}\n\t\t\t});\n\t\t\tthis.checkPwdEvent();\n\t\t},\n\t\tregisterEventForStep5: function () {\n\t\t\tjQuery('input[name=\"step6\"]').on('click', function () {\n\t\t\t\tvar error = jQuery('#errorMessage');\n\t\t\t\tif (error.length) {\n\t\t\t\t\tapp.showAlert(app.vtranslate('LBL_RESOLVE_ERROR'));\n\t\t\t\t\treturn false;\n\t\t\t\t} else {\n\t\t\t\t\tjQuery('#progressIndicator').removeClass('d-none');\n\t\t\t\t\tjQuery('form[name=\"step5\"]').submit().hide();\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tregisterEventForStep6: function () {\n\t\t\tvar form = $('form[name=\"step6\"]');\n\t\t\tform.on('submit', function () {\n\t\t\t\tif (form.validationEngine('validate')) {\n\t\t\t\t\tform.submit();\n\t\t\t\t\t$('.js-submit').attr('disabled', true);\n\t\t\t\t} else {\n\t\t\t\t\tapp.formAlignmentAfterValidation(form);\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tregisterEventForMigration: function () {\n\t\t\tvar step = jQuery('input[name=\"mode\"]').val();\n\t\t\tif (step == 'mStep3') {\n\t\t\t\tjQuery('form').on('submit', function () {\n\t\t\t\t\tjQuery('#progressIndicator').show();\n\t\t\t\t\tjQuery('#mainContainer').hide();\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tcheckForm() {\n\t\t\tlet error = false;\n\t\t\tif (jQuery('#passwordError').html().trim()) {\n\t\t\t\terror = true;\n\t\t\t}\n\t\t\tif (this.checkPwd(jQuery('input[name=\"password\"]').val())) {\n\t\t\t\terror = true;\n\t\t\t}\n\t\t\treturn error;\n\t\t},\n\t\tsubmitForm() {\n\t\t\twindow.localStorage.setItem(\n\t\t\t\t'yetiforce_install',\n\t\t\t\tJSON.stringify({\n\t\t\t\t\tdb_server: document.step4.db_server.value,\n\t\t\t\t\tdb_username: document.step4.db_username.value,\n\t\t\t\t\tdb_name: document.step4.db_name.value,\n\t\t\t\t\tcurrency_name: document.step4.currency_name.value,\n\t\t\t\t\tfirstname: document.step4.firstname.value,\n\t\t\t\t\tlastname: document.step4.lastname.value,\n\t\t\t\t\tadmin_email: document.step4.admin_email.value,\n\t\t\t\t\tdateformat: document.step4.dateformat.value,\n\t\t\t\t\tdefault_timezone: document.step4.default_timezone.value\n\t\t\t\t})\n\t\t\t);\n\t\t},\n\t\tchangeLanguage: function (e) {\n\t\t\tjQuery('input[name=\"mode\"]').val('step1');\n\t\t\tjQuery('form[name=\"step1\"]').submit();\n\t\t},\n\t\tregisterEvents: function () {\n\t\t\tconst form = $('form');\n\t\t\tjQuery('input[name=\"back\"]').on('click', function () {\n\t\t\t\twindow.history.back();\n\t\t\t});\n\t\t\tform.validationEngine(app.validationEngineOptions);\n\t\t\tthis.registerEventForStep1();\n\t\t\tthis.registerEventForStep2();\n\t\t\tthis.registerEventForStep3();\n\t\t\tthis.registerEventForStep4();\n\t\t\tthis.registerEventForStep5();\n\t\t\tthis.registerEventForStep6();\n\t\t\tthis.registerEventForMigration();\n\t\t\tif (form.attr('name') === 'step-stepChooseHost') {\n\t\t\t\tthis.registerEventForStepChooseHost();\n\t\t\t}\n\t\t\t$('select[name=\"lang\"]').on('change', this.changeLanguage);\n\t\t}\n\t}\n);\njQuery(document).ready(function () {\n\tvar install = new Install_Index_Js();\n\tinstall.registerEvents();\n});\n"],"names":["jQuery","Class","fieldsCached","checkUsername","field","fieldValue","val","result","test","app","vtranslate","JSON","parse","$","inArray","logins","checkDbUsername","checkDbName","registerEventForStep1","on","submit","registerEventForStep2","modalContainer","registerDataTables","find","lengthMenu","retrieve","showBuyModal","event","get","currentTarget","data","done","showModalWindow","Settings_YetiForce_Shop_Js","registerBuyModalEvents","registerEventForStepChooseHost","e","hideModalWindow","registerEventForStep3","window","location","reload","elements","length","preventDefault","showConfirmModal","icon","text","confirmedCallback","trigger","checkPwdEvent","thisInstance","checkPwd","pass","error","html","search","registerEventForStep4","clearPasswordError","config","localStorage","getItem","Install_Index_Js","forEach","formField","prop","select2","App","Fields","Picklist","showSelect2ElementView","attr","removeClass","element","password","setPasswordError","retypePassword","checkForm","off","submitForm","registerEventForStep5","showAlert","hide","registerEventForStep6","form","validationEngine","formAlignmentAfterValidation","registerEventForMigration","step","show","trim","setItem","stringify","db_server","document","step4","value","db_username","db_name","currency_name","firstname","lastname","admin_email","dateformat","default_timezone","changeLanguage","registerEvents","history","back","validationEngineOptions","ready","install"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAEAA,MAAM,CAACC,KAAP,CACC,kBADD,CAEC,CACCC,YAAY,CAAE,CACb,WADa,CAEb,aAFa,CAGb,SAHa,CAIb,eAJa,CAKb,WALa,CAMb,UANa,CAOb,aAPa,CAQb,YARa,CASb,kBATa,CADf,CAYCC,aAAa,CAAE,uBAAUC,KAAV,CAAoC,CAClD,IAAIC,UAAU,CAAGD,KAAK,CAACE,GAAN,EAAjB,CAECC,MAAM,CADU,yBACP,CAAcC,IAAd,CAAmBH,UAAnB,CAFV,CAGA,GAAI,CAACE,MAAL,CACC,OAAOE,GAAG,CAACC,UAAJ,CAAe,gCAAf,CAAP,CAED,IAAU,MAAA,CAAGC,IAAI,CAACC,KAAL,CAAWC,CAAC,CAAC,qBAAD,CAAD,CAAyBP,GAAzB,EAAX,CAAb,CACA,GAAsC,CAAC,CAAnC,GAAAO,CAAC,CAACC,OAAF,CAAUT,UAAV,CAAsBU,MAAtB,CAAJ,CACC,OAAON,GAAG,CAACC,UAAJ,CAAe,4BAAf,CAER,CAvBF,CAwBCM,eAAe,CAAE,yBAAUZ,KAAV,CAAoC,CACpD,IAAIC,UA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BAA1B,CAL2B,CAM3B,IAAK5F,CAAAA,qBAAL,EAN2B,CAO3B,IAAA,CAAKG,qBAAL,EAP2B,CAQ3B,KAAKkB,qBAAL,EAR2B,CAS3B,IAAKmB,CAAAA,qBAAL,EAT2B,CAU3B,IAAA,CAAKuB,qBAAL,EAV2B,CAW3B,KAAKG,qBAAL,EAX2B,CAY3B,IAAKI,CAAAA,yBAAL,EAZ2B,CAaD,qBAAtB,GAAAH,IAAI,CAACb,IAAL,CAAU,MAAV,CAbuB,EAc1B,IAAKpC,CAAAA,8BAAL,EAd0B,CAgB3BvB,CAAC,CAAC,uBAAD,CAAD,CAAyBM,EAAzB,CAA4B,QAA5B,CAAsC,IAAA,CAAKuF,cAA3C,EACA,CApOF,CA3CD,EAkRA1G,MAAM,CAAC+F,QAAD,CAAN,CAAiBgB,KAAjB,CAAuB,UAAY,CAClC,IAAW,OAAA,CAAG,IAAd,gBAAA,CACAC,OAAO,CAACL,cAAR,GACA,CAHD;;"} \ No newline at end of file +{"version":3,"file":"Index.min.js","sources":["Index.js"],"sourcesContent":["/*+**********************************************************************************\n * The contents of this file are subject to the vtiger CRM Public License Version 1.0\n * (\"License\"); You may not use this file except in compliance with the License\n * The Original Code is: vtiger CRM Open Source\n * The Initial Developer of the Original Code is vtiger.\n * Portions created by vtiger are Copyright (C) vtiger.\n * All Rights Reserved.\n * Contributor(s): YetiForce S.A.\n ************************************************************************************/\n\njQuery.Class(\n\t'Install_Index_Js',\n\t{\n\t\tfieldsCached: [\n\t\t\t'db_server',\n\t\t\t'db_username',\n\t\t\t'db_name',\n\t\t\t'currency_name',\n\t\t\t'firstname',\n\t\t\t'lastname',\n\t\t\t'admin_email',\n\t\t\t'dateformat',\n\t\t\t'default_timezone'\n\t\t],\n\t\tcheckUsername: function (field, rules, i, options) {\n\t\t\tlet fieldValue = field.val(),\n\t\t\t\tnegativeRegex = /^[a-zA-Z0-9_.@-]{3,64}$/,\n\t\t\t\tresult = negativeRegex.test(fieldValue);\n\t\t\tif (!result) {\n\t\t\t\treturn app.vtranslate('JS_CONTAINS_ILLEGAL_CHARACTERS');\n\t\t\t}\n\t\t\tlet logins = JSON.parse($('#not_allowed_logins').val());\n\t\t\tif ($.inArray(fieldValue, logins) !== -1) {\n\t\t\t\treturn app.vtranslate('LBL_INVALID_USERNAME_ERROR');\n\t\t\t}\n\t\t},\n\t\tcheckDbUsername: function (field, rules, i, options) {\n\t\t\tlet fieldValue = field.val(),\n\t\t\t\tnegativeRegex = /^[_a-zA-Z0-9.,:-]+$/,\n\t\t\t\tresult = negativeRegex.test(fieldValue);\n\t\t\tif (!result) {\n\t\t\t\treturn app.vtranslate('JS_CONTAINS_ILLEGAL_CHARACTERS');\n\t\t\t}\n\t\t},\n\t\tcheckDbName: function (field, rules, i, options) {\n\t\t\tlet fieldValue = field.val(),\n\t\t\t\tnegativeRegex = /^[^\\\\/?%*:|\\\\\\\"<>.\\s]{1,64}$/,\n\t\t\t\tresult = negativeRegex.test(fieldValue);\n\t\t\tif (!result) {\n\t\t\t\treturn app.vtranslate('JS_CONTAINS_ILLEGAL_CHARACTERS');\n\t\t\t}\n\t\t}\n\t},\n\t{\n\t\tregisterEventForStep1: function () {\n\t\t\tjQuery('.bt_install').on('click', function (e) {\n\t\t\t\tjQuery('input[name=\"mode\"]').val('step2');\n\t\t\t\tjQuery('form[name=\"step1\"]').submit();\n\t\t\t});\n\t\t\tjQuery('.bt_migrate').on('click', function (e) {\n\t\t\t\tjQuery('input[name=\"mode\"]').val('mStep0');\n\t\t\t\tjQuery('form[name=\"step1\"]').submit();\n\t\t\t});\n\t\t},\n\t\tregisterEventForStep2: function () {\n\t\t\tlet modalContainer = $('.js-license-modal');\n\t\t\tmodalContainer.on('shown.bs.modal', function (e) {\n\t\t\t\tapp.registerDataTables(modalContainer.find('.js-data-table'), {\n\t\t\t\t\tlengthMenu: [\n\t\t\t\t\t\t[10, 25, 50, -1],\n\t\t\t\t\t\t[10, 25, 50, app.vtranslate('JS_ALL')]\n\t\t\t\t\t],\n\t\t\t\t\tretrieve: true\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\tregisterEventForStep3: function () {\n\t\t\t$('#recheck').on('click', function () {\n\t\t\t\twindow.location.reload();\n\t\t\t});\n\t\t\tlet elements = jQuery('.js-wrong-status');\n\t\t\t$('.js-confirm').on('submit', function (e) {\n\t\t\t\tif (elements.length > 0) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tapp.showConfirmModal({\n\t\t\t\t\t\ticon: 'fas fa-exclamation-triangle',\n\t\t\t\t\t\ttext: app.vtranslate('LBL_SETTINGS_WARNING'),\n\t\t\t\t\t\tconfirmedCallback: () => {\n\t\t\t\t\t\t\telements = false;\n\t\t\t\t\t\t\t$('form[name=\"step3\"]').trigger('submit');\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tcheckPwdEvent: function () {\n\t\t\tvar thisInstance = this;\n\t\t\tjQuery('input[name=\"password\"]').on('blur', function () {\n\t\t\t\tthisInstance.checkPwd(jQuery(this).val());\n\t\t\t});\n\t\t},\n\t\tcheckPwd: function (pass) {\n\t\t\tlet error = false;\n\n\t\t\tif (pass.length < 8) {\n\t\t\t\tjQuery('#passwordError').html(app.vtranslate('LBL_PASS_TO_SHORT'));\n\t\t\t\terror = true;\n\t\t\t} else if (pass.length > 32) {\n\t\t\t\tjQuery('#passwordError').html(app.vtranslate('LBL_PASS_TO_LONG'));\n\t\t\t\terror = true;\n\t\t\t} else if (pass.search(/\\d/) == -1) {\n\t\t\t\tjQuery('#passwordError').html(app.vtranslate('LBL_PASS_NO_NUM'));\n\t\t\t\terror = true;\n\t\t\t} else if (pass.search(/[A-Z]/) == -1) {\n\t\t\t\tjQuery('#passwordError').html(app.vtranslate('LBL_PASS_LACK_OF_CAPITAL_LETTERS'));\n\t\t\t\terror = true;\n\t\t\t} else if (pass.search(/[a-z]/) == -1) {\n\t\t\t\tjQuery('#passwordError').html(app.vtranslate('LBL_PASS_LACK_OF_LOWERCASE_LETTERS'));\n\t\t\t\terror = true;\n\t\t\t}\n\n\t\t\treturn error;\n\t\t},\n\t\tregisterEventForStep4: function () {\n\t\t\tvar config = JSON.parse(localStorage.getItem('yetiforce_install'));\n\t\t\tInstall_Index_Js.fieldsCached.forEach(function (field) {\n\t\t\t\tif (config && typeof config[field] !== 'undefined') {\n\t\t\t\t\tvar formField = jQuery('[name=\"' + field + '\"]');\n\t\t\t\t\tif ('SELECT' == jQuery(formField).prop('tagName')) {\n\t\t\t\t\t\tjQuery(formField).val(config[field]);\n\t\t\t\t\t\tjQuery(formField).select2('destroy');\n\t\t\t\t\t\tApp.Fields.Picklist.showSelect2ElementView(jQuery(formField));\n\t\t\t\t\t} else if ('INPUT' == jQuery(formField).prop('tagName') && 'checkbox' == jQuery(formField).attr('type')) {\n\t\t\t\t\t\tif (true == config[field]) {\n\t\t\t\t\t\t\tjQuery(formField).prop('checked', true);\n\t\t\t\t\t\t\tjQuery('.config-table tr.d-none').removeClass('d-none');\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tjQuery(formField).val(config[field]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tfunction clearPasswordError() {\n\t\t\t\tjQuery('#passwordError').html('');\n\t\t\t}\n\n\t\t\tfunction setPasswordError() {\n\t\t\t\tjQuery('#passwordError').html(app.vtranslate('LBL_PASS_REENTER_ERROR'));\n\t\t\t}\n\n\t\t\tjQuery('input[name=\"retype_password\"]').on('blur', function (e) {\n\t\t\t\tvar element = jQuery(e.currentTarget);\n\t\t\t\tvar password = jQuery('input[name=\"password\"]').val();\n\t\t\t\tif (password !== element.val()) {\n\t\t\t\t\tsetPasswordError();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tjQuery('input[name=\"password\"]').on('blur', function (e) {\n\t\t\t\tvar retypePassword = jQuery('input[name=\"retype_password\"]');\n\t\t\t\tif (retypePassword.val() != '' && retypePassword.val() !== jQuery(e.currentTarget).val()) {\n\t\t\t\t\tjQuery('#passwordError').html(app.vtranslate('LBL_PASS_REENTER_ERROR'));\n\t\t\t\t} else {\n\t\t\t\t\tclearPasswordError();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tjQuery('input[name=\"retype_password\"]').on('keypress', function (e) {\n\t\t\t\tclearPasswordError();\n\t\t\t});\n\t\t\t$('form[name=\"step4\"]').on('submit', (e) => {\n\t\t\t\tif (this.checkForm()) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t} else {\n\t\t\t\t\t$('form[name=\"step4\"]').off('submit');\n\t\t\t\t\tthis.submitForm();\n\t\t\t\t}\n\t\t\t});\n\t\t\tthis.checkPwdEvent();\n\t\t},\n\t\tregisterEventForStep5: function () {\n\t\t\tjQuery('input[name=\"step6\"]').on('click', function () {\n\t\t\t\tvar error = jQuery('#errorMessage');\n\t\t\t\tif (error.length) {\n\t\t\t\t\tapp.showAlert(app.vtranslate('LBL_RESOLVE_ERROR'));\n\t\t\t\t\treturn false;\n\t\t\t\t} else {\n\t\t\t\t\tjQuery('#progressIndicator').removeClass('d-none');\n\t\t\t\t\tjQuery('form[name=\"step5\"]').submit().hide();\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tregisterEventForStep6: function () {\n\t\t\tvar form = $('form[name=\"step6\"]');\n\t\t\tform.on('submit', function () {\n\t\t\t\tif (form.validationEngine('validate')) {\n\t\t\t\t\tform.submit();\n\t\t\t\t\t$('.js-submit').attr('disabled', true);\n\t\t\t\t} else {\n\t\t\t\t\tapp.formAlignmentAfterValidation(form);\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tregisterEventForMigration: function () {\n\t\t\tvar step = jQuery('input[name=\"mode\"]').val();\n\t\t\tif (step == 'mStep3') {\n\t\t\t\tjQuery('form').on('submit', function () {\n\t\t\t\t\tjQuery('#progressIndicator').show();\n\t\t\t\t\tjQuery('#mainContainer').hide();\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tcheckForm() {\n\t\t\tlet error = false;\n\t\t\tif (jQuery('#passwordError').html().trim()) {\n\t\t\t\terror = true;\n\t\t\t}\n\t\t\tif (this.checkPwd(jQuery('input[name=\"password\"]').val())) {\n\t\t\t\terror = true;\n\t\t\t}\n\t\t\treturn error;\n\t\t},\n\t\tsubmitForm() {\n\t\t\twindow.localStorage.setItem(\n\t\t\t\t'yetiforce_install',\n\t\t\t\tJSON.stringify({\n\t\t\t\t\tdb_server: document.step4.db_server.value,\n\t\t\t\t\tdb_username: document.step4.db_username.value,\n\t\t\t\t\tdb_name: document.step4.db_name.value,\n\t\t\t\t\tcurrency_name: document.step4.currency_name.value,\n\t\t\t\t\tfirstname: document.step4.firstname.value,\n\t\t\t\t\tlastname: document.step4.lastname.value,\n\t\t\t\t\tadmin_email: document.step4.admin_email.value,\n\t\t\t\t\tdateformat: document.step4.dateformat.value,\n\t\t\t\t\tdefault_timezone: document.step4.default_timezone.value\n\t\t\t\t})\n\t\t\t);\n\t\t},\n\t\tchangeLanguage: function (e) {\n\t\t\tjQuery('input[name=\"mode\"]').val('step1');\n\t\t\tjQuery('form[name=\"step1\"]').submit();\n\t\t},\n\t\tregisterEvents: function () {\n\t\t\tconst form = $('form');\n\t\t\tjQuery('input[name=\"back\"]').on('click', function () {\n\t\t\t\twindow.history.back();\n\t\t\t});\n\t\t\tform.validationEngine(app.validationEngineOptions);\n\t\t\tthis.registerEventForStep1();\n\t\t\tthis.registerEventForStep2();\n\t\t\tthis.registerEventForStep3();\n\t\t\tthis.registerEventForStep4();\n\t\t\tthis.registerEventForStep5();\n\t\t\tthis.registerEventForStep6();\n\t\t\tthis.registerEventForMigration();\n\t\t\t$('select[name=\"lang\"]').on('change', this.changeLanguage);\n\t\t}\n\t}\n);\njQuery(document).ready(function () {\n\tvar install = new Install_Index_Js();\n\tinstall.registerEvents();\n});\n"],"names":["jQuery","Class","fieldsCached","checkUsername","field","fieldValue","val","result","test","app","vtranslate","logins","JSON","parse","$","inArray","checkDbUsername","checkDbName","registerEventForStep1","on","submit","registerEventForStep2","modalContainer","registerDataTables","find","lengthMenu","retrieve","registerEventForStep3","window","location","reload","elements","e","length","preventDefault","showConfirmModal","icon","text","confirmedCallback","trigger","checkPwdEvent","thisInstance","checkPwd","pass","error","html","search","registerEventForStep4","clearPasswordError","setPasswordError","_this","config","localStorage","getItem","Install_Index_Js","forEach","formField","prop","select2","App","Fields","Picklist","showSelect2ElementView","attr","removeClass","element","currentTarget","password","retypePassword","checkForm","off","submitForm","registerEventForStep5","showAlert","hide","registerEventForStep6","form","validationEngine","formAlignmentAfterValidation","registerEventForMigration","step","show","trim","setItem","stringify","db_server","document","step4","value","db_username","db_name","currency_name","firstname","lastname","admin_email","dateformat","default_timezone","changeLanguage","registerEvents","history","back","validationEngineOptions","ready","install"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAEAA,MAAM,CAACC,KAAK,CACX,kBAAkB,CAClB,CACCC,YAAY,CAAE,CACb,WAAW,CACX,aAAa,CACb,SAAS,CACT,eAAe,CACf,WAAW,CACX,UAAU,CACV,aAAa,CACb,YAAY,CACZ,kBAAkB,CAClB,CACDC,aAAa,CAAE,SAAAA,aAAAA,CAAUC,KAAK,CAAqB,CAClD,IAAIC,UAAU,CAAGD,KAAK,CAACE,GAAG,EAAE,CAE3BC,MAAM,CADU,yBAAyB,CAClBC,IAAI,CAACH,UAAU,CAAC,CACxC,GAAI,CAACE,MAAM,CACV,OAAOE,GAAG,CAACC,UAAU,CAAC,gCAAgC,CAAC,CAExD,IAAIC,MAAM,CAAGC,IAAI,CAACC,KAAK,CAACC,CAAC,CAAC,qBAAqB,CAAC,CAACR,GAAG,EAAE,CAAC,CACvD,GAAsC,CAAC,CAAC,GAApCQ,CAAC,CAACC,OAAO,CAACV,UAAU,CAAEM,MAAM,CAAQ,CACvC,OAAOF,GAAG,CAACC,UAAU,CAAC,4BAA4B,CAEpD,CAAC,CACDM,eAAe,CAAE,SAAAA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ACM,qBAAqB,EAAE,CAC5B,IAAI,CAACoB,qBAAqB,EAAE,CAC5B,IAAI,CAACyB,qBAAqB,EAAE,CAC5B,IAAI,CAACG,qBAAqB,EAAE,CAC5B,IAAI,CAACI,yBAAyB,EAAE,CAChCjE,CAAC,CAAC,uBAAqB,CAAC,CAACK,EAAE,CAAC,QAAQ,CAAE,IAAI,CAAC8E,cAAc,EAC1D,CACD,CACD,CAAC,CACDjG,MAAM,CAACsF,QAAQ,CAAC,CAACgB,KAAK,CAAC,UAAY,CAClC,IAAIC,OAAO,CAAG,IAAIjD,gBAAkB,CACpCiD,OAAO,CAACL,cAAc,GACvB,CAAC,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/components/InterestsConflict.min.js b/public_html/layouts/basic/components/InterestsConflict.min.js index 57e5c9a8d5db..43c6b3f03a01 100644 --- a/public_html/layouts/basic/components/InterestsConflict.min.js +++ b/public_html/layouts/basic/components/InterestsConflict.min.js @@ -1,6 +1,6 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */"use strict";$.Class("AppComponents_InterestsConflict_Js",{/** +/* {[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]} */"use strict";$.Class("AppComponents_InterestsConflict_Js",{/** * Register unlock tab events * @param {jQuery} container */registerUnlock:function registerUnlock(container){var form=container.find(".js-filter-form");App.Fields.Date.registerRange(form);var table=$("#js-unlock-table");table.hasClass("dataTable")&&table.DataTable().clear().destroy();var dt=app.registerDataTables(table,{processing:!0,serverSide:!0,paging:!0,searching:!1,lengthChange:!1,pageLength:15,ajax:{url:"index.php?module=AppComponents&action=InterestsConflict&mode=getUnlock",type:"POST",data:function data(_data){_data=$.extend(_data,form.serializeFormData());}},order:[[0,"desc"]],columns:[{data:"date_time"},{data:"user_id"},{data:"status",render:function render(data){return 1===data?""):2===data?""):3===data?""):"")}},{data:"related"},{orderable:!1,data:"comment"},{orderable:!1,data:function data(row){var action=row.info?""):"";return 0===row.status&&(action+="")),action},defaultContent:""}]});container.find("input,select").on("change",function(){dt.ajax.reload();}),table.off("click",".js-update").on("click",".js-update",function(){AppConnector.request({module:"AppComponents",action:"InterestsConflict",mode:"updateUnlockStatus",id:this.dataset.id,status:this.dataset.status}).done(function(){app.showNotify({text:app.vtranslate("JS_SAVE_NOTIFY_OK"),type:"success"}),dt.ajax.reload(null,!1);}).fail(function(){app.showNotify({text:app.vtranslate("JS_ERROR"),type:"error"});});});},/** diff --git a/public_html/layouts/basic/components/InterestsConflict.min.js.map b/public_html/layouts/basic/components/InterestsConflict.min.js.map index 3e931df6cfc6..e6dcd1e7ae84 100644 --- a/public_html/layouts/basic/components/InterestsConflict.min.js.map +++ b/public_html/layouts/basic/components/InterestsConflict.min.js.map @@ -1 +1 @@ -{"version":3,"file":"InterestsConflict.min.js","sources":["InterestsConflict.js"],"sourcesContent":["/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */\n'use strict';\n\n$.Class(\n\t'AppComponents_InterestsConflict_Js',\n\n\t{\n\t\t/**\n\t\t * Register unlock tab events\n\t\t * @param {jQuery} container\n\t\t */\n\t\tregisterUnlock: function (container) {\n\t\t\tlet form = container.find('.js-filter-form');\n\t\t\tApp.Fields.Date.registerRange(form);\n\t\t\tlet table = $('#js-unlock-table');\n\t\t\tif (table.hasClass('dataTable')) {\n\t\t\t\ttable.DataTable().clear().destroy();\n\t\t\t}\n\t\t\tlet dt = app.registerDataTables(table, {\n\t\t\t\tprocessing: true,\n\t\t\t\tserverSide: true,\n\t\t\t\tpaging: true,\n\t\t\t\tsearching: false,\n\t\t\t\tlengthChange: false,\n\t\t\t\tpageLength: 15,\n\t\t\t\tajax: {\n\t\t\t\t\turl: 'index.php?module=AppComponents&action=InterestsConflict&mode=getUnlock',\n\t\t\t\t\ttype: 'POST',\n\t\t\t\t\tdata: function (data) {\n\t\t\t\t\t\tdata = $.extend(data, form.serializeFormData());\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\torder: [[0, 'desc']],\n\t\t\t\tcolumns: [\n\t\t\t\t\t{ data: 'date_time' },\n\t\t\t\t\t{ data: 'user_id' },\n\t\t\t\t\t{\n\t\t\t\t\t\tdata: 'status',\n\t\t\t\t\t\trender: function (data, type, row, meta) {\n\t\t\t\t\t\t\tswitch (data) {\n\t\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\t\treturn ``;\n\t\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\t\treturn ``;\n\t\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\t\treturn ``;\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\treturn ``;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdata: 'related'\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\torderable: false,\n\t\t\t\t\t\tdata: 'comment'\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\torderable: false,\n\t\t\t\t\t\tdata: function (row) {\n\t\t\t\t\t\t\tlet action = row['info']\n\t\t\t\t\t\t\t\t? ``\n\t\t\t\t\t\t\t\t: '';\n\t\t\t\t\t\t\tif (row['status'] === 0) {\n\t\t\t\t\t\t\t\taction += ``;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn action;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdefaultContent: ''\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t});\n\t\t\tcontainer.find('input,select').on('change', function () {\n\t\t\t\tdt.ajax.reload();\n\t\t\t});\n\t\t\ttable.off('click', '.js-update').on('click', '.js-update', function () {\n\t\t\t\tAppConnector.request({\n\t\t\t\t\tmodule: 'AppComponents',\n\t\t\t\t\taction: 'InterestsConflict',\n\t\t\t\t\tmode: 'updateUnlockStatus',\n\t\t\t\t\tid: this.dataset.id,\n\t\t\t\t\tstatus: this.dataset.status\n\t\t\t\t})\n\t\t\t\t\t.done(function () {\n\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\ttext: app.vtranslate('JS_SAVE_NOTIFY_OK'),\n\t\t\t\t\t\t\ttype: 'success'\n\t\t\t\t\t\t});\n\t\t\t\t\t\tdt.ajax.reload(null, false);\n\t\t\t\t\t})\n\t\t\t\t\t.fail(function () {\n\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\ttext: app.vtranslate('JS_ERROR'),\n\t\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Register confirmations tab events\n\t\t * @param {jQuery} container\n\t\t */\n\t\tregisterConfirmations: function (container) {\n\t\t\tlet form = container.find('.js-filter-form');\n\t\t\tApp.Fields.Date.registerRange(form);\n\t\t\tlet table = $('#js-confirm-table');\n\t\t\tif (table.hasClass('dataTable')) {\n\t\t\t\ttable.DataTable().clear().destroy();\n\t\t\t}\n\t\t\tlet dt = app.registerDataTables(table, {\n\t\t\t\tprocessing: true,\n\t\t\t\tserverSide: true,\n\t\t\t\tpaging: true,\n\t\t\t\tsearching: false,\n\t\t\t\tlengthChange: false,\n\t\t\t\tpageLength: 15,\n\t\t\t\tajax: {\n\t\t\t\t\turl: 'index.php?module=AppComponents&action=InterestsConflict&mode=getConfirm',\n\t\t\t\t\ttype: 'POST',\n\t\t\t\t\tdata: function (data) {\n\t\t\t\t\t\tdata = $.extend(data, form.serializeFormData());\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\torder: [[0, 'desc']],\n\t\t\t\tcolumns: [\n\t\t\t\t\t{ data: 'date_time' },\n\t\t\t\t\t{ data: 'user' },\n\t\t\t\t\t{\n\t\t\t\t\t\tdata: 'status',\n\t\t\t\t\t\trender: function (data, type, row, meta) {\n\t\t\t\t\t\t\tswitch (data) {\n\t\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\t\treturn '';\n\t\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\t\treturn '';\n\t\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\t\treturn '';\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\treturn '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdata: 'related'\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tclass: 'details-control',\n\t\t\t\t\t\torderable: false,\n\t\t\t\t\t\tdata: function (row) {\n\t\t\t\t\t\t\tlet action = row['info']\n\t\t\t\t\t\t\t\t? ``\n\t\t\t\t\t\t\t\t: '';\n\t\t\t\t\t\t\tif (row['db'] !== 'base') {\n\t\t\t\t\t\t\t\treturn action;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taction += ``;\n\t\t\t\t\t\t\treturn action;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdefaultContent: ''\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t});\n\t\t\tcontainer.find('input,select').on('change', function () {\n\t\t\t\tdt.ajax.reload();\n\t\t\t});\n\t\t\ttable.off('click', '.js-update').on('click', '.js-update', function () {\n\t\t\t\tapp.showConfirmModal({\n\t\t\t\t\ttitle: app.vtranslate('JS_ENTER_A_REASON'),\n\t\t\t\t\tshowDialog: true,\n\t\t\t\t\tmultiLineDialog: true,\n\t\t\t\t\tconfirmedCallback: (notice, value) => {\n\t\t\t\t\t\tAppConnector.request({\n\t\t\t\t\t\t\tmodule: 'AppComponents',\n\t\t\t\t\t\t\taction: 'InterestsConflict',\n\t\t\t\t\t\t\tmode: 'updateConfirmStatus',\n\t\t\t\t\t\t\tid: this.dataset.user,\n\t\t\t\t\t\t\tbaseRecord: this.dataset.related,\n\t\t\t\t\t\t\tcomment: value\n\t\t\t\t\t\t})\n\t\t\t\t\t\t\t.done(function () {\n\t\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\t\ttext: app.vtranslate('JS_SAVE_NOTIFY_OK'),\n\t\t\t\t\t\t\t\t\ttype: 'success'\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tdt.ajax.reload(null, false);\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t.fail(function () {\n\t\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\t\ttext: app.vtranslate('JS_ERROR'),\n\t\t\t\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t},\n\t{\n\t\t/**\n\t\t * Register events\n\t\t */\n\t\tregisterEvents: function () {\n\t\t\tlet container = $('.contentsDiv');\n\t\t\tswitch (CONFIG['mode']) {\n\t\t\t\tcase 'unlock':\n\t\t\t\t\tAppComponents_InterestsConflict_Js.registerUnlock(container);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'confirm':\n\t\t\t\t\tAppComponents_InterestsConflict_Js.registerConfirmations(container);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n);\n"],"names":["$","Class","registerUnlock","container","find","App","Fields","Date","registerRange","form","table","hasClass","DataTable","clear","destroy","app","registerDataTables","processing","serverSide","paging","searching","lengthChange","pageLength","ajax","url","type","data","extend","serializeFormData","order","columns","render","vtranslate","orderable","row","action","defaultContent","on","dt","reload","off","AppConnector","request","module","mode","id","dataset","status","done","showNotify","text","fail","registerConfirmations","class","showConfirmModal","title","showDialog","multiLineDialog","confirmedCallback","notice","value","user","baseRecord","related","comment","registerEvents","CONFIG","AppComponents_InterestsConflict_Js"],"mappings":";;AAAA,kKACA,aAEAA,CAAC,CAACC,KAAF,CACC,oCADD,CAGC;AAED;AACA;AACA,KACEC,cAAc,CAAE,SAAUC,cAAAA,CAAAA,SAAV,C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AAY,CAC3B,IAAI9D,SAAS,CAAGH,CAAC,CAAC,cAAD,CAAjB,CACA,OAAQkE,MAAM,KAAd,EACC,IAAK,QAAL,CACCC,kCAAkC,CAACjE,cAAnC,CAAkDC,SAAlD,CADD,CAEC,MACD,IAAK,SAAL,CACCgE,kCAAkC,CAACf,qBAAnC,CAAyDjD,SAAzD,CADD,CAJD,CAQA,CAdF,CAvND;;"} \ No newline at end of file +{"version":3,"file":"InterestsConflict.min.js","sources":["InterestsConflict.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'AppComponents_InterestsConflict_Js',\n\n\t{\n\t\t/**\n\t\t * Register unlock tab events\n\t\t * @param {jQuery} container\n\t\t */\n\t\tregisterUnlock: function (container) {\n\t\t\tlet form = container.find('.js-filter-form');\n\t\t\tApp.Fields.Date.registerRange(form);\n\t\t\tlet table = $('#js-unlock-table');\n\t\t\tif (table.hasClass('dataTable')) {\n\t\t\t\ttable.DataTable().clear().destroy();\n\t\t\t}\n\t\t\tlet dt = app.registerDataTables(table, {\n\t\t\t\tprocessing: true,\n\t\t\t\tserverSide: true,\n\t\t\t\tpaging: true,\n\t\t\t\tsearching: false,\n\t\t\t\tlengthChange: false,\n\t\t\t\tpageLength: 15,\n\t\t\t\tajax: {\n\t\t\t\t\turl: 'index.php?module=AppComponents&action=InterestsConflict&mode=getUnlock',\n\t\t\t\t\ttype: 'POST',\n\t\t\t\t\tdata: function (data) {\n\t\t\t\t\t\tdata = $.extend(data, form.serializeFormData());\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\torder: [[0, 'desc']],\n\t\t\t\tcolumns: [\n\t\t\t\t\t{ data: 'date_time' },\n\t\t\t\t\t{ data: 'user_id' },\n\t\t\t\t\t{\n\t\t\t\t\t\tdata: 'status',\n\t\t\t\t\t\trender: function (data, type, row, meta) {\n\t\t\t\t\t\t\tswitch (data) {\n\t\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\t\treturn ``;\n\t\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\t\treturn ``;\n\t\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\t\treturn ``;\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\treturn ``;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdata: 'related'\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\torderable: false,\n\t\t\t\t\t\tdata: 'comment'\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\torderable: false,\n\t\t\t\t\t\tdata: function (row) {\n\t\t\t\t\t\t\tlet action = row['info']\n\t\t\t\t\t\t\t\t? ``\n\t\t\t\t\t\t\t\t: '';\n\t\t\t\t\t\t\tif (row['status'] === 0) {\n\t\t\t\t\t\t\t\taction += ``;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn action;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdefaultContent: ''\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t});\n\t\t\tcontainer.find('input,select').on('change', function () {\n\t\t\t\tdt.ajax.reload();\n\t\t\t});\n\t\t\ttable.off('click', '.js-update').on('click', '.js-update', function () {\n\t\t\t\tAppConnector.request({\n\t\t\t\t\tmodule: 'AppComponents',\n\t\t\t\t\taction: 'InterestsConflict',\n\t\t\t\t\tmode: 'updateUnlockStatus',\n\t\t\t\t\tid: this.dataset.id,\n\t\t\t\t\tstatus: this.dataset.status\n\t\t\t\t})\n\t\t\t\t\t.done(function () {\n\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\ttext: app.vtranslate('JS_SAVE_NOTIFY_OK'),\n\t\t\t\t\t\t\ttype: 'success'\n\t\t\t\t\t\t});\n\t\t\t\t\t\tdt.ajax.reload(null, false);\n\t\t\t\t\t})\n\t\t\t\t\t.fail(function () {\n\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\ttext: app.vtranslate('JS_ERROR'),\n\t\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Register confirmations tab events\n\t\t * @param {jQuery} container\n\t\t */\n\t\tregisterConfirmations: function (container) {\n\t\t\tlet form = container.find('.js-filter-form');\n\t\t\tApp.Fields.Date.registerRange(form);\n\t\t\tlet table = $('#js-confirm-table');\n\t\t\tif (table.hasClass('dataTable')) {\n\t\t\t\ttable.DataTable().clear().destroy();\n\t\t\t}\n\t\t\tlet dt = app.registerDataTables(table, {\n\t\t\t\tprocessing: true,\n\t\t\t\tserverSide: true,\n\t\t\t\tpaging: true,\n\t\t\t\tsearching: false,\n\t\t\t\tlengthChange: false,\n\t\t\t\tpageLength: 15,\n\t\t\t\tajax: {\n\t\t\t\t\turl: 'index.php?module=AppComponents&action=InterestsConflict&mode=getConfirm',\n\t\t\t\t\ttype: 'POST',\n\t\t\t\t\tdata: function (data) {\n\t\t\t\t\t\tdata = $.extend(data, form.serializeFormData());\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\torder: [[0, 'desc']],\n\t\t\t\tcolumns: [\n\t\t\t\t\t{ data: 'date_time' },\n\t\t\t\t\t{ data: 'user' },\n\t\t\t\t\t{\n\t\t\t\t\t\tdata: 'status',\n\t\t\t\t\t\trender: function (data, type, row, meta) {\n\t\t\t\t\t\t\tswitch (data) {\n\t\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\t\treturn '';\n\t\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\t\treturn '';\n\t\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\t\treturn '';\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\treturn '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdata: 'related'\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tclass: 'details-control',\n\t\t\t\t\t\torderable: false,\n\t\t\t\t\t\tdata: function (row) {\n\t\t\t\t\t\t\tlet action = row['info']\n\t\t\t\t\t\t\t\t? ``\n\t\t\t\t\t\t\t\t: '';\n\t\t\t\t\t\t\tif (row['db'] !== 'base') {\n\t\t\t\t\t\t\t\treturn action;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taction += ``;\n\t\t\t\t\t\t\treturn action;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdefaultContent: ''\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t});\n\t\t\tcontainer.find('input,select').on('change', function () {\n\t\t\t\tdt.ajax.reload();\n\t\t\t});\n\t\t\ttable.off('click', '.js-update').on('click', '.js-update', function () {\n\t\t\t\tapp.showConfirmModal({\n\t\t\t\t\ttitle: app.vtranslate('JS_ENTER_A_REASON'),\n\t\t\t\t\tshowDialog: true,\n\t\t\t\t\tmultiLineDialog: true,\n\t\t\t\t\tconfirmedCallback: (notice, value) => {\n\t\t\t\t\t\tAppConnector.request({\n\t\t\t\t\t\t\tmodule: 'AppComponents',\n\t\t\t\t\t\t\taction: 'InterestsConflict',\n\t\t\t\t\t\t\tmode: 'updateConfirmStatus',\n\t\t\t\t\t\t\tid: this.dataset.user,\n\t\t\t\t\t\t\tbaseRecord: this.dataset.related,\n\t\t\t\t\t\t\tcomment: value\n\t\t\t\t\t\t})\n\t\t\t\t\t\t\t.done(function () {\n\t\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\t\ttext: app.vtranslate('JS_SAVE_NOTIFY_OK'),\n\t\t\t\t\t\t\t\t\ttype: 'success'\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tdt.ajax.reload(null, false);\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t.fail(function () {\n\t\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\t\ttext: app.vtranslate('JS_ERROR'),\n\t\t\t\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t},\n\t{\n\t\t/**\n\t\t * Register events\n\t\t */\n\t\tregisterEvents: function () {\n\t\t\tlet container = $('.contentsDiv');\n\t\t\tswitch (CONFIG['mode']) {\n\t\t\t\tcase 'unlock':\n\t\t\t\t\tAppComponents_InterestsConflict_Js.registerUnlock(container);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'confirm':\n\t\t\t\t\tAppComponents_InterestsConflict_Js.registerConfirmations(container);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n);\n"],"names":["$","Class","registerUnlock","container","form","find","App","Fields","Date","registerRange","table","hasClass","DataTable","clear","destroy","dt","app","registerDataTables","processing","serverSide","paging","searching","lengthChange","pageLength","ajax","url","type","data","extend","serializeFormData","order","columns","render","concat","vtranslate","orderable","row","action","info","status","id","defaultContent","on","reload","off","AppConnector","request","module","mode","dataset","done","showNotify","text","fail","registerConfirmations","class","db","user_id","related_id","_this","showConfirmModal","title","showDialog","multiLineDialog","confirmedCallback","notice","value","user","baseRecord","related","comment","registerEvents","CONFIG","AppComponents_InterestsConflict_Js"],"mappings":";;AAAA,kKACA,YAAY,CAEZA,CAAC,CAACC,KAAK,CACN,oCAAoC,CAEpC;AAED;AACA;AACA,KACEC,cAAc,CAAE,SAAAA,cAAUC,CAAAA,SAAS,CAAE,CACpC,IAAIC,IAAI,CAAGD,SAAS,CAACE,IAAI,CAAC,iBAAiB,CAAC,CAC5CC,GAAG,CAACC,MAAM,CAACC,IAAI,CAACC,aAAa,CAACL,IAAI,CAAC,CACnC,IAAIM,KAAK,CAAGV,CAAC,CAAC,kBAAkB,CAAC,CAC7BU,KAAK,CAACC,QAAQ,CAAC,WAAW,CAAC,E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diff --git a/public_html/layouts/basic/components/MediaModal.min.js b/public_html/layouts/basic/components/MediaModal.min.js index 450e70d597ef..237ea05f6d6c 100644 --- a/public_html/layouts/basic/components/MediaModal.min.js +++ b/public_html/layouts/basic/components/MediaModal.min.js @@ -1,6 +1,6 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var descriptor,i=0;i {\n\t\t\tlet currentPage = this.container.find('.js-page--set.active').data('id');\n\t\t\tthis.setPage(parseInt(currentPage) + 1);\n\t\t});\n\t\tthis.container.on('click', '.js-page--previous:not(.disabled)', () => {\n\t\t\tlet currentPage = this.container.find('.js-page--set.active').data('id');\n\t\t\tif (currentPage !== 1) {\n\t\t\t\tthis.setPage(currentPage - 1);\n\t\t\t}\n\t\t});\n\t\tthis.container.on('click', '.js-page--first:not(.disabled)', () => {\n\t\t\tthis.setPage(1);\n\t\t});\n\t\tthis.container.on('click', '.js-page--last:not(.disabled)', () => {\n\t\t\tlet elements = this.container.find('.js-icon-item:not(.not-match)');\n\t\t\tlet totalPages = Math.ceil(elements.length / this.pageLimit);\n\t\t\tthis.setPage(totalPages);\n\t\t});\n\t}\n\t/**\n\t * Register Icon Search\n\t */\n\tregisterSearchIcon() {\n\t\tthis.searchField.on('keyup', (e) => {\n\t\t\tlet tab = this.getActiveTab();\n\t\t\ttab.find('.js-icon-item.not-match').removeClass('not-match');\n\t\t\tlet value = e.currentTarget.value.toString().replace('\"', '').toLowerCase();\n\t\t\tif (value.length) {\n\t\t\t\ttab.find(`.js-icon-item:not([data-icon-search*=\"${value}\"])`).addClass('not-match');\n\t\t\t}\n\t\t\tthis.setPage(1);\n\t\t});\n\t}\n\t/**\n\t * Remove image item\n\t * @param {Event} e\n\t */\n\tremoveItem(e) {\n\t\tlet url = e.currentTarget.dataset.url;\n\t\tlet progressIndicatorElement = $.progressIndicator({ position: 'html', blockInfo: { enabled: true } });\n\t\tAppConnector.request({\n\t\t\tasync: false,\n\t\t\turl: url,\n\t\t\ttype: 'POST',\n\t\t\tdata: {}\n\t\t})\n\t\t\t.done((data) => {\n\t\t\t\tif (data.result) {\n\t\t\t\t\te.currentTarget.closest('.js-icon-item').remove();\n\t\t\t\t}\n\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t})\n\t\t\t.fail(function (error, err) {\n\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\tapp.errorLog(error, err);\n\t\t\t});\n\t}\n\tregisterImageEvents() {\n\t\tlet fileInput = this.container.find('.js-icon-file');\n\t\tif (fileInput.length) {\n\t\t\tlet fieldInfo = fileInput.data('fieldinfo') || {};\n\t\t\tthis.container.find('.js-image-add').on('click', () => {\n\t\t\t\tfileInput.trigger('click');\n\t\t\t});\n\t\t\tlet file = App.File.register(fileInput, {\n\t\t\t\tfileupload: {\n\t\t\t\t\tdataType: 'json',\n\t\t\t\t\treplaceFileInput: false,\n\t\t\t\t\tautoUpload: false,\n\t\t\t\t\tdone: (e, data) => {\n\t\t\t\t\t\tconst attach = data.result.result.attach;\n\t\t\t\t\t\tattach.forEach((fileAttach) => {\n\t\t\t\t\t\t\tif (typeof fileAttach.key === 'undefined') {\n\t\t\t\t\t\t\t\treturn file.uploadError(e, data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfile.filesActive--;\n\t\t\t\t\t\t\tthis.addImage(fileAttach);\n\t\t\t\t\t\t});\n\t\t\t\t\t\tfile.fileInput.val('');\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tformats: fieldInfo.formats,\n\t\t\t\tlimit: fieldInfo.limit,\n\t\t\t\tmaxFileSize: fieldInfo.maxFileSize,\n\t\t\t\tmaxFileSizeDisplay: fieldInfo.maxFileSizeDisplay || ''\n\t\t\t});\n\t\t}\n\n\t\tthis.container.find('.js-image-remove').on('click', (e) => {\n\t\t\te.stopPropagation();\n\t\t\tapp.showConfirmModal({\n\t\t\t\ttext: app.vtranslate('JS_LBL_ARE_YOU_SURE_YOU_WANT_TO_DELETE'),\n\t\t\t\tconfirmedCallback: () => {\n\t\t\t\t\tthis.removeItem(e);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\t/**\n\t * Add image to container\n\t * @param {Object} data\n\t */\n\taddImage(data) {\n\t\tconst item = document.createElement('article');\n\t\titem.setAttribute('class', 'w-100 position-relative js-icon-item');\n\t\titem.setAttribute('data-icon-search', data.name.toLowerCase());\n\t\titem.setAttribute('data-name', data.name);\n\t\titem.setAttribute('data-type', 'image');\n\t\titem.setAttribute('data-src', data.src);\n\t\titem.setAttribute('data-key', data.key);\n\n\t\tconst button = document.createElement('button');\n\t\tbutton.setAttribute('class', 'btn btn-light w-100 h-100');\n\n\t\tconst image = document.createElement('img');\n\t\timage.setAttribute('class', 'icon-img--list');\n\t\timage.setAttribute('src', data.src);\n\n\t\tconst span = document.createElement('span');\n\t\tspan.setAttribute('class', 'c-grid-item--signature u-fs-xs');\n\t\tspan.appendChild(document.createTextNode(data.name));\n\n\t\tbutton.appendChild(image);\n\t\tbutton.appendChild(span);\n\t\titem.appendChild(button);\n\n\t\tthis.getActiveTab().find('#icons-results').append(item);\n\t}\n\t/**\n\t * Register events\n\t */\n\tregisterEvents(container) {\n\t\tthis.container = container;\n\t\tthis.pageLimit = parseInt(this.container.find('.js-page-size').val());\n\t\tthis.searchField = this.container.find('.js-icon-search');\n\t\tthis.setPage();\n\t\tthis.registerPaginationEvents();\n\t\tthis.registerSearchIcon();\n\t\tthis.container.on('shown.bs.tab', 'a[data-toggle=\"tab\"]', () => {\n\t\t\tthis.searchField.trigger('keyup');\n\t\t});\n\t\tthis.registerImageEvents();\n\t}\n};\n"],"names":["window","AppComponents_MediaModal_Js","min","page","pageLimit","max","tab","getActiveTab","elements","find","addClass","slice","removeClass","container","data","text","eq","length","on","setPage","parseInt","currentPage","totalPages","Math","ceil","searchField","e","value","currentTarget","toString","replace","toLowerCase","dataset","url","progressIndicatorElement","$","progressIndicator","position","blockInfo","enabled","AppConnector","request","async","type","done","result","closest","remove","mode","fail","error","err","app","errorLog","fileInput","trigger","App","File","register","fileupload","dataType","replaceFileInput","autoUpload","attach","forEach","fileAttach","key","file","uploadError","filesActive","addImage","val","formats","fieldInfo","limit","maxFileSize","maxFileSizeDisplay","stopPropagation","showConfirmModal","vtranslate","confirmedCallback","removeItem","item","document","createElement","setAttribute","name","src","button","image","span","appendChild","createTextNode","append","registerPaginationEvents","registerSearchIcon","registerImageEvents"],"mappings":";;AAAA,kKACA,urBAEAA,MAAM,CAACC,2BAAP,cACC,UAAA,CAAA,SAAA,MAAA,EAAA,CAAA,eAAA,CAAA,IAAA,CAAA,MAAA,EAAA,CAAA,OAAA,YAAA,CAAA,MAAA,CAAA,CAAA,CAAA,GAAA,CAAA,SAAA,CAAA,KAAA;AACD;AACA;AACA,IACC,SAAkB,OAAA,EAAA,CAAA,IAAA,IAAA,CAAA,CAAA,CAAA,SAAA,CAAA,MAAA,EAAA,KAAA,CAAA,GAAA,SAAA,CAAA,CAAA,CAAA,CAAA,SAAA,CAAA,CAAA,CAAA,CAAH,CAAG,CACbC,GAAG,CAAG,CAACC,IAAI,CAAG,CAAR,EAAa,IAAA,CAAKC,SADX,CAEbC,GAAG,CAAGF,IAAI,CAAG,IAAKC,CAAAA,SAFL,CAGbE,GAAG,CAAG,IAAKC,CAAAA,YAAL,EAHO,CAIbC,QAAQ,CAAGF,GAAG,CAACG,IAAJ,CAAS,+BAAT,CAJE,CAKjBH,GAAG,CAACG,IAAJ,CAAS,eAAT,CAAA,CAA0BC,QAA1B,CAAmC,QAAnC,CALiB,CAMjBF,QAAQ,CAACG,KAAT,CAAeT,GAAf,CAAoBG,GAApB,CAAA,CAAyBO,WAAzB,CAAqC,QAArC,CANiB,CAOjB,IAAKC,CAAAA,SAAL,CAAeJ,IAAf,CAAoB,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,OAAlB,CAA2B,gCAA3B,CAjBc,CAkBdK,IAAI,CAACC,WAAL,CAAiBR,QAAQ,CAACS,cAAT,CAAwB9E,IAAI,CAACwE,IAA7B,CAAjB,CAlBc,CAoBdE,MAAM,CAACG,WAAP,CAAmBF,KAAnB,CApBc,CAqBdD,MAAM,CAACG,WAAP,CAAmBD,IAAnB,CArBc,CAsBdR,IAAI,CAACS,WAAL,CAAiBH,MAAjB,CAtBc,CAwBd,KAAKjF,YAAL,EAAA,CAAoBE,IAApB,CAAyB,gBAAzB,EAA2CoF,MAA3C,CAAkDX,IAAlD,EACA,CACD;AACD;AACA,KACC,CAAA,CAAA,GAAA,CAAA,gBAAA,CAAA,KAAA,CAAA,SAAA,cAAA,CAAerE,SAAf,CAA0B,iBACzB,IAAKA,CAAAA,SAAL,CAAiBA,SADQ,CAEzB,IAAKT,CAAAA,SAAL,CAAiBgB,QAAQ,CAAC,IAAKP,CAAAA,SAAL,CAAeJ,IAAf,CAAoB,eAApB,CAAA,CAAqC8D,GAArC,EAAD,CAFA,CAGzB,IAAA,CAAK9C,WAAL,CAAmB,KAAKZ,SAAL,CAAeJ,IAAf,CAAoB,iBAApB,CAHM,CAIzB,IAAKU,CAAAA,OAAL,EAJyB,CAKzB,IAAA,CAAK2E,wBAAL,EALyB,CAMzB,IAAKC,CAAAA,kBAAL,EANyB,CAOzB,KAAKlF,SAAL,CAAeK,EAAf,CAAkB,cAAlB,CAAkC,wBAAlC,CAA0D,UAAM,CAC/D,MAAI,CAACO,WAAL,CAAiB8B,OAAjB,CAAyB,OAAzB,EACA,CAFD,CAPyB,CAUzB,IAAA,CAAKyC,mBAAL,GACA,CAjLF;;"} \ No newline at end of file +{"version":3,"file":"MediaModal.min.js","sources":["MediaModal.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\nwindow.AppComponents_MediaModal_Js = class {\n\t/**\n\t * Set page\n\t * @param {int} page\n\t */\n\tsetPage(page = 1) {\n\t\tlet min = (page - 1) * this.pageLimit;\n\t\tlet max = page * this.pageLimit;\n\t\tlet tab = this.getActiveTab();\n\t\tlet elements = tab.find('.js-icon-item:not(.not-match)');\n\t\ttab.find('.js-icon-item').addClass('d-none');\n\t\telements.slice(min, max).removeClass('d-none');\n\t\tthis.container.find('.js-page--set').data('id', page).find('.page-link').text(page);\n\t\tif (elements.eq(max + 1).length) {\n\t\t\tthis.container.find('.js-page--next,.js-page--last').removeClass('disabled');\n\t\t} else {\n\t\t\tthis.container.find('.js-page--next,.js-page--last').addClass('disabled');\n\t\t}\n\t\tif (min !== 0 && elements.eq(min - 1).length) {\n\t\t\tthis.container.find('.js-page--previous,.js-page--first').removeClass('disabled');\n\t\t} else {\n\t\t\tthis.container.find('.js-page--previous,.js-page--first').addClass('disabled');\n\t\t}\n\t}\n\t/**\n\t * Get active tab\n\t * @returns\n\t */\n\tgetActiveTab() {\n\t\treturn this.container.find('.js-tab.active');\n\t}\n\t/**\n\t * Register pagination events\n\t */\n\tregisterPaginationEvents() {\n\t\tthis.container.on('click', '.js-page--next:not(.disabled)', () => {\n\t\t\tlet currentPage = this.container.find('.js-page--set.active').data('id');\n\t\t\tthis.setPage(parseInt(currentPage) + 1);\n\t\t});\n\t\tthis.container.on('click', '.js-page--previous:not(.disabled)', () => {\n\t\t\tlet currentPage = this.container.find('.js-page--set.active').data('id');\n\t\t\tif (currentPage !== 1) {\n\t\t\t\tthis.setPage(currentPage - 1);\n\t\t\t}\n\t\t});\n\t\tthis.container.on('click', '.js-page--first:not(.disabled)', () => {\n\t\t\tthis.setPage(1);\n\t\t});\n\t\tthis.container.on('click', '.js-page--last:not(.disabled)', () => {\n\t\t\tlet elements = this.container.find('.js-icon-item:not(.not-match)');\n\t\t\tlet totalPages = Math.ceil(elements.length / this.pageLimit);\n\t\t\tthis.setPage(totalPages);\n\t\t});\n\t}\n\t/**\n\t * Register Icon Search\n\t */\n\tregisterSearchIcon() {\n\t\tthis.searchField.on('keyup', (e) => {\n\t\t\tlet tab = this.getActiveTab();\n\t\t\ttab.find('.js-icon-item.not-match').removeClass('not-match');\n\t\t\tlet value = e.currentTarget.value.toString().replace('\"', '').toLowerCase();\n\t\t\tif (value.length) {\n\t\t\t\ttab.find(`.js-icon-item:not([data-icon-search*=\"${value}\"])`).addClass('not-match');\n\t\t\t}\n\t\t\tthis.setPage(1);\n\t\t});\n\t}\n\t/**\n\t * Remove image item\n\t * @param {Event} e\n\t */\n\tremoveItem(e) {\n\t\tlet url = e.currentTarget.dataset.url;\n\t\tlet progressIndicatorElement = $.progressIndicator({ position: 'html', blockInfo: { enabled: true } });\n\t\tAppConnector.request({\n\t\t\tasync: false,\n\t\t\turl: url,\n\t\t\ttype: 'POST',\n\t\t\tdata: {}\n\t\t})\n\t\t\t.done((data) => {\n\t\t\t\tif (data.result) {\n\t\t\t\t\te.currentTarget.closest('.js-icon-item').remove();\n\t\t\t\t}\n\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t})\n\t\t\t.fail(function (error, err) {\n\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\tapp.errorLog(error, err);\n\t\t\t});\n\t}\n\tregisterImageEvents() {\n\t\tlet fileInput = this.container.find('.js-icon-file');\n\t\tif (fileInput.length) {\n\t\t\tlet fieldInfo = fileInput.data('fieldinfo') || {};\n\t\t\tthis.container.find('.js-image-add').on('click', () => {\n\t\t\t\tfileInput.trigger('click');\n\t\t\t});\n\t\t\tlet file = App.File.register(fileInput, {\n\t\t\t\tfileupload: {\n\t\t\t\t\tdataType: 'json',\n\t\t\t\t\treplaceFileInput: false,\n\t\t\t\t\tautoUpload: false,\n\t\t\t\t\tdone: (e, data) => {\n\t\t\t\t\t\tconst attach = data.result.result.attach;\n\t\t\t\t\t\tattach.forEach((fileAttach) => {\n\t\t\t\t\t\t\tif (typeof fileAttach.key === 'undefined') {\n\t\t\t\t\t\t\t\treturn file.uploadError(e, data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfile.filesActive--;\n\t\t\t\t\t\t\tthis.addImage(fileAttach);\n\t\t\t\t\t\t});\n\t\t\t\t\t\tfile.fileInput.val('');\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tformats: fieldInfo.formats,\n\t\t\t\tlimit: fieldInfo.limit,\n\t\t\t\tmaxFileSize: fieldInfo.maxFileSize,\n\t\t\t\tmaxFileSizeDisplay: fieldInfo.maxFileSizeDisplay || ''\n\t\t\t});\n\t\t}\n\n\t\tthis.container.find('.js-image-remove').on('click', (e) => {\n\t\t\te.stopPropagation();\n\t\t\tapp.showConfirmModal({\n\t\t\t\ttext: app.vtranslate('JS_LBL_ARE_YOU_SURE_YOU_WANT_TO_DELETE'),\n\t\t\t\tconfirmedCallback: () => {\n\t\t\t\t\tthis.removeItem(e);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\t/**\n\t * Add image to container\n\t * @param {Object} data\n\t */\n\taddImage(data) {\n\t\tconst item = document.createElement('article');\n\t\titem.setAttribute('class', 'w-100 position-relative js-icon-item');\n\t\titem.setAttribute('data-icon-search', data.name.toLowerCase());\n\t\titem.setAttribute('data-name', data.name);\n\t\titem.setAttribute('data-type', 'image');\n\t\titem.setAttribute('data-src', data.src);\n\t\titem.setAttribute('data-key', data.key);\n\n\t\tconst button = document.createElement('button');\n\t\tbutton.setAttribute('class', 'btn btn-light w-100 h-100');\n\n\t\tconst image = document.createElement('img');\n\t\timage.setAttribute('class', 'icon-img--list');\n\t\timage.setAttribute('src', data.src);\n\n\t\tconst span = document.createElement('span');\n\t\tspan.setAttribute('class', 'c-grid-item--signature u-fs-xs');\n\t\tspan.appendChild(document.createTextNode(data.name));\n\n\t\tbutton.appendChild(image);\n\t\tbutton.appendChild(span);\n\t\titem.appendChild(button);\n\n\t\tthis.getActiveTab().find('#icons-results').append(item);\n\t}\n\t/**\n\t * Register events\n\t */\n\tregisterEvents(container) {\n\t\tthis.container = container;\n\t\tthis.pageLimit = parseInt(this.container.find('.js-page-size').val());\n\t\tthis.searchField = this.container.find('.js-icon-search');\n\t\tthis.setPage();\n\t\tthis.registerPaginationEvents();\n\t\tthis.registerSearchIcon();\n\t\tthis.container.on('shown.bs.tab', 'a[data-toggle=\"tab\"]', () => {\n\t\t\tthis.searchField.trigger('keyup');\n\t\t});\n\t\tthis.registerImageEvents();\n\t}\n};\n"],"names":["_typeof","o","Symbol","iterator","constructor","prototype","_classCallCheck","instance","Constructor","TypeError","_defineProperties","target","props","descriptor","i","length","enumerable","configurable","writable","Object","defineProperty","_toPropertyKey","key","_createClass","protoProps","staticProps","arg","_toPrimitive","String","input","hint","prim","toPrimitive","res","call","Number","window","AppComponents_MediaModal_Js","_class","value","setPage","page","arguments","min","pageLimit","max","tab","getActiveTab","elements","find","addClass","slice","removeClass","container","data","text","eq","registerPaginationEvents","_this","on","currentPage","parseInt","totalPages","Math","ceil","registerSearchIcon","_this2","searchField","e","currentTarget","toString","replace","toLowerCase","concat","removeItem","url","dataset","progressIndicatorElement","$","progressIndicator","position","blockInfo","enabled","AppConnector","request","async","type","done","result","closest","remove","mode","fail","error","err","app","errorLog","registerImageEvents","_this3","fileInput","fieldInfo","trigger","file","App","File","register","fileupload","dataType","replaceFileInput","autoUpload","attach","forEach","fileAttach","uploadError","filesActive","addImage","val","formats","limit","maxFileSize","maxFileSizeDisplay","stopPropagation","showConfirmModal","vtranslate","confirmedCallback","item","document","createElement","setAttribute","name","src","button","image","span","appendChild","createTextNode","append","registerEvents","_this4"],"mappings":";;AAAA,kKACA,YAAY,CAAC,SAAAA,OAAAC,CAAAA,CAAA,mCAAAD,OAAA,CAAA,UAAA,EAAA,OAAAE,MAAA,EAAA,QAAA,EAAA,OAAAA,MAAA,CAAAC,QAAA,CAAAF,SAAAA,CAAA,CAAAA,CAAAA,OAAAA,OAAAA,CAAA,CAAAA,CAAAA,SAAAA,CAAA,CAAAA,CAAAA,OAAAA,CAAA,EAAAC,UAAAA,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D,EAAA;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/Accounts/resources/Detail.min.js b/public_html/layouts/basic/modules/Accounts/resources/Detail.min.js index 73a95e3512f7..46a502421ce7 100644 --- a/public_html/layouts/basic/modules/Accounts/resources/Detail.min.js +++ b/public_html/layouts/basic/modules/Accounts/resources/Detail.min.js @@ -11,7 +11,8 @@ accountHierarchyResponseCache:{},/** * function to get the AccountHierarchy response data * @returns {Promise} - */getAccountHierarchyResponseData:function getAccountHierarchyResponseData(params){var thisInstance=this,aDeferred=jQuery.Deferred();return jQuery.isEmptyObject(thisInstance.accountHierarchyResponseCache)?AppConnector.request(params).done(function(data){thisInstance.accountHierarchyResponseCache=data,aDeferred.resolve(thisInstance.accountHierarchyResponseCache);}):aDeferred.resolve(thisInstance.accountHierarchyResponseCache),aDeferred.promise()},/* + */getAccountHierarchyResponseData:function getAccountHierarchyResponseData(params){var thisInstance=this,aDeferred=jQuery.Deferred();//Check in the cache +return jQuery.isEmptyObject(thisInstance.accountHierarchyResponseCache)?AppConnector.request(params).done(function(data){thisInstance.accountHierarchyResponseCache=data,aDeferred.resolve(thisInstance.accountHierarchyResponseCache);}):aDeferred.resolve(thisInstance.accountHierarchyResponseCache),aDeferred.promise()},/* * function to display the AccountHierarchy response data */displayAccountHierarchyResponseData:function displayAccountHierarchyResponseData(data){var callbackFunction=function(){app.showScrollBar($("#hierarchyScroll"),{height:"300px",railVisible:!0,size:"6px"});};app.showModalWindow(data,function(modalContainer){App.Components.Scrollbar.xy($("#hierarchyScroll",modalContainer)),"function"==typeof callbackFunction&&300<$("#hierarchyScroll",modalContainer).height()&&callbackFunction();});},registerHierarchyRecordCount:function registerHierarchyRecordCount(){var hierarchyButton=$(".detailViewTitle .hierarchy");if(hierarchyButton.length){var params={module:app.getModuleName(),action:"RelationAjax",record:app.getRecordId(),mode:"getHierarchyCount"};AppConnector.request(params).done(function(response){response.success&&$(".detailViewTitle .hierarchy .badge").html(response.result);});}},registerShowHierarchy:function registerShowHierarchy(){var thisInstance=this,hierarchyButton=$(".detailViewTitle"),url="index.php?module=Accounts&view=AccountHierarchy&record="+app.getRecordId();hierarchyButton.on("click",".js-detail__icon, .recordLabelValue",function(){thisInstance.getAccountHierarchyResponseData(url).done(function(data){thisInstance.displayAccountHierarchyResponseData(data);});});},registerEvents:function registerEvents(){this._super(),this.registerHierarchyRecordCount(),this.registerShowHierarchy();}}); //# sourceMappingURL=Detail.min.js.map diff --git a/public_html/layouts/basic/modules/Accounts/resources/Detail.min.js.map b/public_html/layouts/basic/modules/Accounts/resources/Detail.min.js.map index e7df5c7f0347..833958816881 100644 --- a/public_html/layouts/basic/modules/Accounts/resources/Detail.min.js.map +++ b/public_html/layouts/basic/modules/Accounts/resources/Detail.min.js.map @@ -1 +1 @@ -{"version":3,"file":"Detail.min.js","sources":["Detail.js"],"sourcesContent":["/*+***********************************************************************************\n * The contents of this file are subject to the vtiger CRM Public License Version 1.0\n * (\"License\"); You may not use this file except in compliance with the License\n * The Original Code is: vtiger CRM Open Source\n * The Initial Developer of the Original Code is vtiger.\n * Portions created by vtiger are Copyright (C) vtiger.\n * All Rights Reserved.\n *************************************************************************************/\n'use strict';\n\nVtiger_Detail_Js(\n\t'Accounts_Detail_Js',\n\t{},\n\t{\n\t\t//It stores the Account Hierarchy response data\n\t\taccountHierarchyResponseCache: {},\n\t\t/**\n\t\t * function to get the AccountHierarchy response data\n\t\t * @returns {Promise}\n\t\t */\n\t\tgetAccountHierarchyResponseData: function (params) {\n\t\t\tvar thisInstance = this;\n\t\t\tvar aDeferred = jQuery.Deferred();\n\n\t\t\t//Check in the cache\n\t\t\tif (!jQuery.isEmptyObject(thisInstance.accountHierarchyResponseCache)) {\n\t\t\t\taDeferred.resolve(thisInstance.accountHierarchyResponseCache);\n\t\t\t} else {\n\t\t\t\tAppConnector.request(params).done(function (data) {\n\t\t\t\t\t//store it in the cache, so that we dont do multiple request\n\t\t\t\t\tthisInstance.accountHierarchyResponseCache = data;\n\t\t\t\t\taDeferred.resolve(thisInstance.accountHierarchyResponseCache);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn aDeferred.promise();\n\t\t},\n\n\t\t/*\n\t\t * function to display the AccountHierarchy response data\n\t\t */\n\t\tdisplayAccountHierarchyResponseData: function (data) {\n\t\t\tlet callbackFunction = function () {\n\t\t\t\tapp.showScrollBar($('#hierarchyScroll'), {\n\t\t\t\t\theight: '300px',\n\t\t\t\t\trailVisible: true,\n\t\t\t\t\tsize: '6px'\n\t\t\t\t});\n\t\t\t};\n\t\t\tapp.showModalWindow(data, function (modalContainer) {\n\t\t\t\tApp.Components.Scrollbar.xy($('#hierarchyScroll', modalContainer));\n\t\t\t\tif (typeof callbackFunction == 'function' && $('#hierarchyScroll', modalContainer).height() > 300) {\n\t\t\t\t\tcallbackFunction();\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\tregisterHierarchyRecordCount: function () {\n\t\t\tvar hierarchyButton = $('.detailViewTitle .hierarchy');\n\t\t\tif (hierarchyButton.length) {\n\t\t\t\tvar params = {\n\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\taction: 'RelationAjax',\n\t\t\t\t\trecord: app.getRecordId(),\n\t\t\t\t\tmode: 'getHierarchyCount'\n\t\t\t\t};\n\t\t\t\tAppConnector.request(params).done(function (response) {\n\t\t\t\t\tif (response.success) {\n\t\t\t\t\t\t$('.detailViewTitle .hierarchy .badge').html(response.result);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tregisterShowHierarchy: function () {\n\t\t\tvar thisInstance = this;\n\t\t\tvar hierarchyButton = $('.detailViewTitle');\n\t\t\tvar url = 'index.php?module=Accounts&view=AccountHierarchy&record=' + app.getRecordId();\n\t\t\thierarchyButton.on('click', '.js-detail__icon, .recordLabelValue', function (e) {\n\t\t\t\tthisInstance.getAccountHierarchyResponseData(url).done(function (data) {\n\t\t\t\t\tthisInstance.displayAccountHierarchyResponseData(data);\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\tregisterEvents: function () {\n\t\t\tthis._super();\n\t\t\tthis.registerHierarchyRecordCount();\n\t\t\tthis.registerShowHierarchy();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Detail_Js","accountHierarchyResponseCache","getAccountHierarchyResponseData","params","thisInstance","aDeferred","jQuery","Deferred","isEmptyObject","AppConnector","request","done","data","resolve","promise","displayAccountHierarchyResponseData","callbackFunction","app","showScrollBar","$","height","railVisible","size","showModalWindow","modalContainer","App","Components","Scrollbar","xy","registerHierarchyRecordCount","hierarchyButton","length","module","getModuleName","action","record","getRecordId","mode","response","success","html","result","registerShowHierarchy","url","on","registerEvents","_super"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFACA,aAEAA,gBAAgB,CACf,oBADe,CAEf,EAFe,CAGf;AAECC,6BAA6B,CAAE,EAFhC;AAID;AACA;AACA,KACEC,+BAA+B,CAAE,SAAUC,+BAAAA,CAAAA,MAAV,CAAkB,CAC9CC,IAAAA,YAAY,CAAG,IAD+B,CAE9CC,SAAS,CAAGC,MAAM,CAACC,QAAP,EAFkC,CAclD,OATW,MAAA,CAACC,aAAP,CAAqBJ,YAAY,CAACH,6BAAlC,CASL,CANCQ,YAAY,CAACC,OAAb,CAAqBP,MAArB,EAA6BQ,IAA7B,CAAkC,SAAUC,IAAV,CAAgB,CAEjDR,YAAY,CAACH,6BAAb,CAA6CW,IAFI,CAGjDP,SAAS,CAACQ,OAAV,CAAkBT,YAAY,CAACH,6BAA/B,EACA,CAJD,CAMD,CARCI,SAAS,CAACQ,OAAV,CAAkBT,YAAY,CAACH,6BAA/B,CAQD,CAAOI,SAAS,CAACS,OAAV,EACP,CAtBF;AAyBD;AACA,KACEC,mCAAmC,CAAE,SAAA,mCAAA,CAAUH,IAAV,CAAgB,CACpD,IAAII,gBAAgB,CAAG,UAAY,CAClCC,GAAG,CAACC,aAAJ,CAAkBC,CAAC,CAAC,kBAAD,CAAnB,CAAyC,CACxCC,MAAM,CAA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CAACF,+BAAb,CAA6CyC,GAA7C,CAAkDhC,CAAAA,IAAlD,CAAuD,SAAUC,IAAV,CAAgB,CACtER,YAAY,CAACW,mCAAb,CAAiDH,IAAjD,EACA,CAFD,EAGA,CAJD,EAKA,CApEF,CAqECiC,cAAc,CAAE,SAAY,cAAA,EAAA,CAC3B,KAAKC,MAAL,EAD2B,CAE3B,IAAA,CAAKjB,4BAAL,EAF2B,CAG3B,IAAA,CAAKa,qBAAL,GACA,CAzEF,CAHe;;"} \ No newline at end of file +{"version":3,"file":"Detail.min.js","sources":["Detail.js"],"sourcesContent":["/*+***********************************************************************************\n * The contents of this file are subject to the vtiger CRM Public License Version 1.0\n * (\"License\"); You may not use this file except in compliance with the License\n * The Original Code is: vtiger CRM Open Source\n * The Initial Developer of the Original Code is vtiger.\n * Portions created by vtiger are Copyright (C) vtiger.\n * All Rights Reserved.\n *************************************************************************************/\n'use strict';\n\nVtiger_Detail_Js(\n\t'Accounts_Detail_Js',\n\t{},\n\t{\n\t\t//It stores the Account Hierarchy response data\n\t\taccountHierarchyResponseCache: {},\n\t\t/**\n\t\t * function to get the AccountHierarchy response data\n\t\t * @returns {Promise}\n\t\t */\n\t\tgetAccountHierarchyResponseData: function (params) {\n\t\t\tvar thisInstance = this;\n\t\t\tvar aDeferred = jQuery.Deferred();\n\n\t\t\t//Check in the cache\n\t\t\tif (!jQuery.isEmptyObject(thisInstance.accountHierarchyResponseCache)) {\n\t\t\t\taDeferred.resolve(thisInstance.accountHierarchyResponseCache);\n\t\t\t} else {\n\t\t\t\tAppConnector.request(params).done(function (data) {\n\t\t\t\t\t//store it in the cache, so that we dont do multiple request\n\t\t\t\t\tthisInstance.accountHierarchyResponseCache = data;\n\t\t\t\t\taDeferred.resolve(thisInstance.accountHierarchyResponseCache);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn aDeferred.promise();\n\t\t},\n\n\t\t/*\n\t\t * function to display the AccountHierarchy response data\n\t\t */\n\t\tdisplayAccountHierarchyResponseData: function (data) {\n\t\t\tlet callbackFunction = function () {\n\t\t\t\tapp.showScrollBar($('#hierarchyScroll'), {\n\t\t\t\t\theight: '300px',\n\t\t\t\t\trailVisible: true,\n\t\t\t\t\tsize: '6px'\n\t\t\t\t});\n\t\t\t};\n\t\t\tapp.showModalWindow(data, function (modalContainer) {\n\t\t\t\tApp.Components.Scrollbar.xy($('#hierarchyScroll', modalContainer));\n\t\t\t\tif (typeof callbackFunction == 'function' && $('#hierarchyScroll', modalContainer).height() > 300) {\n\t\t\t\t\tcallbackFunction();\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\tregisterHierarchyRecordCount: function () {\n\t\t\tvar hierarchyButton = $('.detailViewTitle .hierarchy');\n\t\t\tif (hierarchyButton.length) {\n\t\t\t\tvar params = {\n\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\taction: 'RelationAjax',\n\t\t\t\t\trecord: app.getRecordId(),\n\t\t\t\t\tmode: 'getHierarchyCount'\n\t\t\t\t};\n\t\t\t\tAppConnector.request(params).done(function (response) {\n\t\t\t\t\tif (response.success) {\n\t\t\t\t\t\t$('.detailViewTitle .hierarchy .badge').html(response.result);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tregisterShowHierarchy: function () {\n\t\t\tvar thisInstance = this;\n\t\t\tvar hierarchyButton = $('.detailViewTitle');\n\t\t\tvar url = 'index.php?module=Accounts&view=AccountHierarchy&record=' + app.getRecordId();\n\t\t\thierarchyButton.on('click', '.js-detail__icon, .recordLabelValue', function (e) {\n\t\t\t\tthisInstance.getAccountHierarchyResponseData(url).done(function (data) {\n\t\t\t\t\tthisInstance.displayAccountHierarchyResponseData(data);\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\tregisterEvents: function () {\n\t\t\tthis._super();\n\t\t\tthis.registerHierarchyRecordCount();\n\t\t\tthis.registerShowHierarchy();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Detail_Js","accountHierarchyResponseCache","getAccountHierarchyResponseData","params","thisInstance","aDeferred","jQuery","Deferred","isEmptyObject","AppConnector","request","done","data","resolve","promise","displayAccountHierarchyResponseData","callbackFunction","app","showScrollBar","$","height","railVisible","size","showModalWindow","modalContainer","App","Components","Scrollbar","xy","registerHierarchyRecordCount","hierarchyButton","length","module","getModuleName","action","record","getRecordId","mode","response","success","html","result","registerShowHierarchy","url","on","registerEvents","_super"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFACA,YAAY,CAEZA,gBAAgB,CACf,oBAAoB,CACpB,EAAE,CACF;AAECC,6BAA6B,CAAE,EAAE;AAEnC;AACA;AACA,KACEC,+BAA+B,CAAE,SAAAA,gCAAUC,MAAM,CAAE,KAC9CC,YAAY,CAAG,IAAI,CACnBC,SAAS,CAAGC,MAAM,CAACC,QAAQ,EAAE,CAEjC;AAUA,OATKD,MAAM,CAACE,aAAa,CAACJ,YAAY,CAACH,6BAA6B,CAAC,CAGpEQ,YAAY,CAACC,OAAO,CAACP,MAAM,CAAC,CAACQ,IAAI,CAAC,SAAUC,IAAI,CAAE,CAEjDR,YAAY,CAACH,6BAA6B,CAAGW,IAAI,CACjDP,SAAS,CAACQ,OAAO,CAACT,YAAY,CAACH,6BAA6B,EAC7D,CAAC,CAAC,CANFI,SAAS,CAACQ,OAAO,CAACT,YAAY,CAACH,6BAA6B,CAAC,CAQvDI,SAAS,CAACS,OAAO,EACzB,CAAC;AAGH;AACA,KACEC,mCAAmC,CAAE,SAAAA,mCAAAA,CAAUH,IAAI,CAAE,CACpD,IAAII,gBAAgB,CAAG,UAAY,CAClCC,GAAG,CAACC,aAAa,CAACC,CAAC,CAAC,kBAAkB,CAAC,CAAE,CACxCC,MAAM,CAAE,OAAO,CACfC,WAAW,CAAA,CAAA,CAAM,CACjBC,IAAI,CAAE,KACP,CAAC,EACF,CAAC,CACDL,GAAG,CAACM,eAAe,CAACX,IAAI,CAAE,SAAUY,cAAc,CAAE,CACnDC,GAAG,CAACC,UAAU,CAACC,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4BAA4B,EAAE,CACnC,IAAI,CAACa,qBAAqB,GAC3B,CACD,CACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/Accounts/resources/ListPreview.min.js b/public_html/layouts/basic/modules/Accounts/resources/ListPreview.min.js index c3aace9f9c68..5be94696a95a 100644 --- a/public_html/layouts/basic/modules/Accounts/resources/ListPreview.min.js +++ b/public_html/layouts/basic/modules/Accounts/resources/ListPreview.min.js @@ -1,6 +1,6 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */"use strict";Vtiger_ListPreview_Js("Accounts_ListPreview_Js",{},{/** +/* {[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]} */"use strict";Vtiger_ListPreview_Js("Accounts_ListPreview_Js",{},{/** * Sets account hierarchy */registerHierarchyRecordCount:function registerHierarchyRecordCount(){var iframe=$(".listPreviewframe");iframe.on("load",function(){var contents=iframe.contents(),hierarchyButton=contents.find(".detailViewTitle .hierarchy");hierarchyButton&&AppConnector.request({module:app.getModuleName(),action:"RelationAjax",record:contents.find("#recordId").val(),mode:"getHierarchyCount"}).done(function(response){response.success&&contents.find(".detailViewTitle .hierarchy .badge").html(response.result);});});},/** * Executes event listener. diff --git a/public_html/layouts/basic/modules/Accounts/resources/ListPreview.min.js.map b/public_html/layouts/basic/modules/Accounts/resources/ListPreview.min.js.map index e96e97c71742..6141a6a544e3 100644 --- a/public_html/layouts/basic/modules/Accounts/resources/ListPreview.min.js.map +++ b/public_html/layouts/basic/modules/Accounts/resources/ListPreview.min.js.map @@ -1 +1 @@ -{"version":3,"file":"ListPreview.min.js","sources":["ListPreview.js"],"sourcesContent":["/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */\n'use strict';\n\nVtiger_ListPreview_Js(\n\t'Accounts_ListPreview_Js',\n\t{},\n\t{\n\t\t/**\n\t\t * Sets account hierarchy\n\t\t */\n\t\tregisterHierarchyRecordCount: function () {\n\t\t\tconst iframe = $('.listPreviewframe');\n\t\t\tiframe.on('load', function () {\n\t\t\t\tvar contents = iframe.contents();\n\t\t\t\tvar hierarchyButton = contents.find('.detailViewTitle .hierarchy');\n\t\t\t\tif (hierarchyButton) {\n\t\t\t\t\tAppConnector.request({\n\t\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\t\taction: 'RelationAjax',\n\t\t\t\t\t\trecord: contents.find('#recordId').val(),\n\t\t\t\t\t\tmode: 'getHierarchyCount'\n\t\t\t\t\t}).done(function (response) {\n\t\t\t\t\t\tif (response.success) {\n\t\t\t\t\t\t\tcontents.find('.detailViewTitle .hierarchy .badge').html(response.result);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Executes event listener.\n\t\t * @param {jQuery} container - current container for reference.\n\t\t */\n\t\tpostLoadListViewRecordsEvents: function (container) {\n\t\t\tthis._super(container);\n\t\t\tthis.registerHierarchyRecordCount();\n\t\t},\n\t\t/**\n\t\t * Registers ListPreview's events.\n\t\t */\n\t\tregisterEvents: function () {\n\t\t\tthis._super();\n\t\t\tthis.registerHierarchyRecordCount();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_ListPreview_Js","registerHierarchyRecordCount","$","iframe","on","contents","hierarchyButton","find","AppConnector","request","module","app","getModuleName","action","record","val","mode","done","response","success","html","result","postLoadListViewRecordsEvents","container","_super","registerEvents"],"mappings":";;AAAA,kKACA,aAEAA,qBAAqB,CACpB,yBADoB,CAEpB,EAFoB,CAGpB;AAED;AACA,KACEC,4BAA4B,CAAE,SAAY,4BAAA,EAAA,CACzC,IAAY,MAAA,CAAGC,CAAC,CAAC,mBAAD,CAAhB,CACAC,MAAM,CAACC,EAAP,CAAU,MAAV,CAAkB,UAAY,CACzBC,IAAAA,QAAQ,CAAGF,MAAM,CAACE,QAAP,EADc,CAEzBC,eAAe,CAAGD,QAAQ,CAACE,IAAT,CAAc,6BAAd,CAFO,CAGzBD,eAHyB,EAI5BE,YAAY,CAACC,OAAb,CAAqB,CACpBC,MAAM,CAAEC,GAAG,CAACC,aAAJ,EADY,CAEpBC,MAAM,CAAE,cAFY,CAGpBC,MAAM,CAAET,QAAQ,CAACE,IAAT,CAAc,WAAd,CAA2BQ,CAAAA,GAA3B,EAHY,CAIpBC,IAAI,CAAE,mBAJc,CAArB,CAKGC,CAAAA,IALH,CAKQ,SAAUC,QAAV,CAAoB,CACvBA,QAAQ,CAACC,OADc,EAE1Bd,QAAQ,CAACE,IAAT,CAAc,oCAAd,CAAA,CAAoDa,IAApD,CAAyDF,QAAQ,CAACG,MAAlE,EAED,CATD,EAWD,CAfD,EAgBA,CAtBF;AAwBD;AACA;AACA,KACEC,6BAA6B,CAAE,SAAA,6BAAA,CAAUC,SAAV,CAAqB,CACnD,IAAKC,CAAAA,MAAL,CAAYD,SAAZ,CADmD,CAEnD,IAAA,CAAKtB,4BAAL,GACA,CA9BF;AAgCD;AACA,KACEwB,cAAc,CAAE,SAAY,cAAA,EAAA,CAC3B,IAAKD,CAAAA,MAAL,EAD2B,CAE3B,IAAKvB,CAAAA,4BAAL,GACA,CArCF,CAHoB;;"} \ No newline at end of file +{"version":3,"file":"ListPreview.min.js","sources":["ListPreview.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\nVtiger_ListPreview_Js(\n\t'Accounts_ListPreview_Js',\n\t{},\n\t{\n\t\t/**\n\t\t * Sets account hierarchy\n\t\t */\n\t\tregisterHierarchyRecordCount: function () {\n\t\t\tconst iframe = $('.listPreviewframe');\n\t\t\tiframe.on('load', function () {\n\t\t\t\tvar contents = iframe.contents();\n\t\t\t\tvar hierarchyButton = contents.find('.detailViewTitle .hierarchy');\n\t\t\t\tif (hierarchyButton) {\n\t\t\t\t\tAppConnector.request({\n\t\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\t\taction: 'RelationAjax',\n\t\t\t\t\t\trecord: contents.find('#recordId').val(),\n\t\t\t\t\t\tmode: 'getHierarchyCount'\n\t\t\t\t\t}).done(function (response) {\n\t\t\t\t\t\tif (response.success) {\n\t\t\t\t\t\t\tcontents.find('.detailViewTitle .hierarchy .badge').html(response.result);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Executes event listener.\n\t\t * @param {jQuery} container - current container for reference.\n\t\t */\n\t\tpostLoadListViewRecordsEvents: function (container) {\n\t\t\tthis._super(container);\n\t\t\tthis.registerHierarchyRecordCount();\n\t\t},\n\t\t/**\n\t\t * Registers ListPreview's events.\n\t\t */\n\t\tregisterEvents: function () {\n\t\t\tthis._super();\n\t\t\tthis.registerHierarchyRecordCount();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_ListPreview_Js","registerHierarchyRecordCount","iframe","$","on","contents","hierarchyButton","find","AppConnector","request","module","app","getModuleName","action","record","val","mode","done","response","success","html","result","postLoadListViewRecordsEvents","container","_super","registerEvents"],"mappings":";;AAAA,kKACA,YAAY,CAEZA,qBAAqB,CACpB,yBAAyB,CACzB,EAAE,CACF;AAED;AACA,KACEC,4BAA4B,CAAE,SAAAA,4BAAAA,EAAY,CACzC,IAAMC,MAAM,CAAGC,CAAC,CAAC,mBAAmB,CAAC,CACrCD,MAAM,CAACE,EAAE,CAAC,MAAM,CAAE,UAAY,CAAA,IACzBC,QAAQ,CAAGH,MAAM,CAACG,QAAQ,EAAE,CAC5BC,eAAe,CAAGD,QAAQ,CAACE,IAAI,CAAC,6BAA6B,CAAC,CAC9DD,eAAe,EAClBE,YAAY,CAACC,OAAO,CAAC,CACpBC,MAAM,CAAEC,GAAG,CAACC,aAAa,EAAE,CAC3BC,MAAM,CAAE,cAAc,CACtBC,MAAM,CAAET,QAAQ,CAACE,IAAI,CAAC,WAAW,CAAC,CAACQ,GAAG,EAAE,CACxCC,IAAI,CAAE,mBACP,CAAC,CAAC,CAACC,IAAI,CAAC,SAAUC,QAAQ,CAAE,CACvBA,QAAQ,CAACC,OAAO,EACnBd,QAAQ,CAACE,IAAI,CAAC,oCAAoC,CAAC,CAACa,IAAI,CAACF,QAAQ,CAACG,MAAM,EAE1E,CAAC,EAEH,CAAC,EACF,CAAC;AAEH;AACA;AACA,KACEC,6BAA6B,CAAE,SAAAA,6BAAAA,CAAUC,SAAS,CAAE,CACnD,IAAI,CAACC,MAAM,CAACD,SAAS,CAAC,CACtB,IAAI,CAACtB,4BAA4B,GAClC,CAAC;AAEH;AACA,KACEwB,cAAc,CAAE,SAAAA,gBAAY,CAC3B,IAAI,CAACD,MAAM,EAAE,CACb,IAAI,CAACvB,4BAA4B,GAClC,CACD,CACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/Calendar/resources/ActivityStateModal.min.js b/public_html/layouts/basic/modules/Calendar/resources/ActivityStateModal.min.js index ef23a216f3e3..f356cfda8eb1 100644 --- a/public_html/layouts/basic/modules/Calendar/resources/ActivityStateModal.min.js +++ b/public_html/layouts/basic/modules/Calendar/resources/ActivityStateModal.min.js @@ -1,5 +1,5 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */"use strict";jQuery.Class("Calendar_ActivityStateModal_Js",{},{registerActivityState:function registerActivityState(){var self=this;$(".js-activity-buttons button:not(.close)").on("click",function(e){var currentTarget=$(e.currentTarget),viewName=app.getViewName();if(app.hideModalWindow(),1===currentTarget.data("type"))self.updateActivityState(currentTarget);else {var isReminder=currentTarget.closest("#calendar-reminder-modal").length;if("Calendar"===app.getModuleName()&&"CalendarExtended"===viewName&&!isReminder){var calendarInstance=new Calendar_Calendar_Js;calendarInstance.getCalendarSidebarData({module:"Calendar",view:"EventForm",record:currentTarget.data("id"),isDuplicate:!0,addRelation:!0,sourceModule:"Calendar",sourceRecord:currentTarget.data("id")});}else if(currentTarget.hasClass("showQuickCreate")||isReminder){var progressIndicatorElement=$.progressIndicator({position:"html",blockInfo:{enabled:!0}}),url="index.php?module=Calendar&view=QuickCreateAjax&addRelation=true&sourceModule=Calendar&sourceRecord="+currentTarget.data("id")+"&fillFields=all",params={};params.noCache=!0,App.Components.QuickCreate.getForm(url,"Calendar",params).done(function(data){progressIndicatorElement.progressIndicator({mode:"hide"}),App.Components.QuickCreate.showModal(data,{callbackFunction:function callbackFunction(data){data&&data.success&&data.result.followup.value==currentTarget.data("id")&&self.updateActivityState(currentTarget);}});});}}});},updateActivityState:function updateActivityState(currentTarget){var params={module:"Calendar",action:"ActivityStateAjax",record:currentTarget.data("id"),state:currentTarget.data("state")};app.hideModalWindow();var progressIndicatorElement=jQuery.progressIndicator({position:"html",blockInfo:{enabled:!0}});AppConnector.request(params).done(function(data){if(data.success){var viewName=app.getViewName();if("Detail"===viewName){var thisInstance=Vtiger_Detail_Js.getInstance(),widget=$(".activityWidgetContainer .widgetContentBlock");if(widget.length)thisInstance.loadWidget(widget);else {var recentActivitiesTab=thisInstance.getTabByLabel(thisInstance.detailViewRecentActivitiesTabLabel);recentActivitiesTab&&recentActivitiesTab.trigger("click"),"Calendar"===app.getModuleName()&&(recentActivitiesTab=thisInstance.getSelectedTab().length&&thisInstance.getSelectedTab().data("linkKey")!=thisInstance.detailViewDetailsTabLabel?$("
"):thisInstance.getTabContainer().find("[data-link-key=\""+thisInstance.detailViewDetailsTabLabel+"\"]:not(.d-none)"),$(".showModal.closeCalendarRekord").addClass("d-none"),recentActivitiesTab.trigger("click"));}}if("List"===viewName){var listinstance=new Vtiger_List_Js;listinstance.getListViewRecords();}if("DashBoard"===viewName&&new Vtiger_DashBoard_Js().getContainer().find(".js-widget-refresh").trigger("click"),"Calendar"===app.getModuleName()&&("Calendar"===viewName||"CalendarExtended"===viewName)){var calendarInstance=new window["Calendar_".concat(viewName,"_Js")];calendarInstance.loadCalendarData(),calendarInstance.getCalendarCreateView();}//updates the Calendar Reminder popup's status -Vtiger_Index_Js.requestReminder(),progressIndicatorElement.progressIndicator({mode:"hide"});}else return !1});},registerEvents:function registerEvents(){this.registerActivityState();}}),jQuery(document).ready(function(){var instance=new Calendar_ActivityStateModal_Js;instance.registerEvents();}); +/* {[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]} */"use strict";jQuery.Class("Calendar_ActivityStateModal_Js",{},{registerActivityState:function registerActivityState(){var self=this;$(".js-activity-buttons button:not(.close)").on("click",function(e){var currentTarget=$(e.currentTarget),viewName=app.getViewName();if(app.hideModalWindow(),1===currentTarget.data("type"))self.updateActivityState(currentTarget);else {var isReminder=currentTarget.closest("#calendar-reminder-modal").length;if(currentTarget.hasClass("showQuickCreate")||isReminder){var progressIndicatorElement=$.progressIndicator({position:"html",blockInfo:{enabled:!0}}),url="index.php?module=Calendar&view=QuickCreateAjax&addRelation=true&sourceModule=Calendar&sourceRecord="+currentTarget.data("id")+"&fillFields=all",params={};params.noCache=!0,App.Components.QuickCreate.getForm(url,"Calendar",params).done(function(data){progressIndicatorElement.progressIndicator({mode:"hide"}),App.Components.QuickCreate.showModal(data,{callbackFunction:function callbackFunction(data){data&&data.success&&data.result.followup.value==currentTarget.data("id")&&self.updateActivityState(currentTarget);}});});}}});},updateActivityState:function updateActivityState(currentTarget){var params={module:"Calendar",action:"ActivityStateAjax",record:currentTarget.data("id"),state:currentTarget.data("state")};app.hideModalWindow();var progressIndicatorElement=jQuery.progressIndicator({position:"html",blockInfo:{enabled:!0}});AppConnector.request(params).done(function(data){if(data.success){var viewName=app.getViewName();if("Detail"===viewName){var thisInstance=Vtiger_Detail_Js.getInstance(),widget=$(".activityWidgetContainer .widgetContentBlock");if(widget.length)thisInstance.loadWidget(widget);else {var recentActivitiesTab=thisInstance.getTabByLabel(thisInstance.detailViewRecentActivitiesTabLabel);recentActivitiesTab&&recentActivitiesTab.trigger("click"),"Calendar"===app.getModuleName()&&(recentActivitiesTab=thisInstance.getSelectedTab().length&&thisInstance.getSelectedTab().data("linkKey")!=thisInstance.detailViewDetailsTabLabel?$("
"):thisInstance.getTabContainer().find("[data-link-key=\""+thisInstance.detailViewDetailsTabLabel+"\"]:not(.d-none)"),$(".showModal.closeCalendarRekord").addClass("d-none"),recentActivitiesTab.trigger("click"));}}if("List"===viewName){var listinstance=new Vtiger_List_Js;listinstance.getListViewRecords();}//updates the Calendar Reminder popup's status +"DashBoard"===viewName&&new Vtiger_DashBoard_Js().getContainer().find(".js-widget-refresh").trigger("click"),"Calendar"===app.getModuleName()&&"Calendar"===viewName&&(app.pageController.loadCalendarData(),app.pageController.getCalendarCreateView()),Vtiger_Index_Js.requestReminder(),progressIndicatorElement.progressIndicator({mode:"hide"});}else return !1});},registerEvents:function registerEvents(){this.registerActivityState();}}),jQuery(document).ready(function(){var instance=new Calendar_ActivityStateModal_Js;instance.registerEvents();}); //# sourceMappingURL=ActivityStateModal.min.js.map diff --git a/public_html/layouts/basic/modules/Calendar/resources/ActivityStateModal.min.js.map b/public_html/layouts/basic/modules/Calendar/resources/ActivityStateModal.min.js.map index 7df86bbcf974..ee5df8a85aaf 100644 --- a/public_html/layouts/basic/modules/Calendar/resources/ActivityStateModal.min.js.map +++ b/public_html/layouts/basic/modules/Calendar/resources/ActivityStateModal.min.js.map @@ -1 +1 @@ -{"version":3,"file":"ActivityStateModal.min.js","sources":["ActivityStateModal.js"],"sourcesContent":["/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */\n'use strict';\n\njQuery.Class(\n\t'Calendar_ActivityStateModal_Js',\n\t{},\n\t{\n\t\tregisterActivityState() {\n\t\t\tconst self = this;\n\t\t\t$('.js-activity-buttons button:not(.close)').on('click', function (e) {\n\t\t\t\tlet currentTarget = $(e.currentTarget),\n\t\t\t\t\tviewName = app.getViewName();\n\t\t\t\tapp.hideModalWindow();\n\t\t\t\tif (1 === currentTarget.data('type')) {\n\t\t\t\t\tself.updateActivityState(currentTarget);\n\t\t\t\t} else {\n\t\t\t\t\tlet isReminder = currentTarget.closest('#calendar-reminder-modal').length;\n\t\t\t\t\tif (app.getModuleName() === 'Calendar' && viewName === 'CalendarExtended' && !isReminder) {\n\t\t\t\t\t\tlet calendarInstance = new Calendar_Calendar_Js();\n\t\t\t\t\t\tcalendarInstance.getCalendarSidebarData({\n\t\t\t\t\t\t\tmodule: 'Calendar',\n\t\t\t\t\t\t\tview: 'EventForm',\n\t\t\t\t\t\t\trecord: currentTarget.data('id'),\n\t\t\t\t\t\t\tisDuplicate: true,\n\t\t\t\t\t\t\taddRelation: true,\n\t\t\t\t\t\t\tsourceModule: 'Calendar',\n\t\t\t\t\t\t\tsourceRecord: currentTarget.data('id')\n\t\t\t\t\t\t});\n\t\t\t\t\t} else if (currentTarget.hasClass('showQuickCreate') || isReminder) {\n\t\t\t\t\t\tlet progressIndicatorElement = $.progressIndicator({\n\t\t\t\t\t\t\t\tposition: 'html',\n\t\t\t\t\t\t\t\tblockInfo: {\n\t\t\t\t\t\t\t\t\tenabled: true\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\turl =\n\t\t\t\t\t\t\t\t'index.php?module=Calendar&view=QuickCreateAjax&addRelation=true&sourceModule=Calendar&sourceRecord=' +\n\t\t\t\t\t\t\t\tcurrentTarget.data('id') +\n\t\t\t\t\t\t\t\t'&fillFields=all',\n\t\t\t\t\t\t\tparams = {};\n\t\t\t\t\t\tparams.noCache = true;\n\t\t\t\t\t\tApp.Components.QuickCreate.getForm(url, 'Calendar', params).done(function (data) {\n\t\t\t\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\t\tApp.Components.QuickCreate.showModal(data, {\n\t\t\t\t\t\t\t\tcallbackFunction: function (data) {\n\t\t\t\t\t\t\t\t\tif (data && data.success && data.result.followup.value == currentTarget.data('id')) {\n\t\t\t\t\t\t\t\t\t\tself.updateActivityState(currentTarget);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tupdateActivityState: function (currentTarget) {\n\t\t\tlet params = {\n\t\t\t\tmodule: 'Calendar',\n\t\t\t\taction: 'ActivityStateAjax',\n\t\t\t\trecord: currentTarget.data('id'),\n\t\t\t\tstate: currentTarget.data('state')\n\t\t\t};\n\t\t\tapp.hideModalWindow();\n\t\t\tlet progressIndicatorElement = jQuery.progressIndicator({\n\t\t\t\tposition: 'html',\n\t\t\t\tblockInfo: {\n\t\t\t\t\tenabled: true\n\t\t\t\t}\n\t\t\t});\n\t\t\tAppConnector.request(params).done(function (data) {\n\t\t\t\tif (data.success) {\n\t\t\t\t\tlet viewName = app.getViewName();\n\t\t\t\t\tif (viewName === 'Detail') {\n\t\t\t\t\t\tconst thisInstance = Vtiger_Detail_Js.getInstance();\n\t\t\t\t\t\tlet widget = $('.activityWidgetContainer .widgetContentBlock');\n\t\t\t\t\t\tif (widget.length) {\n\t\t\t\t\t\t\tthisInstance.loadWidget(widget);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlet recentActivitiesTab = thisInstance.getTabByLabel(thisInstance.detailViewRecentActivitiesTabLabel);\n\t\t\t\t\t\t\tif (recentActivitiesTab) {\n\t\t\t\t\t\t\t\trecentActivitiesTab.trigger('click');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (app.getModuleName() === 'Calendar') {\n\t\t\t\t\t\t\t\trecentActivitiesTab =\n\t\t\t\t\t\t\t\t\t!thisInstance.getSelectedTab().length ||\n\t\t\t\t\t\t\t\t\tthisInstance.getSelectedTab().data('linkKey') == thisInstance.detailViewDetailsTabLabel\n\t\t\t\t\t\t\t\t\t\t? thisInstance\n\t\t\t\t\t\t\t\t\t\t\t\t.getTabContainer()\n\t\t\t\t\t\t\t\t\t\t\t\t.find('[data-link-key=\"' + thisInstance.detailViewDetailsTabLabel + '\"]:not(.d-none)')\n\t\t\t\t\t\t\t\t\t\t: $('
');\n\t\t\t\t\t\t\t\t$('.showModal.closeCalendarRekord').addClass('d-none');\n\t\t\t\t\t\t\t\trecentActivitiesTab.trigger('click');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (viewName === 'List') {\n\t\t\t\t\t\tlet listinstance = new Vtiger_List_Js();\n\t\t\t\t\t\tlistinstance.getListViewRecords();\n\t\t\t\t\t}\n\t\t\t\t\tif (viewName === 'DashBoard') {\n\t\t\t\t\t\tnew Vtiger_DashBoard_Js().getContainer().find('.js-widget-refresh').trigger('click');\n\t\t\t\t\t}\n\t\t\t\t\tif (app.getModuleName() === 'Calendar' && (viewName === 'Calendar' || viewName === 'CalendarExtended')) {\n\t\t\t\t\t\tconst calendarInstance = new window[`Calendar_${viewName}_Js`]();\n\t\t\t\t\t\tcalendarInstance.loadCalendarData();\n\t\t\t\t\t\tcalendarInstance.getCalendarCreateView();\n\t\t\t\t\t}\n\t\t\t\t\t//updates the Calendar Reminder popup's status\n\t\t\t\t\tVtiger_Index_Js.requestReminder();\n\t\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tregisterEvents: function () {\n\t\t\tthis.registerActivityState();\n\t\t}\n\t}\n);\n\njQuery(document).ready(function (e) {\n\tvar instance = new Calendar_ActivityStateModal_Js();\n\tinstance.registerEvents();\n});\n"],"names":["jQuery","Class","registerActivityState","self","$","on","e","currentTarget","viewName","app","getViewName","hideModalWindow","data","updateActivityState","isReminder","closest","length","getModuleName","calendarInstance","getCalendarSidebarData","module","view","record","isDuplicate","addRelation","sourceModule","sourceRecord","hasClass","progressIndicatorElement","progressIndicator","position","blockInfo","enabled","url","params","noCache","App","Components","QuickCreate","getForm","done","mode","showModal","callbackFunction","success","result","followup","value","action","state","AppConnector","request","Vtiger_Detail_Js","getInstance","widget","thisInstance","loadWidget","recentActivitiesTab","getTabByLabel","detailViewRecentActivitiesTabLabel","trigger","getSelectedTab","detailViewDetailsTabLabel","getTabContainer","find","addClass","Vtiger_List_Js","listinstance","getListViewRecords","Vtiger_DashBoard_Js","getContainer","loadCalendarData","getCalendarCreateView","Vtiger_Index_Js","requestReminder","registerEvents","document","ready","instance"],"mappings":";;AAAA,kKACA,YAEAA,CAAAA,MAAM,CAACC,KAAP,CACC,gCADD,CAEC,EAFD,CAGC,CACCC,qBADD,CAAA,SAAA,qBAAA,EACyB,CACvB,IAAMC,IAAI,CAAG,IAAb,CACAC,CAAC,CAAC,yCAAD,CAAD,CAA6CC,EAA7C,CAAgD,OAAhD,CAAyD,SAAUC,CAAV,CAAa,CACrE,IAAIC,aAAa,CAAGH,CAAC,CAACE,CAAC,CAACC,aAAH,CAArB,CACCC,QAAQ,CAAGC,GAAG,CAACC,WAAJ,EADZ,CAGA,GADAD,GAAG,CAACE,eAAJ,EACA,CAAI,CAAMJ,GAAAA,aAAa,CAACK,IAAd,CAAmB,MAAnB,CAAV,CACCT,IAAI,CAACU,mBAAL,CAAyBN,aAAzB,CADD,CAEO,KAAA,CACN,IAAIO,UAAU,CAAGP,aAAa,CAACQ,OAAd,CAAsB,0BAAtB,CAAkDC,CAAAA,MAAnE,CACA,GAA4B,UAAxB,GAAAP,GAAG,CAACQ,aAAJ,EAAmD,EAAA,kBAAb,GAAAT,QAAtC,EAAyE,CAACM,UAA9E,CAA0F,CACzF,IAAII,gBAAgB,CAAG,wBAAvB,CACAA,gBAAgB,CAACC,sBAAjB,CAAwC,CACvCC,MAAM,CAAE,UAD+B,CAEvCC,IAAI,CAAE,WAFiC,CAGvCC,MAAM,CAAEf,aAAa,CAACK,IAAd,CAAmB,IAAnB,CAH+B,CAIvCW,WAAW,CAJ4B,CAAA,CAAA,CAKvCC,WAAW,CAL4B,CAAA,CAAA,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,CAaL1D,CAAC,CAAC,gCAAD,CAAD,CAAoC6D,QAApC,CAA6C,QAA7C,CAbK,CAcLR,mBAAmB,CAACG,OAApB,CAA4B,OAA5B,CAdK,EAgBN,CACD,CACD,GAAiB,MAAb,GAAApD,QAAJ,CAAyB,CACxB,IAAgB,YAAA,CAAG,IAAI0D,cAAvB,CACAC,YAAY,CAACC,kBAAb,GACA,CAID,GAHiB,WAAb,GAAA5D,QAGJ,EAFC,IAAI6D,mBAAJ,GAA0BC,YAA1B,EAAA,CAAyCN,IAAzC,CAA8C,oBAA9C,CAAA,CAAoEJ,OAApE,CAA4E,OAA5E,CAED,CAA4B,UAAxB,GAAAnD,GAAG,CAACQ,aAAJ,EAAA,GAAoD,UAAb,GAAAT,QAAQ,EAAgC,kBAAb,GAAAA,QAAlE,CAAJ,CAAwG,CACvG,IAAMU,gBAAgB,CAAG,IAAU,MAAA,CAAA,WAAA,CAAA,MAAA,CAAaV,QAAb,CAAA,KAAA,CAAA,CAAnC,CACAU,gBAAgB,CAACqD,gBAAjB,EAFuG,CAGvGrD,gBAAgB,CAACsD,qBAAjB,GACA,CACD;AACAC,eAAe,CAACC,eAAhB,EAtCiB,CAuCjB9C,wBAAwB,CAACC,iBAAzB,CAA2C,CAAEY,IAAI,CAAE,MAAR,CAA3C,EACA,CAxCD,KAyCC,OAAA,CAAA,CAED,CA5CD,EA6CA,CA5GF,CA6GCkC,cAAc,CAAE,SAAA,cAAA,EAAY,CAC3B,IAAA,CAAKzE,qBAAL,GACA,CA/GF,CAHD,EAsHAF,MAAM,CAAC4E,QAAD,CAAN,CAAiBC,KAAjB,CAAuB,UAAa,CACnC,IAAIC,QAAQ,CAAG,IAAf,8BAAA,CACAA,QAAQ,CAACH,cAAT,GACA,CAHD;;"} \ No newline at end of file +{"version":3,"file":"ActivityStateModal.min.js","sources":["ActivityStateModal.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\njQuery.Class(\n\t'Calendar_ActivityStateModal_Js',\n\t{},\n\t{\n\t\tregisterActivityState() {\n\t\t\tconst self = this;\n\t\t\t$('.js-activity-buttons button:not(.close)').on('click', function (e) {\n\t\t\t\tlet currentTarget = $(e.currentTarget),\n\t\t\t\t\tviewName = app.getViewName();\n\t\t\t\tapp.hideModalWindow();\n\t\t\t\tif (1 === currentTarget.data('type')) {\n\t\t\t\t\tself.updateActivityState(currentTarget);\n\t\t\t\t} else {\n\t\t\t\t\tlet isReminder = currentTarget.closest('#calendar-reminder-modal').length;\n\t\t\t\t\tif (currentTarget.hasClass('showQuickCreate') || isReminder) {\n\t\t\t\t\t\tlet progressIndicatorElement = $.progressIndicator({\n\t\t\t\t\t\t\t\tposition: 'html',\n\t\t\t\t\t\t\t\tblockInfo: {\n\t\t\t\t\t\t\t\t\tenabled: true\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\turl =\n\t\t\t\t\t\t\t\t'index.php?module=Calendar&view=QuickCreateAjax&addRelation=true&sourceModule=Calendar&sourceRecord=' +\n\t\t\t\t\t\t\t\tcurrentTarget.data('id') +\n\t\t\t\t\t\t\t\t'&fillFields=all',\n\t\t\t\t\t\t\tparams = {};\n\t\t\t\t\t\tparams.noCache = true;\n\t\t\t\t\t\tApp.Components.QuickCreate.getForm(url, 'Calendar', params).done(function (data) {\n\t\t\t\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\t\tApp.Components.QuickCreate.showModal(data, {\n\t\t\t\t\t\t\t\tcallbackFunction: function (data) {\n\t\t\t\t\t\t\t\t\tif (data && data.success && data.result.followup.value == currentTarget.data('id')) {\n\t\t\t\t\t\t\t\t\t\tself.updateActivityState(currentTarget);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tupdateActivityState: function (currentTarget) {\n\t\t\tlet params = {\n\t\t\t\tmodule: 'Calendar',\n\t\t\t\taction: 'ActivityStateAjax',\n\t\t\t\trecord: currentTarget.data('id'),\n\t\t\t\tstate: currentTarget.data('state')\n\t\t\t};\n\t\t\tapp.hideModalWindow();\n\t\t\tlet progressIndicatorElement = jQuery.progressIndicator({\n\t\t\t\tposition: 'html',\n\t\t\t\tblockInfo: {\n\t\t\t\t\tenabled: true\n\t\t\t\t}\n\t\t\t});\n\t\t\tAppConnector.request(params).done(function (data) {\n\t\t\t\tif (data.success) {\n\t\t\t\t\tlet viewName = app.getViewName();\n\t\t\t\t\tif (viewName === 'Detail') {\n\t\t\t\t\t\tconst thisInstance = Vtiger_Detail_Js.getInstance();\n\t\t\t\t\t\tlet widget = $('.activityWidgetContainer .widgetContentBlock');\n\t\t\t\t\t\tif (widget.length) {\n\t\t\t\t\t\t\tthisInstance.loadWidget(widget);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlet recentActivitiesTab = thisInstance.getTabByLabel(thisInstance.detailViewRecentActivitiesTabLabel);\n\t\t\t\t\t\t\tif (recentActivitiesTab) {\n\t\t\t\t\t\t\t\trecentActivitiesTab.trigger('click');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (app.getModuleName() === 'Calendar') {\n\t\t\t\t\t\t\t\trecentActivitiesTab =\n\t\t\t\t\t\t\t\t\t!thisInstance.getSelectedTab().length ||\n\t\t\t\t\t\t\t\t\tthisInstance.getSelectedTab().data('linkKey') == thisInstance.detailViewDetailsTabLabel\n\t\t\t\t\t\t\t\t\t\t? thisInstance\n\t\t\t\t\t\t\t\t\t\t\t\t.getTabContainer()\n\t\t\t\t\t\t\t\t\t\t\t\t.find('[data-link-key=\"' + thisInstance.detailViewDetailsTabLabel + '\"]:not(.d-none)')\n\t\t\t\t\t\t\t\t\t\t: $('
');\n\t\t\t\t\t\t\t\t$('.showModal.closeCalendarRekord').addClass('d-none');\n\t\t\t\t\t\t\t\trecentActivitiesTab.trigger('click');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (viewName === 'List') {\n\t\t\t\t\t\tlet listinstance = new Vtiger_List_Js();\n\t\t\t\t\t\tlistinstance.getListViewRecords();\n\t\t\t\t\t}\n\t\t\t\t\tif (viewName === 'DashBoard') {\n\t\t\t\t\t\tnew Vtiger_DashBoard_Js().getContainer().find('.js-widget-refresh').trigger('click');\n\t\t\t\t\t}\n\t\t\t\t\tif (app.getModuleName() === 'Calendar' && viewName === 'Calendar') {\n\t\t\t\t\t\tapp.pageController.loadCalendarData();\n\t\t\t\t\t\tapp.pageController.getCalendarCreateView();\n\t\t\t\t\t}\n\t\t\t\t\t//updates the Calendar Reminder popup's status\n\t\t\t\t\tVtiger_Index_Js.requestReminder();\n\t\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tregisterEvents: function () {\n\t\t\tthis.registerActivityState();\n\t\t}\n\t}\n);\n\njQuery(document).ready(function (e) {\n\tvar instance = new Calendar_ActivityStateModal_Js();\n\tinstance.registerEvents();\n});\n"],"names":["jQuery","Class","registerActivityState","self","$","on","e","currentTarget","viewName","app","getViewName","hideModalWindow","data","updateActivityState","isReminder","closest","length","hasClass","progressIndicatorElement","progressIndicator","position","blockInfo","enabled","url","params","noCache","App","Components","QuickCreate","getForm","done","mode","showModal","callbackFunction","success","result","followup","value","module","action","record","state","AppConnector","request","thisInstance","Vtiger_Detail_Js","getInstance","widget","loadWidget","recentActivitiesTab","getTabByLabel","detailViewRecentActivitiesTabLabel","trigger","getModuleName","getSelectedTab","detailViewDetailsTabLabel","getTabContainer","find","addClass","listinstance","Vtiger_List_Js","getListViewRecords","Vtiger_DashBoard_Js","getContainer","pageController","loadCalendarData","getCalendarCreateView","Vtiger_Index_Js","requestReminder","registerEv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,MAAM,CAACsE,QAAQ,CAAC,CAACC,KAAK,CAAC,UAAa,CACnC,IAAIC,QAAQ,CAAG,IAAIC,8BAAgC,CACnDD,QAAQ,CAACH,cAAc,GACxB,CAAC,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/Calendar/resources/CalendarQuickCreate.min.js b/public_html/layouts/basic/modules/Calendar/resources/CalendarQuickCreate.min.js index 7e4cf0317d1c..fcefe63e516f 100644 --- a/public_html/layouts/basic/modules/Calendar/resources/CalendarQuickCreate.min.js +++ b/public_html/layouts/basic/modules/Calendar/resources/CalendarQuickCreate.min.js @@ -1,9 +1,9 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */"use strict";/** +/* {[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]} */"use strict";/** * Class representing a modal calendar. * @extends Calendar_Calendar_Js - */function _typeof(obj){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var descriptor,i=0;iarguments.length?target:receiver):desc.value}},_get.apply(this,arguments)}function _superPropBase(object,property){for(;!Object.prototype.hasOwnProperty.call(object,property)&&(object=_getPrototypeOf(object),null!==object););return object}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return !1;if(Reflect.construct.sham)return !1;if("function"==typeof Proxy)return !0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return !1}}function _getPrototypeOf(o){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(o){return o.__proto__||Object.getPrototypeOf(o)},_getPrototypeOf(o)}window.Calendar_CalendarQuickCreate_Js=/*#__PURE__*/function(_Calendar_Calendar_Js){function Calendar_CalendarQuickCreate_Js(container,readonly){var _this;return _classCallCheck(this,Calendar_CalendarQuickCreate_Js),_this=_super.call(this,container,readonly),_this.isSwitchAllDays=!1,_this.sidebarName="add",_this.eventCreate=!1,_this.module="Calendar",_this.renderCalendar(),_this.registerEvents(),_this}/** + */function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var descriptor,i=0;iarguments.length?target:receiver):desc.value}},_get.apply(this,arguments)}function _superPropBase(object,property){for(;!Object.prototype.hasOwnProperty.call(object,property)&&(object=_getPrototypeOf(object),null!==object););return object}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return !1;if(Reflect.construct.sham)return !1;if("function"==typeof Proxy)return !0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return !1}}function _getPrototypeOf(o){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(o){return o.__proto__||Object.getPrototypeOf(o)},_getPrototypeOf(o)}window.Calendar_CalendarQuickCreate_Js=/*#__PURE__*/function(_Calendar_Calendar_Js){function Calendar_CalendarQuickCreate_Js(container,readonly){var _this;return _classCallCheck(this,Calendar_CalendarQuickCreate_Js),_this=_super.call(this,container,readonly),_this.isSwitchAllDays=!1,_this.sidebarName="add",_this.eventCreate=!1,_this.module="Calendar",_this.renderCalendar(),_this.registerEvents(),_this}/** * Function sets calendar module's options * @returns {{eventClick: function, headerToolbar: object, selectable: boolean}} */_inherits(Calendar_CalendarQuickCreate_Js,_Calendar_Calendar_Js);var _super=_createSuper(Calendar_CalendarQuickCreate_Js);return _createClass(Calendar_CalendarQuickCreate_Js,[{key:"setCalendarModuleOptions",value:function setCalendarModuleOptions(){var options=_get(_getPrototypeOf(Calendar_CalendarQuickCreate_Js.prototype),"setCalendarModuleOptions",this).call(this);return options.selectable=!0,options.headerToolbar={left:"dayGridMonth,".concat(app.getMainParams("weekView"),",").concat(app.getMainParams("dayView"),",today"),center:"prevYear,prev,title,next,nextYear",right:""},options.eventClick=function(info){info.jsEvent.preventDefault();},options}/** diff --git a/public_html/layouts/basic/modules/Calendar/resources/CalendarQuickCreate.min.js.map b/public_html/layouts/basic/modules/Calendar/resources/CalendarQuickCreate.min.js.map index 775a182b8485..1eeac7b61edc 100644 --- a/public_html/layouts/basic/modules/Calendar/resources/CalendarQuickCreate.min.js.map +++ b/public_html/layouts/basic/modules/Calendar/resources/CalendarQuickCreate.min.js.map @@ -1 +1 @@ -{"version":3,"file":"CalendarQuickCreate.min.js","sources":["CalendarQuickCreate.js"],"sourcesContent":["/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */\n'use strict';\n\n/**\n * Class representing a modal calendar.\n * @extends Calendar_Calendar_Js\n */\nwindow.Calendar_CalendarQuickCreate_Js = class Calendar_CalendarQuickCreate_Js extends Calendar_Calendar_Js {\n\tconstructor(container, readonly) {\n\t\tsuper(container, readonly);\n\t\tthis.isSwitchAllDays = false;\n\t\tthis.sidebarName = 'add'; //available: add, status, edit\n\t\tthis.eventCreate = false;\n\t\tthis.module = 'Calendar';\n\t\tthis.renderCalendar();\n\t\tthis.registerEvents();\n\t}\n\t/**\n\t * Function sets calendar module's options\n\t * @returns {{eventClick: function, headerToolbar: object, selectable: boolean}}\n\t */\n\tsetCalendarModuleOptions() {\n\t\tlet options = super.setCalendarModuleOptions();\n\t\toptions.selectable = true;\n\t\toptions.headerToolbar = {\n\t\t\tleft: `dayGridMonth,${app.getMainParams('weekView')},${app.getMainParams('dayView')},today`,\n\t\t\tcenter: 'prevYear,prev,title,next,nextYear',\n\t\t\tright: ''\n\t\t};\n\t\toptions.eventClick = function (info) {\n\t\t\tinfo.jsEvent.preventDefault();\n\t\t};\n\t\treturn options;\n\t}\n\t/**\n\t * Get selected users\n\t * @returns {{ selectedIds: array, excludedIds: array }}\n\t */\n\tgetSelectedUsersCalendar() {\n\t\treturn { selectedIds: [this.container.find('.assigned_user_id').val()], excludedIds: [] };\n\t}\n\t/**\n\t * Function registers calendar events\n\t */\n\tregisterEvents() {\n\t\tconst calendarView = this.getCalendarView();\n\t\tthis.switchContainer = $(`
`).insertAfter(\n\t\t\tcalendarView.find('.fc-center')\n\t\t);\n\t\tthis.registerSwitchEvents();\n\t\tthis.registerUsersChange();\n\t\tthis.registerAutofillTime();\n\t\tthis.registerPopoverButtonsClickEvent();\n\t}\n\t/**\n\t * Function registers calendar switch event\n\t */\n\tregisterSwitchEvents() {\n\t\tif (app.getMainParams('hiddenDays', true) !== false) {\n\t\t\tthis.switchContainer.html(this.createSwitch());\n\t\t\tthis.switchContainer.find('input').on('change', (e) => {\n\t\t\t\tconst currentTarget = $(e.currentTarget);\n\t\t\t\tlet hiddenDays = [];\n\t\t\t\tif (typeof currentTarget.data('on-text') !== 'undefined') {\n\t\t\t\t\thiddenDays = app.getMainParams('hiddenDays', true);\n\t\t\t\t\tthis.isSwitchAllDays = false;\n\t\t\t\t} else {\n\t\t\t\t\tthis.isSwitchAllDays = true;\n\t\t\t\t}\n\t\t\t\tthis.fullCalendar.setOption('hiddenDays', hiddenDays);\n\t\t\t\tthis.registerSwitchEvents();\n\t\t\t});\n\t\t}\n\t}\n\t/**\n\t * Generate filter buttons\n\t * @returns {string}\n\t */\n\tcreateSwitch() {\n\t\tlet on = app.vtranslate('JS_WORK_DAYS'),\n\t\t\toff = app.vtranslate('JS_ALL'),\n\t\t\tstate = this.isSwitchAllDays;\n\t\treturn `
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
`;\n\t}\n\t/**\n\t * Function registers select's user change event\n\t */\n\tregisterUsersChange() {\n\t\tthis.container.find('.assigned_user_id').on('change', () => {\n\t\t\tthis.reloadCalendarData();\n\t\t});\n\t}\n\t/**\n\t * Function invokes by FullCalendar, sets selected days in form\n\t * @param {Object} info\n\t * @returns\n\t */\n\tselectDays(info) {\n\t\tif (this.sidebarName === 'status') {\n\t\t\tthis.sidebarName = 'add';\n\t\t\tthis.getCalendarCreateView().done(() => {\n\t\t\t\tthis.selectDays(info);\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tthis.selectCallbackCreateModal(this.container, info);\n\t}\n\n\t/** @inheritdoc */\n\tregisterEditForm(sideBar) {\n\t\tlet editViewInstance = Vtiger_Edit_Js.getInstanceByModuleName(sideBar.find('[name=\"module\"]').val()),\n\t\t\tparams = [];\n\t\tlet rightFormCreate = sideBar.find('form.js-form');\n\t\teditViewInstance.registerBasicEvents(rightFormCreate);\n\t\trightFormCreate.validationEngine(app.validationEngineOptions);\n\t\tApp.Fields.Picklist.showSelect2ElementView(sideBar.find('select'));\n\t\tsideBar.find('.js-summary-close-edit').on('click', () => {\n\t\t\tthis.getCalendarCreateView();\n\t\t});\n\t\tApp.Components.QuickCreate.registerPostLoadEvents(rightFormCreate, params);\n\t\tApp.Fields.Text.Editor.register(sideBar.find('.js-editor'), { height: '5em', toolbar: 'Min' });\n\t}\n\n\t/** @inheritdoc */\n\tupdateSidebar(sidebar, data) {\n\t\tconst modalTitleContainer = $('.js-modal-title__container'),\n\t\t\tmodalTitles = modalTitleContainer.find('[class*=\"js-modal-title\"]');\n\t\tdata = $(data);\n\n\t\tmodalTitles.addClass('d-none');\n\t\tif (data.hasClass('js-edit-form')) {\n\t\t\tlet title = data.find('.js-sidebar-title ').data('title');\n\t\t\tmodalTitles.filter(`.js-modal-title--${title}`).removeClass('d-none');\n\t\t\tthis.sidebarName = title;\n\t\t} else if (data.hasClass('js-activity-state')) {\n\t\t\tmodalTitles.filter('.js-modal-title--status').removeClass('d-none');\n\t\t\tthis.sidebarName = 'status';\n\t\t}\n\t\tsidebar.find('.js-qc-form').html(data);\n\t}\n};\n\njQuery.Class(\n\t'Calendar_QuickCreate_Js',\n\t{},\n\t{\n\t\tregisterEvents: function (container) {\n\t\t\tnew Calendar_CalendarQuickCreate_Js(container.closest('.js-modal-container'), true);\n\t\t\tcontainer.find('.js-activity-buttons button').on('click', function (e) {\n\t\t\t\tlet form = container.find('form');\n\t\t\t\tlet currentTarget = $(e.currentTarget);\n\t\t\t\tif (1 === currentTarget.data('type')) {\n\t\t\t\t\tform.append('');\n\t\t\t\t\tform.submit();\n\t\t\t\t} else {\n\t\t\t\t\tcontainer.find('.js-activity-buttons').remove();\n\t\t\t\t\tform.find('[name=\"record\"]').val('');\n\t\t\t\t\tform.append('');\n\t\t\t\t\tform.append('');\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n);\n"],"names":["window","Calendar_CalendarQuickCreate_Js","container","readonly","isSwitchAllDays","sidebarName","eventCreate","module","renderCalendar","registerEvents","selectable","options","headerToolbar","left","app","getMainParams","center","right","eventClick","info","jsEvent","preventDefault","selectedIds","find","val","excludedIds","getCalendarView","switchContainer","$","insertAfter","calendarView","registerSwitchEvents","registerUsersChange","registerAutofillTime","registerPopoverButtonsClickEvent","html","createSwitch","on","e","currentTarget","hiddenDays","data","fullCalendar","setOption","vtranslate","off","state","reloadCalendarData","getCalendarCreateView","done","selectDays","selectCallbackCreateModal","sideBar","editViewInstance","Vtiger_Edit_Js","getInstanceByModuleName","rightFormCreate","registerBasicEvents","validationEngine","validationEngineOptions","App","Fields","Picklist","showSelect2ElementView","Components","QuickCreate","registerPostLoadEvents","Text","Editor","register","height","toolbar","sidebar","modalTitleContainer","modalTitles","addClass","hasClass","filter","title","removeClass","Calendar_Calendar_Js","jQuery","Class","closest","form","append","submit","remove"],"mappings":";;AAAA,kKACA,YAEA,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AAlB,CAApC,CADoC,CAAA,CAAA,CAAA,CAEpCjF,SAAS,CAACqB,IAAV,CAAe,6BAAf,CAA8Cc,CAAAA,EAA9C,CAAiD,OAAjD,CAA0D,SAAUC,CAAV,CAAa,CAClE8C,IAAAA,IAAI,CAAGlF,SAAS,CAACqB,IAAV,CAAe,MAAf,CAD2D,CAElEgB,aAAa,CAAGX,CAAC,CAACU,CAAC,CAACC,aAAH,CAFiD,CAGlE,CAAA,GAAMA,aAAa,CAACE,IAAd,CAAmB,MAAnB,CAH4D,EAIrE2C,IAAI,CAACC,MAAL,CAAY,qDAAqD9C,CAAAA,aAAa,CAACE,IAAd,CAAmB,OAAnB,CAArD,CAAmF,KAA/F,CAJqE,CAKrE2C,IAAI,CAACE,MAAL,EALqE,GAOrEpF,SAAS,CAACqB,IAAV,CAAe,sBAAf,CAAuCgE,CAAAA,MAAvC,EAPqE,CAQrEH,IAAI,CAAC7D,IAAL,CAAU,mBAAV,CAAA,CAA6BC,GAA7B,CAAiC,EAAjC,CARqE,CASrE4D,IAAI,CAACC,MAAL,CAAY,uDAAZ,CATqE,CAUrED,IAAI,CAACC,MAAL,CAAY,+CAA+C9C,CAAAA,aAAa,CAACE,IAAd,CAAmB,IAAnB,CAA/C,CAA0E,KAAtF,CAVqE,EAYtE,CAZD,EAaA,CAhBF,CAHD;;"} \ No newline at end of file +{"version":3,"file":"CalendarQuickCreate.min.js","sources":["CalendarQuickCreate.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/**\n * Class representing a modal calendar.\n * @extends Calendar_Calendar_Js\n */\nwindow.Calendar_CalendarQuickCreate_Js = class Calendar_CalendarQuickCreate_Js extends Calendar_Calendar_Js {\n\tconstructor(container, readonly) {\n\t\tsuper(container, readonly);\n\t\tthis.isSwitchAllDays = false;\n\t\tthis.sidebarName = 'add'; //available: add, status, edit\n\t\tthis.eventCreate = false;\n\t\tthis.module = 'Calendar';\n\t\tthis.renderCalendar();\n\t\tthis.registerEvents();\n\t}\n\t/**\n\t * Function sets calendar module's options\n\t * @returns {{eventClick: function, headerToolbar: object, selectable: boolean}}\n\t */\n\tsetCalendarModuleOptions() {\n\t\tlet options = super.setCalendarModuleOptions();\n\t\toptions.selectable = true;\n\t\toptions.headerToolbar = {\n\t\t\tleft: `dayGridMonth,${app.getMainParams('weekView')},${app.getMainParams('dayView')},today`,\n\t\t\tcenter: 'prevYear,prev,title,next,nextYear',\n\t\t\tright: ''\n\t\t};\n\t\toptions.eventClick = function (info) {\n\t\t\tinfo.jsEvent.preventDefault();\n\t\t};\n\t\treturn options;\n\t}\n\t/**\n\t * Get selected users\n\t * @returns {{ selectedIds: array, excludedIds: array }}\n\t */\n\tgetSelectedUsersCalendar() {\n\t\treturn { selectedIds: [this.container.find('.assigned_user_id').val()], excludedIds: [] };\n\t}\n\t/**\n\t * Function registers calendar events\n\t */\n\tregisterEvents() {\n\t\tconst calendarView = this.getCalendarView();\n\t\tthis.switchContainer = $(`
`).insertAfter(\n\t\t\tcalendarView.find('.fc-center')\n\t\t);\n\t\tthis.registerSwitchEvents();\n\t\tthis.registerUsersChange();\n\t\tthis.registerAutofillTime();\n\t\tthis.registerPopoverButtonsClickEvent();\n\t}\n\t/**\n\t * Function registers calendar switch event\n\t */\n\tregisterSwitchEvents() {\n\t\tif (app.getMainParams('hiddenDays', true) !== false) {\n\t\t\tthis.switchContainer.html(this.createSwitch());\n\t\t\tthis.switchContainer.find('input').on('change', (e) => {\n\t\t\t\tconst currentTarget = $(e.currentTarget);\n\t\t\t\tlet hiddenDays = [];\n\t\t\t\tif (typeof currentTarget.data('on-text') !== 'undefined') {\n\t\t\t\t\thiddenDays = app.getMainParams('hiddenDays', true);\n\t\t\t\t\tthis.isSwitchAllDays = false;\n\t\t\t\t} else {\n\t\t\t\t\tthis.isSwitchAllDays = true;\n\t\t\t\t}\n\t\t\t\tthis.fullCalendar.setOption('hiddenDays', hiddenDays);\n\t\t\t\tthis.registerSwitchEvents();\n\t\t\t});\n\t\t}\n\t}\n\t/**\n\t * Generate filter buttons\n\t * @returns {string}\n\t */\n\tcreateSwitch() {\n\t\tlet on = app.vtranslate('JS_WORK_DAYS'),\n\t\t\toff = app.vtranslate('JS_ALL'),\n\t\t\tstate = this.isSwitchAllDays;\n\t\treturn `
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
`;\n\t}\n\t/**\n\t * Function registers select's user change event\n\t */\n\tregisterUsersChange() {\n\t\tthis.container.find('.assigned_user_id').on('change', () => {\n\t\t\tthis.reloadCalendarData();\n\t\t});\n\t}\n\t/**\n\t * Function invokes by FullCalendar, sets selected days in form\n\t * @param {Object} info\n\t * @returns\n\t */\n\tselectDays(info) {\n\t\tif (this.sidebarName === 'status') {\n\t\t\tthis.sidebarName = 'add';\n\t\t\tthis.getCalendarCreateView().done(() => {\n\t\t\t\tthis.selectDays(info);\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tthis.selectCallbackCreateModal(this.container, info);\n\t}\n\n\t/** @inheritdoc */\n\tregisterEditForm(sideBar) {\n\t\tlet editViewInstance = Vtiger_Edit_Js.getInstanceByModuleName(sideBar.find('[name=\"module\"]').val()),\n\t\t\tparams = [];\n\t\tlet rightFormCreate = sideBar.find('form.js-form');\n\t\teditViewInstance.registerBasicEvents(rightFormCreate);\n\t\trightFormCreate.validationEngine(app.validationEngineOptions);\n\t\tApp.Fields.Picklist.showSelect2ElementView(sideBar.find('select'));\n\t\tsideBar.find('.js-summary-close-edit').on('click', () => {\n\t\t\tthis.getCalendarCreateView();\n\t\t});\n\t\tApp.Components.QuickCreate.registerPostLoadEvents(rightFormCreate, params);\n\t\tApp.Fields.Text.Editor.register(sideBar.find('.js-editor'), { height: '5em', toolbar: 'Min' });\n\t}\n\n\t/** @inheritdoc */\n\tupdateSidebar(sidebar, data) {\n\t\tconst modalTitleContainer = $('.js-modal-title__container'),\n\t\t\tmodalTitles = modalTitleContainer.find('[class*=\"js-modal-title\"]');\n\t\tdata = $(data);\n\n\t\tmodalTitles.addClass('d-none');\n\t\tif (data.hasClass('js-edit-form')) {\n\t\t\tlet title = data.find('.js-sidebar-title ').data('title');\n\t\t\tmodalTitles.filter(`.js-modal-title--${title}`).removeClass('d-none');\n\t\t\tthis.sidebarName = title;\n\t\t} else if (data.hasClass('js-activity-state')) {\n\t\t\tmodalTitles.filter('.js-modal-title--status').removeClass('d-none');\n\t\t\tthis.sidebarName = 'status';\n\t\t}\n\t\tsidebar.find('.js-qc-form').html(data);\n\t}\n};\n\njQuery.Class(\n\t'Calendar_QuickCreate_Js',\n\t{},\n\t{\n\t\tregisterEvents: function (container) {\n\t\t\tnew Calendar_CalendarQuickCreate_Js(container.closest('.js-modal-container'), true);\n\t\t\tcontainer.find('.js-activity-buttons button').on('click', function (e) {\n\t\t\t\tlet form = container.find('form');\n\t\t\t\tlet currentTarget = $(e.currentTarget);\n\t\t\t\tif (1 === currentTarget.data('type')) {\n\t\t\t\t\tform.append('');\n\t\t\t\t\tform.submit();\n\t\t\t\t} else {\n\t\t\t\t\tcontainer.find('.js-activity-buttons').remove();\n\t\t\t\t\tform.find('[name=\"record\"]').val('');\n\t\t\t\t\tform.append('');\n\t\t\t\t\tform.append('');\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n);\n"],"names":["_typeof","o","Symbol","iterator","constructor","prototype","_classCallCheck","instance","Constructor","TypeError","_defineProperties","target","props","descriptor","i","length","enumerable","configurable","writable","Object","defineProperty","_toPropertyKey","key","_createClass","protoProps","staticProps","arg","_toPrimitive","String","input","hint","prim","toPrimitive","res","call","Number","_get","Reflect","get","bind","property","receiver","base","_superPropBase","desc","getOwnPropertyDescriptor","arguments","value","apply","object","hasOwnProperty","_getPrototypeOf","_inherits","subClass","superClass","create","_setPrototypeOf","p","setPrototypeOf","__proto__","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","result","Super","NewTarget","construct","_possibleConstructorReturn","self","_assertThisInitialized","ReferenceError","sham","Proxy","Boolean","valueOf","e","getPrototypeOf","window","Calendar_CalendarQuickCreate_Js","_Calendar_Calendar_Js","container","readonly","_this","_super","isSwitchAllDays","sidebarName","eventCreate","module","renderCalendar","registerEvents","setCalendarModuleOptions","options","selectable","headerToolbar","left","concat","app","getMainParams","center","right","eventClick","info","jsEvent","preventDefault","getSelectedUsersCalendar","selectedIds","find","val","excludedIds","calendarView","getCalendarView","switchContainer","$","insertAfter","registerSwitchEvents","registerUsersChange","registerAutofillTime","registerPopoverButtonsClickEvent","_this2","html","createSwitch","on","currentTarget","hiddenDays","data","fullCalendar","setOption","vtranslate","off","state","_this3","reloadCalendarData","selectDays","_this4","getCalendarCreateView","done","selectCallbackCreateModal","registerEditForm","sideBar","_this5","editViewInstance","Vtiger_Edit_Js","getInstanceByModuleName","rightFormCreate","registerBasicEvents","validationEngine","validationEngineOptions","App","Fields","Picklist","showSelect2ElementView","Components","QuickCreate","registerPostLoadEvents","Text","Editor","register","height","toolbar","updateSidebar","sidebar","modalTitleContainer","modalTitles","addClass","hasClass","title","filter","removeClass","Calendar_Calendar_Js","jQuery","Class","closest","form","append","submit","remove"],"mappings":";;AAAA,kKACA,YAAY,CAEZ;AACA;AACA;AACA,GAHA,SAAAA,OAAAA,CAAAC,CAAA,CAAA,CAAA,yBAAA,CAAA,OAAAD,OAAA,CAAAE,UAAAA,EAAAA,OAAAA,MAAA,EAAAA,QAAAA,EAAAA,OAAAA,MAAA,CAAAC,QAAA,CAAAF,SAAAA,CAAA,gBAAAA,CAAA,CAAA,CAAA,SAAAA,CAAA,CAAA,CAAA,OAAAA,CAAA,EAAA,UAAA,EAAA,OAAAC,MAAA,EAAAD,CAAA,CAAAG,WAAA,GAAAF,MAAA,EAAAD,CAAA,GAAAC,MAAA,CAAAG,SAAA,CAAAJ,QAAAA,CAAAA,OAAAA,CAAA,CAAAD,CAAAA,OAAA,CAAAC,CAAA,CAAAK,CAAAA,SAAAA,eAAAA,CAAAC,QAAA,CA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a,IAAI,CAACK,IAAI,EACtC,CAAC,CAAA,CAAA,CAAA,CAAA9C,+BAAA,CAAA,CA3IqF0F,oBAAoB,CA4I1G,CAEDC,MAAM,CAACC,KAAK,CACX,yBAAyB,CACzB,EAAE,CACF,CACCjF,cAAc,CAAE,SAAAA,cAAAA,CAAUT,SAAS,CAAE,CACpC,IAAIF,+BAA+B,CAACE,SAAS,CAAC2F,OAAO,CAAC,qBAAqB,CAAC,CAAM,CAAA,CAAA,CAAC,CACnF3F,SAAS,CAAC0B,IAAI,CAAC,6BAA6B,CAAC,CAACe,EAAE,CAAC,OAAO,CAAE,SAAU9C,CAAC,CAAE,CAClE,IAAAiG,IAAI,CAAG5F,SAAS,CAAC0B,IAAI,CAAC,MAAM,CAAC,CAC7BgB,aAAa,CAAGV,CAAC,CAACrC,CAAC,CAAC+C,aAAa,CAAC,CAClC,CAAC,GAAKA,aAAa,CAACE,IAAI,CAAC,MAAM,CAAC,EACnCgD,IAAI,CAACC,MAAM,CAAC,qDAAkD,CAAGnD,aAAa,CAACE,IAAI,CAAC,OAAO,CAAC,CAAG,KAAI,CAAC,CACpGgD,IAAI,CAACE,MAAM,EAAE,GAEb9F,SAAS,CAAC0B,IAAI,CAAC,sBAAsB,CAAC,CAACqE,MAAM,EAAE,CAC/CH,IAAI,CAAClE,IAAI,CAAC,mBAAiB,CAAC,CAACC,GAAG,CAAC,EAAE,CAAC,CACpCiE,IAAI,CAACC,MAAM,CAAC,uDAAmD,CAAC,CAChED,IAAI,CAACC,MAAM,CAAC,+CAA4C,CAAGnD,aAAa,CAACE,IAAI,CAAC,IAAI,CAAC,CAAG,KAAI,CAAC,EAE7F,CAAC,EACF,CACD,CACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/Calendar/resources/CalendarView.min.js b/public_html/layouts/basic/modules/Calendar/resources/CalendarView.min.js index 1bdd06f903c2..2451c59dd91d 100644 --- a/public_html/layouts/basic/modules/Calendar/resources/CalendarView.min.js +++ b/public_html/layouts/basic/modules/Calendar/resources/CalendarView.min.js @@ -1,9 +1,9 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */"use strict";/** +/* {[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]} */"use strict";/** * Class representing an extended calendar. * @extends Calendar_Calendar_Js - */function _typeof(obj){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var descriptor,i=0;iarguments.length?target:receiver):desc.value}},_get.apply(this,arguments)}function _superPropBase(object,property){for(;!Object.prototype.hasOwnProperty.call(object,property)&&(object=_getPrototypeOf(object),null!==object););return object}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return !1;if(Reflect.construct.sham)return !1;if("function"==typeof Proxy)return !0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return !1}}function _getPrototypeOf(o){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(o){return o.__proto__||Object.getPrototypeOf(o)},_getPrototypeOf(o)}//Global calendar flag needed for correct loading data from history browser in year view + */function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var descriptor,i=0;iarguments.length?target:receiver):desc.value}},_get.apply(this,arguments)}function _superPropBase(object,property){for(;!Object.prototype.hasOwnProperty.call(object,property)&&(object=_getPrototypeOf(object),null!==object););return object}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return !1;if(Reflect.construct.sham)return !1;if("function"==typeof Proxy)return !0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return !1}}function _getPrototypeOf(o){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(o){return o.__proto__||Object.getPrototypeOf(o)},_getPrototypeOf(o)}//Global calendar flag needed for correct loading data from history browser in year view window.calendarLoaded=!1,window.Calendar_Calendar_Js=/*#__PURE__*/function(_Vtiger_Calendar_Js){/** * Create calendar's options. * @param {jQuery} container @@ -12,7 +12,7 @@ window.calendarLoaded=!1,window.Calendar_Calendar_Js=/*#__PURE__*/function(_Vtig */function Calendar_Calendar_Js(container,readonly){var browserHistory=!(2 {\n\t\t\t\tif (this.eventCreate == 1) {\n\t\t\t\t\tthis.showCalendarCreateView().done((form) => {\n\t\t\t\t\t\tif (this.getSidebarView().find('.tab-pane.active').hasClass('js-right-panel-event') === false) {\n\t\t\t\t\t\t\tthis.getSidebarView().find('.js-right-panel-event-link').trigger('click');\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.dayCallbackCreateModal(form, args);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t},\n\t\t\tselectable: false,\n\t\t\teventClick: function (info) {\n\t\t\t\tinfo.jsEvent.preventDefault();\n\t\t\t\tconst element = $(info.el);\n\t\t\t\tlet link = element.attr('href');\n\t\t\t\tif (!link) {\n\t\t\t\t\tlink = element.find('a').attr('href');\n\t\t\t\t}\n\t\t\t\tif (!self.readonly && self.eventEdit) {\n\t\t\t\t\tself.showSidebarEvent(link);\n\t\t\t\t} else {\n\t\t\t\t\twindow.location.assign(link.replace('view=', 'xview=') + '&view=Detail');\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n\t/**\n\t * Show sidebar event\n\t * @param {*} params\n\t * @returns {Promise}\n\t */\n\tshowSidebarEvent(params) {\n\t\tconst self = this,\n\t\t\taDeferred = $.Deferred();\n\t\tconst progressInstance = $.progressIndicator({ blockInfo: { enabled: true } });\n\t\tif (typeof params == 'number') {\n\t\t\tparams = {\n\t\t\t\tmodule: this.module,\n\t\t\t\tview: 'EventForm',\n\t\t\t\trecord: params\n\t\t\t};\n\t\t}\n\t\tAppConnector.request(params)\n\t\t\t.done((data) => {\n\t\t\t\tprogressInstance.progressIndicator({ mode: 'hide' });\n\t\t\t\tself.openRightPanel();\n\t\t\t\tthis.updateSidebar(data);\n\t\t\t\tlet sidebar = self.getSidebarView();\n\t\t\t\tif (sidebar.find('form').length) {\n\t\t\t\t\tself.registerEditForm(sidebar);\n\t\t\t\t} else {\n\t\t\t\t\tapp.showNewScrollbar(sidebar.find('.js-calendar__form__wrapper'), {\n\t\t\t\t\t\tsuppressScrollX: true\n\t\t\t\t\t});\n\t\t\t\t\tsidebar.find('.js-activity-state .js-summary-close-edit').on('click', function () {\n\t\t\t\t\t\tself.showCalendarCreateView();\n\t\t\t\t\t});\n\t\t\t\t\tsidebar.find('.js-activity-state .editRecord').on('click', function () {\n\t\t\t\t\t\tself.showSidebarEvent($(this).data('id'));\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\taDeferred.resolve(sidebar.find('.js-qc-form'));\n\t\t\t})\n\t\t\t.fail((error) => {\n\t\t\t\tprogressInstance.progressIndicator({ mode: 'hide' });\n\t\t\t\tapp.errorLog(error);\n\t\t\t});\n\t\treturn aDeferred.promise();\n\t}\n\t/**\n\t * Open sidebar right panel\n\t */\n\topenRightPanel() {\n\t\tif (this.getSidebarView().hasClass('hideSiteBar')) {\n\t\t\tthis.getSidebarView().find('.js-toggle-site-bar-right-button').trigger('click');\n\t\t}\n\t}\n\t/**\n\t * Update sidebar\n\t * @param {html} data\n\t */\n\tupdateSidebar(data) {\n\t\tthis.getSidebarView().find('.js-qc-form').html(data);\n\t\tthis.showRightPanelForm();\n\t}\n\t/**\n\t * Show sidebar right panel form\n\t */\n\tshowRightPanelForm() {\n\t\tconst calendarRightPanel = this.getSidebarView();\n\t\tif (!calendarRightPanel.find('.js-right-panel-event').hasClass('active')) {\n\t\t\tcalendarRightPanel.find('.js-right-panel-event-link').trigger('click');\n\t\t}\n\t\tapp.showNewScrollbar(calendarRightPanel.find('.js-calendar__form__wrapper'), {\n\t\t\tsuppressScrollX: true\n\t\t});\n\t}\n\t/**\n\t * Register events to EditView\n\t * @param {jQuery} sideBar\n\t */\n\tregisterEditForm(sideBar) {\n\t\tconst editViewInstance = Vtiger_Edit_Js.getInstanceByModuleName(sideBar.find('[name=\"module\"]').val());\n\t\tlet rightFormCreate = sideBar.find('form.js-form');\n\t\teditViewInstance.registerBasicEvents(rightFormCreate);\n\t\trightFormCreate.validationEngine(app.validationEngineOptions);\n\t\tApp.Fields.Picklist.showSelect2ElementView(sideBar.find('select'));\n\t\tsideBar.find('.js-summary-close-edit').on('click', () => {\n\t\t\tthis.showCalendarCreateView();\n\t\t});\n\t\tApp.Components.QuickCreate.registerPostLoadEvents(rightFormCreate, {\n\t\t\tcallbackFunction: this.registerAfterSubmitForm(this)\n\t\t});\n\t\tnew App.Fields.Text.Editor(sideBar.find('.js-editor'), { height: '5em', toolbar: 'Min' });\n\t}\n\t/**\n\t * Register actions to do after save record\n\t * @param {object} self\n\t * @param {object} data\n\t * @returns {function}\n\t */\n\tregisterAfterSubmitForm(self) {\n\t\tlet returnFunction = function (data) {\n\t\t\tif (data.success) {\n\t\t\t\tself.reloadCalendarData();\n\t\t\t\tself.refreshDatesRowView();\n\t\t\t\tself.getSidebarView().find('.js-qc-form').html('');\n\t\t\t\tself.showCalendarCreateView();\n\t\t\t\twindow.popoverCache = {};\n\t\t\t}\n\t\t};\n\t\treturn returnFunction;\n\t}\n\t/**\n\t * Load calendar data\n\t */\n\tloadCalendarData() {\n\t\tconst self = this,\n\t\t\tprogressInstance = $.progressIndicator({ blockInfo: { enabled: true } });\n\t\tlet options = this.getDefaultParams();\n\t\tself.fullCalendar.removeAllEvents();\n\t\tself.clearFilterButton(options['user']);\n\t\toptions.historyUrl = `index.php?module=${options['module']}&view=Calendar&history=true&viewType=${\n\t\t\tthis.fullCalendar.view.type\n\t\t}&start=${options['start']}&end=${options['end']}&user=${JSON.stringify(options['user'])}&time=${\n\t\t\toptions['time']\n\t\t}&cvid=${options['cvid']}&hiddenDays=${this.fullCalendar.getOption('hiddenDays')}`;\n\t\tlet connectorMethod = window['AppConnector']['request'];\n\t\tif (this.browserHistory && window.calendarLoaded) {\n\t\t\tconnectorMethod = window['AppConnector']['requestPjax'];\n\t\t}\n\t\tif (this.browserHistoryConfig && Object.keys(this.browserHistoryConfig).length && !window.calendarLoaded) {\n\t\t\toptions = Object.assign(options, {\n\t\t\t\tstart: this.browserHistoryConfig.start,\n\t\t\t\tend: this.browserHistoryConfig.end,\n\t\t\t\tuser: this.browserHistoryConfig.user,\n\t\t\t\ttime: this.browserHistoryConfig.time,\n\t\t\t\tcvid: this.browserHistoryConfig.cvid\n\t\t\t});\n\t\t\tconnectorMethod = window['AppConnector']['request'];\n\t\t\tapp.setMainParams('showType', this.browserHistoryConfig.time);\n\t\t\tapp.setMainParams('usersId', this.browserHistoryConfig.user);\n\t\t}\n\t\tconnectorMethod(options).done((events) => {\n\t\t\tself.fullCalendar.removeAllEvents();\n\t\t\tself.fullCalendar.addEventSource(events.result);\n\t\t\tprogressInstance.progressIndicator({ mode: 'hide' });\n\t\t});\n\t\twindow.calendarLoaded = true;\n\t}\n\t/**\n\t * Show create view\n\t * @returns {Promise}\n\t */\n\tshowCalendarCreateView() {\n\t\tconst aDeferred = $.Deferred();\n\t\tif (this.eventCreate == 1) {\n\t\t\tconst sideBar = this.getSidebarView(),\n\t\t\t\tqcForm = sideBar.find('.js-qc-form');\n\t\t\tif (qcForm.find('form').length > 0 && qcForm.find('input[name=record]').length === 0) {\n\t\t\t\taDeferred.resolve(qcForm);\n\t\t\t} else {\n\t\t\t\tlet progressInstance = $.progressIndicator({ blockInfo: { enabled: true } });\n\t\t\t\tthis.showSidebarEvent({ module: this.module, view: 'EventForm' })\n\t\t\t\t\t.done(() => {\n\t\t\t\t\t\tprogressInstance.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\tthis.registerAutofillTime();\n\t\t\t\t\t\taDeferred.resolve(qcForm);\n\t\t\t\t\t})\n\t\t\t\t\t.fail((error) => {\n\t\t\t\t\t\tprogressInstance.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\tapp.errorLog(error);\n\t\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\taDeferred.reject();\n\t\t}\n\t\treturn aDeferred.promise();\n\t}\n\t/**\n\t * Auto select date in create view in extended calendar\n\t */\n\tregisterAutofillTime() {\n\t\tif (app.getMainParams('autofillTime')) {\n\t\t\tthis.container.find('.js-autofill').prop('checked', 'checked').trigger('change');\n\t\t}\n\t}\n\t/**\n\t * Register cache settings\n\t */\n\tregisterCacheSettings() {\n\t\tconst self = this;\n\t\t$('.siteBarRight .filterField').each(function (index) {\n\t\t\tlet name = $(this).attr('id');\n\t\t\tlet value = app.moduleCacheGet(name);\n\t\t\tlet element = $('#' + name);\n\t\t\tif (element.length > 0 && value != null) {\n\t\t\t\tif (element.attr('type') == 'checkbox') {\n\t\t\t\t\telement.prop('checked', value);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tthis.getCalendarView()\n\t\t\t.find('.fc-toolbar .fc-button')\n\t\t\t.on('click', function (e) {\n\t\t\t\tlet element = $(e.currentTarget);\n\t\t\t\tif (element.hasClass('fc-' + self.fullCalendar.view.type + '-button')) {\n\t\t\t\t\tapp.moduleCacheSet('defaultView', self.fullCalendar.view.type);\n\t\t\t\t} else if (\n\t\t\t\t\telement.hasClass('fc-prev-button') ||\n\t\t\t\t\telement.hasClass('fc-next-button') ||\n\t\t\t\t\telement.hasClass('fc-today-button')\n\t\t\t\t) {\n\t\t\t\t\tapp.moduleCacheSet('start', App.Fields.Date.dateToUserFormat(self.fullCalendar.view.activeStart));\n\t\t\t\t\tapp.moduleCacheSet('end', App.Fields.Date.dateToUserFormat(self.fullCalendar.view.activeEnd));\n\t\t\t\t}\n\t\t\t});\n\t\tconst keys = app.moduleCacheKeys();\n\t\tif (keys.length > 0) {\n\t\t\tlet alert = $('#moduleCacheAlert');\n\t\t\talert.find('.cacheClear').on('click', function (e) {\n\t\t\t\tapp.moduleCacheClear();\n\t\t\t\talert.addClass('d-none');\n\t\t\t\tlocation.reload();\n\t\t\t});\n\t\t}\n\t}\n\t/**\n\t * Register site bar events\n\t */\n\tregisterSiteBarEvents() {\n\t\tlet calendarRightPanel = $('.js-calendar-right-panel');\n\t\tcalendarRightPanel.find('.js-show-sitebar').on('click', () => {\n\t\t\tif (calendarRightPanel.hasClass('hideSiteBar')) {\n\t\t\t\tcalendarRightPanel.find('.js-toggle-site-bar-right-button').trigger('click');\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t * Register popover buttons' click\n\t */\n\tregisterPopoverButtonsClickEvent() {\n\t\t$(document).on('click', '.js-calendar-popover__button', this.showCalendarPopoverLinkInSidebar.bind(this));\n\t}\n\t/**\n\t * Show popover link in sidebar\n\t * @param {jQuery.Event} e click event\n\t * @returns {boolean}\n\t */\n\tshowCalendarPopoverLinkInSidebar(e) {\n\t\tlet href = e.currentTarget.href;\n\t\tconst hrefObject = app.convertUrlToObject(href);\n\t\tif (hrefObject.module !== 'Calendar' || (hrefObject.view !== 'Edit' && hrefObject.view !== 'Detail')) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\te.preventDefault();\n\t\t\tconst sidebarView = hrefObject.view === 'Edit' ? 'EventForm' : 'ActivityState';\n\t\t\thref = href.replace(hrefObject.view, sidebarView);\n\t\t\tthis.showSidebarEvent(href);\n\t\t}\n\t}\n\t/**\n\t * Register events\n\t */\n\tregisterEvents() {\n\t\tsuper.registerEvents();\n\t\tthis.registerSiteBarEvents();\n\t\tthis.registerPopoverButtonsClickEvent();\n\t\tElementQueries.listen();\n\t\tthis.showCalendarCreateView();\n\t}\n};\n"],"names":["window","calendarLoaded","Calendar_Calendar_Js","container","readonly","browserHistory","self","allDaySlot","dateClick","args","eventCreate","showCalendarCreateView","done","form","getSidebarView","find","hasClass","trigger","dayCallbackCreateModal","selectable","eventClick","info","jsEvent","preventDefault","element","$","el","link","attr","eventEdit","showSidebarEvent","location","assign","replace","params","aDeferred","Deferred","progressInstance","progressIndicator","blockInfo","enabled","module","view","record","AppConnector","request","data","mode","openRightPanel","updateSidebar","sidebar","length","registerEditForm","app","showNewScrollbar","suppressScrollX","on","resolve","fail","error","errorLog","promise","html","showRightPanelForm","calendarRightPanel","sideBar","editViewInstance","Vtiger_Edit_Js","getInstanceByModuleName","val","rightFormCreate","registerBasicEvents","validationEngine","validationEngineOptions","App","Fields","Picklist","showSelect2ElementView","Components","QuickCreate","registerPostLoadEvents","callbackFunction","registerAfterSubmitForm","Text","Editor","height","toolbar","success","reloadCalendarData","refreshDatesRowView","popoverCache","options","getDefaultParams","fullCalendar","removeAllEvents","clearFilterButton","historyUrl","type","JSON","stringify","getOption","connectorMethod","browserHistoryConfig","Object","keys","start","end","user","time","cvid","setMainParams","events","addEventSource","result","qcForm","registerAutofillTime","reject","getMainParams","prop","each","name","value","moduleCacheGet","getCalendarView","e","currentTarget","moduleCacheSet","Date","dateToUserFormat","activeStart","activeEnd","moduleCacheKeys","alert","moduleCacheClear","addClass","reload","document","showCalendarPopoverLinkInSidebar","bind","href","hrefObject","convertUrlToObject","sidebarView","registerSiteBarEvents","registerPopoverButtonsClickEvent","ElementQueries","listen","pageController","status","join","searchParams","encodeURIComponent","Vtiger_Calendar_Js"],"mappings":";;AAAA,kKACA,YACA,CAAA;AACA;AACA;AACA,YAC+B,OAAA,CAAA,GAAA,CAAA,CAAA,yBAAA,CAAA,OAAA,OAAA,CAAA,UAAA,EAA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{[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 representing an extended calendar.\n * @extends Calendar_Calendar_Js\n */\nwindow.calendarLoaded = false; //Global calendar flag needed for correct loading data from history browser in year view\nwindow.Calendar_Calendar_Js = class Calendar_Calendar_Js extends Vtiger_Calendar_Js {\n\t/**\n\t * Go to records list\n\t * @param {string} link\n\t */\n\tstatic goToRecordsList(link) {\n\t\tconst self = app.pageController,\n\t\t\tstatus = app.getMainParams('activityStateLabels', true),\n\t\t\toptions = self.getDefaultParams();\n\t\tif (options['cvid']) {\n\t\t\tlink += '&viewname=' + options['cvid'];\n\t\t} else {\n\t\t\tlink += '&viewname=All';\n\t\t}\n\t\tlet searchParams = '[\"activitystatus\",\"e\",\"' + status[app.getMainParams('showType')].join() + '\"]';\n\t\tsearchParams += ',[\"date_start\",\"bw\",\"' + options['start'] + ' 00:00:00,' + options['end'] + ' 23:59:59\"]';\n\t\tif (options['user']) {\n\t\t\tsearchParams += ',[\"assigned_user_id\",\"e\",\"' + options['user']['selectedIds'].join('##') + '\"]';\n\t\t}\n\t\tlink += '&search_params=[[' + encodeURIComponent(searchParams) + ']]';\n\t\twindow.location.href = link;\n\t}\n\t/**\n\t * Create calendar's options.\n\t * @param {jQuery} container\n\t * @param {bool} readonly\n\t * @param {boolean} browserHistory\n\t */\n\tconstructor(container, readonly, browserHistory = true) {\n\t\tsuper(container, readonly, browserHistory);\n\t}\n\t/**\n\t * Set calendar module options.\n\t * @returns {{allDaySlot: boolean, dayClick: object, selectable: boolean}}\n\t */\n\tsetCalendarModuleOptions() {\n\t\tconst self = this;\n\t\treturn {\n\t\t\tallDaySlot: app.getMainParams('allDaySlot'),\n\t\t\tdateClick: (args) => {\n\t\t\t\tif (this.eventCreate == 1) {\n\t\t\t\t\tthis.showCalendarCreateView().done((form) => {\n\t\t\t\t\t\tif (this.getSidebarView().find('.tab-pane.active').hasClass('js-right-panel-event') === false) {\n\t\t\t\t\t\t\tthis.getSidebarView().find('.js-right-panel-event-link').trigger('click');\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.dayCallbackCreateModal(form, args);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t},\n\t\t\tselectable: false,\n\t\t\teventClick: function (info) {\n\t\t\t\tinfo.jsEvent.preventDefault();\n\t\t\t\tconst element = $(info.el);\n\t\t\t\tlet link = element.attr('href');\n\t\t\t\tif (!link) {\n\t\t\t\t\tlink = element.find('a').attr('href');\n\t\t\t\t}\n\t\t\t\tif (!self.readonly && self.eventEdit) {\n\t\t\t\t\tself.showSidebarEvent(link);\n\t\t\t\t} else {\n\t\t\t\t\twindow.location.assign(link.replace('view=', 'xview=') + '&view=Detail');\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n\t/**\n\t * Show sidebar event\n\t * @param {*} params\n\t * @returns {Promise}\n\t */\n\tshowSidebarEvent(params) {\n\t\tconst self = this,\n\t\t\taDeferred = $.Deferred();\n\t\tconst progressInstance = $.progressIndicator({ blockInfo: { enabled: true } });\n\t\tif (typeof params == 'number') {\n\t\t\tparams = {\n\t\t\t\tmodule: this.module,\n\t\t\t\tview: 'EventForm',\n\t\t\t\trecord: params\n\t\t\t};\n\t\t}\n\t\tAppConnector.request(params)\n\t\t\t.done((data) => {\n\t\t\t\tprogressInstance.progressIndicator({ mode: 'hide' });\n\t\t\t\tself.openRightPanel();\n\t\t\t\tthis.updateSidebar(data);\n\t\t\t\tlet sidebar = self.getSidebarView();\n\t\t\t\tif (sidebar.find('form').length) {\n\t\t\t\t\tself.registerEditForm(sidebar);\n\t\t\t\t} else {\n\t\t\t\t\tapp.showNewScrollbar(sidebar.find('.js-calendar__form__wrapper'), {\n\t\t\t\t\t\tsuppressScrollX: true\n\t\t\t\t\t});\n\t\t\t\t\tsidebar.find('.js-activity-state .js-summary-close-edit').on('click', function () {\n\t\t\t\t\t\tself.showCalendarCreateView();\n\t\t\t\t\t});\n\t\t\t\t\tsidebar.find('.js-activity-state .editRecord').on('click', function () {\n\t\t\t\t\t\tself.showSidebarEvent($(this).data('id'));\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\taDeferred.resolve(sidebar.find('.js-qc-form'));\n\t\t\t})\n\t\t\t.fail((error) => {\n\t\t\t\tprogressInstance.progressIndicator({ mode: 'hide' });\n\t\t\t\tapp.errorLog(error);\n\t\t\t});\n\t\treturn aDeferred.promise();\n\t}\n\t/**\n\t * Open sidebar right panel\n\t */\n\topenRightPanel() {\n\t\tif (this.getSidebarView().hasClass('hideSiteBar')) {\n\t\t\tthis.getSidebarView().find('.js-toggle-site-bar-right-button').trigger('click');\n\t\t}\n\t}\n\t/**\n\t * Update sidebar\n\t * @param {html} data\n\t */\n\tupdateSidebar(data) {\n\t\tthis.getSidebarView().find('.js-qc-form').html(data);\n\t\tthis.showRightPanelForm();\n\t}\n\t/**\n\t * Show sidebar right panel form\n\t */\n\tshowRightPanelForm() {\n\t\tconst calendarRightPanel = this.getSidebarView();\n\t\tif (!calendarRightPanel.find('.js-right-panel-event').hasClass('active')) {\n\t\t\tcalendarRightPanel.find('.js-right-panel-event-link').trigger('click');\n\t\t}\n\t\tapp.showNewScrollbar(calendarRightPanel.find('.js-calendar__form__wrapper'), {\n\t\t\tsuppressScrollX: true\n\t\t});\n\t}\n\t/**\n\t * Register events to EditView\n\t * @param {jQuery} sideBar\n\t */\n\tregisterEditForm(sideBar) {\n\t\tconst editViewInstance = Vtiger_Edit_Js.getInstanceByModuleName(sideBar.find('[name=\"module\"]').val());\n\t\tlet rightFormCreate = sideBar.find('form.js-form');\n\t\teditViewInstance.registerBasicEvents(rightFormCreate);\n\t\trightFormCreate.validationEngine(app.validationEngineOptions);\n\t\tApp.Fields.Picklist.showSelect2ElementView(sideBar.find('select'));\n\t\tsideBar.find('.js-summary-close-edit').on('click', () => {\n\t\t\tthis.showCalendarCreateView();\n\t\t});\n\t\tApp.Components.QuickCreate.registerPostLoadEvents(rightFormCreate, {\n\t\t\tcallbackFunction: this.registerAfterSubmitForm(this)\n\t\t});\n\t\tnew App.Fields.Text.Editor(sideBar.find('.js-editor'), { height: '5em', toolbar: 'Min' });\n\t}\n\t/**\n\t * Register actions to do after save record\n\t * @param {object} self\n\t * @param {object} data\n\t * @returns {function}\n\t */\n\tregisterAfterSubmitForm(self) {\n\t\tlet returnFunction = function (data) {\n\t\t\tif (data.success) {\n\t\t\t\tself.reloadCalendarData();\n\t\t\t\tself.refreshDatesRowView();\n\t\t\t\tself.getSidebarView().find('.js-qc-form').html('');\n\t\t\t\tself.showCalendarCreateView();\n\t\t\t\twindow.popoverCache = {};\n\t\t\t}\n\t\t};\n\t\treturn returnFunction;\n\t}\n\t/**\n\t * Load calendar data\n\t */\n\tloadCalendarData() {\n\t\tconst self = this,\n\t\t\tprogressInstance = $.progressIndicator({ blockInfo: { enabled: true } });\n\t\tlet options = this.getDefaultParams();\n\t\tself.fullCalendar.removeAllEvents();\n\t\tself.clearFilterButton(options['user']);\n\t\toptions.historyUrl = `index.php?module=${options['module']}&view=Calendar&history=true&viewType=${\n\t\t\tthis.fullCalendar.view.type\n\t\t}&start=${options['start']}&end=${options['end']}&user=${JSON.stringify(options['user'])}&time=${\n\t\t\toptions['time']\n\t\t}&cvid=${options['cvid']}&hiddenDays=${this.fullCalendar.getOption('hiddenDays')}`;\n\t\tlet connectorMethod = window['AppConnector']['request'];\n\t\tif (this.browserHistory && window.calendarLoaded) {\n\t\t\tconnectorMethod = window['AppConnector']['requestPjax'];\n\t\t}\n\t\tif (this.browserHistoryConfig && Object.keys(this.browserHistoryConfig).length && !window.calendarLoaded) {\n\t\t\toptions = Object.assign(options, {\n\t\t\t\tstart: this.browserHistoryConfig.start,\n\t\t\t\tend: this.browserHistoryConfig.end,\n\t\t\t\tuser: this.browserHistoryConfig.user,\n\t\t\t\ttime: this.browserHistoryConfig.time,\n\t\t\t\tcvid: this.browserHistoryConfig.cvid\n\t\t\t});\n\t\t\tconnectorMethod = window['AppConnector']['request'];\n\t\t\tapp.setMainParams('showType', this.browserHistoryConfig.time);\n\t\t\tapp.setMainParams('usersId', this.browserHistoryConfig.user);\n\t\t}\n\t\tconnectorMethod(options).done((events) => {\n\t\t\tself.fullCalendar.removeAllEvents();\n\t\t\tself.fullCalendar.addEventSource(events.result);\n\t\t\tprogressInstance.progressIndicator({ mode: 'hide' });\n\t\t});\n\t\twindow.calendarLoaded = true;\n\t}\n\t/**\n\t * Show create view\n\t * @returns {Promise}\n\t */\n\tshowCalendarCreateView() {\n\t\tconst aDeferred = $.Deferred();\n\t\tif (this.eventCreate == 1) {\n\t\t\tconst sideBar = this.getSidebarView(),\n\t\t\t\tqcForm = sideBar.find('.js-qc-form');\n\t\t\tif (qcForm.find('form').length > 0 && qcForm.find('input[name=record]').length === 0) {\n\t\t\t\taDeferred.resolve(qcForm);\n\t\t\t} else {\n\t\t\t\tlet progressInstance = $.progressIndicator({ blockInfo: { enabled: true } });\n\t\t\t\tthis.showSidebarEvent({ module: this.module, view: 'EventForm' })\n\t\t\t\t\t.done(() => {\n\t\t\t\t\t\tprogressInstance.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\tthis.registerAutofillTime();\n\t\t\t\t\t\taDeferred.resolve(qcForm);\n\t\t\t\t\t})\n\t\t\t\t\t.fail((error) => {\n\t\t\t\t\t\tprogressInstance.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\tapp.errorLog(error);\n\t\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\taDeferred.reject();\n\t\t}\n\t\treturn aDeferred.promise();\n\t}\n\t/**\n\t * Auto select date in create view in extended calendar\n\t */\n\tregisterAutofillTime() {\n\t\tif (app.getMainParams('autofillTime')) {\n\t\t\tthis.container.find('.js-autofill').prop('checked', 'checked').trigger('change');\n\t\t}\n\t}\n\t/**\n\t * Register cache settings\n\t */\n\tregisterCacheSettings() {\n\t\tconst self = this;\n\t\t$('.siteBarRight .filterField').each(function (index) {\n\t\t\tlet name = $(this).attr('id');\n\t\t\tlet value = app.moduleCacheGet(name);\n\t\t\tlet element = $('#' + name);\n\t\t\tif (element.length > 0 && value != null) {\n\t\t\t\tif (element.attr('type') == 'checkbox') {\n\t\t\t\t\telement.prop('checked', value);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tthis.getCalendarView()\n\t\t\t.find('.fc-toolbar .fc-button')\n\t\t\t.on('click', function (e) {\n\t\t\t\tlet element = $(e.currentTarget);\n\t\t\t\tif (element.hasClass('fc-' + self.fullCalendar.view.type + '-button')) {\n\t\t\t\t\tapp.moduleCacheSet('defaultView', self.fullCalendar.view.type);\n\t\t\t\t} else if (\n\t\t\t\t\telement.hasClass('fc-prev-button') ||\n\t\t\t\t\telement.hasClass('fc-next-button') ||\n\t\t\t\t\telement.hasClass('fc-today-button')\n\t\t\t\t) {\n\t\t\t\t\tapp.moduleCacheSet('start', App.Fields.Date.dateToUserFormat(self.fullCalendar.view.activeStart));\n\t\t\t\t\tapp.moduleCacheSet('end', App.Fields.Date.dateToUserFormat(self.fullCalendar.view.activeEnd));\n\t\t\t\t}\n\t\t\t});\n\t\tconst keys = app.moduleCacheKeys();\n\t\tif (keys.length > 0) {\n\t\t\tlet alert = $('#moduleCacheAlert');\n\t\t\talert.find('.cacheClear').on('click', function (e) {\n\t\t\t\tapp.moduleCacheClear();\n\t\t\t\talert.addClass('d-none');\n\t\t\t\tlocation.reload();\n\t\t\t});\n\t\t}\n\t}\n\t/**\n\t * Register site bar events\n\t */\n\tregisterSiteBarEvents() {\n\t\tlet calendarRightPanel = $('.js-calendar-right-panel');\n\t\tcalendarRightPanel.find('.js-show-sitebar').on('click', () => {\n\t\t\tif (calendarRightPanel.hasClass('hideSiteBar')) {\n\t\t\t\tcalendarRightPanel.find('.js-toggle-site-bar-right-button').trigger('click');\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t * Register popover buttons' click\n\t */\n\tregisterPopoverButtonsClickEvent() {\n\t\t$(document).on('click', '.js-calendar-popover__button', this.showCalendarPopoverLinkInSidebar.bind(this));\n\t}\n\t/**\n\t * Show popover link in sidebar\n\t * @param {jQuery.Event} e click event\n\t * @returns {boolean}\n\t */\n\tshowCalendarPopoverLinkInSidebar(e) {\n\t\tlet href = e.currentTarget.href;\n\t\tconst hrefObject = app.convertUrlToObject(href);\n\t\tif (hrefObject.module !== 'Calendar' || (hrefObject.view !== 'Edit' && hrefObject.view !== 'Detail')) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\te.preventDefault();\n\t\t\tconst sidebarView = hrefObject.view === 'Edit' ? 'EventForm' : 'ActivityState';\n\t\t\thref = href.replace(hrefObject.view, sidebarView);\n\t\t\tthis.showSidebarEvent(href);\n\t\t}\n\t}\n\t/**\n\t * Register events\n\t */\n\tregisterEvents() {\n\t\tsuper.registerEvents();\n\t\tthis.registerSiteBarEvents();\n\t\tthis.registerPopoverButtonsClickEvent();\n\t\tElementQueries.listen();\n\t\tthis.showCalendarCreateView();\n\t}\n};\n"],"names":["_typeof","o","Symbol","iterator","constructor","prototype","_classCallCheck","instance","Constructor","TypeError","_defineProperties","target","props","descriptor","i","length","enumerable","configurable","writable","Object","defineProperty","_toPropertyKey","key","_createClass","protoProps","staticProps","arg","_toPrimitive","String","input","hint","prim","toPrimitive","res","call","Number","_get","Reflect","get","bind","property","receiver","base","_superPropBase","desc","getOwnPropertyDescriptor","arguments","value","apply","object","hasOwnProperty","_getPrototypeOf","_inherits","subClass","superClass","create","_setPrototypeOf","p","setPrototypeOf","__proto__","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","result","Super","NewTarget","construct","_possibleConstructorReturn","self","_assertThisInitialized","ReferenceError","sham","Proxy","Boolean","valueOf","e","getPrototypeOf","window","calendarLoaded","Calendar_Calendar_Js","_Vtiger_Calendar_Js","container","readonly","browserHistory","_super","setCalendarModuleOptions","_this","allDaySlot","app","getMainParams","dateClick","args","eventCreate","showCalendarCreateView","done","form","getSidebarView","find","hasClass","trigger","dayCallbackCreateModal","selectable","eventClick","info","jsEvent","preventDefault","element","$","el","link","attr","eventEdit","showSidebarEvent","location","assign","replace","params","_this2","aDeferred","Deferred","progressInstance","progressIndicator","blockInfo","enabled","module","view","record","AppConnector","request","data","mode","openRightPanel","updateSidebar","sidebar","registerEditForm","showNewScrollbar","suppressScrollX","on","resolve","fail","error","errorLog","promise","html","showRightPanelForm","calendarRightPanel","sideBar","_this3","editViewInstance","Vtiger_Edit_Js","getInstanceByModuleName","val","rightFormCreate","registerBasicEvents","validationEngine","validationEngineOptions","App","Fields","Picklist","showSelect2ElementView","Components","QuickCreate","registerPostLoadEvents","callbackFunction","registerAfterSubmitForm","Text","Editor","height","toolbar","returnFunction","success","reloadCalendarData","refreshDatesRowView","popoverCache","loadCalendarData","options","getDefaultParams","fullCalendar","removeAllEvents","clearFilterButton","user","historyUrl","concat","type","start","end","JSON","stringify","time","cvid","getOption","connectorMethod","requestPjax","browserHistoryConfig","keys","setMainParams","events","addEventSource","_this4","qcForm","registerAutofillTime","reject","prop","registerCacheSettings","each","name","moduleCacheGet","getCalendarView","currentTarget","moduleCacheSet","Date","dateToUserFormat","activeStart","activeEnd","moduleCacheKeys","alert","moduleCacheClear","addClass","reload","registerSiteBarEvents","registerPopoverButtonsClickEvent","document","showCalendarPopoverLinkInSidebar","href","hrefObject","convertUrlToObject","sidebarView","registerEvents","ElementQueries","listen","goToRecordsList","pageController","status","searchParams","join","selectedIds","encodeURIComponent","Vtiger_Calendar_Js"],"mappings":";;AAAA,kKACA,YAAY,CACZ;AACA;AACA;AACA,GAHA,SAAAA,OAAAA,CAAAC,CAAA,CAAA,CAAA,yBAAA,CAAA,OAAAD,OAAA,CAAA,UAAA,EAAA,OAAAE,MAAA,EAAA,QAAA,EAAA,OAAAA,MAAA,CAAAC,QAAA,CAAA,SAAAF,CAAA,CAAA,CAAA,OAAA,OAAAA,CAAA,CAAA,CAAA,SAAAA,CAAA,CAAA,CAAA,OAAAA,CAAA,EAAA,UAAA,EAAA,OAAAC,MAAA,EAAAD,CAAA,CAAAG,WA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A,CAAAA,CAAAA,CAAAA,GAAA,CAAAyB,iBAAAA,CAAAA,KAAA;AAvUF;AACA;AACA,IACC,SAAAwL,eAAAA,CAAuBzH,IAAI,CAAE,CAC5B,IAAMzC,IAAI,CAAGoB,GAAG,CAAC+I,cAAc,CAC9BC,MAAM,CAAGhJ,GAAG,CAACC,aAAa,CAAC,qBAAqB,CAAM,CAAA,CAAA,CAAC,CACvDsF,OAAO,CAAG3G,IAAI,CAAC4G,gBAAgB,EAAE,CAEjCnE,IAAI,EADDkE,OAAO,CAAAc,IAAQ,CACV,YAAY,CAAGd,OAAO,CAAAc,IAAQ,CAE9B,eAAe,CAExB,IAAI4C,YAAY,CAAG,8BAAyB,CAAGD,MAAM,CAAChJ,GAAG,CAACC,aAAa,CAAC,UAAU,CAAC,CAAC,CAACiJ,IAAI,EAAE,CAAG,KAAI,CAClGD,YAAY,EAAI,4BAAuB,CAAG1D,OAAO,CAAAS,KAAS,CAAG,YAAY,CAAGT,OAAO,CAAAU,GAAO,CAAG,cAAa,CACtGV,OAAO,CAAAK,IAAQ,GAClBqD,YAAY,EAAI,iCAA4B,CAAG1D,OAAO,CAAAK,IAAQ,CAAAuD,WAAe,CAACD,IAAI,CAAC,IAAI,CAAC,CAAG,KAAI,CAAA,CAEhG7H,IAAI,EAAI,mBAAmB,CAAG+H,kBAAkB,CAACH,YAAY,CAAC,CAAG,IAAI,CACrE5J,MAAM,CAACoC,QAAQ,CAAC8G,IAAI,CAAGlH,KACxB,CAAC,CAAA,CAAA,CAAA,CAAA9B,oBAAA,CAAA,CArB+D8J,kBAAkB,CA0UlF;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/Calendar/resources/Detail.min.js b/public_html/layouts/basic/modules/Calendar/resources/Detail.min.js index 1c4b3a37ed64..5b93492e9449 100644 --- a/public_html/layouts/basic/modules/Calendar/resources/Detail.min.js +++ b/public_html/layouts/basic/modules/Calendar/resources/Detail.min.js @@ -1,4 +1,4 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */"use strict";Vtiger_Detail_Js("Calendar_Detail_Js",{deleteRecord:function deleteRecord(deleteRecordActionUrl){app.showConfirmModal({text:app.vtranslate("LBL_DELETE_CONFIRMATION"),confirmedCallback:function confirmedCallback(){app.showModalWindow($(".typeRemoveModal").clone(),function(container){container.find(".typeSavingBtn").on("click",function(e){var currentTarget=$(e.currentTarget);app.hideModalWindow(),AppConnector.request(deleteRecordActionUrl+"&typeRemove="+currentTarget.data("value")).done(function(data){!0==data.success?window.location.href=data.result:app.showNotify({text:data.error.message,type:"error"});});});});}});}},{}); +/* {[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]} */"use strict";Vtiger_Detail_Js("Calendar_Detail_Js",{deleteRecord:function deleteRecord(deleteRecordActionUrl){app.showConfirmModal({text:app.vtranslate("LBL_DELETE_CONFIRMATION"),confirmedCallback:function confirmedCallback(){app.showModalWindow($(".typeRemoveModal").clone(),function(container){container.find(".typeSavingBtn").on("click",function(e){var currentTarget=$(e.currentTarget);app.hideModalWindow(),AppConnector.request(deleteRecordActionUrl+"&typeRemove="+currentTarget.data("value")).done(function(data){!0==data.success?window.location.href=data.result:app.showNotify({text:data.error.message,type:"error"});});});});}});}},{}); //# sourceMappingURL=Detail.min.js.map diff --git a/public_html/layouts/basic/modules/Calendar/resources/Detail.min.js.map b/public_html/layouts/basic/modules/Calendar/resources/Detail.min.js.map index c65bb987e055..033b15562b35 100644 --- a/public_html/layouts/basic/modules/Calendar/resources/Detail.min.js.map +++ b/public_html/layouts/basic/modules/Calendar/resources/Detail.min.js.map @@ -1 +1 @@ -{"version":3,"file":"Detail.min.js","sources":["Detail.js"],"sourcesContent":["/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */\n'use strict';\n\nVtiger_Detail_Js(\n\t'Calendar_Detail_Js',\n\t{\n\t\tdeleteRecord: function (deleteRecordActionUrl) {\n\t\t\tapp.showConfirmModal({\n\t\t\t\ttext: app.vtranslate('LBL_DELETE_CONFIRMATION'),\n\t\t\t\tconfirmedCallback: () => {\n\t\t\t\t\tapp.showModalWindow($('.typeRemoveModal').clone(), function (container) {\n\t\t\t\t\t\tcontainer.find('.typeSavingBtn').on('click', function (e) {\n\t\t\t\t\t\t\tvar currentTarget = $(e.currentTarget);\n\t\t\t\t\t\t\tapp.hideModalWindow();\n\t\t\t\t\t\t\tAppConnector.request(deleteRecordActionUrl + '&typeRemove=' + currentTarget.data('value')).done(function (\n\t\t\t\t\t\t\t\tdata\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tif (data.success == true) {\n\t\t\t\t\t\t\t\t\twindow.location.href = data.result;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\t\t\ttext: data.error.message,\n\t\t\t\t\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t},\n\t{}\n);\n"],"names":["Vtiger_Detail_Js","deleteRecord","deleteRecordActionUrl","app","showConfirmModal","text","vtranslate","confirmedCallback","showModalWindow","$","clone","container","find","on","e","currentTarget","hideModalWindow","AppConnector","request","data","done","success","window","location","href","result","showNotify","error","message","type"],"mappings":";;AAAA,kKACA,YAEAA,CAAAA,gBAAgB,CACf,oBADe,CAEf,CACCC,YAAY,CAAE,SAAA,YAAA,CAAUC,qBAAV,CAAiC,CAC9CC,GAAG,CAACC,gBAAJ,CAAqB,CACpBC,IAAI,CAAEF,GAAG,CAACG,UAAJ,CAAe,yBAAf,CADc,CAEpBC,iBAAiB,CAAE,SAAA,iBAAA,EAAM,CACxBJ,GAAG,CAACK,eAAJ,CAAoBC,CAAC,CAAC,kBAAD,CAAD,CAAsBC,KAAtB,EAApB,CAAmD,SAAUC,SAAV,CAAqB,CACvEA,SAAS,CAACC,IAAV,CAAe,gBAAf,CAAA,CAAiCC,EAAjC,CAAoC,OAApC,CAA6C,SAAUC,CAAV,CAAa,CACzD,IAAiB,aAAA,CAAGL,CAAC,CAACK,CAAC,CAACC,aAAH,CAArB,CACAZ,GAAG,CAACa,eAAJ,EAFyD,CAGzDC,YAAY,CAACC,OAAb,CAAqBhB,qBAAqB,CAAG,cAAxB,CAAyCa,aAAa,CAACI,IAAd,CAAmB,OAAnB,CAA9D,CAA2FC,CAAAA,IAA3F,CAAgG,SAC/FD,IAD+F,CAE9F,CACG,CAAAA,CAAAA,EAAAA,IAAI,CAACE,OADR,CAEAC,MAAM,CAACC,QAAP,CAAgBC,IAAhB,CAAuBL,IAAI,CAACM,MAF5B,CAIAtB,GAAG,CAACuB,UAAJ,CAAe,CACdrB,IAAI,CAAEc,IAAI,CAACQ,KAAL,CAAWC,OADH,CAEdC,IAAI,CAAE,OAFQ,CAAf,EAKD,CAXD,EAYA,CAfD,EAgBA,CAjBD,EAkBA,CArBmB,CAArB,EAuBA,CAzBF,CAFe,CA6Bf,EA7Be;;"} \ No newline at end of file +{"version":3,"file":"Detail.min.js","sources":["Detail.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\nVtiger_Detail_Js(\n\t'Calendar_Detail_Js',\n\t{\n\t\tdeleteRecord: function (deleteRecordActionUrl) {\n\t\t\tapp.showConfirmModal({\n\t\t\t\ttext: app.vtranslate('LBL_DELETE_CONFIRMATION'),\n\t\t\t\tconfirmedCallback: () => {\n\t\t\t\t\tapp.showModalWindow($('.typeRemoveModal').clone(), function (container) {\n\t\t\t\t\t\tcontainer.find('.typeSavingBtn').on('click', function (e) {\n\t\t\t\t\t\t\tvar currentTarget = $(e.currentTarget);\n\t\t\t\t\t\t\tapp.hideModalWindow();\n\t\t\t\t\t\t\tAppConnector.request(deleteRecordActionUrl + '&typeRemove=' + currentTarget.data('value')).done(function (\n\t\t\t\t\t\t\t\tdata\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tif (data.success == true) {\n\t\t\t\t\t\t\t\t\twindow.location.href = data.result;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\t\t\ttext: data.error.message,\n\t\t\t\t\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t},\n\t{}\n);\n"],"names":["Vtiger_Detail_Js","deleteRecord","deleteRecordActionUrl","app","showConfirmModal","text","vtranslate","confirmedCallback","showModalWindow","$","clone","container","find","on","e","currentTarget","hideModalWindow","AppConnector","request","data","done","success","window","location","href","result","showNotify","error","message","type"],"mappings":";;AAAA,kKACA,YAAY,CAEZA,gBAAgB,CACf,oBAAoB,CACpB,CACCC,YAAY,CAAE,SAAAA,YAAUC,CAAAA,qBAAqB,CAAE,CAC9CC,GAAG,CAACC,gBAAgB,CAAC,CACpBC,IAAI,CAAEF,GAAG,CAACG,UAAU,CAAC,yBAAyB,CAAC,CAC/CC,iBAAiB,CAAE,SAAAA,iBAAAA,EAAM,CACxBJ,GAAG,CAACK,eAAe,CAACC,CAAC,CAAC,kBAAkB,CAAC,CAACC,KAAK,EAAE,CAAE,SAAUC,SAAS,CAAE,CACvEA,SAAS,CAACC,IAAI,CAAC,gBAAgB,CAAC,CAACC,EAAE,CAAC,OAAO,CAAE,SAAUC,CAAC,CAAE,CACzD,IAAIC,aAAa,CAAGN,CAAC,CAACK,CAAC,CAACC,aAAa,CAAC,CACtCZ,GAAG,CAACa,eAAe,EAAE,CACrBC,YAAY,CAACC,OAAO,CAAChB,qBAAqB,CAAG,cAAc,CAAGa,aAAa,CAACI,IAAI,CAAC,OAAO,CAAC,CAAC,CAACC,IAAI,CAAC,SAC/FD,IAAI,CACH,CACG,CAAAA,CAAAA,EAAAA,IAAI,CAACE,OAAe,CACvBC,MAAM,CAACC,QAAQ,CAACC,IAAI,CAAGL,IAAI,CAACM,MAAM,CAElCtB,GAAG,CAACuB,UAAU,CAAC,CACdrB,IAAI,CAAEc,IAAI,CAACQ,KAAK,CAACC,OAAO,CACxBC,IAAI,CAAE,OACP,CAAC,EAEH,CAAC,EACF,CAAC,EACF,CAAC,EACF,CACD,CAAC,EACF,CACD,CAAC,CACD,EACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/Calendar/resources/Edit.min.js.map b/public_html/layouts/basic/modules/Calendar/resources/Edit.min.js.map index a0840b4e2d53..c58700f8e58f 100644 --- a/public_html/layouts/basic/modules/Calendar/resources/Edit.min.js.map +++ b/public_html/layouts/basic/modules/Calendar/resources/Edit.min.js.map @@ -1 +1 @@ -{"version":3,"file":"Edit.min.js","sources":["Edit.js"],"sourcesContent":["/*+***********************************************************************************\n * The contents of this file are subject to the vtiger CRM Public License Version 1.0\n * (\"License\"); You may not use this file except in compliance with the License\n * The Original Code is: vtiger CRM Open Source\n * The Initial Developer of the Original Code is vtiger.\n * Portions created by vtiger are Copyright (C) vtiger.\n * All Rights Reserved.\n * Contributor(s): YetiForce S.A.\n *************************************************************************************/\n'use strict';\n\nVtiger_Edit_Js(\n\t'Calendar_Edit_Js',\n\t{\n\t\tcurrencyInstance: false,\n\t\tcheckEmail(field, rules, i, options) {\n\t\t\tif (Calendar_Edit_Js.currencyInstance.emailExists(field.val())) {\n\t\t\t\treturn app.vtranslate('JS_DUPLICATE_RECORD') + ': ' + field.val();\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t},\n\t{\n\t\tinit() {\n\t\t\tCalendar_Edit_Js.currencyInstance = this;\n\t\t},\n\t\tregisterReminderFieldCheckBox: function () {\n\t\t\tlet element = this.getForm().find('.js-reminder-field-checkbox');\n\t\t\telement.on('change', function (e) {\n\t\t\t\tlet rowElement = element.closest('.js-reminder-field-element').find('.js-reminder-field-row');\n\t\t\t\tif (element.is(':checked')) {\n\t\t\t\t\trowElement.removeClass('d-none');\n\t\t\t\t} else {\n\t\t\t\t\trowElement.addClass('d-none');\n\t\t\t\t}\n\t\t\t});\n\t\t\telement.change();\n\t\t},\n\t\t/**\n\t\t * Function which will register change event on recurrence field checkbox\n\t\t */\n\t\tregisterRecurrenceFieldCheckBox: function () {\n\t\t\tconst form = this.getForm(),\n\t\t\t\telement = form.find('input[name=\"reapeat\"]');\n\t\t\telement.on('change', function (e) {\n\t\t\t\tlet repeatUI = form.find('.js-repeat-ui'),\n\t\t\t\t\tcontainer = form.find('[name=\"followup\"]').closest('.fieldValue');\n\t\t\t\tif ($(e.currentTarget).is(':checked')) {\n\t\t\t\t\trepeatUI.closest('.fieldRow').removeClass('d-none');\n\t\t\t\t\tcontainer.find('[name=\"followup_display\"]').attr('disabled', 'disabled');\n\t\t\t\t\tcontainer.find('button').attr('disabled', 'disabled');\n\t\t\t\t} else {\n\t\t\t\t\tcontainer.find('[name=\"followup_display\"]').removeAttr('disabled');\n\t\t\t\t\tcontainer.find('button').removeAttr('disabled');\n\t\t\t\t\trepeatUI.closest('.fieldRow').addClass('d-none');\n\t\t\t\t}\n\t\t\t});\n\t\t\telement.change();\n\t\t},\n\t\t/**\n\t\t * Function which will register the change event for recurring type\n\t\t */\n\t\tregisterRecurringTypeChangeEvent: function () {\n\t\t\tvar container = this.getForm();\n\t\t\tvar thisInstance = this;\n\t\t\tcontainer.find('.recurringType').on('change', function (e) {\n\t\t\t\tthisInstance.changeRecurringTypesUIStyles(jQuery(e.currentTarget).val());\n\t\t\t});\n\t\t\tcontainer.find('.js-repeat-ui [name=\"calendarEndType\"]').on('change', function (e) {\n\t\t\t\tvar currentTarget = $(e.currentTarget);\n\t\t\t\tvar value = currentTarget.val();\n\t\t\t\tif (value === 'never') {\n\t\t\t\t\tcontainer.find('.countEvents').attr('disabled', 'disabled');\n\t\t\t\t\tcontainer.find('.calendarUntil').attr('disabled', 'disabled');\n\t\t\t\t} else if (value === 'count') {\n\t\t\t\t\tcontainer.find('.countEvents').removeAttr('disabled');\n\t\t\t\t\tcontainer.find('.calendarUntil').attr('disabled', 'disabled');\n\t\t\t\t} else if (value === 'until') {\n\t\t\t\t\tcontainer.find('.countEvents').attr('disabled', 'disabled');\n\t\t\t\t\tcontainer.find('.calendarUntil').removeAttr('disabled');\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Function which will change the UI styles based on recurring type\n\t\t * @params - recurringType - which recurringtype is selected\n\t\t */\n\t\tchangeRecurringTypesUIStyles: function (recurringType) {\n\t\t\tvar container = this.getForm();\n\t\t\tif (recurringType == 'DAILY' || recurringType == 'YEARLY') {\n\t\t\t\tcontainer.find('.repeatWeekUI').removeClass('show').addClass('d-none');\n\t\t\t\tcontainer.find('.repeatMonthUI').removeClass('show').addClass('d-none');\n\t\t\t} else if (recurringType == 'WEEKLY') {\n\t\t\t\tcontainer.find('.repeatWeekUI').removeClass('d-none').addClass('show');\n\t\t\t\tcontainer.find('.repeatMonthUI').removeClass('show').addClass('d-none');\n\t\t\t} else if (recurringType == 'MONTHLY') {\n\t\t\t\tcontainer.find('.repeatWeekUI').removeClass('show').addClass('d-none');\n\t\t\t\tcontainer.find('.repeatMonthUI').removeClass('d-none').addClass('show');\n\t\t\t}\n\t\t},\n\t\tsetDefaultEndTime: function (container) {\n\t\t\tconst self = this;\n\t\t\tif (container.find('.js-autofill').is(':checked')) {\n\t\t\t\tself.getFreeTime(container);\n\t\t\t} else {\n\t\t\t\tif ('1' === $('[name=\"userChangedEndDateTime\"]').val()) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tlet dateStartElement = container.find('[name=\"date_start\"]'),\n\t\t\t\t\tstartTimeElement = container.find('[name=\"time_start\"]'),\n\t\t\t\t\tendTimeElement = container.find('[name=\"time_end\"]'),\n\t\t\t\t\tendDateElement = container.find('[name=\"due_date\"]'),\n\t\t\t\t\tstartDate = dateStartElement.val(),\n\t\t\t\t\tstartTime = startTimeElement.val(),\n\t\t\t\t\tresult = Vtiger_Time_Validator_Js.invokeValidation(startTimeElement);\n\t\t\t\tif (true !== result) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tlet activityType = container.find('[name=\"activitytype\"]');\n\t\t\t\tlet activityTypeValue = activityType.val();\n\t\t\t\tif (activityType.is('[type=\"radio\"]')) {\n\t\t\t\t\tactivityTypeValue = activityType.filter(':checked').val();\n\t\t\t\t}\n\t\t\t\tlet startDateTime = startDate + ' ' + startTime,\n\t\t\t\t\tdateFormat = container.find('[name=\"due_date\"]').data('dateFormat').toUpperCase(),\n\t\t\t\t\ttimeFormat = endTimeElement.data('format'),\n\t\t\t\t\tactivityDurations = JSON.parse(container.find('[name=\"defaultOtherEventDuration\"]').val()),\n\t\t\t\t\tminutes = 0;\n\t\t\t\tfor (let i in activityDurations) {\n\t\t\t\t\tif (activityDurations[i].activitytype === activityTypeValue) {\n\t\t\t\t\t\tminutes = parseInt(activityDurations[i].duration);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlet defaultTimeFormat = 'HH:mm';\n\t\t\t\tif (12 === timeFormat) {\n\t\t\t\t\tdefaultTimeFormat = 'hh:mm A';\n\t\t\t\t}\n\t\t\t\tlet endDate = moment(startDateTime, dateFormat + ' ' + defaultTimeFormat).add(minutes, 'minutes');\n\t\t\t\tendDateElement.val(endDate.format(dateFormat));\n\t\t\t\tendTimeElement.val(endDate.format(defaultTimeFormat));\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Function to change the end time based on default call duration\n\t\t */\n\t\tregisterActivityTypeChangeEvent: function (container) {\n\t\t\tconst thisInstance = this;\n\t\t\tcontainer.on('change', '[name=\"activitytype\"]', function (e) {\n\t\t\t\tthisInstance.setDefaultEndTime(container);\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Function to change the end time based on default call duration\n\t\t */\n\t\tregisterTimeStartChangeEvent(container) {\n\t\t\tconst thisInstance = this;\n\t\t\tcontainer.find('input[name=\"time_start\"]').on('change', function (e) {\n\t\t\t\tthisInstance.setDefaultEndTime(container);\n\t\t\t});\n\t\t\tcontainer.find('[name=\"date_start\"]').on('change', function (e) {\n\t\t\t\tlet endDateElement = container.find('[name=\"due_date\"]'),\n\t\t\t\t\tstart = thisInstance.getDateInstance(container, 'start'),\n\t\t\t\t\tend = thisInstance.getDateInstance(container, 'end'),\n\t\t\t\t\tdateFormat = CONFIG.dateFormat.toUpperCase();\n\t\t\t\tcontainer.find('.js-autofill').trigger('change');\n\t\t\t\tif (start > end) {\n\t\t\t\t\tend = start;\n\t\t\t\t\tendDateElement.val(moment(end).format(dateFormat));\n\t\t\t\t\tApp.Fields.Date.register(container);\n\t\t\t\t}\n\t\t\t});\n\t\t\tcontainer.find('input[name=\"time_start\"]').on('focus', function (e) {\n\t\t\t\tlet element = $(e.currentTarget);\n\t\t\t\telement.data('prevValue', element.val());\n\t\t\t});\n\t\t\tcontainer.find('input[name=\"time_start\"]').on('blur', function (e, data) {\n\t\t\t\tif (typeof data === 'undefined') {\n\t\t\t\t\tdata = {};\n\t\t\t\t}\n\t\t\t\tif (typeof data.forceChange === 'undefined') {\n\t\t\t\t\tdata.forceChange = false;\n\t\t\t\t}\n\t\t\t\tlet element = $(e.currentTarget);\n\t\t\t\tif (element.val() !== element.data('prevValue') || data.forceChange) {\n\t\t\t\t\te = $.Event('keydown');\n\t\t\t\t\te.which = 13;\n\t\t\t\t\te.keyCode = 13;\n\t\t\t\t\telement.trigger(e);\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tregisterEndDateTimeChangeLogger: function (container) {\n\t\t\tcontainer.find('[name=\"time_end\"]').on('change', function (e) {\n\t\t\t\tlet timeElement = jQuery(e.currentTarget);\n\t\t\t\tlet result = Vtiger_Time_Validator_Js.invokeValidation(timeElement);\n\t\t\t\tif (result != true) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tlet timeDateElement = timeElement.closest('.fieldValue').find('[name=\"due_date\"]');\n\t\t\t\tjQuery('[name=\"userChangedEndDateTime\"]').val('1');\n\t\t\t\ttimeDateElement.data('userChangedTime', true);\n\t\t\t});\n\n\t\t\tcontainer.find('[name=\"due_date\"]').on('change', function (e) {\n\t\t\t\tlet dueDateElement = jQuery(e.currentTarget);\n\t\t\t\tlet result = Vtiger_Date_Validator_Js.invokeValidation(dueDateElement);\n\t\t\t\tif (result != true) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tjQuery('[name=\"userChangedEndDateTime\"]').val('1');\n\t\t\t\tdueDateElement.data('userChangedTime', true);\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t *\n\t\t * @returns {String}\n\t\t */\n\t\tgetRule: function () {\n\t\t\tvar form = this.getForm();\n\t\t\tvar freq = form.find('.recurringType').val();\n\t\t\tvar rule = 'FREQ=' + freq;\n\t\t\trule += ';INTERVAL=' + form.find('.repeatFrequency').val();\n\t\t\tvar endValue = form.find('.js-repeat-ui [name=\"calendarEndType\"]:checked').val();\n\t\t\tif (endValue === 'count') {\n\t\t\t\trule += ';COUNT=' + form.find('.countEvents').val();\n\t\t\t} else if (endValue === 'until') {\n\t\t\t\tlet date = App.Fields.Date.dateToDbFormat(App.Fields.Date.getDateInstance(form.find('.calendarUntil').val()));\n\t\t\t\trule += ';UNTIL=' + date.replace(/-/gi, '') + 'T235959';\n\t\t\t}\n\t\t\tif (freq === 'WEEKLY') {\n\t\t\t\tvar checkedElements = [];\n\t\t\t\tform.find('.repeatWeekUI [type=\"checkbox\"]').each(function () {\n\t\t\t\t\tvar currentTarget = $(this);\n\t\t\t\t\tif (currentTarget.is(':checked')) {\n\t\t\t\t\t\tcheckedElements.push(currentTarget.val());\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tif (checkedElements.length > 0) {\n\t\t\t\t\trule += ';BYDAY=' + checkedElements.join(',');\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (freq === 'MONTHLY') {\n\t\t\t\tconst dateInstance = App.Fields.Date.getDateInstance(form.find('[name=\"date_start\"]').val());\n\t\t\t\tlet dayOfMonth = dateInstance.getDate();\n\t\t\t\tif (form.find('.calendarMontlyType:checked').val() == 'DAY') {\n\t\t\t\t\tlet dayOfWeekLabel = '';\n\t\t\t\t\tswitch (dateInstance.getDay()) {\n\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\tdayOfWeekLabel = 'SU';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\tdayOfWeekLabel = 'MO';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\tdayOfWeekLabel = 'TU';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\tdayOfWeekLabel = 'WE';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\tdayOfWeekLabel = 'TU';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 5:\n\t\t\t\t\t\t\tdayOfWeekLabel = 'FR';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 6:\n\t\t\t\t\t\t\tdayOfWeekLabel = 'SA';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\trule += ';BYDAY=' + (parseInt((dayOfMonth - 1) / 7) + 1) + dayOfWeekLabel;\n\t\t\t\t} else {\n\t\t\t\t\trule += ';BYMONTHDAY=' + dayOfMonth;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn rule;\n\t\t},\n\t\t/**\n\t\t * This function will register the submit event on form\n\t\t * @param {jQuery} form\n\t\t */\n\t\tregisterFormSubmitEvent: function (form) {\n\t\t\tvar thisInstance = this;\n\t\t\tvar lockSave = true;\n\t\t\tif (app.getRecordId()) {\n\t\t\t\tform.on(Vtiger_Edit_Js.recordPreSave, function (e) {\n\t\t\t\t\tif (lockSave && form.find('input[name=\"reapeat\"]').is(':checked')) {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\tapp.showModalWindow(form.find('.typeSavingModal').clone(), function (container) {\n\t\t\t\t\t\t\tcontainer.find('.typeSavingBtn').on('click', function (e) {\n\t\t\t\t\t\t\t\tvar currentTarget = $(e.currentTarget);\n\t\t\t\t\t\t\t\tform.find('[name=\"typeSaving\"]').val(currentTarget.data('value'));\n\t\t\t\t\t\t\t\tapp.hideModalWindow();\n\t\t\t\t\t\t\t\tlockSave = false;\n\t\t\t\t\t\t\t\tform.submit();\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\tform.on('submit', function (e) {\n\t\t\t\tconst recurringCheck = form.find('input[name=\"reapeat\"]').is(':checked');\n\t\t\t\tif (recurringCheck) {\n\t\t\t\t\tif (app.getRecordId() && lockSave) {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t\tform.find('[name=\"recurrence\"]').val(thisInstance.getRule());\n\t\t\t\t}\n\t\t\t\tlet rows = form.find('.js-participants-content .js-participant-row');\n\t\t\t\tlet invitees = [];\n\t\t\t\trows.each(function (index, domElement) {\n\t\t\t\t\tlet row = $(domElement);\n\t\t\t\t\tif (row.data('email')) {\n\t\t\t\t\t\tinvitees.push([row.data('email'), row.data('crmid'), row.data('ivid'), row.data('name')]);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t$('').appendTo(form).val(JSON.stringify(invitees));\n\t\t\t});\n\t\t},\n\t\tgetFreeTime: function (container) {\n\t\t\tlet ownerId = container.find('[name=\"assigned_user_id\"], [data-element-name=\"assigned_user_id\"]');\n\t\t\tif (ownerId.length === 0 || !ownerId.val()) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tlet timeStart = container.find('[name=\"time_start\"], [data-element-name=\"time_start\"]');\n\t\t\tlet timeEnd = container.find('[name=\"time_end\"], [data-element-name=\"time_end\"]');\n\t\t\tlet dateStart = container.find('[name=\"date_start\"], [data-element-name=\"date_start\"]');\n\t\t\tlet params = {\n\t\t\t\tmodule: 'Calendar',\n\t\t\t\taction: 'GetFreeTime',\n\t\t\t\tdateStart: dateStart.val(),\n\t\t\t\townerId: ownerId.val(),\n\t\t\t\tactivitytype: container.find('[name=\"activitytype\"]').val()\n\t\t\t};\n\t\t\tlet progress = $.progressIndicator({ position: 'html', blockInfo: { enabled: true } });\n\t\t\tAppConnector.request(params).done(function (data) {\n\t\t\t\tprogress.progressIndicator({ mode: 'hide' });\n\t\t\t\tif (data.result.date_start !== null) {\n\t\t\t\t\ttimeStart.val(data.result.time_start);\n\t\t\t\t\ttimeEnd.val(data.result.time_end);\n\t\t\t\t\tdateStart.val(data.result.date_start);\n\t\t\t\t\tcontainer.find('[name=\"due_date\"]').val(data.result.date_start);\n\t\t\t\t} else {\n\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\ttext: app.vtranslate('JS_ERROR_MAX_VALUE'),\n\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t});\n\t\t\t\t\tcontainer.find('.js-autofill').prop('checked', false).trigger('change');\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tregisterAutoFillHours: function (container) {\n\t\t\tconst thisInstance = this;\n\t\t\tlet allDay = container.find('[name=\"allday\"]'),\n\t\t\t\ttimeStart = container.find('[name=\"time_start\"]'),\n\t\t\t\ttimeEnd = container.find('[name=\"time_end\"]'),\n\t\t\t\tdateEnd = container.find('[name=\"due_date\"]'),\n\t\t\t\tautoFill = container.find('.js-autofill');\n\t\t\tcontainer.find('.js-autofill__icon').on('click', function (e) {\n\t\t\t\tif (autoFill.is(':checked')) {\n\t\t\t\t\t$(e.currentTarget).closest('.input-group-text').removeClass('bg-color-blue-700').removeClass('text-white');\n\t\t\t\t\tautoFill.prop('checked', false).trigger('change');\n\t\t\t\t} else {\n\t\t\t\t\t$(e.currentTarget).closest('.input-group-text').addClass('bg-color-blue-700').addClass('text-white');\n\t\t\t\t\tautoFill.prop('checked', true).trigger('change');\n\t\t\t\t}\n\t\t\t});\n\t\t\tcontainer.find('.js-autofill').on('change', function (e) {\n\t\t\t\tlet currentTarget = $(e.currentTarget);\n\t\t\t\tif (currentTarget.is(':checked')) {\n\t\t\t\t\tcontainer.find('.js-autofill').prop('checked', true);\n\t\t\t\t\tthisInstance.getFreeTime(container);\n\t\t\t\t\ttimeStart.attr('readonly', 'readonly');\n\t\t\t\t\ttimeEnd.attr('readonly', 'readonly');\n\t\t\t\t\ttimeStart.clockpicker('remove');\n\t\t\t\t\ttimeEnd.clockpicker('remove');\n\t\t\t\t\tallDay.attr('disabled', 'disabled');\n\t\t\t\t\tallDay.prop('checked', false);\n\t\t\t\t\tallDay.trigger('change');\n\t\t\t\t\tdateEnd.attr('readonly', 'readonly');\n\t\t\t\t} else {\n\t\t\t\t\tcontainer.find('.js-autofill').prop('checked', false);\n\t\t\t\t\tallDay.removeAttr('disabled');\n\t\t\t\t\ttimeStart.removeAttr('readonly');\n\t\t\t\t\ttimeEnd.removeAttr('readonly');\n\t\t\t\t\tdateEnd.removeAttr('readonly');\n\t\t\t\t\tapp.registerEventForClockPicker(timeStart);\n\t\t\t\t\tapp.registerEventForClockPicker(timeEnd);\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tregisterMarkAsCompletedBtn: function (container) {\n\t\t\tcontainer.find('.js-btn--mark-as-completed').on('click', function () {\n\t\t\t\tconst self = $(this);\n\t\t\t\tif (self.hasClass('active')) {\n\t\t\t\t\tcontainer.find('.js-completed').remove();\n\t\t\t\t} else {\n\t\t\t\t\tcontainer.append(\n\t\t\t\t\t\t''\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tregisterBasicEvents: function (container) {\n\t\t\tthis._super(container);\n\t\t\tthis.toggleTimesInputs(container);\n\t\t\tthis.registerTimesInputs(container);\n\t\t\tthis.registerTimeStartChangeEvent(container);\n\t\t\tthis.registerActivityTypeChangeEvent(container);\n\t\t\tthis.registerEndDateTimeChangeLogger(container);\n\t\t\tthis.registerAutoFillHours(container);\n\t\t\tthis.registerMarkAsCompletedBtn(container);\n\t\t\tthis.registerInviteEvent(container);\n\t\t\tthis.registerAddInvitation(container);\n\t\t\tthis.registerFormSubmitEvent(container);\n\t\t},\n\t\ttoggleTimesInputs: function (container) {\n\t\t\tcontainer.find(':checkbox').on('change', function () {\n\t\t\t\tvar checkboxName = $(this).attr('name');\n\t\t\t\tif ('allday' == checkboxName) {\n\t\t\t\t\tvar checkboxIsChecked = $(this).is(':checked');\n\t\t\t\t\tif (!container.find('#quickCreate').length) {\n\t\t\t\t\t\tif (checkboxIsChecked) {\n\t\t\t\t\t\t\tcontainer.find('.time').hide();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcontainer.find('.time').show();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tregisterTimesInputs: function (container) {\n\t\t\tvar allday = container.find('[name=\"allday\"]:checkbox');\n\t\t\tif (allday.prop('checked')) {\n\t\t\t\tcontainer.find('.time').hide();\n\t\t\t}\n\t\t},\n\t\tgetDateInstance: function (container, type) {\n\t\t\tvar startDateElement = container.find('[name=\"date_start\"]');\n\t\t\tvar endDateElement = container.find('[name=\"due_date\"]');\n\t\t\tvar endTimeElement = container.find('[name=\"time_end\"]');\n\t\t\tvar startTimeElement = container.find('[name=\"time_start\"]');\n\t\t\tvar startDate = startDateElement.val();\n\t\t\tvar startTime = startTimeElement.val();\n\t\t\tvar endTime = endTimeElement.val();\n\t\t\tvar endDate = endDateElement.val();\n\t\t\tvar dateFormat = CONFIG.dateFormat;\n\t\t\tif (type == 'start') {\n\t\t\t\treturn App.Fields.Date.getDateInstance(startDate + ' ' + startTime, dateFormat);\n\t\t\t}\n\t\t\tif (type == 'end') {\n\t\t\t\treturn App.Fields.Date.getDateInstance(endDate + ' ' + endTime, dateFormat);\n\t\t\t}\n\t\t},\n\t\temailExists(email) {\n\t\t\temail = email.toLowerCase();\n\t\t\tlet recordExist = false;\n\t\t\tthis.getForm()\n\t\t\t\t.find('.js-participants-content')\n\t\t\t\t.find('.js-participant-row')\n\t\t\t\t.each((index, element) => {\n\t\t\t\t\tif ($(element).data('email').toLowerCase() === email) {\n\t\t\t\t\t\trecordExist = true;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\treturn recordExist;\n\t\t},\n\t\tregisterAddInvitation(container) {\n\t\t\tcontainer.find('.js-btn-add-invitation').on('click', (e) => {\n\t\t\t\tlet progressIndicatorElement = $.progressIndicator();\n\t\t\t\tapp.showModalWindow(null, 'index.php?module=Calendar&view=InviteEmail', (data) => {\n\t\t\t\t\tdata.find('.js-modal__save').on('click', (e) => {\n\t\t\t\t\t\tlet email = data.find('.js-invite-email-input').val();\n\t\t\t\t\t\tlet nameAttendee = data.find('.js-invite-name-input').val();\n\t\t\t\t\t\tlet participantsContent = container.find('.js-participants-content');\n\t\t\t\t\t\tlet formEmail = data.find('.js-form');\n\t\t\t\t\t\tformEmail.validationEngine(app.validationEngineOptions);\n\t\t\t\t\t\tif (formEmail.validationEngine('validate')) {\n\t\t\t\t\t\t\tlet participantRow = participantsContent.find('.d-none .js-participant-row').clone(true, true);\n\t\t\t\t\t\t\tparticipantRow.data('crmid', 0);\n\t\t\t\t\t\t\tparticipantRow.data('email', email);\n\t\t\t\t\t\t\tif (nameAttendee) {\n\t\t\t\t\t\t\t\tparticipantRow.find('.js-participant-name').data('content', nameAttendee).text(nameAttendee);\n\t\t\t\t\t\t\t\tparticipantRow.data('name', nameAttendee);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tparticipantRow.find('.js-participant-name').data('content', email).text(email);\n\t\t\t\t\t\t\t\tparticipantRow.data('name', '');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tparticipantsContent.append(participantRow);\n\t\t\t\t\t\t\tapp.hideModalWindow();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\tregisterInviteEvent: function (editViewForm) {\n\t\t\tthis.registerRow(editViewForm);\n\t\t\tlet participantsContent = editViewForm.find('.js-participants-content');\n\t\t\tlet participantsSearch = editViewForm.find('.js-participants-search');\n\t\t\t$.widget('custom.ivAutocomplete', $.ui.autocomplete, {\n\t\t\t\t_create: function () {\n\t\t\t\t\tthis._super();\n\t\t\t\t\tthis.widget().menu('option', 'items', '> :not(.ui-autocomplete-category)');\n\t\t\t\t},\n\t\t\t\t_renderMenu: function (ul, items) {\n\t\t\t\t\tlet that = this,\n\t\t\t\t\t\tcurrentCategory = '';\n\t\t\t\t\t$.each(items, function (_index, item) {\n\t\t\t\t\t\tif (item.category != currentCategory) {\n\t\t\t\t\t\t\tul.append(\"
  • \" + item.category + '
  • ');\n\t\t\t\t\t\t\tcurrentCategory = item.category;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthat._renderItemData(ul, item);\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\t_renderItemData: function (ul, item) {\n\t\t\t\t\treturn this._renderItem(ul, item).data('ui-autocomplete-item', item);\n\t\t\t\t},\n\t\t\t\t_renderItem: function (ul, item) {\n\t\t\t\t\treturn $('
  • ').data('item.autocomplete', item).append($('').html(item.label)).appendTo(ul);\n\t\t\t\t}\n\t\t\t});\n\t\t\tparticipantsSearch.ivAutocomplete({\n\t\t\t\tdelay: '600',\n\t\t\t\tminLength: '3',\n\t\t\t\tsource: (request, response) => {\n\t\t\t\t\tAppConnector.request({\n\t\t\t\t\t\tmodule: 'Calendar',\n\t\t\t\t\t\taction: 'Invitees',\n\t\t\t\t\t\tmode: 'find',\n\t\t\t\t\t\tvalue: request.term\n\t\t\t\t\t}).done((result) => {\n\t\t\t\t\t\tlet reponseDataList = result.result;\n\t\t\t\t\t\tif (reponseDataList.length <= 0) {\n\t\t\t\t\t\t\treponseDataList.push({\n\t\t\t\t\t\t\t\tlabel: app.vtranslate('JS_NO_RESULTS_FOUND'),\n\t\t\t\t\t\t\t\ttype: 'no results',\n\t\t\t\t\t\t\t\tcategory: ''\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\tresponse(reponseDataList);\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\tselect: (event, ui) => {\n\t\t\t\t\tlet selected = ui.item;\n\t\t\t\t\t//To stop selection if no results is selected\n\t\t\t\t\tif (typeof selected.type !== 'undefined' && selected.type == 'no results') {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tlet recordExist = true;\n\t\t\t\t\tparticipantsContent.find('.js-participant-row').each(function (index) {\n\t\t\t\t\t\tif ($(this).data('crmid') == selected.id) {\n\t\t\t\t\t\t\trecordExist = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tif (recordExist) {\n\t\t\t\t\t\tlet participantRow = participantsContent.find('.d-none .js-participant-row').clone(true, true);\n\t\t\t\t\t\tVtiger_Index_Js.getEmailFromRecord(selected.id, selected.module).done((email) => {\n\t\t\t\t\t\t\tparticipantRow.data('crmid', selected.id);\n\t\t\t\t\t\t\tparticipantRow.data('email', email);\n\t\t\t\t\t\t\tparticipantRow\n\t\t\t\t\t\t\t\t.find('.js-participant-name')\n\t\t\t\t\t\t\t\t.data('content', selected.fullLabel + email)\n\t\t\t\t\t\t\t\t.text(selected.label);\n\t\t\t\t\t\t\tparticipantRow\n\t\t\t\t\t\t\t\t.find('.js-participant-icon .c-badge__icon')\n\t\t\t\t\t\t\t\t.removeClass('fas fa-envelope')\n\t\t\t\t\t\t\t\t.addClass('yfm-' + selected.module);\n\t\t\t\t\t\t\tparticipantsContent.append(participantRow);\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\ttext: app.vtranslate('JS_DUPLICATE_RECORD') + ': ' + selected.fullLabel,\n\t\t\t\t\t\t\ttype: 'info'\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tclose: (event, ui) => {\n\t\t\t\t\tparticipantsSearch.val('');\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tregisterRow(row) {\n\t\t\trow.on('click', '.js-participant-remove', (e) => {\n\t\t\t\t$(e.target).closest('.js-participant-row').remove();\n\t\t\t});\n\t\t},\n\t\tregisterEvents() {\n\t\t\tif (!this.proceedRegisterEvents()) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.registerReminderFieldCheckBox();\n\t\t\tthis.registerRecurrenceFieldCheckBox();\n\t\t\tthis.registerRecurringTypeChangeEvent();\n\t\t\tthis._super();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Edit_Js","currencyInstance","checkEmail","field","Calendar_Edit_Js","emailExists","val","app","vtranslate","init","registerReminderFieldCheckBox","element","getForm","find","on","closest","is","rowElement","removeClass","addClass","change","registerRecurrenceFieldCheckBox","form","e","container","$","currentTarget","repeatUI","attr","removeAttr","registerRecurringTypeChangeEvent","thisInstance","changeRecurringTypesUIStyles","jQuery","value","recurringType","setDefaultEndTime","self","getFreeTime","startTimeElement","endTimeElement","endDateElement","startDate","dateStartElement","startTime","result","Vtiger_Time_Validator_Js","invokeValidation","activityTypeValue","activityType","filter","dateFormat","data","toUpperCase","timeFormat","activityDurations","JSON","parse","minutes","i","activitytype","parseInt","duration","defaultTimeFormat","moment","add","endDate","format","registerActivityTypeChangeEvent","registerTimeStartChangeEvent","start","getDateInstance","end","CONFIG","trigger","App","Fields","Date","register","forceChange","Event","which","keyCode","registerEndDateTimeChangeLogger","timeElement","timeDateElement","Vtiger_Date_Validator_Js","dueDateElement","getRule","freq","rule","endValue","dateToDbFormat","date","replace","each","checkedElements","push","length","join","dayOfMonth","dateInstance","getDate","dayOfWeekLabel","getDay","registerFormSubmitEvent","lockSave","getRecordId","recordPreSave","preventDefault","showModalWindow","clone","hideModalWindow","submit","recurringCheck","rows","invitees","index","domElement","row","appendTo","stringify","ownerId","timeEnd","dateStart","params","module","action","progress","progressIndicator","position","blockInfo","enabled","AppConnector","request","done","mode","date_start","showNotify","text","type","prop","timeStart","time_start","time_end","registerAutoFillHours","allDay","dateEnd","autoFill","clockpicker","registerEventForClockPicker","registerMarkAsCompletedBtn","hasClass","remove","append","registerBasicEvents","_super","toggleTimesInputs","registerTimesInputs","registerInviteEvent","registerAddInvitation","checkboxName","checkboxIsChecked","hide","show","allday","startDateElement","endTime","email","toLowerCase","recordExist","nameAttendee","participantsContent","formEmail","validationEngine","validationEngineOptions","participantRow","progressIndicatorElement","editViewForm","registerRow","participantsSearch","widget","ui","autocomplete","_create","menu","_renderMenu","ul","items","currentCategory","_index","item","category","that","_renderItemData","_renderItem","html","label","ivAutocomplete","delay","minLength","source","response","term","reponseDataList","select","event","selected","id","Vtiger_Index_Js","getEmailFromRecord","fullLabel","close","target","registerEvents","proceedRegisterEvents"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFACA,YAAA,CAEAA,cAAc,CACb,kBADa,CAEb,CACCC,gBAAgB,CADjB,CAAA,CAAA,CAECC,UAFD,CAAA,SAAA,UAAA,CAEYC,KAFZ,CAEsC,SAChCC,gBAAgB,CAACH,gBAAjB,CAAkCI,WAAlC,CAA8CF,KAAK,CAACG,GAAN,EAA9C,CADgC,EAE5BC,GAAG,CAACC,UAAJ,CAAe,qBAAf,CAAwC,CAAA,IAAxC,CAA+CL,KAAK,CAACG,GAAN,EAGvD,CAPF,CAFa,CAWb,CACCG,IADD,gBACQ,CACNL,gBAAgB,CAACH,gBAAjB,CAAoC,KACpC,CAHF,CAICS,6BAA6B,CAAE,SAAY,6BAAA,EAAA,CAC1C,IAAIC,OAAO,CAAG,IAAKC,CAAAA,OAAL,EAAeC,CAAA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C,GACA,CAFD,EAGA,CAtjBF,CAujBC6D,cAvjBD,CAujBkB,SAAA,cAAA,EAAA,CACX,IAAKC,CAAAA,qBAAL,EADW,GAIhB,IAAK7M,CAAAA,6BAAL,EAJgB,CAKhB,IAAKW,CAAAA,+BAAL,EALgB,CAMhB,IAAKS,CAAAA,gCAAL,EANgB,CAOhB,IAAK8H,CAAAA,MAAL,EAPgB,EAQhB,CA/jBF,CAXa;;"} \ No newline at end of file +{"version":3,"file":"Edit.min.js","sources":["Edit.js"],"sourcesContent":["/*+***********************************************************************************\n * The contents of this file are subject to the vtiger CRM Public License Version 1.0\n * (\"License\"); You may not use this file except in compliance with the License\n * The Original Code is: vtiger CRM Open Source\n * The Initial Developer of the Original Code is vtiger.\n * Portions created by vtiger are Copyright (C) vtiger.\n * All Rights Reserved.\n * Contributor(s): YetiForce S.A.\n *************************************************************************************/\n'use strict';\n\nVtiger_Edit_Js(\n\t'Calendar_Edit_Js',\n\t{\n\t\tcurrencyInstance: false,\n\t\tcheckEmail(field, rules, i, options) {\n\t\t\tif (Calendar_Edit_Js.currencyInstance.emailExists(field.val())) {\n\t\t\t\treturn app.vtranslate('JS_DUPLICATE_RECORD') + ': ' + field.val();\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t},\n\t{\n\t\tinit() {\n\t\t\tCalendar_Edit_Js.currencyInstance = this;\n\t\t},\n\t\tregisterReminderFieldCheckBox: function () {\n\t\t\tlet element = this.getForm().find('.js-reminder-field-checkbox');\n\t\t\telement.on('change', function (e) {\n\t\t\t\tlet rowElement = element.closest('.js-reminder-field-element').find('.js-reminder-field-row');\n\t\t\t\tif (element.is(':checked')) {\n\t\t\t\t\trowElement.removeClass('d-none');\n\t\t\t\t} else {\n\t\t\t\t\trowElement.addClass('d-none');\n\t\t\t\t}\n\t\t\t});\n\t\t\telement.change();\n\t\t},\n\t\t/**\n\t\t * Function which will register change event on recurrence field checkbox\n\t\t */\n\t\tregisterRecurrenceFieldCheckBox: function () {\n\t\t\tconst form = this.getForm(),\n\t\t\t\telement = form.find('input[name=\"reapeat\"]');\n\t\t\telement.on('change', function (e) {\n\t\t\t\tlet repeatUI = form.find('.js-repeat-ui'),\n\t\t\t\t\tcontainer = form.find('[name=\"followup\"]').closest('.fieldValue');\n\t\t\t\tif ($(e.currentTarget).is(':checked')) {\n\t\t\t\t\trepeatUI.closest('.fieldRow').removeClass('d-none');\n\t\t\t\t\tcontainer.find('[name=\"followup_display\"]').attr('disabled', 'disabled');\n\t\t\t\t\tcontainer.find('button').attr('disabled', 'disabled');\n\t\t\t\t} else {\n\t\t\t\t\tcontainer.find('[name=\"followup_display\"]').removeAttr('disabled');\n\t\t\t\t\tcontainer.find('button').removeAttr('disabled');\n\t\t\t\t\trepeatUI.closest('.fieldRow').addClass('d-none');\n\t\t\t\t}\n\t\t\t});\n\t\t\telement.change();\n\t\t},\n\t\t/**\n\t\t * Function which will register the change event for recurring type\n\t\t */\n\t\tregisterRecurringTypeChangeEvent: function () {\n\t\t\tvar container = this.getForm();\n\t\t\tvar thisInstance = this;\n\t\t\tcontainer.find('.recurringType').on('change', function (e) {\n\t\t\t\tthisInstance.changeRecurringTypesUIStyles(jQuery(e.currentTarget).val());\n\t\t\t});\n\t\t\tcontainer.find('.js-repeat-ui [name=\"calendarEndType\"]').on('change', function (e) {\n\t\t\t\tvar currentTarget = $(e.currentTarget);\n\t\t\t\tvar value = currentTarget.val();\n\t\t\t\tif (value === 'never') {\n\t\t\t\t\tcontainer.find('.countEvents').attr('disabled', 'disabled');\n\t\t\t\t\tcontainer.find('.calendarUntil').attr('disabled', 'disabled');\n\t\t\t\t} else if (value === 'count') {\n\t\t\t\t\tcontainer.find('.countEvents').removeAttr('disabled');\n\t\t\t\t\tcontainer.find('.calendarUntil').attr('disabled', 'disabled');\n\t\t\t\t} else if (value === 'until') {\n\t\t\t\t\tcontainer.find('.countEvents').attr('disabled', 'disabled');\n\t\t\t\t\tcontainer.find('.calendarUntil').removeAttr('disabled');\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Function which will change the UI styles based on recurring type\n\t\t * @params - recurringType - which recurringtype is selected\n\t\t */\n\t\tchangeRecurringTypesUIStyles: function (recurringType) {\n\t\t\tvar container = this.getForm();\n\t\t\tif (recurringType == 'DAILY' || recurringType == 'YEARLY') {\n\t\t\t\tcontainer.find('.repeatWeekUI').removeClass('show').addClass('d-none');\n\t\t\t\tcontainer.find('.repeatMonthUI').removeClass('show').addClass('d-none');\n\t\t\t} else if (recurringType == 'WEEKLY') {\n\t\t\t\tcontainer.find('.repeatWeekUI').removeClass('d-none').addClass('show');\n\t\t\t\tcontainer.find('.repeatMonthUI').removeClass('show').addClass('d-none');\n\t\t\t} else if (recurringType == 'MONTHLY') {\n\t\t\t\tcontainer.find('.repeatWeekUI').removeClass('show').addClass('d-none');\n\t\t\t\tcontainer.find('.repeatMonthUI').removeClass('d-none').addClass('show');\n\t\t\t}\n\t\t},\n\t\tsetDefaultEndTime: function (container) {\n\t\t\tconst self = this;\n\t\t\tif (container.find('.js-autofill').is(':checked')) {\n\t\t\t\tself.getFreeTime(container);\n\t\t\t} else {\n\t\t\t\tif ('1' === $('[name=\"userChangedEndDateTime\"]').val()) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tlet dateStartElement = container.find('[name=\"date_start\"]'),\n\t\t\t\t\tstartTimeElement = container.find('[name=\"time_start\"]'),\n\t\t\t\t\tendTimeElement = container.find('[name=\"time_end\"]'),\n\t\t\t\t\tendDateElement = container.find('[name=\"due_date\"]'),\n\t\t\t\t\tstartDate = dateStartElement.val(),\n\t\t\t\t\tstartTime = startTimeElement.val(),\n\t\t\t\t\tresult = Vtiger_Time_Validator_Js.invokeValidation(startTimeElement);\n\t\t\t\tif (true !== result) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tlet activityType = container.find('[name=\"activitytype\"]');\n\t\t\t\tlet activityTypeValue = activityType.val();\n\t\t\t\tif (activityType.is('[type=\"radio\"]')) {\n\t\t\t\t\tactivityTypeValue = activityType.filter(':checked').val();\n\t\t\t\t}\n\t\t\t\tlet startDateTime = startDate + ' ' + startTime,\n\t\t\t\t\tdateFormat = container.find('[name=\"due_date\"]').data('dateFormat').toUpperCase(),\n\t\t\t\t\ttimeFormat = endTimeElement.data('format'),\n\t\t\t\t\tactivityDurations = JSON.parse(container.find('[name=\"defaultOtherEventDuration\"]').val()),\n\t\t\t\t\tminutes = 0;\n\t\t\t\tfor (let i in activityDurations) {\n\t\t\t\t\tif (activityDurations[i].activitytype === activityTypeValue) {\n\t\t\t\t\t\tminutes = parseInt(activityDurations[i].duration);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlet defaultTimeFormat = 'HH:mm';\n\t\t\t\tif (12 === timeFormat) {\n\t\t\t\t\tdefaultTimeFormat = 'hh:mm A';\n\t\t\t\t}\n\t\t\t\tlet endDate = moment(startDateTime, dateFormat + ' ' + defaultTimeFormat).add(minutes, 'minutes');\n\t\t\t\tendDateElement.val(endDate.format(dateFormat));\n\t\t\t\tendTimeElement.val(endDate.format(defaultTimeFormat));\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Function to change the end time based on default call duration\n\t\t */\n\t\tregisterActivityTypeChangeEvent: function (container) {\n\t\t\tconst thisInstance = this;\n\t\t\tcontainer.on('change', '[name=\"activitytype\"]', function (e) {\n\t\t\t\tthisInstance.setDefaultEndTime(container);\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Function to change the end time based on default call duration\n\t\t */\n\t\tregisterTimeStartChangeEvent(container) {\n\t\t\tconst thisInstance = this;\n\t\t\tcontainer.find('input[name=\"time_start\"]').on('change', function (e) {\n\t\t\t\tthisInstance.setDefaultEndTime(container);\n\t\t\t});\n\t\t\tcontainer.find('[name=\"date_start\"]').on('change', function (e) {\n\t\t\t\tlet endDateElement = container.find('[name=\"due_date\"]'),\n\t\t\t\t\tstart = thisInstance.getDateInstance(container, 'start'),\n\t\t\t\t\tend = thisInstance.getDateInstance(container, 'end'),\n\t\t\t\t\tdateFormat = CONFIG.dateFormat.toUpperCase();\n\t\t\t\tcontainer.find('.js-autofill').trigger('change');\n\t\t\t\tif (start > end) {\n\t\t\t\t\tend = start;\n\t\t\t\t\tendDateElement.val(moment(end).format(dateFormat));\n\t\t\t\t\tApp.Fields.Date.register(container);\n\t\t\t\t}\n\t\t\t});\n\t\t\tcontainer.find('input[name=\"time_start\"]').on('focus', function (e) {\n\t\t\t\tlet element = $(e.currentTarget);\n\t\t\t\telement.data('prevValue', element.val());\n\t\t\t});\n\t\t\tcontainer.find('input[name=\"time_start\"]').on('blur', function (e, data) {\n\t\t\t\tif (typeof data === 'undefined') {\n\t\t\t\t\tdata = {};\n\t\t\t\t}\n\t\t\t\tif (typeof data.forceChange === 'undefined') {\n\t\t\t\t\tdata.forceChange = false;\n\t\t\t\t}\n\t\t\t\tlet element = $(e.currentTarget);\n\t\t\t\tif (element.val() !== element.data('prevValue') || data.forceChange) {\n\t\t\t\t\te = $.Event('keydown');\n\t\t\t\t\te.which = 13;\n\t\t\t\t\te.keyCode = 13;\n\t\t\t\t\telement.trigger(e);\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tregisterEndDateTimeChangeLogger: function (container) {\n\t\t\tcontainer.find('[name=\"time_end\"]').on('change', function (e) {\n\t\t\t\tlet timeElement = jQuery(e.currentTarget);\n\t\t\t\tlet result = Vtiger_Time_Validator_Js.invokeValidation(timeElement);\n\t\t\t\tif (result != true) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tlet timeDateElement = timeElement.closest('.fieldValue').find('[name=\"due_date\"]');\n\t\t\t\tjQuery('[name=\"userChangedEndDateTime\"]').val('1');\n\t\t\t\ttimeDateElement.data('userChangedTime', true);\n\t\t\t});\n\n\t\t\tcontainer.find('[name=\"due_date\"]').on('change', function (e) {\n\t\t\t\tlet dueDateElement = jQuery(e.currentTarget);\n\t\t\t\tlet result = Vtiger_Date_Validator_Js.invokeValidation(dueDateElement);\n\t\t\t\tif (result != true) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tjQuery('[name=\"userChangedEndDateTime\"]').val('1');\n\t\t\t\tdueDateElement.data('userChangedTime', true);\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t *\n\t\t * @returns {String}\n\t\t */\n\t\tgetRule: function () {\n\t\t\tvar form = this.getForm();\n\t\t\tvar freq = form.find('.recurringType').val();\n\t\t\tvar rule = 'FREQ=' + freq;\n\t\t\trule += ';INTERVAL=' + form.find('.repeatFrequency').val();\n\t\t\tvar endValue = form.find('.js-repeat-ui [name=\"calendarEndType\"]:checked').val();\n\t\t\tif (endValue === 'count') {\n\t\t\t\trule += ';COUNT=' + form.find('.countEvents').val();\n\t\t\t} else if (endValue === 'until') {\n\t\t\t\tlet date = App.Fields.Date.dateToDbFormat(App.Fields.Date.getDateInstance(form.find('.calendarUntil').val()));\n\t\t\t\trule += ';UNTIL=' + date.replace(/-/gi, '') + 'T235959';\n\t\t\t}\n\t\t\tif (freq === 'WEEKLY') {\n\t\t\t\tvar checkedElements = [];\n\t\t\t\tform.find('.repeatWeekUI [type=\"checkbox\"]').each(function () {\n\t\t\t\t\tvar currentTarget = $(this);\n\t\t\t\t\tif (currentTarget.is(':checked')) {\n\t\t\t\t\t\tcheckedElements.push(currentTarget.val());\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tif (checkedElements.length > 0) {\n\t\t\t\t\trule += ';BYDAY=' + checkedElements.join(',');\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (freq === 'MONTHLY') {\n\t\t\t\tconst dateInstance = App.Fields.Date.getDateInstance(form.find('[name=\"date_start\"]').val());\n\t\t\t\tlet dayOfMonth = dateInstance.getDate();\n\t\t\t\tif (form.find('.calendarMontlyType:checked').val() == 'DAY') {\n\t\t\t\t\tlet dayOfWeekLabel = '';\n\t\t\t\t\tswitch (dateInstance.getDay()) {\n\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\tdayOfWeekLabel = 'SU';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\tdayOfWeekLabel = 'MO';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\tdayOfWeekLabel = 'TU';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\tdayOfWeekLabel = 'WE';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\tdayOfWeekLabel = 'TU';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 5:\n\t\t\t\t\t\t\tdayOfWeekLabel = 'FR';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 6:\n\t\t\t\t\t\t\tdayOfWeekLabel = 'SA';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\trule += ';BYDAY=' + (parseInt((dayOfMonth - 1) / 7) + 1) + dayOfWeekLabel;\n\t\t\t\t} else {\n\t\t\t\t\trule += ';BYMONTHDAY=' + dayOfMonth;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn rule;\n\t\t},\n\t\t/**\n\t\t * This function will register the submit event on form\n\t\t * @param {jQuery} form\n\t\t */\n\t\tregisterFormSubmitEvent: function (form) {\n\t\t\tvar thisInstance = this;\n\t\t\tvar lockSave = true;\n\t\t\tif (app.getRecordId()) {\n\t\t\t\tform.on(Vtiger_Edit_Js.recordPreSave, function (e) {\n\t\t\t\t\tif (lockSave && form.find('input[name=\"reapeat\"]').is(':checked')) {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\tapp.showModalWindow(form.find('.typeSavingModal').clone(), function (container) {\n\t\t\t\t\t\t\tcontainer.find('.typeSavingBtn').on('click', function (e) {\n\t\t\t\t\t\t\t\tvar currentTarget = $(e.currentTarget);\n\t\t\t\t\t\t\t\tform.find('[name=\"typeSaving\"]').val(currentTarget.data('value'));\n\t\t\t\t\t\t\t\tapp.hideModalWindow();\n\t\t\t\t\t\t\t\tlockSave = false;\n\t\t\t\t\t\t\t\tform.submit();\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\tform.on('submit', function (e) {\n\t\t\t\tconst recurringCheck = form.find('input[name=\"reapeat\"]').is(':checked');\n\t\t\t\tif (recurringCheck) {\n\t\t\t\t\tif (app.getRecordId() && lockSave) {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t\tform.find('[name=\"recurrence\"]').val(thisInstance.getRule());\n\t\t\t\t}\n\t\t\t\tlet rows = form.find('.js-participants-content .js-participant-row');\n\t\t\t\tlet invitees = [];\n\t\t\t\trows.each(function (index, domElement) {\n\t\t\t\t\tlet row = $(domElement);\n\t\t\t\t\tif (row.data('email')) {\n\t\t\t\t\t\tinvitees.push([row.data('email'), row.data('crmid'), row.data('ivid'), row.data('name')]);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t$('').appendTo(form).val(JSON.stringify(invitees));\n\t\t\t});\n\t\t},\n\t\tgetFreeTime: function (container) {\n\t\t\tlet ownerId = container.find('[name=\"assigned_user_id\"], [data-element-name=\"assigned_user_id\"]');\n\t\t\tif (ownerId.length === 0 || !ownerId.val()) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tlet timeStart = container.find('[name=\"time_start\"], [data-element-name=\"time_start\"]');\n\t\t\tlet timeEnd = container.find('[name=\"time_end\"], [data-element-name=\"time_end\"]');\n\t\t\tlet dateStart = container.find('[name=\"date_start\"], [data-element-name=\"date_start\"]');\n\t\t\tlet params = {\n\t\t\t\tmodule: 'Calendar',\n\t\t\t\taction: 'GetFreeTime',\n\t\t\t\tdateStart: dateStart.val(),\n\t\t\t\townerId: ownerId.val(),\n\t\t\t\tactivitytype: container.find('[name=\"activitytype\"]').val()\n\t\t\t};\n\t\t\tlet progress = $.progressIndicator({ position: 'html', blockInfo: { enabled: true } });\n\t\t\tAppConnector.request(params).done(function (data) {\n\t\t\t\tprogress.progressIndicator({ mode: 'hide' });\n\t\t\t\tif (data.result.date_start !== null) {\n\t\t\t\t\ttimeStart.val(data.result.time_start);\n\t\t\t\t\ttimeEnd.val(data.result.time_end);\n\t\t\t\t\tdateStart.val(data.result.date_start);\n\t\t\t\t\tcontainer.find('[name=\"due_date\"]').val(data.result.date_start);\n\t\t\t\t} else {\n\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\ttext: app.vtranslate('JS_ERROR_MAX_VALUE'),\n\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t});\n\t\t\t\t\tcontainer.find('.js-autofill').prop('checked', false).trigger('change');\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tregisterAutoFillHours: function (container) {\n\t\t\tconst thisInstance = this;\n\t\t\tlet allDay = container.find('[name=\"allday\"]'),\n\t\t\t\ttimeStart = container.find('[name=\"time_start\"]'),\n\t\t\t\ttimeEnd = container.find('[name=\"time_end\"]'),\n\t\t\t\tdateEnd = container.find('[name=\"due_date\"]'),\n\t\t\t\tautoFill = container.find('.js-autofill');\n\t\t\tcontainer.find('.js-autofill__icon').on('click', function (e) {\n\t\t\t\tif (autoFill.is(':checked')) {\n\t\t\t\t\t$(e.currentTarget).closest('.input-group-text').removeClass('bg-color-blue-700').removeClass('text-white');\n\t\t\t\t\tautoFill.prop('checked', false).trigger('change');\n\t\t\t\t} else {\n\t\t\t\t\t$(e.currentTarget).closest('.input-group-text').addClass('bg-color-blue-700').addClass('text-white');\n\t\t\t\t\tautoFill.prop('checked', true).trigger('change');\n\t\t\t\t}\n\t\t\t});\n\t\t\tcontainer.find('.js-autofill').on('change', function (e) {\n\t\t\t\tlet currentTarget = $(e.currentTarget);\n\t\t\t\tif (currentTarget.is(':checked')) {\n\t\t\t\t\tcontainer.find('.js-autofill').prop('checked', true);\n\t\t\t\t\tthisInstance.getFreeTime(container);\n\t\t\t\t\ttimeStart.attr('readonly', 'readonly');\n\t\t\t\t\ttimeEnd.attr('readonly', 'readonly');\n\t\t\t\t\ttimeStart.clockpicker('remove');\n\t\t\t\t\ttimeEnd.clockpicker('remove');\n\t\t\t\t\tallDay.attr('disabled', 'disabled');\n\t\t\t\t\tallDay.prop('checked', false);\n\t\t\t\t\tallDay.trigger('change');\n\t\t\t\t\tdateEnd.attr('readonly', 'readonly');\n\t\t\t\t} else {\n\t\t\t\t\tcontainer.find('.js-autofill').prop('checked', false);\n\t\t\t\t\tallDay.removeAttr('disabled');\n\t\t\t\t\ttimeStart.removeAttr('readonly');\n\t\t\t\t\ttimeEnd.removeAttr('readonly');\n\t\t\t\t\tdateEnd.removeAttr('readonly');\n\t\t\t\t\tapp.registerEventForClockPicker(timeStart);\n\t\t\t\t\tapp.registerEventForClockPicker(timeEnd);\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tregisterMarkAsCompletedBtn: function (container) {\n\t\t\tcontainer.find('.js-btn--mark-as-completed').on('click', function () {\n\t\t\t\tconst self = $(this);\n\t\t\t\tif (self.hasClass('active')) {\n\t\t\t\t\tcontainer.find('.js-completed').remove();\n\t\t\t\t} else {\n\t\t\t\t\tcontainer.append(\n\t\t\t\t\t\t''\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tregisterBasicEvents: function (container) {\n\t\t\tthis._super(container);\n\t\t\tthis.toggleTimesInputs(container);\n\t\t\tthis.registerTimesInputs(container);\n\t\t\tthis.registerTimeStartChangeEvent(container);\n\t\t\tthis.registerActivityTypeChangeEvent(container);\n\t\t\tthis.registerEndDateTimeChangeLogger(container);\n\t\t\tthis.registerAutoFillHours(container);\n\t\t\tthis.registerMarkAsCompletedBtn(container);\n\t\t\tthis.registerInviteEvent(container);\n\t\t\tthis.registerAddInvitation(container);\n\t\t\tthis.registerFormSubmitEvent(container);\n\t\t},\n\t\ttoggleTimesInputs: function (container) {\n\t\t\tcontainer.find(':checkbox').on('change', function () {\n\t\t\t\tvar checkboxName = $(this).attr('name');\n\t\t\t\tif ('allday' == checkboxName) {\n\t\t\t\t\tvar checkboxIsChecked = $(this).is(':checked');\n\t\t\t\t\tif (!container.find('#quickCreate').length) {\n\t\t\t\t\t\tif (checkboxIsChecked) {\n\t\t\t\t\t\t\tcontainer.find('.time').hide();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcontainer.find('.time').show();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tregisterTimesInputs: function (container) {\n\t\t\tvar allday = container.find('[name=\"allday\"]:checkbox');\n\t\t\tif (allday.prop('checked')) {\n\t\t\t\tcontainer.find('.time').hide();\n\t\t\t}\n\t\t},\n\t\tgetDateInstance: function (container, type) {\n\t\t\tvar startDateElement = container.find('[name=\"date_start\"]');\n\t\t\tvar endDateElement = container.find('[name=\"due_date\"]');\n\t\t\tvar endTimeElement = container.find('[name=\"time_end\"]');\n\t\t\tvar startTimeElement = container.find('[name=\"time_start\"]');\n\t\t\tvar startDate = startDateElement.val();\n\t\t\tvar startTime = startTimeElement.val();\n\t\t\tvar endTime = endTimeElement.val();\n\t\t\tvar endDate = endDateElement.val();\n\t\t\tvar dateFormat = CONFIG.dateFormat;\n\t\t\tif (type == 'start') {\n\t\t\t\treturn App.Fields.Date.getDateInstance(startDate + ' ' + startTime, dateFormat);\n\t\t\t}\n\t\t\tif (type == 'end') {\n\t\t\t\treturn App.Fields.Date.getDateInstance(endDate + ' ' + endTime, dateFormat);\n\t\t\t}\n\t\t},\n\t\temailExists(email) {\n\t\t\temail = email.toLowerCase();\n\t\t\tlet recordExist = false;\n\t\t\tthis.getForm()\n\t\t\t\t.find('.js-participants-content')\n\t\t\t\t.find('.js-participant-row')\n\t\t\t\t.each((index, element) => {\n\t\t\t\t\tif ($(element).data('email').toLowerCase() === email) {\n\t\t\t\t\t\trecordExist = true;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\treturn recordExist;\n\t\t},\n\t\tregisterAddInvitation(container) {\n\t\t\tcontainer.find('.js-btn-add-invitation').on('click', (e) => {\n\t\t\t\tlet progressIndicatorElement = $.progressIndicator();\n\t\t\t\tapp.showModalWindow(null, 'index.php?module=Calendar&view=InviteEmail', (data) => {\n\t\t\t\t\tdata.find('.js-modal__save').on('click', (e) => {\n\t\t\t\t\t\tlet email = data.find('.js-invite-email-input').val();\n\t\t\t\t\t\tlet nameAttendee = data.find('.js-invite-name-input').val();\n\t\t\t\t\t\tlet participantsContent = container.find('.js-participants-content');\n\t\t\t\t\t\tlet formEmail = data.find('.js-form');\n\t\t\t\t\t\tformEmail.validationEngine(app.validationEngineOptions);\n\t\t\t\t\t\tif (formEmail.validationEngine('validate')) {\n\t\t\t\t\t\t\tlet participantRow = participantsContent.find('.d-none .js-participant-row').clone(true, true);\n\t\t\t\t\t\t\tparticipantRow.data('crmid', 0);\n\t\t\t\t\t\t\tparticipantRow.data('email', email);\n\t\t\t\t\t\t\tif (nameAttendee) {\n\t\t\t\t\t\t\t\tparticipantRow.find('.js-participant-name').data('content', nameAttendee).text(nameAttendee);\n\t\t\t\t\t\t\t\tparticipantRow.data('name', nameAttendee);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tparticipantRow.find('.js-participant-name').data('content', email).text(email);\n\t\t\t\t\t\t\t\tparticipantRow.data('name', '');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tparticipantsContent.append(participantRow);\n\t\t\t\t\t\t\tapp.hideModalWindow();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\tregisterInviteEvent: function (editViewForm) {\n\t\t\tthis.registerRow(editViewForm);\n\t\t\tlet participantsContent = editViewForm.find('.js-participants-content');\n\t\t\tlet participantsSearch = editViewForm.find('.js-participants-search');\n\t\t\t$.widget('custom.ivAutocomplete', $.ui.autocomplete, {\n\t\t\t\t_create: function () {\n\t\t\t\t\tthis._super();\n\t\t\t\t\tthis.widget().menu('option', 'items', '> :not(.ui-autocomplete-category)');\n\t\t\t\t},\n\t\t\t\t_renderMenu: function (ul, items) {\n\t\t\t\t\tlet that = this,\n\t\t\t\t\t\tcurrentCategory = '';\n\t\t\t\t\t$.each(items, function (_index, item) {\n\t\t\t\t\t\tif (item.category != currentCategory) {\n\t\t\t\t\t\t\tul.append(\"
  • \" + item.category + '
  • ');\n\t\t\t\t\t\t\tcurrentCategory = item.category;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthat._renderItemData(ul, item);\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\t_renderItemData: function (ul, item) {\n\t\t\t\t\treturn this._renderItem(ul, item).data('ui-autocomplete-item', item);\n\t\t\t\t},\n\t\t\t\t_renderItem: function (ul, item) {\n\t\t\t\t\treturn $('
  • ').data('item.autocomplete', item).append($('').html(item.label)).appendTo(ul);\n\t\t\t\t}\n\t\t\t});\n\t\t\tparticipantsSearch.ivAutocomplete({\n\t\t\t\tdelay: '600',\n\t\t\t\tminLength: '3',\n\t\t\t\tsource: (request, response) => {\n\t\t\t\t\tAppConnector.request({\n\t\t\t\t\t\tmodule: 'Calendar',\n\t\t\t\t\t\taction: 'Invitees',\n\t\t\t\t\t\tmode: 'find',\n\t\t\t\t\t\tvalue: request.term\n\t\t\t\t\t}).done((result) => {\n\t\t\t\t\t\tlet reponseDataList = result.result;\n\t\t\t\t\t\tif (reponseDataList.length <= 0) {\n\t\t\t\t\t\t\treponseDataList.push({\n\t\t\t\t\t\t\t\tlabel: app.vtranslate('JS_NO_RESULTS_FOUND'),\n\t\t\t\t\t\t\t\ttype: 'no results',\n\t\t\t\t\t\t\t\tcategory: ''\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\tresponse(reponseDataList);\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\tselect: (event, ui) => {\n\t\t\t\t\tlet selected = ui.item;\n\t\t\t\t\t//To stop selection if no results is selected\n\t\t\t\t\tif (typeof selected.type !== 'undefined' && selected.type == 'no results') {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tlet recordExist = true;\n\t\t\t\t\tparticipantsContent.find('.js-participant-row').each(function (index) {\n\t\t\t\t\t\tif ($(this).data('crmid') == selected.id) {\n\t\t\t\t\t\t\trecordExist = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tif (recordExist) {\n\t\t\t\t\t\tlet participantRow = participantsContent.find('.d-none .js-participant-row').clone(true, true);\n\t\t\t\t\t\tVtiger_Index_Js.getEmailFromRecord(selected.id, selected.module).done((email) => {\n\t\t\t\t\t\t\tparticipantRow.data('crmid', selected.id);\n\t\t\t\t\t\t\tparticipantRow.data('email', email);\n\t\t\t\t\t\t\tparticipantRow\n\t\t\t\t\t\t\t\t.find('.js-participant-name')\n\t\t\t\t\t\t\t\t.data('content', selected.fullLabel + email)\n\t\t\t\t\t\t\t\t.text(selected.label);\n\t\t\t\t\t\t\tparticipantRow\n\t\t\t\t\t\t\t\t.find('.js-participant-icon .c-badge__icon')\n\t\t\t\t\t\t\t\t.removeClass('fas fa-envelope')\n\t\t\t\t\t\t\t\t.addClass('yfm-' + selected.module);\n\t\t\t\t\t\t\tparticipantsContent.append(participantRow);\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\ttext: app.vtranslate('JS_DUPLICATE_RECORD') + ': ' + selected.fullLabel,\n\t\t\t\t\t\t\ttype: 'info'\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tclose: (event, ui) => {\n\t\t\t\t\tparticipantsSearch.val('');\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tregisterRow(row) {\n\t\t\trow.on('click', '.js-participant-remove', (e) => {\n\t\t\t\t$(e.target).closest('.js-participant-row').remove();\n\t\t\t});\n\t\t},\n\t\tregisterEvents() {\n\t\t\tif (!this.proceedRegisterEvents()) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.registerReminderFieldCheckBox();\n\t\t\tthis.registerRecurrenceFieldCheckBox();\n\t\t\tthis.registerRecurringTypeChangeEvent();\n\t\t\tthis._super();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Edit_Js","currencyInstance","checkEmail","field","Calendar_Edit_Js","emailExists","val","app","vtranslate","init","registerReminderFieldCheckBox","element","getForm","find","on","rowElement","closest","is","removeClass","addClass","change","registerRecurrenceFieldCheckBox","form","e","repeatUI","container","$","currentTarget","attr","removeAttr","registerRecurringTypeChangeEvent","thisInstance","changeRecurringTypesUIStyles","jQuery","value","recurringType","setDefaultEndTime","self","getFreeTime","dateStartElement","startTimeElement","endTimeElement","endDateElement","startDate","startTime","result","Vtiger_Time_Validator_Js","invokeValidation","activityType","activityTypeValue","filter","dateFormat","data","toUpperCase","timeFormat","activityDurations","JSON","parse","minutes","i","activitytype","parseInt","duration","defaultTimeFormat","endDate","moment","add","format","registerActivityTypeChangeEvent","registerTimeStartChangeEvent","start","getDateInstance","end","CONFIG","trigger","App","Fields","Date","register","forceChange","Event","which","keyCode","registerEndDateTimeChangeLogger","timeElement","timeDateElement","dueDateElement","Vtiger_Date_Validator_Js","getRule","freq","rule","endValue","date","dateToDbFormat","replace","checkedElements","each","push","length","join","dateInstance","dayOfMonth","getDate","dayOfWeekLabel","getDay","registerFormSubmitEvent","lockSave","getRecordId","recordPreSave","preventDefault","showModalWindow","clone","hideModalWindow","submit","recurringCheck","rows","invitees","index","domElement","row","appendTo","stringify","ownerId","timeStart","timeEnd","dateStart","params","module","action","progress","progressIndicator","position","blockInfo","enabled","AppConnector","request","done","mode","date_start","showNotify","text","type","prop","time_start","time_end","registerAutoFillHours","allDay","dateEnd","autoFill","clockpicker","registerEventForClockPicker","registerMarkAsCompletedBtn","hasClass","remove","append","registerBasicEvents","_super","toggleTimesInputs","registerTimesInputs","registerInviteEvent","registerAddInvitation","checkboxName","checkboxIsChecked","hide","show","allday","startDateElement","endTime","email","toLowerCase","recordExist","progressIndicatorElement","nameAttendee","participantsContent","formEmail","validationEngine","validationEngineOptions","participantRow","editViewForm","registerRow","participantsSearch","widget","ui","autocomplete","_create","menu","_renderMenu","ul","items","that","currentCategory","_index","item","category","_renderItemData","_renderItem","html","label","ivAutocomplete","delay","minLength","source","response","term","reponseDataList","select","event","selected","id","Vtiger_Index_Js","getEmailFromRecord","fullLabel","close","target","registerEvents","proceedRegisterEvents"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFACA,YAAY,CAEZA,cAAc,CACb,kBAAkB,CAClB,CACCC,gBAAgB,CAAO,CAAA,CAAA,CACvBC,UAAU,CAAA,SAAAA,WAACC,KAAK,CAAqB,CAChCC,OAAAA,CAAAA,gBAAgB,CAACH,gBAAgB,CAACI,WAAW,CAACF,KAAK,CAACG,GAAG,EAAE,CAAC,EACtDC,GAAG,CAACC,UAAU,CAAC,qBAAqB,CAAC,CAAG,IAAI,CAAGL,KAAK,CAACG,GAAG,EAGjE,CACD,CAAC,CACD,CACCG,IAAI,CAAA,SAAAA,IAAA,EAAG,CACNL,gBAAgB,CAACH,gBAAgB,CAAG,KACrC,CAAC,CACDS,6BAA6B,CAAE,SAAAA,6BAAAA,EAAY,CAC1C,IAAIC,OAAO,CAAG,IAAI,CAACC,OAAO,EAAE,CAACC,IAAI,CAAC,6BAA6B,CAAC,CAChEF,OAAO,CAACG,EAAE,CAAC,QAAQ,CAAE,UAAa,CACjC,IAAIC,UAAU,CAAGJ,OAAO,CAACK,OAAO,CAAC,4BAA4B,CAAC,CAACH,IAAI,CAAC,wBAAwB,CAAC,CACzFF,OAAO,CAACM,EAAE,CAAC,UAAU,CAAC,CACzBF,UAAU,CAACG,WAAW,CAAC,QAAQ,CAAC,CAEhCH,UAAU,CAACI,QAAQ,CAAC,QAAQ,EAE9B,CAAC,CAAC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C,qBAAqB,CAAC,CAACyI,MAAM,GAClD,CAAC,EACF,CAAC,CACD6D,cAAc,CAAAA,SAAAA,cAAAA,EAAG,CACX,IAAI,CAACC,qBAAqB,EAAE,GAGjC,IAAI,CAAC7M,6BAA6B,EAAE,CACpC,IAAI,CAACW,+BAA+B,EAAE,CACtC,IAAI,CAACS,gCAAgC,EAAE,CACvC,IAAI,CAAC8H,MAAM,EAAE,EACd,CACD,CACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/Calendar/resources/List.min.js.map b/public_html/layouts/basic/modules/Calendar/resources/List.min.js.map index 14cf644f089f..5ca60f624aec 100644 --- a/public_html/layouts/basic/modules/Calendar/resources/List.min.js.map +++ b/public_html/layouts/basic/modules/Calendar/resources/List.min.js.map @@ -1 +1 @@ -{"version":3,"file":"List.min.js","sources":["List.js"],"sourcesContent":["/*+***********************************************************************************\n * The contents of this file are subject to the vtiger CRM Public License Version 1.0\n * (\"License\"); You may not use this file except in compliance with the License\n * The Original Code is: vtiger CRM Open Source\n * The Initial Developer of the Original Code is vtiger.\n * Portions created by vtiger are Copyright (C) vtiger.\n * All Rights Reserved.\n * Contributor(s): YetiForce S.A.\n *************************************************************************************/\n'use strict';\n\nVtiger_List_Js(\n\t'Calendar_List_Js',\n\t{\n\t\ttriggerImportAction: function (importUrl) {\n\t\t\tvar progressIndicatorElement = jQuery.progressIndicator();\n\t\t\tAppConnector.request(importUrl).done(function (data) {\n\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\tif (data) {\n\t\t\t\t\tapp.showModalWindow(data, function (data) {\n\t\t\t\t\t\tjQuery('#ical_import').validationEngine(app.validationEngineOptions);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t},\n\t{}\n);\n"],"names":["Vtiger_List_Js","triggerImportAction","importUrl","progressIndicatorElement","jQuery","progressIndicator","AppConnector","request","done","data","mode","app","showModalWindow","validationEngine","validationEngineOptions"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFACA,YAEAA,CAAAA,cAAc,CACb,kBADa,CAEb,CACCC,mBAAmB,CAAE,SAAA,mBAAA,CAAUC,SAAV,CAAqB,CACzC,IAAIC,wBAAwB,CAAGC,MAAM,CAACC,iBAAP,EAA/B,CACAC,YAAY,CAACC,OAAb,CAAqBL,SAArB,CAAA,CAAgCM,IAAhC,CAAqC,SAAUC,IAAV,CAAgB,CACpDN,wBAAwB,CAACE,iBAAzB,CAA2C,CAAEK,IAAI,CAAE,MAAR,CAA3C,CADoD,CAEhDD,IAFgD,EAGnDE,GAAG,CAACC,eAAJ,CAAoBH,IAApB,CAA0B,UAAgB,CACzCL,MAAM,CAAC,cAAD,CAAN,CAAuBS,gBAAvB,CAAwCF,GAAG,CAACG,uBAA5C,EACA,CAFD,EAID,CAPD,EAQA,CAXF,CAFa,CAeb,EAfa;;"} \ No newline at end of file +{"version":3,"file":"List.min.js","sources":["List.js"],"sourcesContent":["/*+***********************************************************************************\n * The contents of this file are subject to the vtiger CRM Public License Version 1.0\n * (\"License\"); You may not use this file except in compliance with the License\n * The Original Code is: vtiger CRM Open Source\n * The Initial Developer of the Original Code is vtiger.\n * Portions created by vtiger are Copyright (C) vtiger.\n * All Rights Reserved.\n * Contributor(s): YetiForce S.A.\n *************************************************************************************/\n'use strict';\n\nVtiger_List_Js(\n\t'Calendar_List_Js',\n\t{\n\t\ttriggerImportAction: function (importUrl) {\n\t\t\tvar progressIndicatorElement = jQuery.progressIndicator();\n\t\t\tAppConnector.request(importUrl).done(function (data) {\n\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\tif (data) {\n\t\t\t\t\tapp.showModalWindow(data, function (data) {\n\t\t\t\t\t\tjQuery('#ical_import').validationEngine(app.validationEngineOptions);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t},\n\t{}\n);\n"],"names":["Vtiger_List_Js","triggerImportAction","importUrl","progressIndicatorElement","jQuery","progressIndicator","AppConnector","request","done","data","mode","app","showModalWindow","validationEngine","validationEngineOptions"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFACA,YAAY,CAEZA,cAAc,CACb,kBAAkB,CAClB,CACCC,mBAAmB,CAAE,SAAAA,oBAAUC,SAAS,CAAE,CACzC,IAAIC,wBAAwB,CAAGC,MAAM,CAACC,iBAAiB,EAAE,CACzDC,YAAY,CAACC,OAAO,CAACL,SAAS,CAAC,CAACM,IAAI,CAAC,SAAUC,IAAI,CAAE,CACpDN,wBAAwB,CAACE,iBAAiB,CAAC,CAAEK,IAAI,CAAE,MAAO,CAAC,CAAC,CACxDD,IAAI,EACPE,GAAG,CAACC,eAAe,CAACH,IAAI,CAAE,UAAgB,CACzCL,MAAM,CAAC,cAAc,CAAC,CAACS,gBAAgB,CAACF,GAAG,CAACG,uBAAuB,EACpE,CAAC,EAEH,CAAC,EACF,CACD,CAAC,CACD,EACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/Calendar/resources/SendInvitationModal.min.js b/public_html/layouts/basic/modules/Calendar/resources/SendInvitationModal.min.js index 79b95f03ea27..43e39053b1b7 100644 --- a/public_html/layouts/basic/modules/Calendar/resources/SendInvitationModal.min.js +++ b/public_html/layouts/basic/modules/Calendar/resources/SendInvitationModal.min.js @@ -1,6 +1,6 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */"use strict";function _typeof(obj){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}jQuery.Class("Calendar_SendInvitationModal_JS",{},{/** +/* {[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]} */"use strict";function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}jQuery.Class("Calendar_SendInvitationModal_JS",{},{/** * Modal container */container:!1,/** * Open mail client diff --git a/public_html/layouts/basic/modules/Calendar/resources/SendInvitationModal.min.js.map b/public_html/layouts/basic/modules/Calendar/resources/SendInvitationModal.min.js.map index c5829687dba5..38f56362d361 100644 --- a/public_html/layouts/basic/modules/Calendar/resources/SendInvitationModal.min.js.map +++ b/public_html/layouts/basic/modules/Calendar/resources/SendInvitationModal.min.js.map @@ -1 +1 @@ -{"version":3,"file":"SendInvitationModal.min.js","sources":["SendInvitationModal.js"],"sourcesContent":["/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */\n'use strict';\n\njQuery.Class(\n\t'Calendar_SendInvitationModal_JS',\n\t{},\n\t{\n\t\t/**\n\t\t * Modal container\n\t\t */\n\t\tcontainer: false,\n\t\t/**\n\t\t * Open mail client\n\t\t */\n\t\topenMailClient() {\n\t\t\t$('.js-modal__save', this.container).on('click', (_) => {\n\t\t\t\tlet url = 'index.php?module=OSSMail&view=Compose';\n\t\t\t\tlet formData = this.container.find('form').serializeFormData();\n\t\t\t\tfor (let i in formData) {\n\t\t\t\t\tlet value = typeof formData[i] === 'object' ? formData[i].join(',') : formData[i];\n\t\t\t\t\turl += `&${i}=` + encodeURIComponent(value);\n\t\t\t\t}\n\t\t\t\tVtiger_Index_Js.sendMailWindow(url, true);\n\t\t\t\tapp.hideModalWindow(false, this.container.closest('.js-modal-container')[0].id);\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Register modal events\n\t\t * @param {jQuery} modalContainer\n\t\t */\n\t\tregisterEvents: function (modalContainer) {\n\t\t\tthis.container = modalContainer;\n\t\t\tthis.openMailClient();\n\t\t}\n\t}\n);\n"],"names":["jQuery","Class","container","openMailClient","$","on","formData","find","serializeFormData","i","join","url","encodeURIComponent","value","Vtiger_Index_Js","sendMailWindow","app","hideModalWindow","closest","id","registerEvents","modalContainer"],"mappings":";;AAAA,kKACA,YAAA,UAEAA,OAAAA,CAAAA,GAAAA,CAAAA,CAAAA,yBAAAA,CAAAA,OAAAA,OAAAA,CAAAA,UAAAA,EAAAA,OAAAA,MAAAA,EAAAA,QAAAA,EAAAA,OAAAA,MAAAA,CAAAA,QAAAA,CAAAA,SAAAA,GAAAA,CAAAA,CAAAA,OAAAA,OAAAA,GAAAA,CAAAA,CAAAA,SAAAA,GAAAA,CAAAA,CAAAA,OAAAA,GAAAA,EAAAA,UAAAA,EAAAA,OAAAA,MAAAA,EAAAA,GAAAA,CAAAA,WAAAA,GAAAA,MAAAA,EAAAA,GAAAA,GAAAA,MAAAA,CAAAA,SAAAA,CAAAA,QAAAA,CAAAA,OAAAA,GAAAA,CAAAA,CAAAA,OAAAA,CAAAA,GAAAA,CAAAA,CAAAA,MAAM,CAACC,KAAP,CACC,iCADD,CAEC,EAFD,CAGC;AAED;AACA,KACEC,SAAS,GAJV;AAMD;AACA,KACEC,cARD,0BAQkB,CAChBC,IAAAA,KAAAA,CAAAA,IAAAA,CAAAA,CAAC,CAAC,iBAAD,CAAoB,IAAKF,CAAAA,SAAzB,CAAD,CAAqCG,EAArC,CAAwC,OAAxC,CAAiD,UAAO,CAAA,OAChD,CAAG,uCAD6C,CAEnDC,QAAQ,CAAG,KAAI,CAACJ,SAAL,CAAeK,IAAf,CAAoB,MAApB,EAA4BC,iBAA5B,EAFwC,CAGvD,IAAK,IAAIC,CAAT,IAAA,QAAA,CAAwB,CACvB,IAAS,KAAA,CAA0B,QAAvB,GAAOH,OAAAA,CAAAA,QAAQ,CAACG,CAAD,CAAf,CAAA,CAAkCH,QAAQ,CAACG,CAAD,CAAR,CAAYC,IAAZ,CAAiB,GAAjB,CAAlC,CAA0DJ,QAAQ,CAACG,CAAD,CAA9E,CACAE,GAAG,EAAI,GAAIF,CAAAA,MAAAA,CAAAA,CAAJ,MAAWG,kBAAkB,CAACC,KAAD,EACpC,CACDC,eAAe,CAACC,cAAhB,CAA+BJ,GAA/B,CAPuD,CAAA,CAAA,CAAA,CAQvDK,GAAG,CAACC,eAAJ,CAA2B,CAAA,CAAA,CAAA,KAAI,CAACf,SAAL,CAAegB,OAAf,CAAuB,qBAAvB,CAAA,CAA8C,CAA9C,CAAA,CAAiDC,EAA5E,EACA,CATD,EAUA,CAnBF;AAqBD;AACA;AACA,KACEC,cAAc,CAAE,SAAA,cAAA,CAAUC,cAAV,CAA0B,CACzC,IAAKnB,CAAAA,SAAL,CAAiBmB,cADwB,CAEzC,IAAKlB,CAAAA,cAAL,GACA,CA3BF,CAHD;;"} \ No newline at end of file +{"version":3,"file":"SendInvitationModal.min.js","sources":["SendInvitationModal.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\njQuery.Class(\n\t'Calendar_SendInvitationModal_JS',\n\t{},\n\t{\n\t\t/**\n\t\t * Modal container\n\t\t */\n\t\tcontainer: false,\n\t\t/**\n\t\t * Open mail client\n\t\t */\n\t\topenMailClient() {\n\t\t\t$('.js-modal__save', this.container).on('click', (_) => {\n\t\t\t\tlet url = 'index.php?module=OSSMail&view=Compose';\n\t\t\t\tlet formData = this.container.find('form').serializeFormData();\n\t\t\t\tfor (let i in formData) {\n\t\t\t\t\tlet value = typeof formData[i] === 'object' ? formData[i].join(',') : formData[i];\n\t\t\t\t\turl += `&${i}=` + encodeURIComponent(value);\n\t\t\t\t}\n\t\t\t\tVtiger_Index_Js.sendMailWindow(url, true);\n\t\t\t\tapp.hideModalWindow(false, this.container.closest('.js-modal-container')[0].id);\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Register modal events\n\t\t * @param {jQuery} modalContainer\n\t\t */\n\t\tregisterEvents: function (modalContainer) {\n\t\t\tthis.container = modalContainer;\n\t\t\tthis.openMailClient();\n\t\t}\n\t}\n);\n"],"names":["_typeof","o","Symbol","iterator","constructor","prototype","jQuery","Class","container","openMailClient","_this","$","on","url","formData","find","serializeFormData","i","value","join","concat","encodeURIComponent","Vtiger_Index_Js","sendMailWindow","app","hideModalWindow","closest","id","registerEvents","modalContainer"],"mappings":";;AAAA,kKACA,YAAY,CAAC,SAAAA,OAAAA,CAAAC,CAAA,CAAAD,CAAAA,yBAAAA,CAAAA,OAAAA,OAAA,CAAAE,UAAAA,EAAAA,OAAAA,MAAA,EAAAA,QAAAA,EAAAA,OAAAA,MAAA,CAAAC,QAAA,CAAA,SAAAF,CAAA,CAAA,CAAA,OAAA,OAAAA,CAAA,CAAA,CAAA,SAAAA,CAAA,CAAAA,CAAAA,OAAAA,CAAA,EAAAC,UAAAA,EAAAA,OAAAA,MAAA,EAAAD,CAAA,CAAAG,WAAA,GAAAF,MAAA,EAAAD,CAAA,GAAAC,MAAA,CAAAG,SAAA,CAAAJ,QAAAA,CAAAA,OAAAA,CAAA,CAAAD,CAAAA,OAAA,CAAAC,CAAA,CAAA,CAEbK,MAAM,CAACC,KAAK,CACX,iCAAiC,CACjC,EAAE,CACF;AAED;AACA,KACEC,SAAS,GAAO;AAElB;AACA,KACEC,cAAc,CAAAA,SAAAA,cAAAA,EAAG,CAAA,IAAAC,KAAA,CAAA,IAAA,CAChBC,CAAC,CAAC,iBAAiB,CAAE,IAAI,CAACH,SAAS,CAAC,CAACI,EAAE,CAAC,OAAO,CAAE,UAAO,CACnD,IAAAC,GAAG,CAAG,uCAAuC,CAC7CC,QAAQ,CAAGJ,KAAI,CAACF,SAAS,CAACO,IAAI,CAAC,MAAM,CAAC,CAACC,iBAAiB,EAAE,CAC9D,IAAK,IAAIC,CAAC,IAAIH,QAAQ,CAAE,CACvB,IAAII,KAAK,CAA0B,QAAQ,GAAAlB,OAAA,CAAxBc,QAAQ,CAACG,CAAC,CAAC,CAAa,CAAGH,QAAQ,CAACG,CAAC,CAAC,CAACE,IAAI,CAAC,GAAG,CAAC,CAAGL,QAAQ,CAACG,CAAC,CAAC,CACjFJ,GAAG,EAAI,GAAA,CAAAO,MAAA,CAAIH,CAAC,CAAA,GAAA,CAAA,CAAMI,kBAAkB,CAACH,KAAK,EAC3C,CACAI,eAAe,CAACC,cAAc,CAACV,GAAG,CAAM,CAAA,CAAA,CAAC,CACzCW,GAAG,CAACC,eAAe,CAAQf,CAAAA,CAAAA,CAAAA,KAAI,CAACF,SAAS,CAACkB,OAAO,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAACC,EAAE,EAC/E,CAAC,EACF,CAAC;AAEH;AACA;AACA,KACEC,cAAc,CAAE,SAAAA,cAAAA,CAAUC,cAAc,CAAE,CACzC,IAAI,CAACrB,SAAS,CAAGqB,cAAc,CAC/B,IAAI,CAACpB,cAAc,GACpB,CACD,CACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/Campaigns/resources/Detail.min.js.map b/public_html/layouts/basic/modules/Campaigns/resources/Detail.min.js.map index cd915b6d9810..6c5e2f5ea945 100644 --- a/public_html/layouts/basic/modules/Campaigns/resources/Detail.min.js.map +++ b/public_html/layouts/basic/modules/Campaigns/resources/Detail.min.js.map @@ -1 +1 @@ -{"version":3,"file":"Detail.min.js","sources":["Detail.js"],"sourcesContent":["/*+***********************************************************************************\n * The contents of this file are subject to the vtiger CRM Public License Version 1.0\n * (\"License\"); You may not use this file except in compliance with the License\n * The Original Code is: vtiger CRM Open Source\n * The Initial Developer of the Original Code is vtiger.\n * Portions created by vtiger are Copyright (C) vtiger.\n * All Rights Reserved.\n * Contributor(s): YetiForce S.A.\n *************************************************************************************/\n'use strict';\n\nVtiger_Detail_Js(\n\t'Campaigns_Detail_Js',\n\t{},\n\t{\n\t\t/**\n\t\t * Function to register email enabled actions\n\t\t */\n\t\tregisterEmailEnabledActions: function () {\n\t\t\tvar moduleName = app.getModuleName();\n\t\t\tvar className = moduleName + '_List_Js';\n\t\t\tvar listInstance = new window[className]();\n\t\t\tlistInstance.registerEvents();\n\t\t\tlistInstance.markSelectedRecords();\n\t\t},\n\t\tregisterEventForRelatedTabClick: function () {\n\t\t\tvar thisInstance = this;\n\t\t\tvar detailContentsHolder = thisInstance.getContentHolder();\n\t\t\tvar detailContainer = detailContentsHolder.closest('div.detailViewInfo');\n\t\t\tjQuery('.related', detailContainer).on('click', 'li:not(.spaceRelatedList)', function (e, urlAttributes) {\n\t\t\t\tvar tabElement = jQuery(e.currentTarget);\n\t\t\t\tif (!tabElement.hasClass('dropdown')) {\n\t\t\t\t\tvar element = jQuery('
    ');\n\t\t\t\t\telement.progressIndicator({\n\t\t\t\t\t\tposition: 'html',\n\t\t\t\t\t\tblockInfo: {\n\t\t\t\t\t\t\tenabled: true,\n\t\t\t\t\t\t\telementToBlock: detailContainer\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tvar url = tabElement.data('url');\n\t\t\t\t\tif (typeof urlAttributes !== 'undefined') {\n\t\t\t\t\t\tvar callBack = urlAttributes.callback;\n\t\t\t\t\t\tdelete urlAttributes.callback;\n\t\t\t\t\t}\n\t\t\t\t\tthisInstance\n\t\t\t\t\t\t.loadContents(url, urlAttributes)\n\t\t\t\t\t\t.done(function (data) {\n\t\t\t\t\t\t\tthisInstance.deSelectAllrelatedTabs();\n\t\t\t\t\t\t\tthisInstance.markTabAsSelected(tabElement);\n\t\t\t\t\t\t\tVtiger_Helper_Js.showHorizontalTopScrollBar();\n\t\t\t\t\t\t\tapp.registerModal(detailContentsHolder);\n\t\t\t\t\t\t\telement.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\t\tvar emailEnabledModule = jQuery(data).find('[name=\"emailEnabledModules\"]').val();\n\t\t\t\t\t\t\tif (emailEnabledModule) {\n\t\t\t\t\t\t\t\tvar listInstance = new Campaigns_List_Js();\n\t\t\t\t\t\t\t\tlistInstance.registerEvents();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (typeof callBack == 'function') {\n\t\t\t\t\t\t\t\tcallBack(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//Summary tab is clicked\n\t\t\t\t\t\t\tif (tabElement.data('linkKey') == thisInstance.detailViewSummaryTabLabel) {\n\t\t\t\t\t\t\t\tthisInstance.loadWidgets();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tthisInstance.registerBasicEvents();\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.fail(function (error) {\n\t\t\t\t\t\t\telement.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tregisterEvents: function () {\n\t\t\tthis._super();\n\t\t\t//Calling registerevents of campaigns list to handle checkboxs click of related records\n\t\t\tvar listInstance = Vtiger_List_Js.getInstance();\n\t\t\tlistInstance.registerEvents();\n\t\t\tvar thisInstance = this;\n\t\t\tapp.event.on('RelatedList.AfterLoad', function (event, instance) {\n\t\t\t\tvar response = instance.content;\n\t\t\t\tresponse.find('[name=\"selectedIds\"]').data('selectedIds', '');\n\t\t\t\tresponse.find('[name=\"excludedIds\"]').data('excludedIds', '');\n\t\t\t\tvar emailEnabledModule = response.find('[name=\"emailEnabledModules\"]').val();\n\t\t\t\tif (emailEnabledModule) {\n\t\t\t\t\tthisInstance.registerEmailEnabledActions();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Detail_Js","registerEmailEnabledActions","app","getModuleName","listInstance","moduleName","registerEvents","markSelectedRecords","registerEventForRelatedTabClick","detailContentsHolder","thisInstance","getContentHolder","detailContainer","closest","jQuery","on","e","urlAttributes","tabElement","currentTarget","hasClass","element","progressIndicator","position","blockInfo","enabled","elementToBlock","data","callback","loadContents","url","done","deSelectAllrelatedTabs","markTabAsSelected","Vtiger_Helper_Js","showHorizontalTopScrollBar","registerModal","mode","find","val","emailEnabledModule","callBack","detailViewSummaryTabLabel","loadWidgets","registerBasicEvents","fail","_super","Vtiger_List_Js","getInstance","event","instance","content","response"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFACA,aAEAA,gBAAgB,CACf,qBADe,CAEf,EAFe,CAGf;AAED;AACA,KACEC,2BAA2B,CAAE,SAAY,2BAAA,EAAA,CAAA,cAC1B,CAAGC,GAAG,CAACC,aAAJ,EADuB,CAGpCC,YAAY,CAAG,IAAU,MAAA,CADbC,UAAU,CAAG,UACA,CAHW,CAIxCD,YAAY,CAACE,cAAb,EAJwC,CAKxCF,YAAY,CAACG,mBAAb,GACA,CAVF,CAWCC,+BAA+B,CAAE,SAAY,+BAAA,EAAA,CAAA,IAC5B,YAAA,CAAG,IADyB,CAExCC,oBAAoB,CAAGC,YAAY,CAACC,gBAAb,EAFiB,CAGxCC,eAAe,CAAGH,oBAAoB,CAACI,OAArB,CAA6B,oBAA7B,CAHsB,CAI5CC,MAAM,CAAC,UAAD,CAAaF,eAAb,CAAN,CAAoCG,EAApC,CAAuC,OAAvC,CAAgD,2BAAhD,CAA6E,SAAUC,CAAV,CAAaC,aAAb,CAA4B,CACxG,IAAIC,UAAU,CAAGJ,MAAM,CAACE,CAAC,CAACG,aAAH,CAAvB,CACA,GAAI,CAACD,UAAU,CAACE,QAAX,CAAoB,UAApB,CAAL,CAAsC,CACrC,IAAW,OAAA,CAAGN,MAAM,CAAC,aAAD,CAApB,CACAO,OAAO,CAACC,iBAAR,CAA0B,CACzBC,QAAQ,CAAE,MADe,CAEzBC,SAAS,CAAE,CACVC,OAAO,CAAA,CAAA,CADG,CAEVC,cAAc,CAAEd,eAFN,CAFc,CAA1B,CAFqC,CASrC,IAAO,GAAA,CAAGM,UAAU,CAACS,IAAX,CAAgB,KAAhB,CAAV,CACA,GAA6B,WAAzB,SAAJ,aAAA,CAA0C,CACzC,YAAY,CAAGV,aAAa,CAACW,QAA7B,CACA,OAAoB,aAAA,CAACA,SACrB,CACDlB,YAAY,CACVmB,YADF,CACeC,GADf,CACoBb,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d,IAAT,CAAc,wBAAd,CAAsCX,CAAAA,IAAtC,CAA2C,aAA3C,CAA0D,EAA1D,CAFgE,CAGhEyB,QAAQ,CAACd,IAAT,CAAc,wBAAd,EAAsCX,IAAtC,CAA2C,aAA3C,CAA0D,EAA1D,CAHgE,CAIhE,IAAsB,kBAAA,CAAGyB,QAAQ,CAACd,IAAT,CAAc,gCAAd,CAAA,CAA8CC,GAA9C,EAAzB,CACIC,kBAL4D,EAM/D9B,YAAY,CAACT,2BAAb,GAED,CARD,EASA,CA1EF,CAHe;;"} \ No newline at end of file +{"version":3,"file":"Detail.min.js","sources":["Detail.js"],"sourcesContent":["/*+***********************************************************************************\n * The contents of this file are subject to the vtiger CRM Public License Version 1.0\n * (\"License\"); You may not use this file except in compliance with the License\n * The Original Code is: vtiger CRM Open Source\n * The Initial Developer of the Original Code is vtiger.\n * Portions created by vtiger are Copyright (C) vtiger.\n * All Rights Reserved.\n * Contributor(s): YetiForce S.A.\n *************************************************************************************/\n'use strict';\n\nVtiger_Detail_Js(\n\t'Campaigns_Detail_Js',\n\t{},\n\t{\n\t\t/**\n\t\t * Function to register email enabled actions\n\t\t */\n\t\tregisterEmailEnabledActions: function () {\n\t\t\tvar moduleName = app.getModuleName();\n\t\t\tvar className = moduleName + '_List_Js';\n\t\t\tvar listInstance = new window[className]();\n\t\t\tlistInstance.registerEvents();\n\t\t\tlistInstance.markSelectedRecords();\n\t\t},\n\t\tregisterEventForRelatedTabClick: function () {\n\t\t\tvar thisInstance = this;\n\t\t\tvar detailContentsHolder = thisInstance.getContentHolder();\n\t\t\tvar detailContainer = detailContentsHolder.closest('div.detailViewInfo');\n\t\t\tjQuery('.related', detailContainer).on('click', 'li:not(.spaceRelatedList)', function (e, urlAttributes) {\n\t\t\t\tvar tabElement = jQuery(e.currentTarget);\n\t\t\t\tif (!tabElement.hasClass('dropdown')) {\n\t\t\t\t\tvar element = jQuery('
    ');\n\t\t\t\t\telement.progressIndicator({\n\t\t\t\t\t\tposition: 'html',\n\t\t\t\t\t\tblockInfo: {\n\t\t\t\t\t\t\tenabled: true,\n\t\t\t\t\t\t\telementToBlock: detailContainer\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tvar url = tabElement.data('url');\n\t\t\t\t\tif (typeof urlAttributes !== 'undefined') {\n\t\t\t\t\t\tvar callBack = urlAttributes.callback;\n\t\t\t\t\t\tdelete urlAttributes.callback;\n\t\t\t\t\t}\n\t\t\t\t\tthisInstance\n\t\t\t\t\t\t.loadContents(url, urlAttributes)\n\t\t\t\t\t\t.done(function (data) {\n\t\t\t\t\t\t\tthisInstance.deSelectAllrelatedTabs();\n\t\t\t\t\t\t\tthisInstance.markTabAsSelected(tabElement);\n\t\t\t\t\t\t\tVtiger_Helper_Js.showHorizontalTopScrollBar();\n\t\t\t\t\t\t\tapp.registerModal(detailContentsHolder);\n\t\t\t\t\t\t\telement.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\t\tvar emailEnabledModule = jQuery(data).find('[name=\"emailEnabledModules\"]').val();\n\t\t\t\t\t\t\tif (emailEnabledModule) {\n\t\t\t\t\t\t\t\tvar listInstance = new Campaigns_List_Js();\n\t\t\t\t\t\t\t\tlistInstance.registerEvents();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (typeof callBack == 'function') {\n\t\t\t\t\t\t\t\tcallBack(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//Summary tab is clicked\n\t\t\t\t\t\t\tif (tabElement.data('linkKey') == thisInstance.detailViewSummaryTabLabel) {\n\t\t\t\t\t\t\t\tthisInstance.loadWidgets();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tthisInstance.registerBasicEvents();\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.fail(function (error) {\n\t\t\t\t\t\t\telement.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tregisterEvents: function () {\n\t\t\tthis._super();\n\t\t\t//Calling registerevents of campaigns list to handle checkboxs click of related records\n\t\t\tvar listInstance = Vtiger_List_Js.getInstance();\n\t\t\tlistInstance.registerEvents();\n\t\t\tvar thisInstance = this;\n\t\t\tapp.event.on('RelatedList.AfterLoad', function (event, instance) {\n\t\t\t\tvar response = instance.content;\n\t\t\t\tresponse.find('[name=\"selectedIds\"]').data('selectedIds', '');\n\t\t\t\tresponse.find('[name=\"excludedIds\"]').data('excludedIds', '');\n\t\t\t\tvar emailEnabledModule = response.find('[name=\"emailEnabledModules\"]').val();\n\t\t\t\tif (emailEnabledModule) {\n\t\t\t\t\tthisInstance.registerEmailEnabledActions();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Detail_Js","registerEmailEnabledActions","moduleName","app","getModuleName","listInstance","window","registerEvents","markSelectedRecords","registerEventForRelatedTabClick","thisInstance","detailContentsHolder","getContentHolder","detailContainer","closest","jQuery","on","e","urlAttributes","tabElement","currentTarget","hasClass","element","progressIndicator","position","blockInfo","enabled","elementToBlock","url","data","callBack","callback","loadContents","done","deSelectAllrelatedTabs","markTabAsSelected","Vtiger_Helper_Js","showHorizontalTopScrollBar","registerModal","mode","emailEnabledModule","find","val","Campaigns_List_Js","detailViewSummaryTabLabel","loadWidgets","registerBasicEvents","fail","_super","Vtiger_List_Js","getInstance","event","instance","response","content"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFACA,YAAY,CAEZA,gBAAgB,CACf,qBAAqB,CACrB,EAAE,CACF;AAED;AACA,KACEC,2BAA2B,CAAE,SAAAA,2BAAA,EAAY,KACpCC,UAAU,CAAGC,GAAG,CAACC,aAAa,EAAE,CAEhCC,YAAY,CAAG,IAAIC,MAAM,CADbJ,UAAU,CAAG,UAAU,CACG,CAC1CG,YAAY,CAACE,cAAc,EAAE,CAC7BF,YAAY,CAACG,mBAAmB,GACjC,CAAC,CACDC,+BAA+B,CAAE,SAAAA,+BAAA,EAAY,CACxC,IAAAC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AAkB,CAAE,CACvB,IAAInC,YAAY,CAAG,IAAIsC,iBAAmB,CAC1CtC,YAAY,CAACE,cAAc,GAC5B,CACuB,UAAU,EAA7B,OAAOuB,QAAsB,EAChCA,QAAQ,CAACD,IAAI,CAAC,CAGXV,UAAU,CAACU,IAAI,CAAC,SAAS,CAAC,EAAInB,YAAY,CAACkC,yBAAyB,EACvElC,YAAY,CAACmC,WAAW,EAAE,CAE3BnC,YAAY,CAACoC,mBAAmB,GACjC,CAAC,CAAC,CACDC,IAAI,CAAC,UAAiB,CACtBzB,OAAO,CAACC,iBAAiB,CAAC,CAAEgB,IAAI,CAAE,MAAO,CAAC,EAC3C,CAAC,EACH,CACD,CAAC,EACF,CAAC,CACDhC,cAAc,CAAE,SAAAA,cAAAA,EAAY,CAC3B,IAAI,CAACyC,MAAM,EAAE,CACb;AACA,IAAI3C,YAAY,CAAG4C,cAAc,CAACC,WAAW,EAAE,CAC/C7C,YAAY,CAACE,cAAc,EAAE,CAC7B,IAAIG,YAAY,CAAG,IAAI,CACvBP,GAAG,CAACgD,KAAK,CAACnC,EAAE,CAAC,uBAAuB,CAAE,SAAUmC,KAAK,CAAEC,QAAQ,CAAE,CAChE,IAAIC,QAAQ,CAAGD,QAAQ,CAACE,OAAO,CAC/BD,QAAQ,CAACZ,IAAI,CAAC,wBAAsB,CAAC,CAACZ,IAAI,CAAC,aAAa,CAAE,EAAE,CAAC,CAC7DwB,QAAQ,CAACZ,IAAI,CAAC,wBAAsB,CAAC,CAACZ,IAAI,CAAC,aAAa,CAAE,EAAE,CAAC,CAC7D,IAAIW,kBAAkB,CAAGa,QAAQ,CAACZ,IAAI,CAAC,gCAA8B,CAAC,CAACC,GAAG,EAAE,CACxEF,kBAAkB,EACrB9B,YAAY,CAACT,2BAA2B,GAE1C,CAAC,EACF,CACD,CACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/Campaigns/resources/List.min.js.map b/public_html/layouts/basic/modules/Campaigns/resources/List.min.js.map index 5cb695fccc24..1ae89de52231 100644 --- a/public_html/layouts/basic/modules/Campaigns/resources/List.min.js.map +++ b/public_html/layouts/basic/modules/Campaigns/resources/List.min.js.map @@ -1 +1 @@ -{"version":3,"file":"List.min.js","sources":["List.js"],"sourcesContent":["/*+***********************************************************************************\n * The contents of this file are subject to the vtiger CRM Public License Version 1.0\n * (\"License\"); You may not use this file except in compliance with the License\n * The Original Code is: vtiger CRM Open Source\n * The Initial Developer of the Original Code is vtiger.\n * Portions created by vtiger are Copyright (C) vtiger.\n * All Rights Reserved.\n *************************************************************************************/\n'use strict';\n\nVtiger_List_Js(\n\t'Campaigns_List_Js',\n\t{},\n\t{\n\t\t/**\n\t\t * Function to mark selected records\n\t\t */\n\t\tmarkSelectedRecords: function () {\n\t\t\tvar thisInstance = this;\n\t\t\tvar selectedIds = this.readSelectedIds();\n\t\t\tif (selectedIds != '') {\n\t\t\t\tif (selectedIds == 'all') {\n\t\t\t\t\tjQuery('.listViewEntriesCheckBox').each(function (index, element) {\n\t\t\t\t\t\tjQuery(this).prop('checked', true).closest('tr').addClass('highlightBackgroundColor');\n\t\t\t\t\t});\n\t\t\t\t\tjQuery('#deSelectAllMsgDiv').show();\n\t\t\t\t\tvar excludedIds = jQuery('[name=\"excludedIds\"]').data('excludedIds');\n\t\t\t\t\tif (excludedIds != '') {\n\t\t\t\t\t\tjQuery('#listViewEntriesMainCheckBox').prop('checked', false);\n\t\t\t\t\t\tjQuery('.listViewEntriesCheckBox').each(function (index, element) {\n\t\t\t\t\t\t\tif (jQuery.inArray(jQuery(element).val(), excludedIds) != -1) {\n\t\t\t\t\t\t\t\tjQuery(element).prop('checked', false).closest('tr').removeClass('highlightBackgroundColor');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tjQuery('.listViewEntriesCheckBox').each(function (index, element) {\n\t\t\t\t\t\tif (jQuery.inArray(jQuery(element).val(), selectedIds) != -1) {\n\t\t\t\t\t\t\tjQuery(this).prop('checked', true).closest('tr').addClass('highlightBackgroundColor');\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tthisInstance.checkSelectAll();\n\t\t\t}\n\t\t},\n\n\t\tgetRecordsCount: function () {\n\t\t\tif (app.getViewName() != 'Detail') {\n\t\t\t\treturn this._super();\n\t\t\t}\n\t\t\tvar detailInstance = Vtiger_Detail_Js.getInstance();\n\t\t\tvar aDeferred = jQuery.Deferred();\n\t\t\tvar recordCountVal = jQuery('#recordsCount').val();\n\t\t\tif (recordCountVal != '') {\n\t\t\t\taDeferred.resolve(recordCountVal);\n\t\t\t} else {\n\t\t\t\tvar count = '';\n\t\t\t\tvar cvId = jQuery('#customFilter').val();\n\t\t\t\tvar module = app.getModuleName();\n\t\t\t\tvar parent = app.getParentModuleName();\n\t\t\t\tvar relatedModuleName = jQuery('[name=\"relatedModuleName\"]').val();\n\t\t\t\tvar recordId = app.getRecordId();\n\t\t\t\tlet selectedTab = detailInstance.getSelectedTab();\n\t\t\t\tAppConnector.request({\n\t\t\t\t\tmodule: module,\n\t\t\t\t\tparent: parent,\n\t\t\t\t\taction: 'DetailAjax',\n\t\t\t\t\tviewname: cvId,\n\t\t\t\t\tmode: 'getRecordsCount',\n\t\t\t\t\trelatedModule: relatedModuleName,\n\t\t\t\t\trecord: recordId,\n\t\t\t\t\ttab_label: selectedTab.data('labelKey'),\n\t\t\t\t\trelationId: selectedTab.data('relationId')\n\t\t\t\t}).done(function (data) {\n\t\t\t\t\tjQuery('#recordsCount').val(data['result']['count']);\n\t\t\t\t\tcount = data['result']['count'];\n\t\t\t\t\taDeferred.resolve(count);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn aDeferred.promise();\n\t\t},\n\n\t\t/**\n\t\t * Function to register events\n\t\t */\n\t\tregisterEvents: function () {\n\t\t\tif (app.getViewName() != 'Detail') {\n\t\t\t\tthis._super();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.registerMainCheckBoxClickEvent();\n\t\t\tthis.registerCheckBoxClickEvent();\n\t\t\tthis.registerSelectAllClickEvent();\n\t\t\tthis.registerDeselectAllClickEvent();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_List_Js","markSelectedRecords","selectedIds","readSelectedIds","jQuery","each","prop","closest","addClass","show","data","excludedIds","index","element","inArray","val","removeClass","thisInstance","checkSelectAll","getRecordsCount","app","getViewName","_super","detailInstance","Vtiger_Detail_Js","getInstance","aDeferred","Deferred","recordCountVal","resolve","cvId","module","getModuleName","parent","getParentModuleName","relatedModuleName","recordId","getRecordId","selectedTab","getSelectedTab","AppConnector","request","action","viewname","mode","relatedModule","record","tab_label","relationId","done","count","promise","registerEvents","registerMainCheckBoxClickEvent","registerCheckBoxClickEvent","registerSelectAllClickEvent","registerDeselectAllClickEvent"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFACA,aAEAA,cAAc,CACb,mBADa,CAEb,EAFa,CAGb;AAED;AACA,KACEC,mBAAmB,CAAE,SAAY,mBAAA,EAAA,CAAA,gBAChB,CAAG,IADa,CAE5BC,WAAW,CAAG,KAAKC,eAAL,EAFc,CAGhC,GAAmB,EAAf,EAAAD,WAAJ,CAAuB,CACtB,GAAmB,KAAf,EAAAA,WAAJ,CAA0B,CACzBE,MAAM,CAAC,0BAAD,CAAN,CAAmCC,IAAnC,CAAwC,UAA0B,CACjED,MAAM,CAAC,IAAD,CAAN,CAAaE,IAAb,CAAkB,SAAlB,CAAA,CAAA,CAAA,CAAA,CAAmCC,OAAnC,CAA2C,IAA3C,CAAA,CAAiDC,QAAjD,CAA0D,0BAA1D,EACA,CAFD,CADyB,CAIzBJ,MAAM,CAAC,oBAAD,CAAN,CAA6BK,IAA7B,EAJyB,CAKzB,IAAe,WAAA,CAAGL,MAAM,CAAC,wBAAD,CAAN,CAA+BM,IAA/B,CAAoC,aAApC,CAAlB,CACmB,EAAf,EAAAC,WANqB,GAOxBP,MAAM,CAAC,8BAAD,CA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AAAA,CAAAA,MAAL,EAOD,CAlFF,CAHa;;"} \ No newline at end of file +{"version":3,"file":"List.min.js","sources":["List.js"],"sourcesContent":["/*+***********************************************************************************\n * The contents of this file are subject to the vtiger CRM Public License Version 1.0\n * (\"License\"); You may not use this file except in compliance with the License\n * The Original Code is: vtiger CRM Open Source\n * The Initial Developer of the Original Code is vtiger.\n * Portions created by vtiger are Copyright (C) vtiger.\n * All Rights Reserved.\n *************************************************************************************/\n'use strict';\n\nVtiger_List_Js(\n\t'Campaigns_List_Js',\n\t{},\n\t{\n\t\t/**\n\t\t * Function to mark selected records\n\t\t */\n\t\tmarkSelectedRecords: function () {\n\t\t\tvar thisInstance = this;\n\t\t\tvar selectedIds = this.readSelectedIds();\n\t\t\tif (selectedIds != '') {\n\t\t\t\tif (selectedIds == 'all') {\n\t\t\t\t\tjQuery('.listViewEntriesCheckBox').each(function (index, element) {\n\t\t\t\t\t\tjQuery(this).prop('checked', true).closest('tr').addClass('highlightBackgroundColor');\n\t\t\t\t\t});\n\t\t\t\t\tjQuery('#deSelectAllMsgDiv').show();\n\t\t\t\t\tvar excludedIds = jQuery('[name=\"excludedIds\"]').data('excludedIds');\n\t\t\t\t\tif (excludedIds != '') {\n\t\t\t\t\t\tjQuery('#listViewEntriesMainCheckBox').prop('checked', false);\n\t\t\t\t\t\tjQuery('.listViewEntriesCheckBox').each(function (index, element) {\n\t\t\t\t\t\t\tif (jQuery.inArray(jQuery(element).val(), excludedIds) != -1) {\n\t\t\t\t\t\t\t\tjQuery(element).prop('checked', false).closest('tr').removeClass('highlightBackgroundColor');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tjQuery('.listViewEntriesCheckBox').each(function (index, element) {\n\t\t\t\t\t\tif (jQuery.inArray(jQuery(element).val(), selectedIds) != -1) {\n\t\t\t\t\t\t\tjQuery(this).prop('checked', true).closest('tr').addClass('highlightBackgroundColor');\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tthisInstance.checkSelectAll();\n\t\t\t}\n\t\t},\n\n\t\tgetRecordsCount: function () {\n\t\t\tif (app.getViewName() != 'Detail') {\n\t\t\t\treturn this._super();\n\t\t\t}\n\t\t\tvar detailInstance = Vtiger_Detail_Js.getInstance();\n\t\t\tvar aDeferred = jQuery.Deferred();\n\t\t\tvar recordCountVal = jQuery('#recordsCount').val();\n\t\t\tif (recordCountVal != '') {\n\t\t\t\taDeferred.resolve(recordCountVal);\n\t\t\t} else {\n\t\t\t\tvar count = '';\n\t\t\t\tvar cvId = jQuery('#customFilter').val();\n\t\t\t\tvar module = app.getModuleName();\n\t\t\t\tvar parent = app.getParentModuleName();\n\t\t\t\tvar relatedModuleName = jQuery('[name=\"relatedModuleName\"]').val();\n\t\t\t\tvar recordId = app.getRecordId();\n\t\t\t\tlet selectedTab = detailInstance.getSelectedTab();\n\t\t\t\tAppConnector.request({\n\t\t\t\t\tmodule: module,\n\t\t\t\t\tparent: parent,\n\t\t\t\t\taction: 'DetailAjax',\n\t\t\t\t\tviewname: cvId,\n\t\t\t\t\tmode: 'getRecordsCount',\n\t\t\t\t\trelatedModule: relatedModuleName,\n\t\t\t\t\trecord: recordId,\n\t\t\t\t\ttab_label: selectedTab.data('labelKey'),\n\t\t\t\t\trelationId: selectedTab.data('relationId')\n\t\t\t\t}).done(function (data) {\n\t\t\t\t\tjQuery('#recordsCount').val(data['result']['count']);\n\t\t\t\t\tcount = data['result']['count'];\n\t\t\t\t\taDeferred.resolve(count);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn aDeferred.promise();\n\t\t},\n\n\t\t/**\n\t\t * Function to register events\n\t\t */\n\t\tregisterEvents: function () {\n\t\t\tif (app.getViewName() != 'Detail') {\n\t\t\t\tthis._super();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.registerMainCheckBoxClickEvent();\n\t\t\tthis.registerCheckBoxClickEvent();\n\t\t\tthis.registerSelectAllClickEvent();\n\t\t\tthis.registerDeselectAllClickEvent();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_List_Js","markSelectedRecords","thisInstance","selectedIds","readSelectedIds","jQuery","each","prop","closest","addClass","show","excludedIds","data","index","element","inArray","val","removeClass","checkSelectAll","getRecordsCount","app","getViewName","_super","detailInstance","Vtiger_Detail_Js","getInstance","aDeferred","Deferred","recordCountVal","resolve","count","cvId","module","getModuleName","parent","getParentModuleName","relatedModuleName","recordId","getRecordId","selectedTab","getSelectedTab","AppConnector","request","action","viewname","mode","relatedModule","record","tab_label","relationId","done","result","promise","registerEvents","registerMainCheckBoxClickEvent","registerCheckBoxClickEvent","registerSelectAllClickEvent","registerDeselectAllClickEvent"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFACA,YAAY,CAEZA,cAAc,CACb,mBAAmB,CACnB,EAAE,CACF;AAED;AACA,KACEC,mBAAmB,CAAE,SAAAA,mBAAAA,EAAY,CAC5B,IAAAC,YAAY,CAAG,IAAI,CACnBC,WAAW,CAAG,IAAI,CAACC,eAAe,EAAE,CACxC,GAAmB,EAAE,EAAjBD,WAAiB,CAAE,CACtB,GAAmB,KAAK,EAApBA,WAAoB,CAAE,CACzBE,MAAM,CAAC,0BAA0B,CAAC,CAACC,IAAI,CAAC,UAA0B,CACjED,MAAM,CAAC,IAAI,CAAC,CAACE,IAAI,CAAC,SAAS,CAAA,CAAA,CAAM,CAAC,CAACC,OAAO,CAAC,IAAI,CAAC,CAACC,QAAQ,CAAC,0BAA0B,EACrF,CAAC,CAAC,CACFJ,MAAM,CAAC,oBAAoB,CAAC,CAACK,IAAI,EAAE,CACnC,IAAIC,WAAW,CAAGN,MAAM,CAAC,wBAAsB,CAAC,CAACO,IAAI,CAAC,aAAa,CAAC,CACjD,EAAE,EAAjBD,WAAiB,GACpBN,MAAM,CAAC,8BAA8B,CAAC,CAACE,IAAI,CAAC,SAAS,CAAO,CAAA,CAAA,CAAC,CAC7DF,MAAM,CAAC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AAGZ,GAAG,CAACa,aAAa,EAAE,CAC5BC,MAAM,CAAGd,GAAG,CAACe,mBAAmB,EAAE,CAClCC,iBAAiB,CAAG/B,MAAM,CAAC,8BAA4B,CAAC,CAACW,GAAG,EAAE,CAC9DqB,QAAQ,CAAGjB,GAAG,CAACkB,WAAW,EAAE,CAC5BC,WAAW,CAAGhB,cAAc,CAACiB,cAAc,EAAE,CACjDC,YAAY,CAACC,OAAO,CAAC,CACpBV,MAAM,CAAEA,MAAM,CACdE,MAAM,CAAEA,MAAM,CACdS,MAAM,CAAE,YAAY,CACpBC,QAAQ,CAAEb,IAAI,CACdc,IAAI,CAAE,iBAAiB,CACvBC,aAAa,CAAEV,iBAAiB,CAChCW,MAAM,CAAEV,QAAQ,CAChBW,SAAS,CAAET,WAAW,CAAC3B,IAAI,CAAC,UAAU,CAAC,CACvCqC,UAAU,CAAEV,WAAW,CAAC3B,IAAI,CAAC,YAAY,CAC1C,CAAC,CAAC,CAACsC,IAAI,CAAC,SAAUtC,IAAI,CAAE,CACvBP,MAAM,CAAC,eAAe,CAAC,CAACW,GAAG,CAACJ,IAAI,CAAAuC,MAAU,CAAArB,KAAS,CAAC,CACpDA,KAAK,CAAGlB,IAAI,CAAAuC,MAAU,CAAArB,KAAS,CAC/BJ,SAAS,CAACG,OAAO,CAACC,KAAK,EACxB,CAAC,EACF,CAEA,OAAOJ,SAAS,CAAC0B,OAAO,EACzB,CAAC;AAGH;AACA,KACEC,cAAc,CAAE,SAAAA,cAAAA,EAAY,CACF,OAAA,QAAQ,EAA7BjC,GAAG,CAACC,WAAW,EAAc,MAIjC,IAAI,CAACiC,8BAA8B,EAAE,CACrC,IAAI,CAACC,0BAA0B,EAAE,CACjC,IAAI,CAACC,2BAA2B,EAAE,CAClC,IAAI,CAACC,6BAA6B,EAAE,OAN/B,IAAA,CAACnC,MAAM,EAOb,CACD,CACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/Campaigns/resources/RelatedList.min.js.map b/public_html/layouts/basic/modules/Campaigns/resources/RelatedList.min.js.map index 8f3701bf6b52..10f93f9ed091 100644 --- a/public_html/layouts/basic/modules/Campaigns/resources/RelatedList.min.js.map +++ b/public_html/layouts/basic/modules/Campaigns/resources/RelatedList.min.js.map @@ -1 +1 @@ -{"version":3,"file":"RelatedList.min.js","sources":["RelatedList.js"],"sourcesContent":["/*+***********************************************************************************\n * The contents of this file are subject to the vtiger CRM Public License Version 1.0\n * (\"License\"); You may not use this file except in compliance with the License\n * The Original Code is: vtiger CRM Open Source\n * The Initial Developer of the Original Code is vtiger.\n * Portions created by vtiger are Copyright (C) vtiger.\n * All Rights Reserved.\n *************************************************************************************/\n'use strict';\n\nVtiger_RelatedList_Js(\n\t'Campaigns_RelatedList_Js',\n\t{},\n\t{\n\t\tgetCompleteParams: function () {\n\t\t\tvar params = this._super();\n\t\t\tvar container = this.getRelatedContainer();\n\t\t\tparams['selectedIds'] = container.find('#selectedIds').data('selectedIds');\n\t\t\tparams['excludedIds'] = container.find('#excludedIds').data('excludedIds');\n\t\t\treturn params;\n\t\t}\n\t}\n);\n"],"names":["Vtiger_RelatedList_Js","getCompleteParams","params","_super","container","getRelatedContainer","find","data"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFACA,YAAA,CAEAA,qBAAqB,CACpB,0BADoB,CAEpB,EAFoB,CAGpB,CACCC,iBAAiB,CAAE,SAAA,iBAAA,EAAY,CAC1BC,IAAAA,MAAM,CAAG,IAAKC,CAAAA,MAAL,EADiB,CAE1BC,SAAS,CAAG,IAAKC,CAAAA,mBAAL,EAFc,CAK9B,OAFAH,MAAM,CAAN,WAAA,CAAwBE,SAAS,CAACE,IAAV,CAAe,cAAf,CAA+BC,CAAAA,IAA/B,CAAoC,aAApC,CAExB,CADAL,MAAM,CAAA,WAAN,CAAwBE,SAAS,CAACE,IAAV,CAAe,cAAf,CAAA,CAA+BC,IAA/B,CAAoC,aAApC,CACxB,CAAOL,MACP,CAPF,CAHoB;;"} \ No newline at end of file +{"version":3,"file":"RelatedList.min.js","sources":["RelatedList.js"],"sourcesContent":["/*+***********************************************************************************\n * The contents of this file are subject to the vtiger CRM Public License Version 1.0\n * (\"License\"); You may not use this file except in compliance with the License\n * The Original Code is: vtiger CRM Open Source\n * The Initial Developer of the Original Code is vtiger.\n * Portions created by vtiger are Copyright (C) vtiger.\n * All Rights Reserved.\n *************************************************************************************/\n'use strict';\n\nVtiger_RelatedList_Js(\n\t'Campaigns_RelatedList_Js',\n\t{},\n\t{\n\t\tgetCompleteParams: function () {\n\t\t\tvar params = this._super();\n\t\t\tvar container = this.getRelatedContainer();\n\t\t\tparams['selectedIds'] = container.find('#selectedIds').data('selectedIds');\n\t\t\tparams['excludedIds'] = container.find('#excludedIds').data('excludedIds');\n\t\t\treturn params;\n\t\t}\n\t}\n);\n"],"names":["Vtiger_RelatedList_Js","getCompleteParams","params","_super","container","getRelatedContainer","selectedIds","find","data","excludedIds"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFACA,YAAY,CAEZA,qBAAqB,CACpB,0BAA0B,CAC1B,EAAE,CACF,CACCC,iBAAiB,CAAE,SAAAA,mBAAY,CAAA,IAC1BC,MAAM,CAAG,IAAI,CAACC,MAAM,EAAE,CACtBC,SAAS,CAAG,IAAI,CAACC,mBAAmB,EAAE,CAG1C,OAFAH,MAAM,CAAAI,WAAe,CAAGF,SAAS,CAACG,IAAI,CAAC,cAAc,CAAC,CAACC,IAAI,CAAC,aAAa,CAAC,CAC1EN,MAAM,CAAAO,WAAe,CAAGL,SAAS,CAACG,IAAI,CAAC,cAAc,CAAC,CAACC,IAAI,CAAC,aAAa,CAAC,CACnEN,MACR,CACD,CACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/Competition/resources/Detail.min.js b/public_html/layouts/basic/modules/Competition/resources/Detail.min.js index 5d9b00e48131..91516836e533 100644 --- a/public_html/layouts/basic/modules/Competition/resources/Detail.min.js +++ b/public_html/layouts/basic/modules/Competition/resources/Detail.min.js @@ -1,6 +1,6 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */Vtiger_Detail_Js("Competition_Detail_Js",{},{hierarchyResponseCache:{},getHierarchyResponseData:function getHierarchyResponseData(params){var thisInstance=this,aDeferred=jQuery.Deferred();return $.isEmptyObject(thisInstance.hierarchyResponseCache)?AppConnector.request(params).then(function(data){thisInstance.hierarchyResponseCache=data,aDeferred.resolve(thisInstance.hierarchyResponseCache);}):aDeferred.resolve(thisInstance.hierarchyResponseCache),aDeferred.promise()},/* +/* {[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]} */Vtiger_Detail_Js("Competition_Detail_Js",{},{hierarchyResponseCache:{},getHierarchyResponseData:function getHierarchyResponseData(params){var thisInstance=this,aDeferred=jQuery.Deferred();return $.isEmptyObject(thisInstance.hierarchyResponseCache)?AppConnector.request(params).then(function(data){thisInstance.hierarchyResponseCache=data,aDeferred.resolve(thisInstance.hierarchyResponseCache);}):aDeferred.resolve(thisInstance.hierarchyResponseCache),aDeferred.promise()},/* * function to display the hierarchy response data */displayHierarchyResponseData:function displayHierarchyResponseData(data){var callbackFunction=function(){app.showScrollBar($("#hierarchyScroll"),{height:"300px",railVisible:!0,size:"6px"});};app.showModalWindow(data,function(modalContainer){App.Components.Scrollbar.xy($("#hierarchyScroll",modalContainer)),"function"==typeof callbackFunction&&300<$("#hierarchyScroll",modalContainer).height()&&callbackFunction();});},/** * Registers read count of hierarchy if it is possoble diff --git a/public_html/layouts/basic/modules/Competition/resources/Detail.min.js.map b/public_html/layouts/basic/modules/Competition/resources/Detail.min.js.map index 82a3e8d8bc2e..6c0229cb69dc 100644 --- a/public_html/layouts/basic/modules/Competition/resources/Detail.min.js.map +++ b/public_html/layouts/basic/modules/Competition/resources/Detail.min.js.map @@ -1 +1 @@ -{"version":3,"file":"Detail.min.js","sources":["Detail.js"],"sourcesContent":["/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */\nVtiger_Detail_Js(\n\t'Competition_Detail_Js',\n\t{},\n\t{\n\t\thierarchyResponseCache: {},\n\t\tgetHierarchyResponseData: function (params) {\n\t\t\tlet thisInstance = this,\n\t\t\t\taDeferred = jQuery.Deferred();\n\n\t\t\tif (!$.isEmptyObject(thisInstance.hierarchyResponseCache)) {\n\t\t\t\taDeferred.resolve(thisInstance.hierarchyResponseCache);\n\t\t\t} else {\n\t\t\t\tAppConnector.request(params).then(function (data) {\n\t\t\t\t\tthisInstance.hierarchyResponseCache = data;\n\t\t\t\t\taDeferred.resolve(thisInstance.hierarchyResponseCache);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn aDeferred.promise();\n\t\t},\n\t\t/*\n\t\t * function to display the hierarchy response data\n\t\t */\n\t\tdisplayHierarchyResponseData: function (data) {\n\t\t\tlet callbackFunction = function () {\n\t\t\t\tapp.showScrollBar($('#hierarchyScroll'), {\n\t\t\t\t\theight: '300px',\n\t\t\t\t\trailVisible: true,\n\t\t\t\t\tsize: '6px'\n\t\t\t\t});\n\t\t\t};\n\t\t\tapp.showModalWindow(data, function (modalContainer) {\n\t\t\t\tApp.Components.Scrollbar.xy($('#hierarchyScroll', modalContainer));\n\t\t\t\tif (typeof callbackFunction == 'function' && $('#hierarchyScroll', modalContainer).height() > 300) {\n\t\t\t\t\tcallbackFunction();\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Registers read count of hierarchy if it is possoble\n\t\t */\n\t\tregisterHierarchyRecordCount: function () {\n\t\t\tlet hierarchyButton = $('.js-detail-hierarchy'),\n\t\t\t\tparams = {\n\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\taction: 'RelationAjax',\n\t\t\t\t\trecord: app.getRecordId(),\n\t\t\t\t\tmode: 'getHierarchyCount'\n\t\t\t\t};\n\t\t\tif (hierarchyButton.length) {\n\t\t\t\tAppConnector.request(params).then(function (response) {\n\t\t\t\t\tif (response.success) {\n\t\t\t\t\t\t$('.hierarchy .badge').html(response.result);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tregisterShowHierarchy: function () {\n\t\t\tlet thisInstance = this,\n\t\t\t\thierarchyButton = $('.detailViewTitle'),\n\t\t\t\tparams = {\n\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\tview: 'Hierarchy',\n\t\t\t\t\trecord: app.getRecordId()\n\t\t\t\t};\n\t\t\thierarchyButton.on('click', '.js-detail-hierarchy', function () {\n\t\t\t\tlet progressIndicatorElement = $.progressIndicator({\n\t\t\t\t\tposition: 'html',\n\t\t\t\t\tblockInfo: {\n\t\t\t\t\t\tenabled: true\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tthisInstance.getHierarchyResponseData(params).then(function (data) {\n\t\t\t\t\tthisInstance.displayHierarchyResponseData(data);\n\t\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\tregisterEvents: function () {\n\t\t\tthis._super();\n\t\t\tthis.registerHierarchyRecordCount();\n\t\t\tthis.registerShowHierarchy();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Detail_Js","hierarchyResponseCache","getHierarchyResponseData","params","thisInstance","aDeferred","jQuery","Deferred","isEmptyObject","AppConnector","request","then","data","resolve","promise","displayHierarchyResponseData","callbackFunction","app","showScrollBar","$","height","railVisible","size","showModalWindow","modalContainer","App","Components","Scrollbar","xy","registerHierarchyRecordCount","module","getModuleName","action","record","getRecordId","mode","hierarchyButton","length","response","success","html","result","registerShowHierarchy","view","on","progressIndicator","position","blockInfo","enabled","progressIndicatorElement","registerEvents","_super"],"mappings":";;AAAA,kKACAA,gBAAgB,CACf,uBADe,CAEf,EAFe,CAGf,CACCC,sBAAsB,CAAE,EADzB,CAECC,wBAAwB,CAAE,kCAAUC,MAAV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"version":3,"file":"Detail.min.js","sources":["Detail.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]} */\nVtiger_Detail_Js(\n\t'Competition_Detail_Js',\n\t{},\n\t{\n\t\thierarchyResponseCache: {},\n\t\tgetHierarchyResponseData: function (params) {\n\t\t\tlet thisInstance = this,\n\t\t\t\taDeferred = jQuery.Deferred();\n\n\t\t\tif (!$.isEmptyObject(thisInstance.hierarchyResponseCache)) {\n\t\t\t\taDeferred.resolve(thisInstance.hierarchyResponseCache);\n\t\t\t} else {\n\t\t\t\tAppConnector.request(params).then(function (data) {\n\t\t\t\t\tthisInstance.hierarchyResponseCache = data;\n\t\t\t\t\taDeferred.resolve(thisInstance.hierarchyResponseCache);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn aDeferred.promise();\n\t\t},\n\t\t/*\n\t\t * function to display the hierarchy response data\n\t\t */\n\t\tdisplayHierarchyResponseData: function (data) {\n\t\t\tlet callbackFunction = function () {\n\t\t\t\tapp.showScrollBar($('#hierarchyScroll'), {\n\t\t\t\t\theight: '300px',\n\t\t\t\t\trailVisible: true,\n\t\t\t\t\tsize: '6px'\n\t\t\t\t});\n\t\t\t};\n\t\t\tapp.showModalWindow(data, function (modalContainer) {\n\t\t\t\tApp.Components.Scrollbar.xy($('#hierarchyScroll', modalContainer));\n\t\t\t\tif (typeof callbackFunction == 'function' && $('#hierarchyScroll', modalContainer).height() > 300) {\n\t\t\t\t\tcallbackFunction();\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Registers read count of hierarchy if it is possoble\n\t\t */\n\t\tregisterHierarchyRecordCount: function () {\n\t\t\tlet hierarchyButton = $('.js-detail-hierarchy'),\n\t\t\t\tparams = {\n\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\taction: 'RelationAjax',\n\t\t\t\t\trecord: app.getRecordId(),\n\t\t\t\t\tmode: 'getHierarchyCount'\n\t\t\t\t};\n\t\t\tif (hierarchyButton.length) {\n\t\t\t\tAppConnector.request(params).then(function (response) {\n\t\t\t\t\tif (response.success) {\n\t\t\t\t\t\t$('.hierarchy .badge').html(response.result);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tregisterShowHierarchy: function () {\n\t\t\tlet thisInstance = this,\n\t\t\t\thierarchyButton = $('.detailViewTitle'),\n\t\t\t\tparams = {\n\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\tview: 'Hierarchy',\n\t\t\t\t\trecord: app.getRecordId()\n\t\t\t\t};\n\t\t\thierarchyButton.on('click', '.js-detail-hierarchy', function () {\n\t\t\t\tlet progressIndicatorElement = $.progressIndicator({\n\t\t\t\t\tposition: 'html',\n\t\t\t\t\tblockInfo: {\n\t\t\t\t\t\tenabled: true\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tthisInstance.getHierarchyResponseData(params).then(function (data) {\n\t\t\t\t\tthisInstance.displayHierarchyResponseData(data);\n\t\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\tregisterEvents: function () {\n\t\t\tthis._super();\n\t\t\tthis.registerHierarchyRecordCount();\n\t\t\tthis.registerShowHierarchy();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Detail_Js","hierarchyResponseCache","getHierarchyResponseData","params","thisInstance","aDeferred","jQuery","Deferred","$","isEmptyObject","AppConnector","request","then","data","resolve","promise","displayHierarchyResponseData","callbackFunction","app","showScrollBar","height","railVisible","size","showModalWindow","modalContainer","App","Components","Scrollbar","xy","registerHierarchyRecordCount","hierarchyButton","module","getModuleName","action","record","getRecordId","mode","length","response","success","html","result","registerShowHierarchy","view","on","progressIndicatorElement","progressIndicator","position","blockInfo","enabled","registerEvents","_super"],"mappings":";;AAAA,kKACAA,gBAAgB,CACf,uBAAuB,CACvB,EAAE,CACF,CACCC,sBAAsB,CAAE,EAAE,CAC1BC,w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cAAc,CACtBC,MAAM,CAAEhB,GAAG,CAACiB,WAAW,EAAE,CACzBC,IAAI,CAAE,mBACP,CAAC,CACEN,eAAe,CAACO,MAAM,EACzB3B,YAAY,CAACC,OAAO,CAACR,MAAM,CAAC,CAACS,IAAI,CAAC,SAAU0B,QAAQ,CAAE,CACjDA,QAAQ,CAACC,OAAO,EACnB/B,CAAC,CAAC,mBAAmB,CAAC,CAACgC,IAAI,CAACF,QAAQ,CAACG,MAAM,EAE7C,CAAC,EAEH,CAAC,CACDC,qBAAqB,CAAE,SAAAA,qBAAA,EAAY,CAClC,IAAItC,YAAY,CAAG,IAAI,CACtB0B,eAAe,CAAGtB,CAAC,CAAC,kBAAkB,CAAC,CACvCL,MAAM,CAAG,CACR4B,MAAM,CAAEb,GAAG,CAACc,aAAa,EAAE,CAC3BW,IAAI,CAAE,WAAW,CACjBT,MAAM,CAAEhB,GAAG,CAACiB,WAAW,EACxB,CAAC,CACFL,eAAe,CAACc,EAAE,CAAC,OAAO,CAAE,sBAAsB,CAAE,UAAY,CAC/D,IAAIC,wBAAwB,CAAGrC,CAAC,CAACsC,iBAAiB,CAAC,CAClDC,QAAQ,CAAE,MAAM,CAChBC,SAAS,CAAE,CACVC,OAAO,CACR,CAAA,CAAA,CACD,CAAC,CAAC,CACF7C,YAAY,CAACF,wBAAwB,CAACC,MAAM,CAAC,CAACS,IAAI,CAAC,SAAUC,IAAI,CAAE,CAClET,YAAY,CAACY,4BAA4B,CAACH,IAAI,CAAC,CAC/CgC,wBAAwB,CAACC,iBAAiB,CAAC,CAAEV,IAAI,CAAE,MAAO,CAAC,EAC5D,CAAC,EACF,CAAC,EACF,CAAC,CACDc,cAAc,CAAE,SAAAA,cAAAA,EAAY,CAC3B,IAAI,CAACC,MAAM,EAAE,CACb,IAAI,CAACtB,4BAA4B,EAAE,CACnC,IAAI,CAACa,qBAAqB,GAC3B,CACD,CACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/Contacts/resources/Detail.min.js.map b/public_html/layouts/basic/modules/Contacts/resources/Detail.min.js.map index 6e51ebf9a5f9..b4a1f9f12657 100644 --- a/public_html/layouts/basic/modules/Contacts/resources/Detail.min.js.map +++ b/public_html/layouts/basic/modules/Contacts/resources/Detail.min.js.map @@ -1 +1 @@ -{"version":3,"file":"Detail.min.js","sources":["Detail.js"],"sourcesContent":["/*+***********************************************************************************\n * The contents of this file are subject to the vtiger CRM Public License Version 1.0\n * (\"License\"); You may not use this file except in compliance with the License\n * The Original Code is: vtiger CRM Open Source\n * The Initial Developer of the Original Code is vtiger.\n * Portions created by vtiger are Copyright (C) vtiger.\n * All Rights Reserved.\n *************************************************************************************/\n'use strict';\n\nVtiger_Detail_Js(\n\t'Contacts_Detail_Js',\n\t{},\n\t{\n\t\thierarchyResponseCache: {},\n\t\t/**\n\t\t * Function to register recordpresave event\n\t\t */\n\t\tregisterRecordPreSaveEvent: function (form) {\n\t\t\tvar primaryEmailField = jQuery('[name=\"email\"]');\n\t\t\tif (typeof form === 'undefined') {\n\t\t\t\tform = this.getForm();\n\t\t\t}\n\n\t\t\tform.on(this.fieldPreSave, '[name=\"portal\"]', function (e, data) {\n\t\t\t\tvar portalField = jQuery(e.currentTarget);\n\n\t\t\t\tvar primaryEmailValue = primaryEmailField.val();\n\t\t\t\tvar isAlertAlreadyShown = jQuery('.ui-pnotify').length;\n\n\t\t\t\tif (portalField.is(':checked')) {\n\t\t\t\t\tif (primaryEmailField.length == 0) {\n\t\t\t\t\t\tif (isAlertAlreadyShown <= 0) {\n\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\ttext: app.vtranslate('JS_PRIMARY_EMAIL_FIELD_DOES_NOT_EXISTS'),\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\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t\tif (primaryEmailValue == '') {\n\t\t\t\t\t\tif (isAlertAlreadyShown <= 0) {\n\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\ttext: app.vtranslate('JS_PLEASE_ENTER_PRIMARY_EMAIL_VALUE_TO_ENABLE_PORTAL_USER'),\n\t\t\t\t\t\t\t\ttype: 'info'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Function to get response from hierarchy\n\t\t * @param {array} params\n\t\t * @returns {Promise}\n\t\t */\n\t\tgetHierarchyResponseData: function (params) {\n\t\t\tlet thisInstance = this,\n\t\t\t\taDeferred = jQuery.Deferred();\n\n\t\t\tif (!$.isEmptyObject(thisInstance.hierarchyResponseCache)) {\n\t\t\t\taDeferred.resolve(thisInstance.hierarchyResponseCache);\n\t\t\t} else {\n\t\t\t\tAppConnector.request(params).then(function (data) {\n\t\t\t\t\tthisInstance.hierarchyResponseCache = data;\n\t\t\t\t\taDeferred.resolve(thisInstance.hierarchyResponseCache);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn aDeferred.promise();\n\t\t},\n\t\t/**\n\t\t * function to display the hierarchy response data\n\t\t * @param {array} data\n\t\t */\n\t\tdisplayHierarchyResponseData: function (data) {\n\t\t\tlet callbackFunction = function () {\n\t\t\t\tapp.showScrollBar($('#hierarchyScroll'), {\n\t\t\t\t\theight: '300px',\n\t\t\t\t\trailVisible: true,\n\t\t\t\t\tsize: '6px'\n\t\t\t\t});\n\t\t\t};\n\t\t\tapp.showModalWindow(data, function (modalContainer) {\n\t\t\t\tApp.Components.Scrollbar.xy($('#hierarchyScroll', modalContainer));\n\t\t\t\tif (typeof callbackFunction == 'function' && $('#hierarchyScroll', modalContainer).height() > 300) {\n\t\t\t\t\tcallbackFunction();\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Registers read count of hierarchy if it is possoble\n\t\t */\n\t\tregisterHierarchyRecordCount: function () {\n\t\t\tlet hierarchyButton = $('.js-detail-hierarchy'),\n\t\t\t\tparams = {\n\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\taction: 'RelationAjax',\n\t\t\t\t\trecord: app.getRecordId(),\n\t\t\t\t\tmode: 'getHierarchyCount'\n\t\t\t\t};\n\t\t\tif (hierarchyButton.length) {\n\t\t\t\tAppConnector.request(params).then(function (response) {\n\t\t\t\t\tif (response.success) {\n\t\t\t\t\t\t$('.hierarchy .badge').html(response.result);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Shows hierarchy\n\t\t */\n\t\tregisterShowHierarchy: function () {\n\t\t\tlet thisInstance = this,\n\t\t\t\thierarchyButton = $('.detailViewTitle'),\n\t\t\t\tparams = {\n\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\tview: 'Hierarchy',\n\t\t\t\t\trecord: app.getRecordId()\n\t\t\t\t};\n\t\t\thierarchyButton.on('click', '.js-detail-hierarchy', function () {\n\t\t\t\tlet progressIndicatorElement = $.progressIndicator({\n\t\t\t\t\tposition: 'html',\n\t\t\t\t\tblockInfo: {\n\t\t\t\t\t\tenabled: true\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tthisInstance.getHierarchyResponseData(params).then(function (data) {\n\t\t\t\t\tthisInstance.displayHierarchyResponseData(data);\n\t\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Function which will register all the events\n\t\t */\n\t\tregisterEvents: function () {\n\t\t\tvar form = this.getForm();\n\t\t\tthis._super();\n\t\t\tthis.registerHierarchyRecordCount();\n\t\t\tthis.registerShowHierarchy();\n\t\t\tthis.registerRecordPreSaveEvent(form);\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Detail_Js","hierarchyResponseCache","registerRecordPreSaveEvent","form","jQuery","getForm","on","fieldPreSave","e","portalField","currentTarget","primaryEmailValue","primaryEmailField","val","isAlertAlreadyShown","length","is","app","showNotify","text","vtranslate","type","preventDefault","getHierarchyResponseData","params","aDeferred","Deferred","$","isEmptyObject","thisInstance","AppConnector","request","then","data","resolve","promise","displayHierarchyResponseData","callbackFunction","showScrollBar","height","railVisible","size","showModalWindow","modalContainer","App","Components","Scrollbar","xy","registerHierarchyRecordCount","module","getModuleName","action","record","getRecordId","mode","hierarchyButton","response","success","html","result","registerShowHierarchy","view","progressIndicator","position","blockInfo","enabled","progressIndicatorElement","registerEvents","_super"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFACA,YAAA,CAEAA,gBAAgB,CACf,oBADe,CAEf,EAFe,CAGf,CACCC,sBAAsB,CAAE,EADzB;AAGD;AACA,KACEC,0BAA0B,CAAE,SAAUC,0BAAAA,CAAAA,IAAV,CAAgB,CAC3C,IAAqB,iBAAA,CAAGC,MAAM,CAAC,kBAAD,CAA9B,CACoB,WAAhB,EAAA,OAFuC,IAAA,GAG1CD,IAAI,CAAG,IAAKE,CAAAA,OAAL,EAHmC,CAM3CF,CAAAA,IAAI,CAACG,EAAL,CAAQ,IAAA,CAAKC,YAAb,CAA2B,mBAA3B,CAA8C,SAAUC,CAAV,CAAmB,CAC5DC,IAAAA,WAAW,CAAGL,MAAM,CAACI,CAAC,CAACE,aAAH,CADwC,CAG5DC,iBAAiB,CAAGC,iBAAiB,CAACC,GAAlB,EAHwC,CAI5DC,mBAAmB,CAAGV,MAAM,CAAC,aAAD,CAAN,CAAsBW,MAJgB,CAM5DN,WAAW,CAACO,EAAZ,CAAe,UAAf,CAN4D,GAO/B,CAA5B,EAAAJ,iBAAiB,CAACG,MAPyC,GAQnC,CAAvB,EAAAD,mBAR0D,EAS7DG,GAAG,CAACC,UAAJ,CAAe,CACdC,IAAI,CAAEF,GAAG,CAACG,UAAJ,CAAe,wCAAf,CADQ,CAEdC,IAAI,CAAE,OAFQ,CAAf,CAT6D,CAc9Db,CAAC,CAACc,cAAF,EAd8D,EAgBtC,EAArB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A8CQ,CAAAA,IAA9C,CAAmD,SAAUC,IAAV,CAAgB,CAClEJ,YAAY,CAACO,4BAAb,CAA0CH,IAA1C,CADkE,CAElEiC,wBAAwB,CAACJ,iBAAzB,CAA2C,CAAER,IAAI,CAAE,MAAR,CAA3C,EACA,CAHD,EAIA,CAXD,EAYA,CAxHF;AA0HD;AACA,KACEa,cAAc,CAAE,SAAY,cAAA,EAAA,CAC3B,IAAIhE,IAAI,CAAG,IAAA,CAAKE,OAAL,EAAX,CACA,IAAA,CAAK+D,MAAL,EAF2B,CAG3B,IAAKpB,CAAAA,4BAAL,EAH2B,CAI3B,IAAKY,CAAAA,qBAAL,EAJ2B,CAK3B,IAAK1D,CAAAA,0BAAL,CAAgCC,IAAhC,EACA,CAlIF,CAHe;;"} \ No newline at end of file +{"version":3,"file":"Detail.min.js","sources":["Detail.js"],"sourcesContent":["/*+***********************************************************************************\n * The contents of this file are subject to the vtiger CRM Public License Version 1.0\n * (\"License\"); You may not use this file except in compliance with the License\n * The Original Code is: vtiger CRM Open Source\n * The Initial Developer of the Original Code is vtiger.\n * Portions created by vtiger are Copyright (C) vtiger.\n * All Rights Reserved.\n *************************************************************************************/\n'use strict';\n\nVtiger_Detail_Js(\n\t'Contacts_Detail_Js',\n\t{},\n\t{\n\t\thierarchyResponseCache: {},\n\t\t/**\n\t\t * Function to register recordpresave event\n\t\t */\n\t\tregisterRecordPreSaveEvent: function (form) {\n\t\t\tvar primaryEmailField = jQuery('[name=\"email\"]');\n\t\t\tif (typeof form === 'undefined') {\n\t\t\t\tform = this.getForm();\n\t\t\t}\n\n\t\t\tform.on(this.fieldPreSave, '[name=\"portal\"]', function (e, data) {\n\t\t\t\tvar portalField = jQuery(e.currentTarget);\n\n\t\t\t\tvar primaryEmailValue = primaryEmailField.val();\n\t\t\t\tvar isAlertAlreadyShown = jQuery('.ui-pnotify').length;\n\n\t\t\t\tif (portalField.is(':checked')) {\n\t\t\t\t\tif (primaryEmailField.length == 0) {\n\t\t\t\t\t\tif (isAlertAlreadyShown <= 0) {\n\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\ttext: app.vtranslate('JS_PRIMARY_EMAIL_FIELD_DOES_NOT_EXISTS'),\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\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t\tif (primaryEmailValue == '') {\n\t\t\t\t\t\tif (isAlertAlreadyShown <= 0) {\n\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\ttext: app.vtranslate('JS_PLEASE_ENTER_PRIMARY_EMAIL_VALUE_TO_ENABLE_PORTAL_USER'),\n\t\t\t\t\t\t\t\ttype: 'info'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Function to get response from hierarchy\n\t\t * @param {array} params\n\t\t * @returns {Promise}\n\t\t */\n\t\tgetHierarchyResponseData: function (params) {\n\t\t\tlet thisInstance = this,\n\t\t\t\taDeferred = jQuery.Deferred();\n\n\t\t\tif (!$.isEmptyObject(thisInstance.hierarchyResponseCache)) {\n\t\t\t\taDeferred.resolve(thisInstance.hierarchyResponseCache);\n\t\t\t} else {\n\t\t\t\tAppConnector.request(params).then(function (data) {\n\t\t\t\t\tthisInstance.hierarchyResponseCache = data;\n\t\t\t\t\taDeferred.resolve(thisInstance.hierarchyResponseCache);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn aDeferred.promise();\n\t\t},\n\t\t/**\n\t\t * function to display the hierarchy response data\n\t\t * @param {array} data\n\t\t */\n\t\tdisplayHierarchyResponseData: function (data) {\n\t\t\tlet callbackFunction = function () {\n\t\t\t\tapp.showScrollBar($('#hierarchyScroll'), {\n\t\t\t\t\theight: '300px',\n\t\t\t\t\trailVisible: true,\n\t\t\t\t\tsize: '6px'\n\t\t\t\t});\n\t\t\t};\n\t\t\tapp.showModalWindow(data, function (modalContainer) {\n\t\t\t\tApp.Components.Scrollbar.xy($('#hierarchyScroll', modalContainer));\n\t\t\t\tif (typeof callbackFunction == 'function' && $('#hierarchyScroll', modalContainer).height() > 300) {\n\t\t\t\t\tcallbackFunction();\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Registers read count of hierarchy if it is possoble\n\t\t */\n\t\tregisterHierarchyRecordCount: function () {\n\t\t\tlet hierarchyButton = $('.js-detail-hierarchy'),\n\t\t\t\tparams = {\n\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\taction: 'RelationAjax',\n\t\t\t\t\trecord: app.getRecordId(),\n\t\t\t\t\tmode: 'getHierarchyCount'\n\t\t\t\t};\n\t\t\tif (hierarchyButton.length) {\n\t\t\t\tAppConnector.request(params).then(function (response) {\n\t\t\t\t\tif (response.success) {\n\t\t\t\t\t\t$('.hierarchy .badge').html(response.result);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Shows hierarchy\n\t\t */\n\t\tregisterShowHierarchy: function () {\n\t\t\tlet thisInstance = this,\n\t\t\t\thierarchyButton = $('.detailViewTitle'),\n\t\t\t\tparams = {\n\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\tview: 'Hierarchy',\n\t\t\t\t\trecord: app.getRecordId()\n\t\t\t\t};\n\t\t\thierarchyButton.on('click', '.js-detail-hierarchy', function () {\n\t\t\t\tlet progressIndicatorElement = $.progressIndicator({\n\t\t\t\t\tposition: 'html',\n\t\t\t\t\tblockInfo: {\n\t\t\t\t\t\tenabled: true\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tthisInstance.getHierarchyResponseData(params).then(function (data) {\n\t\t\t\t\tthisInstance.displayHierarchyResponseData(data);\n\t\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Function which will register all the events\n\t\t */\n\t\tregisterEvents: function () {\n\t\t\tvar form = this.getForm();\n\t\t\tthis._super();\n\t\t\tthis.registerHierarchyRecordCount();\n\t\t\tthis.registerShowHierarchy();\n\t\t\tthis.registerRecordPreSaveEvent(form);\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Detail_Js","hierarchyResponseCache","registerRecordPreSaveEvent","form","primaryEmailField","jQuery","getForm","on","fieldPreSave","e","portalField","currentTarget","primaryEmailValue","val","isAlertAlreadyShown","length","is","app","showNotify","text","vtranslate","type","preventDefault","getHierarchyResponseData","params","thisInstance","aDeferred","Deferred","$","isEmptyObject","AppConnector","request","then","data","resolve","promise","displayHierarchyResponseData","callbackFunction","showScrollBar","height","railVisible","size","showModalWindow","modalContainer","App","Components","Scrollbar","xy","registerHierarchyRecordCount","hierarchyButton","module","getModuleName","action","record","getRecordId","mode","response","success","html","result","registerShowHierarchy","view","progressIndicatorElement","progressIndicator","position","blockInfo","enabled","registerEvents","_super"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFACA,YAAY,CAEZA,gBAAgB,CACf,oBAAoB,CACpB,EAAE,CACF,CACCC,sBAAsB,CAAE,EAAE;AAE5B;AACA,KACEC,0BAA0B,CAAE,SAAAA,0BAAAA,CAAUC,IAAI,CAAE,CAC3C,IAAIC,iBAAiB,CAAGC,MAAM,CAAC,kBAAgB,CAAC,CAC5B,WAAW,EAA3B,OAAOF,IAAoB,GAC9BA,IAAI,CAAG,IAAI,CAACG,OAAO,EAAE,CAGtBH,CAAAA,IAAI,CAACI,EAAE,CAAC,IAAI,CAACC,YAAY,CAAE,mBAAiB,CAAE,SAAUC,CAAC,CAAQ,CAC5D,IAAAC,WAAW,CAAGL,MAAM,CAACI,CAAC,CAACE,aAAa,CAAC,CAErCC,iBAAiB,CAAGR,iBAAiB,CAACS,GAAG,EAAE,CAC3CC,mBAAmB,CAAGT,MAAM,CAAC,aAAa,CAAC,CAACU,MAA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AE,UAAY,CAC/D,IAAIuD,wBAAwB,CAAGlC,CAAC,CAACmC,iBAAiB,CAAC,CAClDC,QAAQ,CAAE,MAAM,CAChBC,SAAS,CAAE,CACVC,OAAO,CACR,CAAA,CAAA,CACD,CAAC,CAAC,CACFzC,YAAY,CAACF,wBAAwB,CAACC,MAAM,CAAC,CAACQ,IAAI,CAAC,SAAUC,IAAI,CAAE,CAClER,YAAY,CAACW,4BAA4B,CAACH,IAAI,CAAC,CAC/C6B,wBAAwB,CAACC,iBAAiB,CAAC,CAAER,IAAI,CAAE,MAAO,CAAC,EAC5D,CAAC,EACF,CAAC,EACF,CAAC;AAEH;AACA,KACEY,cAAc,CAAE,SAAAA,gBAAY,CAC3B,IAAIhE,IAAI,CAAG,IAAI,CAACG,OAAO,EAAE,CACzB,IAAI,CAAC8D,MAAM,EAAE,CACb,IAAI,CAACpB,4BAA4B,EAAE,CACnC,IAAI,CAACY,qBAAqB,EAAE,CAC5B,IAAI,CAAC1D,0BAA0B,CAACC,IAAI,EACrC,CACD,CACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/Contacts/resources/Edit.min.js.map b/public_html/layouts/basic/modules/Contacts/resources/Edit.min.js.map index e1772a22c026..09685708fe41 100644 --- a/public_html/layouts/basic/modules/Contacts/resources/Edit.min.js.map +++ b/public_html/layouts/basic/modules/Contacts/resources/Edit.min.js.map @@ -1 +1 @@ -{"version":3,"file":"Edit.min.js","sources":["Edit.js"],"sourcesContent":["/*+***********************************************************************************\n * The contents of this file are subject to the vtiger CRM Public License Version 1.0\n * (\"License\"); You may not use this file except in compliance with the License\n * The Original Code is: vtiger CRM Open Source\n * The Initial Developer of the Original Code is vtiger.\n * Portions created by vtiger are Copyright (C) vtiger.\n * All Rights Reserved.\n *************************************************************************************/\n'use strict';\n\nVtiger_Edit_Js(\n\t'Contacts_Edit_Js',\n\t{},\n\t{\n\t\t/**\n\t\t * Function to check for Portal User\n\t\t */\n\t\tcheckForPortalUser: function (form) {\n\t\t\tvar element = jQuery('[name=\"portal\"]', form);\n\t\t\tvar response = element.is(':checked');\n\t\t\tvar primaryEmailField = jQuery('[name=\"email\"]');\n\t\t\tvar primaryEmailValue = primaryEmailField.val();\n\t\t\tif (response) {\n\t\t\t\tif (primaryEmailField.length == 0) {\n\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\ttext: app.vtranslate('JS_PRIMARY_EMAIL_FIELD_DOES_NOT_EXISTS'),\n\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t});\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (primaryEmailValue == '') {\n\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\ttext: app.vtranslate('JS_PLEASE_ENTER_PRIMARY_EMAIL_VALUE_TO_ENABLE_PORTAL_USER'),\n\t\t\t\t\t\ttype: 'info'\n\t\t\t\t\t});\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\t/**\n\t\t * Function to register recordpresave event\n\t\t */\n\t\tregisterRecordPreSaveEvent: function (form) {\n\t\t\tvar thisInstance = this;\n\t\t\tif (typeof form === 'undefined') {\n\t\t\t\tform = this.getForm();\n\t\t\t}\n\n\t\t\tform.on(Vtiger_Edit_Js.recordPreSave, function (e, data) {\n\t\t\t\tvar result = thisInstance.checkForPortalUser(form);\n\t\t\t\tif (!result) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\tregisterBasicEvents: function (container) {\n\t\t\tthis._super(container);\n\t\t\tthis.registerRecordPreSaveEvent(container);\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Edit_Js","checkForPortalUser","form","element","jQuery","response","is","primaryEmailField","primaryEmailValue","val","length","showNotify","text","app","vtranslate","type","registerRecordPreSaveEvent","getForm","on","recordPreSave","e","thisInstance","result","preventDefault","registerBasicEvents","container","_super"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFACA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,SAAV,CAAqB,CACzC,IAAKC,CAAAA,MAAL,CAAYD,SAAZ,CADyC,CAEzC,IAAA,CAAKT,0BAAL,CAAgCS,SAAhC,EACA,CAhDF,CAHa;;"} \ No newline at end of file +{"version":3,"file":"Edit.min.js","sources":["Edit.js"],"sourcesContent":["/*+***********************************************************************************\n * The contents of this file are subject to the vtiger CRM Public License Version 1.0\n * (\"License\"); You may not use this file except in compliance with the License\n * The Original Code is: vtiger CRM Open Source\n * The Initial Developer of the Original Code is vtiger.\n * Portions created by vtiger are Copyright (C) vtiger.\n * All Rights Reserved.\n *************************************************************************************/\n'use strict';\n\nVtiger_Edit_Js(\n\t'Contacts_Edit_Js',\n\t{},\n\t{\n\t\t/**\n\t\t * Function to check for Portal User\n\t\t */\n\t\tcheckForPortalUser: function (form) {\n\t\t\tvar element = jQuery('[name=\"portal\"]', form);\n\t\t\tvar response = element.is(':checked');\n\t\t\tvar primaryEmailField = jQuery('[name=\"email\"]');\n\t\t\tvar primaryEmailValue = primaryEmailField.val();\n\t\t\tif (response) {\n\t\t\t\tif (primaryEmailField.length == 0) {\n\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\ttext: app.vtranslate('JS_PRIMARY_EMAIL_FIELD_DOES_NOT_EXISTS'),\n\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t});\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (primaryEmailValue == '') {\n\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\ttext: app.vtranslate('JS_PLEASE_ENTER_PRIMARY_EMAIL_VALUE_TO_ENABLE_PORTAL_USER'),\n\t\t\t\t\t\ttype: 'info'\n\t\t\t\t\t});\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\t/**\n\t\t * Function to register recordpresave event\n\t\t */\n\t\tregisterRecordPreSaveEvent: function (form) {\n\t\t\tvar thisInstance = this;\n\t\t\tif (typeof form === 'undefined') {\n\t\t\t\tform = this.getForm();\n\t\t\t}\n\n\t\t\tform.on(Vtiger_Edit_Js.recordPreSave, function (e, data) {\n\t\t\t\tvar result = thisInstance.checkForPortalUser(form);\n\t\t\t\tif (!result) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\tregisterBasicEvents: function (container) {\n\t\t\tthis._super(container);\n\t\t\tthis.registerRecordPreSaveEvent(container);\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Edit_Js","checkForPortalUser","form","element","jQuery","response","is","primaryEmailField","primaryEmailValue","val","length","app","showNotify","text","vtranslate","type","registerRecordPreSaveEvent","thisInstance","getForm","on","recordPreSave","e","result","preventDefault","registerBasicEvents","container","_super"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFACA,YAAY,CAEZA,cAAc,CACb,kBAAkB,CAClB,EAAE,CACF;AAED;AACA,KACEC,kBAAkB,CAAE,SAAAA,kBAAAA,CAAUC,IAAI,CAAE,CAAA,IAC/BC,OAAO,CAAGC,MAAM,CAAC,mBAAiB,CAAEF,IAAI,CAAC,CACzCG,QAAQ,CAAGF,OAAO,CAACG,EAAE,CAAC,UAAU,CAAC,CACjCC,iBAAiB,CAAGH,MAAM,CAAC,kBAAgB,CAAC,CAC5CI,iBAAiB,CAAGD,iBAAiB,CAACE,GAAG,EAAE,CAC/C,GAAIJ,QAAQ,CAAE,CACb,GAAgC,CAAC,EAA7BE,iBAAiB,CAACG,MAAW,CAKhC,OAJAC,GAAG,CAACC,UAAU,CAAC,CACdC,IAAI,CAAEF,GAAG,CAACG,UAAU,CAAC,wCAAwC,CAAC,CAC9DC,IAAI,CAAE,OACP,CAAC,CAAC,CAGH,CAAA,CAAA,CAAA,GAAyB,EAAE,EAAvBP,iBAAuB,CAK1B,OAJAG,GAAG,CAACC,UAAU,CAAC,CACdC,IAAI,CAAEF,GAAG,CAACG,UAAU,CAAC,2DAA2D,CAAC,CACjFC,IAAI,CAAE,MACP,CAAC,CAAC,CAGJ,CAAA,CAAA,CACA,OACD,CAAA,CAAA,CAAC;AAGH;AACA,KACEC,0BAA0B,CAAE,SAAAA,0BAAUd,CAAAA,IAAI,CAAE,CAC3C,IAAIe,YAAY,CAAG,IAAI,CACH,WAAW,EAA3B,OAAOf,IAAoB,GAC9BA,IAAI,CAAG,IAAI,CAACgB,OAAO,EAAE,CAAA,CAGtBhB,IAAI,CAACiB,EAAE,CAACnB,cAAc,CAACoB,aAAa,CAAE,SAAUC,CAAC,CAAQ,CACxD,IAAIC,MAAM,CAAGL,YAAY,CAAChB,kBAAkB,CAACC,IAAI,CAAC,CAC7CoB,MAAM,EACVD,CAAC,CAACE,cAAc,GAElB,CAAC,EACF,CAAC,CAEDC,mBAAmB,CAAE,SAAAA,mBAAAA,CAAUC,SAAS,CAAE,CACzC,IAAI,CAACC,MAAM,CAACD,SAAS,CAAC,CACtB,IAAI,CAACT,0BAA0B,CAACS,SAAS,EAC1C,CACD,CACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/CustomView/resources/CustomView.min.js b/public_html/layouts/basic/modules/CustomView/resources/CustomView.min.js index dbd289041dcc..5cde8a563f70 100644 --- a/public_html/layouts/basic/modules/CustomView/resources/CustomView.min.js +++ b/public_html/layouts/basic/modules/CustomView/resources/CustomView.min.js @@ -8,7 +8,7 @@ * Portions created by vtiger are Copyright (C) vtiger. * All Rights Reserved. * Contributor(s): YetiForce S.A. - *************************************************************************************/"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var descriptor,i=0;i {\n\t\t\tthis.modalContainer = $('.js-filter-modal__container');\n\t\t\tthis.advanceFilterInstance = new Vtiger_ConditionBuilder_Js(\n\t\t\t\tthis.modalContainer.find('.js-condition-builder-view .js-condition-builder'),\n\t\t\t\tthis.modalContainer.find('#sourceModule').val()\n\t\t\t);\n\t\t\tthis.advanceFilterInstance.registerEvents();\n\t\t\tCustomView.registerAdvancedConditionsEvents(this.modalContainer);\n\n\t\t\t//This will store the columns selection container\n\t\t\tthis.columnSelectElement = false;\n\t\t\tthis.registerEvents();\n\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t});\n\t}\n\n\t/** @type {Vtiger_ConditionBuilder_Js} Condition builder object */\n\tstatic advancedConditionsBuilder;\n\n\tloadDateFilterValues() {\n\t\tlet selectedDateFilter = $('#standardDateFilter option:selected');\n\t\tlet currentDate = selectedDateFilter.data('currentdate');\n\t\tlet endDate = selectedDateFilter.data('enddate');\n\t\t$('#standardFilterCurrentDate').val(currentDate);\n\t\t$('#standardFilterEndDate').val(endDate);\n\t}\n\n\t/**\n\t * Function to get the contents container\n\t * @return : jQuery object of contents container\n\t */\n\tgetContentsContainer() {\n\t\tif (!this.modalContainer) {\n\t\t\tthis.modalContainer = $('.js-filter-modal__container');\n\t\t}\n\t\treturn this.modalContainer;\n\t}\n\n\t/**\n\t * Function to get the view columns selection element\n\t * @return : jQuery object of view columns selection element\n\t */\n\tgetColumnSelectElement() {\n\t\tif (!this.columnSelectElement) {\n\t\t\tthis.columnSelectElement = $('#viewColumnsSelect');\n\t\t}\n\t\treturn this.columnSelectElement;\n\t}\n\n\t/**\n\t * Function which will get the selected columns\n\t * @return : array of selected values\n\t */\n\tgetSelectedColumns() {\n\t\tlet columnListSelectElement = this.getColumnSelectElement();\n\t\treturn columnListSelectElement.val();\n\t}\n\t/**\n\t * Get custom labels\n\t * @returns array\n\t */\n\tgetCustomLabels() {\n\t\tlet customFieldNames = {};\n\t\tthis.getContentsContainer()\n\t\t\t.find('.js-short-label')\n\t\t\t.each(function () {\n\t\t\t\tcustomFieldNames[$(this).attr('data-field-value')] = $(this).val();\n\t\t\t});\n\t\treturn customFieldNames;\n\t}\n\n\tsaveFilter() {\n\t\tlet aDeferred = $.Deferred();\n\t\tlet formData = $('#CustomView').serializeFormData();\n\t\tAppConnector.request(formData, true)\n\t\t\t.done(function (data) {\n\t\t\t\taDeferred.resolve(data);\n\t\t\t})\n\t\t\t.fail(function (error) {\n\t\t\t\taDeferred.reject(error);\n\t\t\t});\n\t\treturn aDeferred.promise();\n\t}\n\n\tsaveAndViewFilter() {\n\t\tthis.saveFilter().done(function (data) {\n\t\t\tlet response = data.result;\n\t\t\tif (response && response.success) {\n\t\t\t\tlet url;\n\t\t\t\tif (app.getParentModuleName() == 'Settings') {\n\t\t\t\t\turl = 'index.php?module=CustomView&parent=Settings&view=Index&sourceModule=' + $('#sourceModule').val();\n\t\t\t\t} else {\n\t\t\t\t\turl = response.listviewurl;\n\t\t\t\t}\n\t\t\t\twindow.location.href = url;\n\t\t\t} else {\n\t\t\t\t$.unblockUI();\n\t\t\t\tapp.showNotify({\n\t\t\t\t\ttitle: app.vtranslate('JS_DUPLICATE_RECORD'),\n\t\t\t\t\ttext: response.message,\n\t\t\t\t\ttype: 'error'\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tregisterIconEvents() {\n\t\tthis.getContentsContainer()\n\t\t\t.find('.js-filter-preferences')\n\t\t\t.on('change', '.js-filter-preference', (e) => {\n\t\t\t\tlet currentTarget = $(e.currentTarget);\n\t\t\t\tlet iconElement = currentTarget.next();\n\t\t\t\tif (currentTarget.prop('checked')) {\n\t\t\t\t\ticonElement.removeClass(iconElement.data('unchecked')).addClass(iconElement.data('check'));\n\t\t\t\t} else {\n\t\t\t\t\ticonElement.removeClass(iconElement.data('check')).addClass(iconElement.data('unchecked'));\n\t\t\t\t}\n\t\t\t});\n\t}\n\n\tregisterColorEvent() {\n\t\tconst container = this.getContentsContainer();\n\t\tlet picker = container.find('.js-color-picker');\n\t\tlet pickerField = picker.find('.js-color-picker__field');\n\t\tlet showPicker = () => {\n\t\t\tApp.Fields.Colors.showPicker({\n\t\t\t\tcolor: pickerField.val(),\n\t\t\t\tbgToUpdate: picker.find('.js-color-picker__color'),\n\t\t\t\tfieldToUpdate: pickerField\n\t\t\t});\n\t\t};\n\t\tpicker.on('click', showPicker);\n\t}\n\n\t/**\n\t * Get list of fields to duplicates\n\t * @returns {Array}\n\t */\n\tgetDuplicateFields() {\n\t\tlet fields = [];\n\t\tconst container = this.getContentsContainer();\n\t\tcontainer.find('.js-duplicates-container .js-duplicates-row').each(function () {\n\t\t\tfields.push({\n\t\t\t\tfieldid: $(this).find('.js-duplicates-field').val(),\n\t\t\t\tignore: $(this).find('.js-duplicates-ignore').is(':checked')\n\t\t\t});\n\t\t});\n\t\treturn fields;\n\t}\n\t/**\n\t * Register events for block \"Find duplicates\"\n\t */\n\tregisterDuplicatesEvents() {\n\t\tconst container = this.getContentsContainer();\n\t\tApp.Fields.Picklist.showSelect2ElementView(container.find('.js-duplicates-container .js-duplicates-field'));\n\t\tcontainer.on('click', '.js-duplicates-remove', function () {\n\t\t\t$(this).closest('.js-duplicates-row').remove();\n\t\t});\n\t\tcontainer.find('.js-duplicate-add-field').on('click', function () {\n\t\t\tlet template = container.find('.js-duplicates-field-template').clone();\n\t\t\ttemplate.removeClass('d-none');\n\t\t\ttemplate.removeClass('js-duplicates-field-template');\n\t\t\tApp.Fields.Picklist.showSelect2ElementView(template.find('.js-duplicates-field'));\n\t\t\tcontainer.find('.js-duplicates-container').append(template);\n\t\t});\n\t}\n\tregisterSubmitEvent(select2Element) {\n\t\t$('#CustomView').on('submit', (e) => {\n\t\t\tconst form = $(e.currentTarget);\n\t\t\tlet selectElement = this.getColumnSelectElement();\n\t\t\tif ($('#viewname').val().length > 100) {\n\t\t\t\tapp.showNotify({\n\t\t\t\t\ttitle: app.vtranslate('JS_MESSAGE'),\n\t\t\t\t\ttext: app.vtranslate('JS_VIEWNAME_ALERT'),\n\t\t\t\t\ttype: 'error'\n\t\t\t\t});\n\t\t\t\te.preventDefault();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t//Mandatory Fields selection validation\n\t\t\t//Any one Mandatory Field should select while creating custom view.\n\t\t\tlet mandatoryFieldsList = JSON.parse($('#mandatoryFieldsList').val());\n\t\t\tlet selectedOptions = selectElement.val();\n\t\t\tlet mandatoryFieldsMissing = true;\n\t\t\tif (selectedOptions) {\n\t\t\t\tmandatoryFieldsMissing = selectedOptions.filter((value) => mandatoryFieldsList.includes(value)).length <= 0;\n\t\t\t}\n\t\t\tif (mandatoryFieldsMissing) {\n\t\t\t\tselectElement.validationEngine(\n\t\t\t\t\t'showPrompt',\n\t\t\t\t\tapp.vtranslate('JS_PLEASE_SELECT_ATLEAST_ONE_MANDATORY_FIELD'),\n\t\t\t\t\t'error',\n\t\t\t\t\t'topLeft',\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\t\t\te.preventDefault();\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tselect2Element.validationEngine('hide');\n\t\t\t}\n\t\t\t//Mandatory Fields validation ends\n\t\t\tlet result = form.validationEngine('validate');\n\t\t\tif (result) {\n\t\t\t\t//handled standard filters saved values.\n\t\t\t\tlet stdfilterlist = {};\n\n\t\t\t\tif (\n\t\t\t\t\t$('#standardFilterCurrentDate').val() != '' &&\n\t\t\t\t\t$('#standardFilterEndDate').val() != '' &&\n\t\t\t\t\t$('select.standardFilterColumn option:selected').val() != 'none'\n\t\t\t\t) {\n\t\t\t\t\tstdfilterlist['columnname'] = $('select.standardFilterColumn option:selected').val();\n\t\t\t\t\tstdfilterlist['stdfilter'] = $('select#standardDateFilter option:selected').val();\n\t\t\t\t\tstdfilterlist['startdate'] = $('#standardFilterCurrentDate').val();\n\t\t\t\t\tstdfilterlist['enddate'] = $('#standardFilterEndDate').val();\n\t\t\t\t\t$('#stdfilterlist').val(JSON.stringify(stdfilterlist));\n\t\t\t\t}\n\t\t\t\t//handled advanced filters saved values.\n\t\t\t\tlet contentContainer = this.getContentsContainer();\n\t\t\t\t$('#advfilterlist').val(JSON.stringify(this.advanceFilterInstance.getConditions()));\n\t\t\t\tform.find('#advancedConditions').val(JSON.stringify(CustomView.getAdvancedConditions(form)));\n\t\t\t\t$('[name=\"duplicatefields\"]').val(JSON.stringify(this.getDuplicateFields()));\n\t\t\t\t$('input[name=\"columnslist\"]', contentContainer).val(JSON.stringify(this.getSelectedColumns()));\n\t\t\t\tcontentContainer.find('.js-custom-field-names').val(JSON.stringify(this.getCustomLabels()));\n\n\t\t\t\tthis.saveAndViewFilter();\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\tapp.formAlignmentAfterValidation($(e.currentTarget));\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Block submit on press enter key\n\t */\n\tregisterDisableSubmitOnEnter() {\n\t\tthis.getContentsContainer()\n\t\t\t.find('#viewname, [name=\"color\"]')\n\t\t\t.on('keydown', (e) => {\n\t\t\t\tif (e.key === 'Enter') {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}\n\t\t\t});\n\t}\n\n\t/**\n\t * Function to register the advanced conditions events for customview\n\t * @param {jQuery} listViewContainer\n\t */\n\tstatic registerCustomViewAdvCondEvents(listViewContainer) {\n\t\tlistViewContainer.on('click', '.js-custom-view-adv-cond-modal', () => {\n\t\t\tconst customViewAdvCond = listViewContainer.find('.js-custom-view-adv-cond');\n\t\t\tlet advancedConditions = customViewAdvCond.val();\n\t\t\tif (advancedConditions) {\n\t\t\t\tadvancedConditions = JSON.parse(advancedConditions);\n\t\t\t}\n\t\t\tAppConnector.request({\n\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\tview: 'CustomViewAdvCondModal',\n\t\t\t\tadvancedConditions: advancedConditions\n\t\t\t})\n\t\t\t\t.done((data) => {\n\t\t\t\t\tif (data) {\n\t\t\t\t\t\tapp.showModalWindow(data, (modalContainer) => {\n\t\t\t\t\t\t\tApp.Tools.Form.registerBlockToggle(modalContainer);\n\t\t\t\t\t\t\tthis.registerAdvancedConditionsEvents(modalContainer);\n\t\t\t\t\t\t\tmodalContainer.find('[name=\"saveButton\"]').on('click', () => {\n\t\t\t\t\t\t\t\tcustomViewAdvCond.val(JSON.stringify(this.getAdvancedConditions(modalContainer)));\n\t\t\t\t\t\t\t\tapp.hideModalWindow();\n\t\t\t\t\t\t\t\tif (typeof app.pageController.getListViewRecords !== 'undefined') {\n\t\t\t\t\t\t\t\t\tapp.pageController.getListViewRecords();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.fail((_textStatus, errorThrown) => {\n\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\ttextTrusted: false,\n\t\t\t\t\t\ttitle: app.vtranslate('JS_ERROR'),\n\t\t\t\t\t\ttext: errorThrown,\n\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t});\n\t}\n\t/**\n\t * Function to register the advanced conditions events for custom view\n\t * @param {jQuery} container\n\t */\n\tstatic registerAdvancedConditionsEvents(container) {\n\t\tconst self = this;\n\t\tconst builder = container.find('.js-adv-condition-builder-view');\n\t\tconst relationSelect = container.find('.js-relation-select');\n\t\tif (relationSelect.val() != 0) {\n\t\t\tthis.advancedConditionsBuilder = new Vtiger_ConditionBuilder_Js(\n\t\t\t\tbuilder.find('.js-condition-builder'),\n\t\t\t\trelationSelect.find('option:selected').data('module')\n\t\t\t);\n\t\t\tthis.advancedConditionsBuilder.registerEvents();\n\t\t}\n\t\trelationSelect.on('change', function () {\n\t\t\tconst moduleName = $(this).find('option:selected').data('module');\n\t\t\tbuilder.html('');\n\t\t\tdelete self.advancedConditionsBuilder;\n\t\t\tif (moduleName) {\n\t\t\t\tAppConnector.request({\n\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\tparent: app.getParentModuleName(),\n\t\t\t\t\tview: 'ConditionBuilder',\n\t\t\t\t\tmode: 'builder',\n\t\t\t\t\tsourceModuleName: moduleName\n\t\t\t\t}).done((data) => {\n\t\t\t\t\tbuilder.html(data);\n\t\t\t\t\tself.advancedConditionsBuilder = new Vtiger_ConditionBuilder_Js(\n\t\t\t\t\t\tbuilder.find('.js-condition-builder'),\n\t\t\t\t\t\tmoduleName\n\t\t\t\t\t);\n\t\t\t\t\tself.advancedConditionsBuilder.registerEvents();\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t * Function to register the advanced conditions events for custom view\n\t * @param {jQuery} container\n\t * @return {object}\n\t */\n\tstatic getAdvancedConditions(container) {\n\t\tconst advancedConditions = {\n\t\t\trelationId: container.find('.js-relation-select').val()\n\t\t};\n\t\tcontainer.find('.js-relation-checkbox:checked').each(function () {\n\t\t\tif (typeof advancedConditions.relationColumns === 'undefined') {\n\t\t\t\tadvancedConditions.relationColumns = [];\n\t\t\t}\n\t\t\tadvancedConditions.relationColumns.push($(this).val());\n\t\t});\n\t\tif (this.advancedConditionsBuilder) {\n\t\t\tadvancedConditions.relationConditions = this.advancedConditionsBuilder.getConditions();\n\t\t}\n\t\treturn advancedConditions;\n\t}\n\t/**\n\t * Register change selected columns\n\t */\n\tregisterChangeSelectedColumns() {\n\t\tthis.container.find('.js-view-columns-select').on('change', () => {\n\t\t\tthis.registerAppendCustomLabels();\n\t\t});\n\t}\n\t/**\n\t *\tRegister append custom labels\n\t */\n\tregisterAppendCustomLabels() {\n\t\tlet shorterNamesContainer = this.container.find('.js-custom-name-fields');\n\t\tlet selectedColumns = this.container\n\t\t\t.find('.js-view-columns-select option:selected')\n\t\t\t.toArray()\n\t\t\t.map((item) => ({\n\t\t\t\ttext: item.getAttribute('data-field-label'),\n\t\t\t\tvalue: item.value,\n\t\t\t\tcustomLabel: item.getAttribute('data-custom-label') || ''\n\t\t\t}));\n\t\tshorterNamesContainer.empty();\n\t\tlet newCustomLabelElement = '';\n\t\tlet customLabelElement = '';\n\t\tlet customLabelValue = '';\n\t\tlet inputContainerElement = '';\n\t\tlet inputElement = '';\n\t\t$.each(selectedColumns, function (_index, element) {\n\t\t\tnewCustomLabelElement = document.createElement('div');\n\t\t\tnewCustomLabelElement.setAttribute('class', 'd-flex mb-1');\n\n\t\t\tcustomLabelElement = document.createElement('div');\n\t\t\tcustomLabelElement.setAttribute('class', 'col-form-label col-md-2 pl-0');\n\t\t\tcustomLabelValue = document.createTextNode(element.text);\n\t\t\tcustomLabelElement.appendChild(customLabelValue);\n\t\t\tnewCustomLabelElement.appendChild(customLabelElement);\n\n\t\t\tinputContainerElement = document.createElement('div');\n\t\t\tinputContainerElement.setAttribute('class', 'col-md-4');\n\n\t\t\tinputElement = document.createElement('input');\n\t\t\tinputElement.setAttribute('type', 'text');\n\t\t\tinputElement.setAttribute('class', 'form-control js-short-label');\n\t\t\tinputElement.setAttribute('data-field-value', element.value);\n\t\t\tinputElement.setAttribute(\n\t\t\t\t'data-validation-engine',\n\t\t\t\t'validate[maxSize[50], funcCall[Vtiger_Base_Validator_Js.invokeValidation]]'\n\t\t\t);\n\t\t\tinputElement.setAttribute('data-validator', '[{\"name\":\"FieldLabel\"}]');\n\t\t\tinputElement.setAttribute('value', element.customLabel);\n\n\t\t\tinputContainerElement.appendChild(inputElement);\n\t\t\tnewCustomLabelElement.appendChild(inputContainerElement);\n\t\t\tshorterNamesContainer.append(newCustomLabelElement);\n\t\t});\n\t}\n\t/**\n\t * Register events\n\t */\n\tregisterEvents() {\n\t\tthis.container = this.getContentsContainer();\n\t\tthis.registerIconEvents();\n\t\tApp.Fields.Tree.register(this.getContentsContainer());\n\t\tApp.Tools.Form.registerBlockToggle(this.getContentsContainer());\n\t\tthis.registerColorEvent();\n\t\tthis.registerDuplicatesEvents();\n\t\tconst select2Element = App.Fields.Picklist.showSelect2ElementView(this.getColumnSelectElement());\n\t\tthis.registerSubmitEvent(select2Element);\n\t\t$('.stndrdFilterDateSelect').datepicker();\n\t\t$('#standardDateFilter').on('change', () => {\n\t\t\tthis.loadDateFilterValues();\n\t\t});\n\t\t$('#CustomView').validationEngine(app.validationEngineOptions);\n\t\tthis.registerDisableSubmitOnEnter();\n\t\tthis.registerChangeSelectedColumns();\n\t\tthis.registerAppendCustomLabels();\n\t}\n}\n\nVtiger_Base_Validator_Js(\n\t'Vtiger_FieldLabel_Validator_Js',\n\t{\n\t\t/** @inheritdoc */\n\t\tinvokeValidation: function (field, _rules, _i, _options) {\n\t\t\tlet instance = new Vtiger_FieldLabel_Validator_Js();\n\t\t\tinstance.setElement(field);\n\t\t\tlet response = instance.validate();\n\t\t\tif (response !== true) {\n\t\t\t\treturn instance.getError();\n\t\t\t}\n\t\t}\n\t},\n\t{\n\t\t/** @inheritdoc */\n\t\tvalidate: function () {\n\t\t\treturn this.validateValue(this.getFieldValue());\n\t\t},\n\t\t/** @inheritdoc */\n\t\tvalidateValue: function (fieldValue) {\n\t\t\tlet specialChars = /[&\\<\\>\\:\\'\\\"\\,]/;\n\t\t\tif (specialChars.test(fieldValue)) {\n\t\t\t\tlet errorInfo = app.vtranslate('JS_SPECIAL_CHARACTERS') + ' & < > \\' \" : , ' + app.vtranslate('JS_NOT_ALLOWED');\n\t\t\t\tthis.setError(errorInfo);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t}\n);\n"],"names":["CustomView","url","progressIndicatorElement","$","progressIndicator","position","blockInfo","enabled","app","showModalWindow","modalContainer","advanceFilterInstance","Vtiger_ConditionBuilder_Js","find","val","registerEvents","registerAdvancedConditionsEvents","columnSelectElement","mode","selectedDateFilter","currentDate","data","endDate","getColumnSelectElement","columnListSelectElement","getContentsContainer","each","customFieldNames","attr","Deferred","formData","serializeFormData","AppConnector","request","done","aDeferred","resolve","fail","error","reject","promise","saveFilter","result","response","success","getParentModuleName","listviewurl","window","location","href","unblockUI","showNotify","title","vtranslate","text","message","type","on","e","currentTarget","iconElement","next","prop","removeClass","addClass","picker","container","pickerField","App","Fields","Colors","showPicker","color","bgToUpdate","fieldToUpdate","fields","push","fieldid","ignore","is","Picklist","showSelect2ElementView","closest","remove","clone","template","append","select2Element","selectElement","length","preventDefault","JSON","parse","selectedOptions","mandatoryFieldsMissing","filter","value","includes","validationEngine","form","stdfilterlist","stringify","getConditions","getAdvancedConditions","getDuplicateFields","contentContainer","getSelectedColumns","getCustomLabels","saveAndViewFilter","formAlignmentAfterValidation","key","registerAppendCustomLabels","shorterNamesContainer","selectedColumns","toArray","map","item","getAttribute","customLabel","empty","newCustomLabelElement","customLabelElement","customLabelValue","inputContainerElement","inputElement","_index","element","document","createElement","setAttribute","createTextNode","appendChild","registerIconEvents","Tree","register","Tools","Form","registerBlockToggle","registerColorEvent","registerDuplicatesEvents","registerSubmitEvent","datepicker","loadDateFilterValues","validationEngineOptions","registerDisableSubmitOnEnter","registerChangeSelectedColumns","listViewContainer","advancedConditions","customViewAdvCond","module","getModuleName","view","hideModalWindow","pageController","getListViewRecords","_textStatus","errorThrown","textTrusted","self","builder","relationSelect","advancedConditionsBuilder","html","moduleName","parent","sourceModuleName","relationId","relationColumns","relationConditions","Vtiger_Base_Validator_Js","invokeValidation","field","instance","setElement","validate","getError","validateValue","getFieldValue","fieldValue","test","setError","errorInfo"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFACA,sBAEMA,eAAAA,CAAAA,QAAAA,CAAAA,WAAAA,CAAAA,CAAAA,GAAAA,EAAAA,QAAAA,YAAAA,WAAAA,CAAAA,CAAAA,MAAAA,IAAAA,SAAAA,CAAAA,mCAAAA,CAAAA,CAAAA,SAAAA,iBAAAA,CAAAA,MAAAA,CAAAA,KAAAA,CAAAA,CAAAA,IAAAA,IAAAA,UAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,KAAAA,CAAAA,MAAAA,CAAAA,CAAAA,EAAAA,CAAAA,UAAAA,CAAAA,KAAAA,CAAAA,CAAAA,CAAAA,CAAAA,UAAAA,CAAAA,UAAAA,CAAAA,UAAAA,CAAAA,UAAAA,EAAAA,CAAAA,CAAAA,CAAAA,UAAAA,CAAAA,YAAAA,CAAAA,CAAAA,CAAAA,CAAAA,OAAAA,GAAAA,UAAAA,GAAAA,UAAAA,CAAAA,QAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,MAAAA,CAAAA,cAAAA,CAAAA,MAAAA,CAAAA,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CAbuB;;"} \ No newline at end of file +{"version":3,"file":"CustomView.min.js","sources":["CustomView.js"],"sourcesContent":["/*+***********************************************************************************\n * The contents of this file are subject to the vtiger CRM Public License Version 1.0\n * (\"License\"); You may not use this file except in compliance with the License\n * The Original Code is: vtiger CRM Open Source\n * The Initial Developer of the Original Code is vtiger.\n * Portions created by vtiger are Copyright (C) vtiger.\n * All Rights Reserved.\n * Contributor(s): YetiForce S.A.\n *************************************************************************************/\n'use strict';\n\nclass CustomView {\n\tconstructor(url) {\n\t\tlet progressIndicatorElement = $.progressIndicator({\n\t\t\tposition: 'html',\n\t\t\tblockInfo: {\n\t\t\t\tenabled: true\n\t\t\t}\n\t\t});\n\t\tapp.showModalWindow(null, url, () => {\n\t\t\tthis.modalContainer = $('.js-filter-modal__container');\n\t\t\tthis.advanceFilterInstance = new Vtiger_ConditionBuilder_Js(\n\t\t\t\tthis.modalContainer.find('.js-condition-builder-view .js-condition-builder'),\n\t\t\t\tthis.modalContainer.find('#sourceModule').val()\n\t\t\t);\n\t\t\tthis.advanceFilterInstance.registerEvents();\n\t\t\tCustomView.registerAdvancedConditionsEvents(this.modalContainer);\n\n\t\t\t//This will store the columns selection container\n\t\t\tthis.columnSelectElement = false;\n\t\t\tthis.registerEvents();\n\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t});\n\t}\n\n\t/** @type {Vtiger_ConditionBuilder_Js} Condition builder object */\n\tstatic advancedConditionsBuilder;\n\n\tloadDateFilterValues() {\n\t\tlet selectedDateFilter = $('#standardDateFilter option:selected');\n\t\tlet currentDate = selectedDateFilter.data('currentdate');\n\t\tlet endDate = selectedDateFilter.data('enddate');\n\t\t$('#standardFilterCurrentDate').val(currentDate);\n\t\t$('#standardFilterEndDate').val(endDate);\n\t}\n\n\t/**\n\t * Function to get the contents container\n\t * @return : jQuery object of contents container\n\t */\n\tgetContentsContainer() {\n\t\tif (!this.modalContainer) {\n\t\t\tthis.modalContainer = $('.js-filter-modal__container');\n\t\t}\n\t\treturn this.modalContainer;\n\t}\n\n\t/**\n\t * Function to get the view columns selection element\n\t * @return : jQuery object of view columns selection element\n\t */\n\tgetColumnSelectElement() {\n\t\tif (!this.columnSelectElement) {\n\t\t\tthis.columnSelectElement = $('#viewColumnsSelect');\n\t\t}\n\t\treturn this.columnSelectElement;\n\t}\n\n\t/**\n\t * Function which will get the selected columns\n\t * @return : array of selected values\n\t */\n\tgetSelectedColumns() {\n\t\tlet columnListSelectElement = this.getColumnSelectElement();\n\t\treturn columnListSelectElement.val();\n\t}\n\t/**\n\t * Get custom labels\n\t * @returns array\n\t */\n\tgetCustomLabels() {\n\t\tlet customFieldNames = {};\n\t\tthis.getContentsContainer()\n\t\t\t.find('.js-short-label')\n\t\t\t.each(function () {\n\t\t\t\tcustomFieldNames[$(this).attr('data-field-value')] = $(this).val();\n\t\t\t});\n\t\treturn customFieldNames;\n\t}\n\n\tsaveFilter() {\n\t\tlet aDeferred = $.Deferred();\n\t\tlet formData = $('#CustomView').serializeFormData();\n\t\tAppConnector.request(formData, true)\n\t\t\t.done(function (data) {\n\t\t\t\taDeferred.resolve(data);\n\t\t\t})\n\t\t\t.fail(function (error) {\n\t\t\t\taDeferred.reject(error);\n\t\t\t});\n\t\treturn aDeferred.promise();\n\t}\n\n\tsaveAndViewFilter() {\n\t\tthis.saveFilter()\n\t\t\t.done(function (data) {\n\t\t\t\tlet response = data.result;\n\t\t\t\tif (response && response.success) {\n\t\t\t\t\tlet url;\n\t\t\t\t\tif (app.getParentModuleName() == 'Settings') {\n\t\t\t\t\t\turl = 'index.php?module=CustomView&parent=Settings&view=Index&sourceModule=' + $('#sourceModule').val();\n\t\t\t\t\t} else {\n\t\t\t\t\t\turl = response.listviewurl;\n\t\t\t\t\t}\n\t\t\t\t\twindow.location.href = url;\n\t\t\t\t} else {\n\t\t\t\t\t$.unblockUI();\n\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\ttitle: app.vtranslate('JS_DUPLICATE_RECORD'),\n\t\t\t\t\t\ttext: response.message,\n\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t})\n\t\t\t.fail(function (error) {\n\t\t\t\tapp.showNotify({\n\t\t\t\t\ttitle: error,\n\t\t\t\t\ttype: 'error'\n\t\t\t\t});\n\t\t\t});\n\t}\n\n\tregisterIconEvents() {\n\t\tthis.getContentsContainer()\n\t\t\t.find('.js-filter-preferences')\n\t\t\t.on('change', '.js-filter-preference', (e) => {\n\t\t\t\tlet currentTarget = $(e.currentTarget);\n\t\t\t\tlet iconElement = currentTarget.next();\n\t\t\t\tif (currentTarget.prop('checked')) {\n\t\t\t\t\ticonElement.removeClass(iconElement.data('unchecked')).addClass(iconElement.data('check'));\n\t\t\t\t} else {\n\t\t\t\t\ticonElement.removeClass(iconElement.data('check')).addClass(iconElement.data('unchecked'));\n\t\t\t\t}\n\t\t\t});\n\t}\n\n\tregisterColorEvent() {\n\t\tconst container = this.getContentsContainer();\n\t\tlet picker = container.find('.js-color-picker');\n\t\tlet pickerField = picker.find('.js-color-picker__field');\n\t\tlet showPicker = () => {\n\t\t\tApp.Fields.Colors.showPicker({\n\t\t\t\tcolor: pickerField.val(),\n\t\t\t\tbgToUpdate: picker.find('.js-color-picker__color'),\n\t\t\t\tfieldToUpdate: pickerField\n\t\t\t});\n\t\t};\n\t\tpicker.on('click', showPicker);\n\t}\n\n\t/**\n\t * Get list of fields to duplicates\n\t * @returns {Array}\n\t */\n\tgetDuplicateFields() {\n\t\tlet fields = [];\n\t\tconst container = this.getContentsContainer();\n\t\tcontainer.find('.js-duplicates-container .js-duplicates-row').each(function () {\n\t\t\tfields.push({\n\t\t\t\tfieldid: $(this).find('.js-duplicates-field').val(),\n\t\t\t\tignore: $(this).find('.js-duplicates-ignore').is(':checked')\n\t\t\t});\n\t\t});\n\t\treturn fields;\n\t}\n\t/**\n\t * Register events for block \"Find duplicates\"\n\t */\n\tregisterDuplicatesEvents() {\n\t\tconst container = this.getContentsContainer();\n\t\tApp.Fields.Picklist.showSelect2ElementView(container.find('.js-duplicates-container .js-duplicates-field'));\n\t\tcontainer.on('click', '.js-duplicates-remove', function () {\n\t\t\t$(this).closest('.js-duplicates-row').remove();\n\t\t});\n\t\tcontainer.find('.js-duplicate-add-field').on('click', function () {\n\t\t\tlet template = container.find('.js-duplicates-field-template').clone();\n\t\t\ttemplate.removeClass('d-none');\n\t\t\ttemplate.removeClass('js-duplicates-field-template');\n\t\t\tApp.Fields.Picklist.showSelect2ElementView(template.find('.js-duplicates-field'));\n\t\t\tcontainer.find('.js-duplicates-container').append(template);\n\t\t});\n\t}\n\tregisterSubmitEvent(select2Element) {\n\t\t$('#CustomView').on('submit', (e) => {\n\t\t\tconst form = $(e.currentTarget);\n\t\t\tlet selectElement = this.getColumnSelectElement();\n\t\t\tif ($('#viewname').val().length > 100) {\n\t\t\t\tapp.showNotify({\n\t\t\t\t\ttitle: app.vtranslate('JS_MESSAGE'),\n\t\t\t\t\ttext: app.vtranslate('JS_VIEWNAME_ALERT'),\n\t\t\t\t\ttype: 'error'\n\t\t\t\t});\n\t\t\t\te.preventDefault();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t//Mandatory Fields selection validation\n\t\t\t//Any one Mandatory Field should select while creating custom view.\n\t\t\tlet mandatoryFieldsList = JSON.parse($('#mandatoryFieldsList').val());\n\t\t\tlet selectedOptions = selectElement.val();\n\t\t\tlet mandatoryFieldsMissing = true;\n\t\t\tif (selectedOptions) {\n\t\t\t\tmandatoryFieldsMissing = selectedOptions.filter((value) => mandatoryFieldsList.includes(value)).length <= 0;\n\t\t\t}\n\t\t\tif (mandatoryFieldsMissing) {\n\t\t\t\tselectElement.validationEngine(\n\t\t\t\t\t'showPrompt',\n\t\t\t\t\tapp.vtranslate('JS_PLEASE_SELECT_ATLEAST_ONE_MANDATORY_FIELD'),\n\t\t\t\t\t'error',\n\t\t\t\t\t'topLeft',\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\t\t\te.preventDefault();\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tselect2Element.validationEngine('hide');\n\t\t\t}\n\t\t\t//Mandatory Fields validation ends\n\t\t\tlet result = form.validationEngine('validate');\n\t\t\tif (result) {\n\t\t\t\t//handled standard filters saved values.\n\t\t\t\tlet stdfilterlist = {};\n\n\t\t\t\tif (\n\t\t\t\t\t$('#standardFilterCurrentDate').val() != '' &&\n\t\t\t\t\t$('#standardFilterEndDate').val() != '' &&\n\t\t\t\t\t$('select.standardFilterColumn option:selected').val() != 'none'\n\t\t\t\t) {\n\t\t\t\t\tstdfilterlist['columnname'] = $('select.standardFilterColumn option:selected').val();\n\t\t\t\t\tstdfilterlist['stdfilter'] = $('select#standardDateFilter option:selected').val();\n\t\t\t\t\tstdfilterlist['startdate'] = $('#standardFilterCurrentDate').val();\n\t\t\t\t\tstdfilterlist['enddate'] = $('#standardFilterEndDate').val();\n\t\t\t\t\t$('#stdfilterlist').val(JSON.stringify(stdfilterlist));\n\t\t\t\t}\n\t\t\t\t//handled advanced filters saved values.\n\t\t\t\tlet contentContainer = this.getContentsContainer();\n\t\t\t\t$('#advfilterlist').val(JSON.stringify(this.advanceFilterInstance.getConditions()));\n\t\t\t\tform.find('#advancedConditions').val(JSON.stringify(CustomView.getAdvancedConditions(form)));\n\t\t\t\t$('[name=\"duplicatefields\"]').val(JSON.stringify(this.getDuplicateFields()));\n\t\t\t\t$('input[name=\"columnslist\"]', contentContainer).val(JSON.stringify(this.getSelectedColumns()));\n\t\t\t\tcontentContainer.find('.js-custom-field-names').val(JSON.stringify(this.getCustomLabels()));\n\n\t\t\t\tthis.saveAndViewFilter();\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\tapp.formAlignmentAfterValidation($(e.currentTarget));\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Block submit on press enter key\n\t */\n\tregisterDisableSubmitOnEnter() {\n\t\tthis.getContentsContainer()\n\t\t\t.find('#viewname, [name=\"color\"]')\n\t\t\t.on('keydown', (e) => {\n\t\t\t\tif (e.key === 'Enter') {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}\n\t\t\t});\n\t}\n\n\t/**\n\t * Function to register the advanced conditions events for customview\n\t * @param {jQuery} listViewContainer\n\t */\n\tstatic registerCustomViewAdvCondEvents(listViewContainer) {\n\t\tlistViewContainer.on('click', '.js-custom-view-adv-cond-modal', () => {\n\t\t\tconst customViewAdvCond = listViewContainer.find('.js-custom-view-adv-cond');\n\t\t\tlet advancedConditions = customViewAdvCond.val();\n\t\t\tif (advancedConditions) {\n\t\t\t\tadvancedConditions = JSON.parse(advancedConditions);\n\t\t\t}\n\t\t\tAppConnector.request({\n\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\tview: 'CustomViewAdvCondModal',\n\t\t\t\tadvancedConditions: advancedConditions\n\t\t\t})\n\t\t\t\t.done((data) => {\n\t\t\t\t\tif (data) {\n\t\t\t\t\t\tapp.showModalWindow(data, (modalContainer) => {\n\t\t\t\t\t\t\tApp.Tools.Form.registerBlockToggle(modalContainer);\n\t\t\t\t\t\t\tthis.registerAdvancedConditionsEvents(modalContainer);\n\t\t\t\t\t\t\tmodalContainer.find('[name=\"saveButton\"]').on('click', () => {\n\t\t\t\t\t\t\t\tcustomViewAdvCond.val(JSON.stringify(this.getAdvancedConditions(modalContainer)));\n\t\t\t\t\t\t\t\tapp.hideModalWindow();\n\t\t\t\t\t\t\t\tif (typeof app.pageController.getListViewRecords !== 'undefined') {\n\t\t\t\t\t\t\t\t\tapp.pageController.getListViewRecords();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.fail((_textStatus, errorThrown) => {\n\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\ttextTrusted: false,\n\t\t\t\t\t\ttitle: app.vtranslate('JS_ERROR'),\n\t\t\t\t\t\ttext: errorThrown,\n\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t});\n\t}\n\t/**\n\t * Function to register the advanced conditions events for custom view\n\t * @param {jQuery} container\n\t */\n\tstatic registerAdvancedConditionsEvents(container) {\n\t\tconst self = this;\n\t\tconst builder = container.find('.js-adv-condition-builder-view');\n\t\tconst relationSelect = container.find('.js-relation-select');\n\t\tif (relationSelect.val() != 0) {\n\t\t\tthis.advancedConditionsBuilder = new Vtiger_ConditionBuilder_Js(\n\t\t\t\tbuilder.find('.js-condition-builder'),\n\t\t\t\trelationSelect.find('option:selected').data('module')\n\t\t\t);\n\t\t\tthis.advancedConditionsBuilder.registerEvents();\n\t\t}\n\t\trelationSelect.on('change', function () {\n\t\t\tconst moduleName = $(this).find('option:selected').data('module');\n\t\t\tbuilder.html('');\n\t\t\tdelete self.advancedConditionsBuilder;\n\t\t\tif (moduleName) {\n\t\t\t\tAppConnector.request({\n\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\tparent: app.getParentModuleName(),\n\t\t\t\t\tview: 'ConditionBuilder',\n\t\t\t\t\tmode: 'builder',\n\t\t\t\t\tsourceModuleName: moduleName\n\t\t\t\t}).done((data) => {\n\t\t\t\t\tbuilder.html(data);\n\t\t\t\t\tself.advancedConditionsBuilder = new Vtiger_ConditionBuilder_Js(\n\t\t\t\t\t\tbuilder.find('.js-condition-builder'),\n\t\t\t\t\t\tmoduleName\n\t\t\t\t\t);\n\t\t\t\t\tself.advancedConditionsBuilder.registerEvents();\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t * Function to register the advanced conditions events for custom view\n\t * @param {jQuery} container\n\t * @return {object}\n\t */\n\tstatic getAdvancedConditions(container) {\n\t\tconst advancedConditions = {\n\t\t\trelationId: container.find('.js-relation-select').val()\n\t\t};\n\t\tcontainer.find('.js-relation-checkbox:checked').each(function () {\n\t\t\tif (typeof advancedConditions.relationColumns === 'undefined') {\n\t\t\t\tadvancedConditions.relationColumns = [];\n\t\t\t}\n\t\t\tadvancedConditions.relationColumns.push($(this).val());\n\t\t});\n\t\tif (this.advancedConditionsBuilder) {\n\t\t\tadvancedConditions.relationConditions = this.advancedConditionsBuilder.getConditions();\n\t\t}\n\t\treturn advancedConditions;\n\t}\n\t/**\n\t * Register change selected columns\n\t */\n\tregisterChangeSelectedColumns() {\n\t\tthis.container.find('.js-view-columns-select').on('change', () => {\n\t\t\tthis.registerAppendCustomLabels();\n\t\t});\n\t}\n\t/**\n\t *\tRegister append custom labels\n\t */\n\tregisterAppendCustomLabels() {\n\t\tlet shorterNamesContainer = this.container.find('.js-custom-name-fields');\n\t\tlet selectedColumns = this.container\n\t\t\t.find('.js-view-columns-select option:selected')\n\t\t\t.toArray()\n\t\t\t.map((item) => ({\n\t\t\t\ttext: item.getAttribute('data-field-label'),\n\t\t\t\tvalue: item.value,\n\t\t\t\tcustomLabel: item.getAttribute('data-custom-label') || ''\n\t\t\t}));\n\t\tshorterNamesContainer.empty();\n\t\tlet newCustomLabelElement = '';\n\t\tlet customLabelElement = '';\n\t\tlet customLabelValue = '';\n\t\tlet inputContainerElement = '';\n\t\tlet inputElement = '';\n\t\t$.each(selectedColumns, function (_index, element) {\n\t\t\tnewCustomLabelElement = document.createElement('div');\n\t\t\tnewCustomLabelElement.setAttribute('class', 'd-flex mb-1');\n\n\t\t\tcustomLabelElement = document.createElement('div');\n\t\t\tcustomLabelElement.setAttribute('class', 'col-form-label col-md-2 pl-0');\n\t\t\tcustomLabelValue = document.createTextNode(element.text);\n\t\t\tcustomLabelElement.appendChild(customLabelValue);\n\t\t\tnewCustomLabelElement.appendChild(customLabelElement);\n\n\t\t\tinputContainerElement = document.createElement('div');\n\t\t\tinputContainerElement.setAttribute('class', 'col-md-4');\n\n\t\t\tinputElement = document.createElement('input');\n\t\t\tinputElement.setAttribute('type', 'text');\n\t\t\tinputElement.setAttribute('class', 'form-control js-short-label');\n\t\t\tinputElement.setAttribute('data-field-value', element.value);\n\t\t\tinputElement.setAttribute(\n\t\t\t\t'data-validation-engine',\n\t\t\t\t'validate[maxSize[50], funcCall[Vtiger_Base_Validator_Js.invokeValidation]]'\n\t\t\t);\n\t\t\tinputElement.setAttribute('data-validator', '[{\"name\":\"FieldLabel\"}]');\n\t\t\tinputElement.setAttribute('value', element.customLabel);\n\n\t\t\tinputContainerElement.appendChild(inputElement);\n\t\t\tnewCustomLabelElement.appendChild(inputContainerElement);\n\t\t\tshorterNamesContainer.append(newCustomLabelElement);\n\t\t});\n\t}\n\t/**\n\t * Register events\n\t */\n\tregisterEvents() {\n\t\tthis.container = this.getContentsContainer();\n\t\tthis.registerIconEvents();\n\t\tApp.Fields.Tree.register(this.getContentsContainer());\n\t\tApp.Tools.Form.registerBlockToggle(this.getContentsContainer());\n\t\tthis.registerColorEvent();\n\t\tthis.registerDuplicatesEvents();\n\t\tconst select2Element = App.Fields.Picklist.showSelect2ElementView(this.getColumnSelectElement());\n\t\tthis.registerSubmitEvent(select2Element);\n\t\t$('.stndrdFilterDateSelect').datepicker();\n\t\t$('#standardDateFilter').on('change', () => {\n\t\t\tthis.loadDateFilterValues();\n\t\t});\n\t\t$('#CustomView').validationEngine(app.validationEngineOptions);\n\t\tthis.registerDisableSubmitOnEnter();\n\t\tthis.registerChangeSelectedColumns();\n\t\tthis.registerAppendCustomLabels();\n\t}\n}\n\nVtiger_Base_Validator_Js(\n\t'Vtiger_FieldLabel_Validator_Js',\n\t{\n\t\t/** @inheritdoc */\n\t\tinvokeValidation: function (field, _rules, _i, _options) {\n\t\t\tlet instance = new Vtiger_FieldLabel_Validator_Js();\n\t\t\tinstance.setElement(field);\n\t\t\tlet response = instance.validate();\n\t\t\tif (response !== true) {\n\t\t\t\treturn instance.getError();\n\t\t\t}\n\t\t}\n\t},\n\t{\n\t\t/** @inheritdoc */\n\t\tvalidate: function () {\n\t\t\treturn this.validateValue(this.getFieldValue());\n\t\t},\n\t\t/** @inheritdoc */\n\t\tvalidateValue: function (fieldValue) {\n\t\t\tlet specialChars = /[&\\<\\>\\:\\'\\\"\\,]/;\n\t\t\tif (specialChars.test(fieldValue)) {\n\t\t\t\tlet errorInfo = app.vtranslate('JS_SPECIAL_CHARACTERS') + ' & < > \\' \" : , ' + app.vtranslate('JS_NOT_ALLOWED');\n\t\t\t\tthis.setError(errorInfo);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t}\n);\n"],"names":["_typeof","o","Symbol","iterator","constructor","prototype","_classCallCheck","instance","Constructor","TypeError","_defineProperties","target","props","descriptor","i","length","enumerable","configurable","writable","Object","defineProperty","_toPropertyKey","key","_createClass","protoProps","staticProps","_defineProperty","obj","value","arg","_toPrimitive","String","input","hint","prim","toPrimitive","res","call","Number","CustomView","url","_this","progressIndicatorElement","$","progressIndicator","position","blockInfo","enabled","app","showModalWindow","modalContainer","advanceFilterInstance","Vtiger_ConditionBuilder_Js","find","val","registerEvents","registerAdvancedConditionsEvents","columnSelectElement","mode","loadDateFilterValues","selectedDateFilter","currentDate","data","endDate","getContentsContainer","getColumnSelectElement","getSelectedColumns","columnListSelectElement","getCustomLabels","customFieldNames","each","attr","saveFilter","aDeferred","Deferred","formData","serializeFormData","AppConnector","request","done","resolve","fail","error","reject","promise","saveAndViewFilter","response","result","success","getParentModuleName","listviewurl","window","location","href","unblockUI","showNotify","title","vtranslate","text","message","type","registerIconEvents","on","e","currentTarget","iconElement","next","prop","removeClass","addClass","registerColorEvent","container","picker","pickerField","showPicker","App","Fields","Colors","color","bgToUpdate","fieldToUpdate","getDuplicateFields","fields","push","fieldid","ignore","is","registerDuplicatesEvents","Picklist","showSelect2ElementView","closest","remove","template","clone","append","registerSubmitEvent","select2Element","_this2","form","selectElement","preventDefault","mandatoryFieldsList","JSON","parse","selectedOptions","mandatoryFieldsMissing","filter","includes","validationEngine","stdfilterlist","columnname","stdfilter","startdate","enddate","stringify","contentContainer","getConditions","getAdvancedConditions","formAlignmentAfterValidation","registerDisableSubmitOnEnter","registerChangeSelectedColumns","_this3","registerAppendCustomLabels","shorterNamesContainer","selectedColumns","toArray","map","item","getAttribute","customLabel","empty","newCustomLabelElement","customLabelElement","customLabelValue","inputContainerElement","inputElement","_index","element","document","createElement","setAttribute","createTextNode","appendChild","_this4","Tree","register","Tools","Form","registerBlockToggle","datepicker","validationEngineOptions","registerCustomViewAdvCondEvents","listViewContainer","_this5","customViewAdvCond","advancedConditions","module","getModuleName","view","hideModalWindow","pageController","getListViewRecords","_textStatus","errorThrown","textTrusted","self","builder","relationSelect","advancedConditionsBuilder","moduleName","html","parent","sourceModuleName","relationId","relationColumns","relationConditions","Vtiger_Base_Validator_Js","invokeValidation","field","Vtiger_FieldLabel_Validator_Js","setElement","validate","getError","validateValue","getFieldValue","fieldValue","test","errorInfo","setError"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFACA,YAAY,CAAC,SAAAA,OAAAA,CAAAC,CAAA,CAAAD,CAAAA,yBAAAA,CAAAA,OAAAA,OAAA,CAAAE,UAAAA,EAAAA,OAAAA,MAAA,EAAAA,QAAAA,EAAAA,OAAAA,MAAA,CAAAC,QAAA,CAAA,SAAAF,CAAA,CAAA,CAAA,OAAA,OAAAA,CAAA,CAAA,CAAA,SAAAA,CAAA,CAAAA,CAAAA,OAAAA,CAAA,EAAAC,UAAAA,EAAAA,OAAAA,MAAA,EAAAD,CAAA,CAAAG,WAAA,GAAAF,MAAA,EAAAD,CAAA,GAAAC,MAAA,CAAAG,SAAA,CAAAJ,QAAAA,CAAAA,OAAAA,CAAA,CAAAD,CAAAA,OAAA,CAAAC,CAAA,CAAA,CAAA,SAAAK,eAAAC,CAAAA,QAAA,CAAAC,WAAA,OAAAD,QAAA,YAAAC,WAAA,CAAA,CAAA,MAAA,IAAAC,SAAA,CAAA,mCAAA,CAAA,CAAA,SAAAC,kBAAAC,MAAA,CAAAC,KAAA,CAAAC,CAAAA,IAAAA,IAAAA,UAAA,CAAAC,CAAA,CAAA,CAAA,CAAAA,CAAA,CAAAF,KAAA,CAAAG,MAAA,CAAAD,CAAA,EAAAD,CAAAA,UAA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AUE,CAAAA,UAAU,CAAE,CAEpC,GADmB,iBAAiB,CACnBC,IAAI,CAACD,UAAU,CAAC,CAAE,CAClC,IAAIE,SAAS,CAAGnL,GAAG,CAACiD,UAAU,CAAC,uBAAuB,CAAC,CAAG,kBAAkB,CAAGjD,GAAG,CAACiD,UAAU,CAAC,gBAAgB,CAAC,CAE/G,OADA,IAAI,CAACmI,QAAQ,CAACD,SAAS,CAAC,CAAA,CAAA,CAEzB,CACA,OAAA,CAAA,CACD,CACD,CACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/Documents/resources/Detail.min.js.map b/public_html/layouts/basic/modules/Documents/resources/Detail.min.js.map index 3f3f55a251b9..2a9453fef00c 100644 --- a/public_html/layouts/basic/modules/Documents/resources/Detail.min.js.map +++ b/public_html/layouts/basic/modules/Documents/resources/Detail.min.js.map @@ -1 +1 @@ -{"version":3,"file":"Detail.min.js","sources":["Detail.js"],"sourcesContent":["/*+***********************************************************************************\n * The contents of this file are subject to the vtiger CRM Public License Version 1.0\n * (\"License\"); You may not use this file except in compliance with the License\n * The Original Code is: vtiger CRM Open Source\n * The Initial Developer of the Original Code is vtiger.\n * Portions created by vtiger are Copyright (C) vtiger.\n * All Rights Reserved.\n *************************************************************************************/\n'use strict';\n\nVtiger_Detail_Js(\n\t'Documents_Detail_Js',\n\t{\n\t\t//It stores the CheckFileIntegrity response data\n\t\tcheckFileIntegrityResponseCache: {},\n\n\t\t/*\n\t\t * function to trigger CheckFileIntegrity action\n\t\t * @param: CheckFileIntegrity url.\n\t\t */\n\t\tcheckFileIntegrity: function (checkFileIntegrityUrl) {\n\t\t\tDocuments_Detail_Js.getFileIntegrityResponse(checkFileIntegrityUrl).done(function (data) {\n\t\t\t\tDocuments_Detail_Js.displayCheckFileIntegrityResponse(data);\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * function to get the CheckFileIntegrity response data\n\t\t * @returns {Promise}\n\t\t */\n\t\tgetFileIntegrityResponse: function (params) {\n\t\t\tvar aDeferred = jQuery.Deferred();\n\n\t\t\t//Check in the cache\n\t\t\tif (!jQuery.isEmptyObject(Documents_Detail_Js.checkFileIntegrityResponseCache)) {\n\t\t\t\taDeferred.resolve(Documents_Detail_Js.checkFileIntegrityResponseCache);\n\t\t\t} else {\n\t\t\t\tAppConnector.request(params).done(function (data) {\n\t\t\t\t\t//store it in the cache, so that we dont do multiple request\n\t\t\t\t\tDocuments_Detail_Js.checkFileIntegrityResponseCache = data;\n\t\t\t\t\taDeferred.resolve(Documents_Detail_Js.checkFileIntegrityResponseCache);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn aDeferred.promise();\n\t\t},\n\n\t\t/*\n\t\t * function to display the CheckFileIntegrity message\n\t\t */\n\t\tdisplayCheckFileIntegrityResponse: function (data) {\n\t\t\tvar result = data['result'];\n\t\t\tvar success = result['success'];\n\t\t\tvar message = result['message'];\n\t\t\tvar params = {};\n\t\t\tif (success) {\n\t\t\t\tparams = {\n\t\t\t\t\ttext: message,\n\t\t\t\t\ttype: 'success'\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tparams = {\n\t\t\t\t\ttext: message,\n\t\t\t\t\ttype: 'error'\n\t\t\t\t};\n\t\t\t}\n\t\t\tDocuments_Detail_Js.showNotify(params);\n\t\t\twindow.location.href = result['url'];\n\t\t},\n\n\t\t//This will show the messages of CheckFileIntegrity using pnotify\n\t\tshowNotify: function (customParams) {\n\t\t\tvar params = {\n\t\t\t\ttitle: app.vtranslate('JS_CHECK_FILE_INTEGRITY'),\n\t\t\t\ttext: customParams.text,\n\t\t\t\ttype: customParams.type,\n\t\t\t\tdelay: '2000'\n\t\t\t};\n\t\t\tapp.showNotify(params);\n\t\t}\n\t},\n\t{}\n);\n"],"names":["Vtiger_Detail_Js","checkFileIntegrityResponseCache","checkFileIntegrity","checkFileIntegrityUrl","Documents_Detail_Js","getFileIntegrityResponse","done","data","displayCheckFileIntegrityResponse","params","aDeferred","jQuery","Deferred","isEmptyObject","AppConnector","request","resolve","promise","success","result","message","text","type","showNotify","window","location","href","customParams","title","app","vtranslate","delay"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFACA,YAEAA,CAAAA,gBAAgB,CACf,qBADe,CAEf;AAECC,+BAA+B,CAAE,EAFlC;AAKD;AACA;AACA,KACEC,kBAAkB,CAAE,SAAA,kBAAA,CAAUC,qBAAV,CAAiC,CACpDC,mBAAmB,CAACC,wBAApB,CAA6CF,qBAA7C,CAAoEG,CAAAA,IAApE,CAAyE,SAAUC,IAAV,CAAgB,CACxFH,mBAAmB,CAACI,iCAApB,CAAsDD,IAAtD,EACA,CAFD,EAGA,CAZF;AAeD;AACA;AACA,KACEF,wBAAwB,CAAE,SAAUI,wBAAAA,CAAAA,MAAV,CAAkB,CAC3C,IAAIC,SAAS,CAAGC,MAAM,CAACC,QAAP,EAAhB,CAEA;AAUA,OATKD,MAAM,CAACE,aAAP,CAAqBT,mBAAmB,CAACH,+BAAzC,CASL,CANCa,YAAY,CAACC,OAAb,CAAqBN,MAArB,CAAA,CAA6BH,IAA7B,CAAkC,SAAUC,IAAV,CAAgB,CAEjDH,mBAAmB,CAACH,+BAApB,CAAsDM,IAFL,CAGjDG,SAAS,CAACM,OAAV,CAAkBZ,mBAAmB,CAACH,+BAAtC,EACA,CAJD,CAMD,CARCS,SAAS,CAACM,OAAV,CAAkBZ,mBAAmB,CAACH,+BAAtC,CAQD,CAAOS,SAAS,CAACO,OAAV,EACP,CAhCF;AAmCD;AACA,KACET,iCAAiC,CAAE,SAAUD,iCAAAA,CAAAA,IAAV,CAAgB,CAAA,IACxC,MAAA,CAAGA,IAAI,CAAA,MADiC,CAE9CW,OAAO,CAAGC,MAAM,CAAA,OAF8B,CAG9CC,OAAO,CAAGD,MAAM,CAH8B,OAAA,CAI9CV,MAAM,CAAG,EAJqC,CAMjDA,MANiD,CAK9CS,OAL8C,CAMxC,CACRG,IAAI,CAAED,OADE,CAERE,IAAI,CAAE,SAFE,CANwC,CAWxC,CACRD,IAAI,CAAED,OADE,CAERE,IAAI,CAAE,OAFE,CAXwC,CAgBlDlB,mBAAmB,CAACmB,UAApB,CAA+Bd,MAA/B,CAhBkD,CAiBlDe,MAAM,CAACC,QAAP,CAAgBC,IAAhB,CAAuBP,MAAM,CAAA,IAC7B,CAvDF;AA0DCI,UAAU,CAAE,oBAAUI,YAAV,CAAwB,CACnC,IAAIlB,MAAM,CAAG,CACZmB,KAAK,CAAEC,GAAG,CAACC,UAAJ,CAAe,yBAAf,CADK,CAEZT,IAAI,CAAEM,YAAY,CAACN,IAFP,CAGZC,IAAI,CAAEK,YAAY,CAACL,IAHP,CAIZS,KAAK,CAAE,MAJK,CAAb,CAMAF,GAAG,CAACN,UAAJ,CAAed,MAAf,EACA,CAlEF,CAFe,CAsEf,EAtEe;;"} \ No newline at end of file +{"version":3,"file":"Detail.min.js","sources":["Detail.js"],"sourcesContent":["/*+***********************************************************************************\n * The contents of this file are subject to the vtiger CRM Public License Version 1.0\n * (\"License\"); You may not use this file except in compliance with the License\n * The Original Code is: vtiger CRM Open Source\n * The Initial Developer of the Original Code is vtiger.\n * Portions created by vtiger are Copyright (C) vtiger.\n * All Rights Reserved.\n *************************************************************************************/\n'use strict';\n\nVtiger_Detail_Js(\n\t'Documents_Detail_Js',\n\t{\n\t\t//It stores the CheckFileIntegrity response data\n\t\tcheckFileIntegrityResponseCache: {},\n\n\t\t/*\n\t\t * function to trigger CheckFileIntegrity action\n\t\t * @param: CheckFileIntegrity url.\n\t\t */\n\t\tcheckFileIntegrity: function (checkFileIntegrityUrl) {\n\t\t\tDocuments_Detail_Js.getFileIntegrityResponse(checkFileIntegrityUrl).done(function (data) {\n\t\t\t\tDocuments_Detail_Js.displayCheckFileIntegrityResponse(data);\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * function to get the CheckFileIntegrity response data\n\t\t * @returns {Promise}\n\t\t */\n\t\tgetFileIntegrityResponse: function (params) {\n\t\t\tvar aDeferred = jQuery.Deferred();\n\n\t\t\t//Check in the cache\n\t\t\tif (!jQuery.isEmptyObject(Documents_Detail_Js.checkFileIntegrityResponseCache)) {\n\t\t\t\taDeferred.resolve(Documents_Detail_Js.checkFileIntegrityResponseCache);\n\t\t\t} else {\n\t\t\t\tAppConnector.request(params).done(function (data) {\n\t\t\t\t\t//store it in the cache, so that we dont do multiple request\n\t\t\t\t\tDocuments_Detail_Js.checkFileIntegrityResponseCache = data;\n\t\t\t\t\taDeferred.resolve(Documents_Detail_Js.checkFileIntegrityResponseCache);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn aDeferred.promise();\n\t\t},\n\n\t\t/*\n\t\t * function to display the CheckFileIntegrity message\n\t\t */\n\t\tdisplayCheckFileIntegrityResponse: function (data) {\n\t\t\tvar result = data['result'];\n\t\t\tvar success = result['success'];\n\t\t\tvar message = result['message'];\n\t\t\tvar params = {};\n\t\t\tif (success) {\n\t\t\t\tparams = {\n\t\t\t\t\ttext: message,\n\t\t\t\t\ttype: 'success'\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tparams = {\n\t\t\t\t\ttext: message,\n\t\t\t\t\ttype: 'error'\n\t\t\t\t};\n\t\t\t}\n\t\t\tDocuments_Detail_Js.showNotify(params);\n\t\t\twindow.location.href = result['url'];\n\t\t},\n\n\t\t//This will show the messages of CheckFileIntegrity using pnotify\n\t\tshowNotify: function (customParams) {\n\t\t\tvar params = {\n\t\t\t\ttitle: app.vtranslate('JS_CHECK_FILE_INTEGRITY'),\n\t\t\t\ttext: customParams.text,\n\t\t\t\ttype: customParams.type,\n\t\t\t\tdelay: '2000'\n\t\t\t};\n\t\t\tapp.showNotify(params);\n\t\t}\n\t},\n\t{}\n);\n"],"names":["Vtiger_Detail_Js","checkFileIntegrityResponseCache","checkFileIntegrity","checkFileIntegrityUrl","Documents_Detail_Js","getFileIntegrityResponse","done","data","displayCheckFileIntegrityResponse","params","aDeferred","jQuery","Deferred","isEmptyObject","AppConnector","request","resolve","promise","result","success","message","text","type","showNotify","window","location","href","url","customParams","title","app","vtranslate","delay"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFACA,YAAY,CAEZA,gBAAgB,CACf,qBAAqB,CACrB;AAECC,+BAA+B,CAAE,EAAE;AAGrC;AACA;AACA,KACEC,kBAAkB,CAAE,SAAAA,kBAAAA,CAAUC,qBAAqB,CAAE,CACpDC,mBAAmB,CAACC,wBAAwB,CAACF,qBAAqB,CAAC,CAACG,IAAI,CAAC,SAAUC,IAAI,CAAE,CACxFH,mBAAmB,CAACI,iCAAiC,CAACD,IAAI,EAC3D,CAAC,EACF,CAAC;AAGH;AACA;AACA,KACEF,wBAAwB,CAAE,SAAAA,wBAAUI,CAAAA,MAAM,CAAE,CAC3C,IAAIC,SAAS,CAAGC,MAAM,CAACC,QAAQ,EAAE,CAEjC;AAUA,OATKD,MAAM,CAACE,aAAa,CAACT,mBAAmB,CAACH,+BAA+B,CAAC,CAG7Ea,YAAY,CAACC,OAAO,CAACN,MAAM,CAAC,CAACH,IAAI,CAAC,SAAUC,IAAI,CAAE,CAEjDH,mBAAmB,CAACH,+BAA+B,CAAGM,IAAI,CAC1DG,SAAS,CAACM,OAAO,CAACZ,mBAAmB,CAACH,+BAA+B,EACtE,CAAC,CAAC,CANFS,SAAS,CAACM,OAAO,CAACZ,mBAAmB,CAACH,+BAA+B,CAAC,CAQhES,SAAS,CAACO,OAAO,EACzB,CAAC;AAGH;AACA,KACET,iCAAiC,CAAE,SAAAA,iCAAAA,CAAUD,IAAI,CAAE,CAAA,IAC9CW,MAAM,CAAGX,IAAI,CAAAW,MAAU,CACvBC,OAAO,CAAGD,MAAM,CAAAC,OAAW,CAC3BC,OAAO,CAAGF,MAAM,CAAAE,OAAW,CAC3BX,MAAM,CAAG,EAAE,CAEdA,MAAM,CADHU,OAAO,CACD,CACRE,IAAI,CAAED,OAAO,CACbE,IAAI,CAAE,SACP,CAAC,CAEQ,CACRD,IAAI,CAAED,OAAO,CACbE,IAAI,CAAE,OACP,CAAC,CAEFlB,mBAAmB,CAACmB,UAAU,CAACd,MAAM,CAAC,CACtCe,MAAM,CAACC,QAAQ,CAACC,IAAI,CAAGR,MAAM,CAAAS,IAC9B,CAAC;AAGDJ,UAAU,CAAE,SAAAA,UAAUK,CAAAA,YAAY,CAAE,CACnC,IAAInB,MAAM,CAAG,CACZoB,KAAK,CAAEC,GAAG,CAACC,UAAU,CAAC,yBAAyB,CAAC,CAChDV,IAAI,CAAEO,YAAY,CAACP,IAAI,CACvBC,IAAI,CAAEM,YAAY,CAACN,IAAI,CACvBU,KAAK,CAAE,MACR,CAAC,CACDF,GAAG,CAACP,UAAU,CAACd,MAAM,EACtB,CACD,CAAC,CACD,EACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/Documents/resources/Edit.min.js b/public_html/layouts/basic/modules/Documents/resources/Edit.min.js index 49ed18c94f91..c11391c1b3d8 100644 --- a/public_html/layouts/basic/modules/Documents/resources/Edit.min.js +++ b/public_html/layouts/basic/modules/Documents/resources/Edit.min.js @@ -14,5 +14,6 @@ if("file"===element.attr("type")){var uploadFileSizeHolder=element.closest(".fil * Function to save the quickcreate module * @param accepts form element as parameter * @returns {Promise} - */quickCreateSave:function quickCreateSave(form){var aDeferred=jQuery.Deferred(),formData=new FormData(form[0]),fileLocationTypeElement=form.find("[name=\"filelocationtype\"]");return AppConnector.request({url:"index.php",type:"POST",data:formData,processData:!1,contentType:!1}).done(function(data){aDeferred.resolve(data);}).fail(function(textStatus,errorThrown){aDeferred.reject(textStatus,errorThrown);}),aDeferred.promise()},registerBasicEvents:function registerBasicEvents(container){this._super(container),this.registerFileLocationTypeChangeEvent(container),this.registerFileChangeEvent(container);},registerEvents:function registerEvents(){this._super();}}); + */quickCreateSave:function quickCreateSave(form){var aDeferred=jQuery.Deferred(),formData=new FormData(form[0]),fileLocationTypeElement=form.find("[name=\"filelocationtype\"]");//Using formData object to send data to server as a multipart/form-data form submit +return AppConnector.request({url:"index.php",type:"POST",data:formData,processData:!1,contentType:!1}).done(function(data){aDeferred.resolve(data);}).fail(function(textStatus,errorThrown){aDeferred.reject(textStatus,errorThrown);}),aDeferred.promise()},registerBasicEvents:function registerBasicEvents(container){this._super(container),this.registerFileLocationTypeChangeEvent(container),this.registerFileChangeEvent(container);},registerEvents:function registerEvents(){this._super();}}); //# sourceMappingURL=Edit.min.js.map diff --git a/public_html/layouts/basic/modules/Documents/resources/Edit.min.js.map b/public_html/layouts/basic/modules/Documents/resources/Edit.min.js.map index f8f70494207a..de22ea5fb91b 100644 --- a/public_html/layouts/basic/modules/Documents/resources/Edit.min.js.map +++ b/public_html/layouts/basic/modules/Documents/resources/Edit.min.js.map @@ -1 +1 @@ -{"version":3,"file":"Edit.min.js","sources":["Edit.js"],"sourcesContent":["/*+***********************************************************************************\n * The contents of this file are subject to the vtiger CRM Public License Version 1.0\n * (\"License\"); You may not use this file except in compliance with the License\n * The Original Code is: vtiger CRM Open Source\n * The Initial Developer of the Original Code is vtiger.\n * Portions created by vtiger are Copyright (C) vtiger.\n * All Rights Reserved.\n * Contributor(s): YetiForce S.A.\n *************************************************************************************/\n'use strict';\n\nVtiger_Edit_Js(\n\t'Documents_Edit_Js',\n\t{},\n\t{\n\t\tINTERNAL_FILE_LOCATION_TYPE: 'I',\n\t\tEXTERNAL_FILE_LOCATION_TYPE: 'E',\n\n\t\tisFileLocationInternalType: function (fileLocationElement) {\n\t\t\tif (fileLocationElement.val() == this.INTERNAL_FILE_LOCATION_TYPE) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\n\t\tisFileLocationExternalType: function (fileLocationElement) {\n\t\t\tif (fileLocationElement.val() == this.EXTERNAL_FILE_LOCATION_TYPE) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\n\t\tconvertFileSizeInToDisplayFormat: function (fileSizeInBytes) {\n\t\t\tvar i = -1;\n\t\t\tvar byteUnits = [' kB', ' MB', ' GB', ' TB', 'PB', 'EB', 'ZB', 'YB'];\n\t\t\tdo {\n\t\t\t\tfileSizeInBytes = fileSizeInBytes / 1024;\n\t\t\t\ti++;\n\t\t\t} while (fileSizeInBytes > 1024);\n\n\t\t\treturn Math.max(fileSizeInBytes, 0.1).toFixed(1) + byteUnits[i];\n\t\t},\n\n\t\tregisterFileLocationTypeChangeEvent: function (container) {\n\t\t\tvar thisInstance = this;\n\t\t\tcontainer.on('change', 'select[name=\"filelocationtype\"]', function (e) {\n\t\t\t\tvar fileLocationTypeElement = container.find('[name=\"filelocationtype\"]');\n\t\t\t\tvar fileNameElement = container.find('[name=\"filename\"]');\n\t\t\t\tvar newFileNameElement;\n\t\t\t\tif (thisInstance.isFileLocationInternalType(fileLocationTypeElement)) {\n\t\t\t\t\tnewFileNameElement = jQuery('');\n\t\t\t\t} else {\n\t\t\t\t\tnewFileNameElement = jQuery('');\n\t\t\t\t}\n\t\t\t\tvar oldElementAttributeList = fileNameElement.get(0).attributes;\n\n\t\t\t\tfor (var index = 0; index < oldElementAttributeList.length; index++) {\n\t\t\t\t\tvar attributeObject = oldElementAttributeList[index];\n\t\t\t\t\t//Dont update the type attribute\n\t\t\t\t\tif (attributeObject.name == 'type' || attributeObject.name == 'value' || attributeObject.name == 'class') {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tvar value = attributeObject.value;\n\t\t\t\t\tvar className = '';\n\t\t\t\t\tif (attributeObject.name == 'data-fieldinfo') {\n\t\t\t\t\t\tvalue = JSON.parse(value);\n\t\t\t\t\t\tif (thisInstance.isFileLocationExternalType(fileLocationTypeElement)) {\n\t\t\t\t\t\t\tvalue['type'] = 'url';\n\t\t\t\t\t\t\tclassName = 'form-control';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tvalue['type'] = 'file';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvalue = JSON.stringify(value);\n\t\t\t\t\t}\n\t\t\t\t\tnewFileNameElement.attr(attributeObject.name, value);\n\t\t\t\t\tnewFileNameElement.addClass(className);\n\t\t\t\t}\n\t\t\t\tfileNameElement.replaceWith(newFileNameElement);\n\t\t\t\tvar fileNameElementTd = newFileNameElement.closest('.fieldValue');\n\t\t\t\tvar uploadFileDetails = fileNameElementTd.find('.uploadedFileDetails');\n\t\t\t\tif (thisInstance.isFileLocationExternalType(fileLocationTypeElement)) {\n\t\t\t\t\tuploadFileDetails.addClass('d-none').removeClass('show');\n\t\t\t\t} else {\n\t\t\t\t\tuploadFileDetails.addClass('show').removeClass('d-none');\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\tregisterFileChangeEvent: function (container) {\n\t\t\tvar thisInstance = this;\n\n\t\t\tcontainer.on('change', 'input[name=\"filename\"]', function (e) {\n\t\t\t\tif (e.target.type === 'text') {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tlet element = container.find('[name=\"filename\"]');\n\t\t\t\t//ignore all other types than file\n\t\t\t\tif (element.attr('type') !== 'file') {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tlet uploadFileSizeHolder = element.closest('.fileUploadContainer').find('.uploadedFileSize');\n\t\t\t\tlet fileSize = element.get(0).files[0].size;\n\t\t\t\tif (fileSize > CONFIG['maxUploadLimit']) {\n\t\t\t\t\tapp.showAlert(app.vtranslate('JS_UPLOADED_FILE_SIZE_EXCEEDS'));\n\t\t\t\t\telement.val('');\n\t\t\t\t\tuploadFileSizeHolder.text('');\n\t\t\t\t} else {\n\t\t\t\t\tuploadFileSizeHolder.text(thisInstance.convertFileSizeInToDisplayFormat(fileSize));\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Function to save the quickcreate module\n\t\t * @param accepts form element as parameter\n\t\t * @returns {Promise}\n\t\t */\n\t\tquickCreateSave: function (form) {\n\t\t\tvar thisInstance = this;\n\t\t\tvar aDeferred = jQuery.Deferred();\n\t\t\t//Using formData object to send data to server as a multipart/form-data form submit\n\t\t\tvar formData = new FormData(form[0]);\n\t\t\tvar fileLocationTypeElement = form.find('[name=\"filelocationtype\"]');\n\t\t\tvar params = {\n\t\t\t\turl: 'index.php',\n\t\t\t\ttype: 'POST',\n\t\t\t\tdata: formData,\n\t\t\t\tprocessData: false,\n\t\t\t\tcontentType: false\n\t\t\t};\n\t\t\tAppConnector.request(params)\n\t\t\t\t.done(function (data) {\n\t\t\t\t\taDeferred.resolve(data);\n\t\t\t\t})\n\t\t\t\t.fail(function (textStatus, errorThrown) {\n\t\t\t\t\taDeferred.reject(textStatus, errorThrown);\n\t\t\t\t});\n\t\t\treturn aDeferred.promise();\n\t\t},\n\t\tregisterBasicEvents: function (container) {\n\t\t\tthis._super(container);\n\t\t\tthis.registerFileLocationTypeChangeEvent(container);\n\t\t\tthis.registerFileChangeEvent(container);\n\t\t},\n\n\t\tregisterEvents: function () {\n\t\t\tthis._super();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Edit_Js","INTERNAL_FILE_LOCATION_TYPE","EXTERNAL_FILE_LOCATION_TYPE","isFileLocationInternalType","fileLocationElement","val","isFileLocationExternalType","convertFileSizeInToDisplayFormat","fileSizeInBytes","i","max","toFixed","registerFileLocationTypeChangeEvent","container","thisInstance","on","fileLocationTypeElement","find","fileNameElement","newFileNameElement","jQuery","attributeObject","oldElementAttributeList","get","attributes","index","length","name","value","className","JSON","parse","stringify","attr","addClass","replaceWith","closest","uploadFileDetails","fileNameElementTd","removeClass","registerFileChangeEvent","e","target","type","element","uploadFileSizeHolder","fileSize","files","size","CONFIG","app","showAlert","vtranslate","text","quickCreateSave","form","Deferred","formData","AppConnector","request","url","data","processData","contentType","done","aDeferred","resolve","fail","textStatus","errorThrown","reject","promise","registerBasicEvents","_super","registerEvents"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFACA,YAAA,CAEAA,cAAc,CACb,mBADa,CAEb,EAFa,CAGb,CACCC,2BAA2B,CAAE,GAD9B,CAECC,2BAA2B,CAAE,GAF9B,CAICC,0BAA0B,CAAE,SAAA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,CAIZK,WAAW,CAJC,CAAA,CAAA,CAKZC,WAAW,CAAA,CAAA,CALC,CAOb,CAAA,CACEC,IADF,CACO,SAAUH,IAAV,CAAgB,CACrBI,SAAS,CAACC,OAAV,CAAkBL,IAAlB,EACA,CAHF,CAIEM,CAAAA,IAJF,CAIO,SAAUC,UAAV,CAAsBC,WAAtB,CAAmC,CACxCJ,SAAS,CAACK,MAAV,CAAiBF,UAAjB,CAA6BC,WAA7B,EACA,CANF,CAOA,CAAOJ,SAAS,CAACM,OAAV,EACP,CA5HF,CA6HCC,mBAAmB,CAAE,SAAU3D,mBAAAA,CAAAA,SAAV,CAAqB,CACzC,IAAK4D,CAAAA,MAAL,CAAY5D,SAAZ,CADyC,CAEzC,IAAKD,CAAAA,mCAAL,CAAyCC,SAAzC,CAFyC,CAGzC,IAAA,CAAK2B,uBAAL,CAA6B3B,SAA7B,EACA,CAjIF,CAmIC6D,cAAc,CAAE,SAAY,cAAA,EAAA,CAC3B,IAAKD,CAAAA,MAAL,GACA,CArIF,CAHa;;"} \ No newline at end of file +{"version":3,"file":"Edit.min.js","sources":["Edit.js"],"sourcesContent":["/*+***********************************************************************************\n * The contents of this file are subject to the vtiger CRM Public License Version 1.0\n * (\"License\"); You may not use this file except in compliance with the License\n * The Original Code is: vtiger CRM Open Source\n * The Initial Developer of the Original Code is vtiger.\n * Portions created by vtiger are Copyright (C) vtiger.\n * All Rights Reserved.\n * Contributor(s): YetiForce S.A.\n *************************************************************************************/\n'use strict';\n\nVtiger_Edit_Js(\n\t'Documents_Edit_Js',\n\t{},\n\t{\n\t\tINTERNAL_FILE_LOCATION_TYPE: 'I',\n\t\tEXTERNAL_FILE_LOCATION_TYPE: 'E',\n\n\t\tisFileLocationInternalType: function (fileLocationElement) {\n\t\t\tif (fileLocationElement.val() == this.INTERNAL_FILE_LOCATION_TYPE) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\n\t\tisFileLocationExternalType: function (fileLocationElement) {\n\t\t\tif (fileLocationElement.val() == this.EXTERNAL_FILE_LOCATION_TYPE) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\n\t\tconvertFileSizeInToDisplayFormat: function (fileSizeInBytes) {\n\t\t\tvar i = -1;\n\t\t\tvar byteUnits = [' kB', ' MB', ' GB', ' TB', 'PB', 'EB', 'ZB', 'YB'];\n\t\t\tdo {\n\t\t\t\tfileSizeInBytes = fileSizeInBytes / 1024;\n\t\t\t\ti++;\n\t\t\t} while (fileSizeInBytes > 1024);\n\n\t\t\treturn Math.max(fileSizeInBytes, 0.1).toFixed(1) + byteUnits[i];\n\t\t},\n\n\t\tregisterFileLocationTypeChangeEvent: function (container) {\n\t\t\tvar thisInstance = this;\n\t\t\tcontainer.on('change', 'select[name=\"filelocationtype\"]', function (e) {\n\t\t\t\tvar fileLocationTypeElement = container.find('[name=\"filelocationtype\"]');\n\t\t\t\tvar fileNameElement = container.find('[name=\"filename\"]');\n\t\t\t\tvar newFileNameElement;\n\t\t\t\tif (thisInstance.isFileLocationInternalType(fileLocationTypeElement)) {\n\t\t\t\t\tnewFileNameElement = jQuery('');\n\t\t\t\t} else {\n\t\t\t\t\tnewFileNameElement = jQuery('');\n\t\t\t\t}\n\t\t\t\tvar oldElementAttributeList = fileNameElement.get(0).attributes;\n\n\t\t\t\tfor (var index = 0; index < oldElementAttributeList.length; index++) {\n\t\t\t\t\tvar attributeObject = oldElementAttributeList[index];\n\t\t\t\t\t//Dont update the type attribute\n\t\t\t\t\tif (attributeObject.name == 'type' || attributeObject.name == 'value' || attributeObject.name == 'class') {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tvar value = attributeObject.value;\n\t\t\t\t\tvar className = '';\n\t\t\t\t\tif (attributeObject.name == 'data-fieldinfo') {\n\t\t\t\t\t\tvalue = JSON.parse(value);\n\t\t\t\t\t\tif (thisInstance.isFileLocationExternalType(fileLocationTypeElement)) {\n\t\t\t\t\t\t\tvalue['type'] = 'url';\n\t\t\t\t\t\t\tclassName = 'form-control';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tvalue['type'] = 'file';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvalue = JSON.stringify(value);\n\t\t\t\t\t}\n\t\t\t\t\tnewFileNameElement.attr(attributeObject.name, value);\n\t\t\t\t\tnewFileNameElement.addClass(className);\n\t\t\t\t}\n\t\t\t\tfileNameElement.replaceWith(newFileNameElement);\n\t\t\t\tvar fileNameElementTd = newFileNameElement.closest('.fieldValue');\n\t\t\t\tvar uploadFileDetails = fileNameElementTd.find('.uploadedFileDetails');\n\t\t\t\tif (thisInstance.isFileLocationExternalType(fileLocationTypeElement)) {\n\t\t\t\t\tuploadFileDetails.addClass('d-none').removeClass('show');\n\t\t\t\t} else {\n\t\t\t\t\tuploadFileDetails.addClass('show').removeClass('d-none');\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\tregisterFileChangeEvent: function (container) {\n\t\t\tvar thisInstance = this;\n\n\t\t\tcontainer.on('change', 'input[name=\"filename\"]', function (e) {\n\t\t\t\tif (e.target.type === 'text') {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tlet element = container.find('[name=\"filename\"]');\n\t\t\t\t//ignore all other types than file\n\t\t\t\tif (element.attr('type') !== 'file') {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tlet uploadFileSizeHolder = element.closest('.fileUploadContainer').find('.uploadedFileSize');\n\t\t\t\tlet fileSize = element.get(0).files[0].size;\n\t\t\t\tif (fileSize > CONFIG['maxUploadLimit']) {\n\t\t\t\t\tapp.showAlert(app.vtranslate('JS_UPLOADED_FILE_SIZE_EXCEEDS'));\n\t\t\t\t\telement.val('');\n\t\t\t\t\tuploadFileSizeHolder.text('');\n\t\t\t\t} else {\n\t\t\t\t\tuploadFileSizeHolder.text(thisInstance.convertFileSizeInToDisplayFormat(fileSize));\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Function to save the quickcreate module\n\t\t * @param accepts form element as parameter\n\t\t * @returns {Promise}\n\t\t */\n\t\tquickCreateSave: function (form) {\n\t\t\tvar thisInstance = this;\n\t\t\tvar aDeferred = jQuery.Deferred();\n\t\t\t//Using formData object to send data to server as a multipart/form-data form submit\n\t\t\tvar formData = new FormData(form[0]);\n\t\t\tvar fileLocationTypeElement = form.find('[name=\"filelocationtype\"]');\n\t\t\tvar params = {\n\t\t\t\turl: 'index.php',\n\t\t\t\ttype: 'POST',\n\t\t\t\tdata: formData,\n\t\t\t\tprocessData: false,\n\t\t\t\tcontentType: false\n\t\t\t};\n\t\t\tAppConnector.request(params)\n\t\t\t\t.done(function (data) {\n\t\t\t\t\taDeferred.resolve(data);\n\t\t\t\t})\n\t\t\t\t.fail(function (textStatus, errorThrown) {\n\t\t\t\t\taDeferred.reject(textStatus, errorThrown);\n\t\t\t\t});\n\t\t\treturn aDeferred.promise();\n\t\t},\n\t\tregisterBasicEvents: function (container) {\n\t\t\tthis._super(container);\n\t\t\tthis.registerFileLocationTypeChangeEvent(container);\n\t\t\tthis.registerFileChangeEvent(container);\n\t\t},\n\n\t\tregisterEvents: function () {\n\t\t\tthis._super();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Edit_Js","INTERNAL_FILE_LOCATION_TYPE","EXTERNAL_FILE_LOCATION_TYPE","isFileLocationInternalType","fileLocationElement","val","isFileLocationExternalType","convertFileSizeInToDisplayFormat","fileSizeInBytes","i","Math","max","toFixed","registerFileLocationTypeChangeEvent","container","thisInstance","on","newFileNameElement","fileLocationTypeElement","find","fileNameElement","jQuery","attributeObject","oldElementAttributeList","get","attributes","index","length","name","value","className","JSON","parse","type","stringify","attr","addClass","replaceWith","fileNameElementTd","closest","uploadFileDetails","removeClass","registerFileChangeEvent","e","target","element","uploadFileSizeHolder","fileSize","files","size","CONFIG","maxUploadLimit","app","showAlert","vtranslate","text","quickCreateSave","form","aDeferred","Deferred","formData","FormData","AppConnector","request","url","data","processData","contentType","done","resolve","fail","textStatus","errorThrown","reject","promise","registerBasicEvents","_super","registerEvents"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFACA,YAAY,CAEZA,cAAc,CACb,mBAAmB,CACnB,EAAE,CACF,CACCC,2BAA2B,CAAE,GAAG,CAChCC,2BAA2B,CAAE,GAAG,CAEhCC,0BAA0B,CAAE,SAAAA,0BAAAA,CAAUC,mBAAmB,CAAE,UACtDA,mBAAmB,CAACC,GAAG,EAAE,EAAI,IAAI,CAACJ,2BAA2B,CAIlE,CAAC,CAEDK,0BAA0B,CAAE,SAAAA,0BAAUF,CAAAA,mBAAmB,CAAE,CAAA,OAAA,EACtDA,mBAAmB,CAACC,GAAG,EAAE,EAAI,IAAI,CAACH,2BAA2B,CAIlE,CAAC,CAEDK,gCAAgC,CAAE,SAAAA,gCAAAA,CAAUC,eAAe,CAAE,CACxD,IAAAC,CAAC,CAAG,CAAC,CAAC,CAEV,GACCD,eAAe,EAAqB,IAAI,CACxCC,CAAC,EAAE,CAAA,MACuB,IAAI,CAAtBD,eAAsB,EAE/B,OAAOE,IAAI,CAACC,GAAG,CAACH,eAAe,CAAE,EAAG,CAAC,CAACI,OAAO,CAAC,CAAC,CAAC,CANhC,CAAC,KAAK,CAAE,KAAK,CAAE,KAAK,CAAE,KAAK,CAAE,IAAI,CAAE,IAAI,CAAE,IAAI,CAAE,IAAI,CAAC,CAMPH,CAAC,CAC/D,CAAC,CAEDI,mCAAmC,CAAE,SAAAA,mCAAAA,CAAUC,SAAS,CAAE,CACzD,IAAIC,YAAY,CAAG,IAAI,CACvBD,SAAS,CAACE,EAAE,CAAC,QAAQ,CAAE,mCAAiC,CAAE,UAAa,CAGlE,IAAAC,kBAAkB,CAFlBC,uBAAuB,CAAGJ,SAAS,CAACK,IAAI,CAAC,6BAA2B,CAAC,CACrEC,eAAe,CAAGN,SAAS,CAACK,IAAI,CAAC,qBAAmB,CAAC,CAGxDF,kBAAkB,CADfF,YAAY,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J,IAAI,CAAC,CAAC,CAAC,CAAC,CAChCvC,uBAAuB,CAAGuC,IAAI,CAACtC,IAAI,CAAC,6BAA2B,CAAC,CAFpE;AAiBA,OAPA2C,YAAY,CAACC,OAAO,CAPP,CACZC,GAAG,CAAE,WAAW,CAChB/B,IAAI,CAAE,MAAM,CACZgC,IAAI,CAAEL,QAAQ,CACdM,WAAW,GAAO,CAClBC,WAAW,CACZ,CAAA,CAAA,CAC2B,CAAC,CAC1BC,IAAI,CAAC,SAAUH,IAAI,CAAE,CACrBP,SAAS,CAACW,OAAO,CAACJ,IAAI,EACvB,CAAC,CAAC,CACDK,IAAI,CAAC,SAAUC,UAAU,CAAEC,WAAW,CAAE,CACxCd,SAAS,CAACe,MAAM,CAACF,UAAU,CAAEC,WAAW,EACzC,CAAC,CAAC,CACId,SAAS,CAACgB,OAAO,EACzB,CAAC,CACDC,mBAAmB,CAAE,SAAAA,mBAAAA,CAAU7D,SAAS,CAAE,CACzC,IAAI,CAAC8D,MAAM,CAAC9D,SAAS,CAAC,CACtB,IAAI,CAACD,mCAAmC,CAACC,SAAS,CAAC,CACnD,IAAI,CAAC4B,uBAAuB,CAAC5B,SAAS,EACvC,CAAC,CAED+D,cAAc,CAAE,SAAAA,cAAA,EAAY,CAC3B,IAAI,CAACD,MAAM,GACZ,CACD,CACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/Documents/resources/List.min.js.map b/public_html/layouts/basic/modules/Documents/resources/List.min.js.map index 3cb3772b69a5..1bfa7e89d9a8 100644 --- a/public_html/layouts/basic/modules/Documents/resources/List.min.js.map +++ b/public_html/layouts/basic/modules/Documents/resources/List.min.js.map @@ -1 +1 @@ -{"version":3,"file":"List.min.js","sources":["List.js"],"sourcesContent":["/*+***********************************************************************************\n * The contents of this file are subject to the vtiger CRM Public License Version 1.0\n * (\"License\"); You may not use this file except in compliance with the License\n * The Original Code is: vtiger CRM Open Source\n * The Initial Developer of the Original Code is vtiger.\n * Portions created by vtiger are Copyright (C) vtiger.\n * All Rights Reserved.\n *************************************************************************************/\n'use strict';\n\nVtiger_List_Js(\n\t'Documents_List_Js',\n\t{\n\t\tmassMove: function (url) {\n\t\t\tvar listInstance = Vtiger_List_Js.getInstance();\n\t\t\tvar validationResult = listInstance.checkListRecordSelected();\n\t\t\tif (validationResult != true) {\n\t\t\t\tvar selectedIds = listInstance.readSelectedIds(true);\n\t\t\t\tvar excludedIds = listInstance.readExcludedIds(true);\n\t\t\t\tvar cvId = listInstance.getCurrentCvId();\n\t\t\t\tvar postData = {\n\t\t\t\t\tselected_ids: selectedIds,\n\t\t\t\t\texcluded_ids: excludedIds,\n\t\t\t\t\tviewname: cvId\n\t\t\t\t};\n\n\t\t\t\tvar searchValue = listInstance.getAlphabetSearchValue();\n\n\t\t\t\tif (searchValue.length > 0) {\n\t\t\t\t\tpostData['search_key'] = listInstance.getAlphabetSearchField();\n\t\t\t\t\tpostData['search_value'] = searchValue;\n\t\t\t\t\tpostData['operator'] = 's';\n\t\t\t\t}\n\n\t\t\t\tvar params = {\n\t\t\t\t\turl: url,\n\t\t\t\t\tdata: postData\n\t\t\t\t};\n\t\t\t\tvar progressIndicatorElement = jQuery.progressIndicator();\n\t\t\t\tAppConnector.request(params).done(function (data) {\n\t\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\t\tvar callBackFunction = function (data) {\n\t\t\t\t\t\tlistInstance.moveDocuments().done(function (data) {\n\t\t\t\t\t\t\tif (data) {\n\t\t\t\t\t\t\t\tvar result = data.result;\n\t\t\t\t\t\t\t\tif (result.success) {\n\t\t\t\t\t\t\t\t\tapp.hideModalWindow();\n\t\t\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\t\t\ttitle: app.vtranslate('JS_MOVE_DOCUMENTS'),\n\t\t\t\t\t\t\t\t\t\ttext: result.message,\n\t\t\t\t\t\t\t\t\t\tdelay: '2000',\n\t\t\t\t\t\t\t\t\t\ttype: 'success'\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\tvar urlParams = listInstance.getDefaultParams();\n\t\t\t\t\t\t\t\t\tlistInstance.getListViewRecords(urlParams);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\t\t\ttitle: app.vtranslate('JS_OPERATION_DENIED'),\n\t\t\t\t\t\t\t\t\t\ttext: result.message,\n\t\t\t\t\t\t\t\t\t\tdelay: '2000',\n\t\t\t\t\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t};\n\t\t\t\t\tapp.showModalWindow(data, callBackFunction);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tlistInstance.noRecordSelectedAlert();\n\t\t\t}\n\t\t}\n\t},\n\t{\n\t\tmoveDocuments: function () {\n\t\t\tvar aDeferred = jQuery.Deferred();\n\t\t\tjQuery('#moveDocuments').on('submit', function (e) {\n\t\t\t\tvar formData = jQuery(e.currentTarget).serializeFormData();\n\t\t\t\tAppConnector.request(formData)\n\t\t\t\t\t.done(function (data) {\n\t\t\t\t\t\taDeferred.resolve(data);\n\t\t\t\t\t})\n\t\t\t\t\t.fail(function (textStatus, errorThrown) {\n\t\t\t\t\t\taDeferred.reject(textStatus, errorThrown);\n\t\t\t\t\t});\n\t\t\t\te.preventDefault();\n\t\t\t});\n\t\t\treturn aDeferred.promise();\n\t\t},\n\t\tregisterDeleteFilterClickEvent: function () {\n\t\t\tconst self = this;\n\t\t\tlet listViewFilterBlock = this.getFilterBlock();\n\t\t\tif (listViewFilterBlock != false) {\n\t\t\t\t//used mouseup event to stop the propagation of customfilter select change event.\n\t\t\t\tlistViewFilterBlock.on('mouseup', '.js-filter-delete', function (event) {\n\t\t\t\t\t//to close the dropdown\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\tself.getFilterSelectElement().data('select2').close();\n\t\t\t\t\tlet liElement = jQuery(event.currentTarget).closest('.select2-results__option');\n\t\t\t\t\tlet message = app.vtranslate('JS_LBL_ARE_YOU_SURE_YOU_WANT_TO_DELETE');\n\t\t\t\t\tif (liElement.hasClass('folderOption')) {\n\t\t\t\t\t\tif (liElement.find('.js-filter-delete').hasClass('dull')) {\n\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\ttext: app.vtranslate('JS_FOLDER_IS_NOT_EMPTY'),\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\treturn;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tapp.showConfirmModal({\n\t\t\t\t\t\t\t\ttext: message,\n\t\t\t\t\t\t\t\tconfirmedCallback: () => {\n\t\t\t\t\t\t\t\t\tlet currentOptionElement = self.getSelectOptionFromChosenOption(liElement);\n\t\t\t\t\t\t\t\t\tAppConnector.request({\n\t\t\t\t\t\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\t\t\t\t\t\tmode: 'delete',\n\t\t\t\t\t\t\t\t\t\taction: 'Folder',\n\t\t\t\t\t\t\t\t\t\tfolderid: currentOptionElement.data('folderid')\n\t\t\t\t\t\t\t\t\t}).done(function (data) {\n\t\t\t\t\t\t\t\t\t\tif (data.success) {\n\t\t\t\t\t\t\t\t\t\t\tcurrentOptionElement.remove();\n\t\t\t\t\t\t\t\t\t\t\tself.getFilterSelectElement().trigger('change');\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tapp.showConfirmModal({\n\t\t\t\t\t\t\ttext: message,\n\t\t\t\t\t\t\tconfirmedCallback: () => {\n\t\t\t\t\t\t\t\tAppConnector.requestForm(self.getSelectOptionFromChosenOption(liElement).data('deleteurl'));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n);\n"],"names":["Vtiger_List_Js","massMove","url","listInstance","getInstance","validationResult","checkListRecordSelected","selectedIds","readSelectedIds","excludedIds","readExcludedIds","cvId","getCurrentCvId","postData","selected_ids","excluded_ids","viewname","searchValue","getAlphabetSearchValue","length","getAlphabetSearchField","jQuery","progressIndicator","AppConnector","request","data","done","progressIndicatorElement","mode","app","showModalWindow","moveDocuments","result","success","hideModalWindow","showNotify","title","vtranslate","text","message","delay","type","getDefaultParams","getListViewRecords","urlParams","noRecordSelectedAlert","Deferred","on","e","formData","currentTarget","serializeFormData","aDeferred","resolve","fail","textStatus","errorThrown","reject","preventDefault","promise","registerDeleteFilterClickEvent","listViewFilterBlock","getFilterBlock","event","stopPropagation","self","getFilterSelectElement","close","liElement","closest","hasClass","find","showConfirmModal","confirmedCallback","currentOptionElement","getSelectOptionFromChosenOption","module","getModuleName","action","folderid","remove","trigger","requestForm"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFACA,YAEAA,CAAAA,cAAc,CACb,mBADa,CAEb,CACCC,QAAQ,CAAE,SAAA,QAAA,CAAUC,GAAV,CAAe,CACpBC,IAAAA,YAAY,CAAGH,cAAc,CAACI,WAAf,EADK,CAEpBC,gBAAgB,CAAGF,YAAY,CAACG,uBAAb,EAFC,CAGxB,GAAI,IAAAD,gBAAJ,CAA8B,CACzBE,IAAAA,WAAW,CAAGJ,YAAY,CAACK,eAAb,CAAA,CAAA,CAAA,CADW,CAEzBC,WAAW,CAAGN,YAAY,CAACO,eAAb,CAAA,CAAA,CAAA,CAFW,CAGzBC,IAAI,CAAGR,YAAY,CAACS,cAAb,EAHkB,CAIzBC,QAAQ,CAAG,CACdC,YAAY,CAAEP,WADA,CAEdQ,YAAY,CAAEN,WAFA,CAGdO,QAAQ,CAAEL,IAHI,CAJc,CAUzBM,WAAW,CAAGd,YAAY,CAACe,sBAAb,EAVW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3,"file":"List.min.js","sources":["List.js"],"sourcesContent":["/*+***********************************************************************************\n * The contents of this file are subject to the vtiger CRM Public License Version 1.0\n * (\"License\"); You may not use this file except in compliance with the License\n * The Original Code is: vtiger CRM Open Source\n * The Initial Developer of the Original Code is vtiger.\n * Portions created by vtiger are Copyright (C) vtiger.\n * All Rights Reserved.\n *************************************************************************************/\n'use strict';\n\nVtiger_List_Js(\n\t'Documents_List_Js',\n\t{\n\t\tmassMove: function (url) {\n\t\t\tvar listInstance = Vtiger_List_Js.getInstance();\n\t\t\tvar validationResult = listInstance.checkListRecordSelected();\n\t\t\tif (validationResult != true) {\n\t\t\t\tvar selectedIds = listInstance.readSelectedIds(true);\n\t\t\t\tvar excludedIds = listInstance.readExcludedIds(true);\n\t\t\t\tvar cvId = listInstance.getCurrentCvId();\n\t\t\t\tvar postData = {\n\t\t\t\t\tselected_ids: selectedIds,\n\t\t\t\t\texcluded_ids: excludedIds,\n\t\t\t\t\tviewname: cvId\n\t\t\t\t};\n\n\t\t\t\tvar searchValue = listInstance.getAlphabetSearchValue();\n\n\t\t\t\tif (searchValue.length > 0) {\n\t\t\t\t\tpostData['search_key'] = listInstance.getAlphabetSearchField();\n\t\t\t\t\tpostData['search_value'] = searchValue;\n\t\t\t\t\tpostData['operator'] = 's';\n\t\t\t\t}\n\n\t\t\t\tvar params = {\n\t\t\t\t\turl: url,\n\t\t\t\t\tdata: postData\n\t\t\t\t};\n\t\t\t\tvar progressIndicatorElement = jQuery.progressIndicator();\n\t\t\t\tAppConnector.request(params).done(function (data) {\n\t\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\t\tvar callBackFunction = function (data) {\n\t\t\t\t\t\tlistInstance.moveDocuments().done(function (data) {\n\t\t\t\t\t\t\tif (data) {\n\t\t\t\t\t\t\t\tvar result = data.result;\n\t\t\t\t\t\t\t\tif (result.success) {\n\t\t\t\t\t\t\t\t\tapp.hideModalWindow();\n\t\t\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\t\t\ttitle: app.vtranslate('JS_MOVE_DOCUMENTS'),\n\t\t\t\t\t\t\t\t\t\ttext: result.message,\n\t\t\t\t\t\t\t\t\t\tdelay: '2000',\n\t\t\t\t\t\t\t\t\t\ttype: 'success'\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\tvar urlParams = listInstance.getDefaultParams();\n\t\t\t\t\t\t\t\t\tlistInstance.getListViewRecords(urlParams);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\t\t\ttitle: app.vtranslate('JS_OPERATION_DENIED'),\n\t\t\t\t\t\t\t\t\t\ttext: result.message,\n\t\t\t\t\t\t\t\t\t\tdelay: '2000',\n\t\t\t\t\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t};\n\t\t\t\t\tapp.showModalWindow(data, callBackFunction);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tlistInstance.noRecordSelectedAlert();\n\t\t\t}\n\t\t}\n\t},\n\t{\n\t\tmoveDocuments: function () {\n\t\t\tvar aDeferred = jQuery.Deferred();\n\t\t\tjQuery('#moveDocuments').on('submit', function (e) {\n\t\t\t\tvar formData = jQuery(e.currentTarget).serializeFormData();\n\t\t\t\tAppConnector.request(formData)\n\t\t\t\t\t.done(function (data) {\n\t\t\t\t\t\taDeferred.resolve(data);\n\t\t\t\t\t})\n\t\t\t\t\t.fail(function (textStatus, errorThrown) {\n\t\t\t\t\t\taDeferred.reject(textStatus, errorThrown);\n\t\t\t\t\t});\n\t\t\t\te.preventDefault();\n\t\t\t});\n\t\t\treturn aDeferred.promise();\n\t\t},\n\t\tregisterDeleteFilterClickEvent: function () {\n\t\t\tconst self = this;\n\t\t\tlet listViewFilterBlock = this.getFilterBlock();\n\t\t\tif (listViewFilterBlock != false) {\n\t\t\t\t//used mouseup event to stop the propagation of customfilter select change event.\n\t\t\t\tlistViewFilterBlock.on('mouseup', '.js-filter-delete', function (event) {\n\t\t\t\t\t//to close the dropdown\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\tself.getFilterSelectElement().data('select2').close();\n\t\t\t\t\tlet liElement = jQuery(event.currentTarget).closest('.select2-results__option');\n\t\t\t\t\tlet message = app.vtranslate('JS_LBL_ARE_YOU_SURE_YOU_WANT_TO_DELETE');\n\t\t\t\t\tif (liElement.hasClass('folderOption')) {\n\t\t\t\t\t\tif (liElement.find('.js-filter-delete').hasClass('dull')) {\n\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\ttext: app.vtranslate('JS_FOLDER_IS_NOT_EMPTY'),\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\treturn;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tapp.showConfirmModal({\n\t\t\t\t\t\t\t\ttext: message,\n\t\t\t\t\t\t\t\tconfirmedCallback: () => {\n\t\t\t\t\t\t\t\t\tlet currentOptionElement = self.getSelectOptionFromChosenOption(liElement);\n\t\t\t\t\t\t\t\t\tAppConnector.request({\n\t\t\t\t\t\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\t\t\t\t\t\tmode: 'delete',\n\t\t\t\t\t\t\t\t\t\taction: 'Folder',\n\t\t\t\t\t\t\t\t\t\tfolderid: currentOptionElement.data('folderid')\n\t\t\t\t\t\t\t\t\t}).done(function (data) {\n\t\t\t\t\t\t\t\t\t\tif (data.success) {\n\t\t\t\t\t\t\t\t\t\t\tcurrentOptionElement.remove();\n\t\t\t\t\t\t\t\t\t\t\tself.getFilterSelectElement().trigger('change');\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tapp.showConfirmModal({\n\t\t\t\t\t\t\ttext: message,\n\t\t\t\t\t\t\tconfirmedCallback: () => {\n\t\t\t\t\t\t\t\tAppConnector.requestForm(self.getSelectOptionFromChosenOption(liElement).data('deleteurl'));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n);\n"],"names":["Vtiger_List_Js","massMove","url","listInstance","getInstance","validationResult","checkListRecordSelected","selectedIds","readSelectedIds","excludedIds","readExcludedIds","cvId","getCurrentCvId","postData","selected_ids","excluded_ids","viewname","searchValue","getAlphabetSearchValue","length","search_key","getAlphabetSearchField","search_value","operator","progressIndicatorElement","jQuery","progressIndicator","AppConnector","request","data","done","mode","app","showModalWindow","callBackFunction","moveDocuments","result","success","hideModalWindow","showNotify","title","vtranslate","text","message","delay","type","urlParams","getDefaultParams","getListViewRecords","noRecordSelectedAlert","aDeferred","Deferred","on","e","formData","currentTarget","serializeFormData","resolve","fail","textStatus","errorThrown","reject","preventDefault","promise","registerDeleteFilterClickEvent","self","listViewFilterBlock","getFilterBlock","event","stopPropagation","getFilterSelectElement","close","liElement","closest","hasClass","find","showConfirmModal","confirmedCallback","currentOptionElement","getSelectOptionFromChosenOption","module","getModuleName","action","folderid","remove","trigger","requestForm"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFACA,YAAY,CAEZA,cAAc,CACb,mBAAmB,CACnB,CACCC,QAAQ,CAAE,SAAAA,SAAUC,GAAG,CAAE,CACpB,IAAAC,YAAY,CAAGH,cAAc,CAACI,WAAW,EAAE,CAC3CC,gBAAgB,CAAGF,YAAY,CAACG,uBAAuB,EAAE,CAC7D,GAAI,CAAA,CAAA,EAAAD,gBAAwB,CAAE,CAAA,IACzBE,WAAW,CAAGJ,YAAY,CAACK,eAAe,CAAK,CAAA,CAAA,CAAC,CAChDC,WAAW,CAAGN,YAAY,CAACO,eAAe,CAAA,CAAA,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AACP,SAAS,CAAC,CAAC3C,IAAI,CAAC,WAAW,CAAC,EAC3F,CACD,CAAC,EAEH,CAAC,EAEH,CACD,CACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/Documents/resources/MassAddDocuments.min.js b/public_html/layouts/basic/modules/Documents/resources/MassAddDocuments.min.js index e8a2a328e9b4..15f6bb303281 100644 --- a/public_html/layouts/basic/modules/Documents/resources/MassAddDocuments.min.js +++ b/public_html/layouts/basic/modules/Documents/resources/MassAddDocuments.min.js @@ -1,9 +1,9 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */"use strict";/** +/* {[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]} */"use strict";/** * Class Documents_MassAddDocuments_Js. * @type {window.Documents_MassAddDocuments_Js} - */function _createForOfIteratorHelper(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&"number"==typeof o.length){it&&(o=it);var i=0,F=function(){};return {s:F,n:function n(){return i>=o.length?{done:!0}:{done:!1,value:o[i++]}},e:function e(_e){throw _e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var err,normalCompletion=!0,didErr=!1;return {s:function s(){it=it.call(o);},n:function n(){var step=it.next();return normalCompletion=step.done,step},e:function e(_e2){didErr=!0,err=_e2;},f:function f(){try{normalCompletion||null==it.return||it.return();}finally{if(didErr)throw err}}}}function _unsupportedIterableToArray(o,minLen){if(o){if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);return "Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n?Array.from(o):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(o,minLen):void 0}}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=o.length?{done:!0}:{done:!1,value:o[i++]}},e:function e(_e){throw _e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var err,normalCompletion=!0,didErr=!1;return {s:function s(){it=it.call(o);},n:function n(){var step=it.next();return normalCompletion=step.done,step},e:function e(_e2){didErr=!0,err=_e2;},f:function f(){try{normalCompletion||null==it.return||it.return();}finally{if(didErr)throw err}}}}function _unsupportedIterableToArray(o,minLen){if(o){if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);return "Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n?Array.from(o):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(o,minLen):void 0}}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i {\n\t\t\te.preventDefault();\n\t\t\tthis.submit();\n\t\t});\n\t}\n\t/**\n\t * Submit\n\t */\n\tsubmit() {\n\t\tlet moduleName = app.getModuleName(),\n\t\t\trecordId = app.getRecordId();\n\t\tif (this.modal.find('[name=\"sourceModule\"]').length > 0) {\n\t\t\tmoduleName = this.modal.find('[name=\"sourceModule\"]').val();\n\t\t}\n\t\tif (this.modal.find('[name=\"sourceRecord\"]').length > 0) {\n\t\t\trecordId = this.modal.find('[name=\"sourceRecord\"]').val();\n\t\t}\n\t\tapp.removeEmptyFilesInput(this.form[0]);\n\t\tlet formData = new FormData(this.form[0]);\n\t\tif (this.button.data('view') === 'Detail') {\n\t\t\tformData.append('createmode', 'link');\n\t\t\tformData.append('return_module', moduleName);\n\t\t\tformData.append('return_id', recordId);\n\t\t}\n\t\tconst progressIndicatorElement = $.progressIndicator({\n\t\t\tblockInfo: { enabled: true }\n\t\t});\n\t\tAppConnector.request({\n\t\t\turl: 'index.php',\n\t\t\ttype: 'POST',\n\t\t\tdata: formData,\n\t\t\tprocessData: false,\n\t\t\tcontentType: false\n\t\t}).done((response) => {\n\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\tapp.hideModalWindow(null, this.modal.parent().attr('id'));\n\t\t\tswitch (this.button.data('view')) {\n\t\t\t\tcase 'Detail':\n\t\t\t\t\tconst detailView = Vtiger_Detail_Js.getInstance(),\n\t\t\t\t\t\tselectedTabElement = detailView.getSelectedTab();\n\t\t\t\t\tif (selectedTabElement.data('reference') === 'Documents') {\n\t\t\t\t\t\tdetailView.reloadTabContent();\n\t\t\t\t\t} else if (detailView.getContentHolder().find('.detailViewBlockLink').data('reference') === 'Documents') {\n\t\t\t\t\t\tVtiger_RelatedList_Js.getInstance(\n\t\t\t\t\t\t\tdetailView.getRecordId(),\n\t\t\t\t\t\t\tapp.getModuleName(),\n\t\t\t\t\t\t\tselectedTabElement,\n\t\t\t\t\t\t\t'Documents'\n\t\t\t\t\t\t).loadRelatedList();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst updatesWidget = this.button.closest('.widgetContentBlock');\n\t\t\t\t\t\tif (updatesWidget.length > 0) {\n\t\t\t\t\t\t\tdetailView.loadWidget(updatesWidget, detailView.getFiltersData(updatesWidget)['params']);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'List':\n\t\t\t\t\tconst listInstance = Vtiger_List_Js.getInstance();\n\t\t\t\t\tlistInstance.getListViewRecords().done(function () {\n\t\t\t\t\t\tlistInstance.calculatePages().done(function () {\n\t\t\t\t\t\t\tlistInstance.updatePagination();\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Edit':\n\t\t\t\t\tif (response['result']) {\n\t\t\t\t\t\tconst fieldBlock = this.button.closest('.js-field-block-column'),\n\t\t\t\t\t\t\tfield = fieldBlock.find('[name=\"' + fieldBlock.data('field') + '[]\"]');\n\t\t\t\t\t\tApp.Fields.Utils.setValue(field, response['result'], { extend: true }, false);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t * Register events.\n\t * @param {jQuery} modal\n\t * @param {jQuery.Event} e\n\t */\n\tregisterEvents(modal, e) {\n\t\tthis.modal = modal;\n\t\tthis.form = modal.find('form');\n\t\tthis.button = $(e.currentTarget);\n\t\tthis.registerSubmit();\n\t}\n};\n"],"names":["window","Documents_MassAddDocuments_Js","uploadButton","modal","find","template","uploadContainer","on","remove","files","file","append","html","val","name","form","e","preventDefault","submit","moduleName","app","getModuleName","recordId","getRecordId","length","removeEmptyFilesInput","formData","FormData","button","data","progressIndicatorElement","$","progressIndicator","blockInfo","enabled","AppConnector","request","url","type","processData","contentType","done","response","mode","hideModalWindow","parent","attr","detailView","Vtiger_Detail_Js","getInstance","selectedTabElement","getSelectedTab","reloadTabContent","getContentHolder","Vtiger_RelatedList_Js","loadRelatedList","updatesWidget","closest","loadWidget","getFiltersData","Vtiger_List_Js","listInstance","getListViewRecords","calculatePages","updatePagination","field","fieldBlock","App","Fields","Utils","setValue","extend","currentTarget","registerSubmit","self","registerEvents"],"mappings":";;AAAA,kKACA,YAEA,CAAA;AACA;AACA;AACA,u+DACAA,MAAM,CAACC,6BAAP,cAAA,UAAA,CAAA,SAAA,6BAAA,EAAA,CAAA,eAAA,CAAA,IAAA,CAAA,6BAAA,EAAA,CAAA,OAAA,YAAA,CAAA,6BAAA,CAAA,CAAA,CAAA,GAAA,CAAA,gBAAA,CAAA,KAAA,CAUC,SAAiB,cAAA,EAAA,CAAA,IAAA,KAAA,CAAA,IAAA,CACVC,YAAY,CAAG,IAAKC,CAAAA,KAAL,CAAWC,IAAX,CAAgB,gBAAhB,CADL,CAEfC,QAAQ,CAAG,IAAA,CAAKF,KAAL,CAAWC,IAAX,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B,CAAG,MAAI,CAACd,MAAL,CAAY6B,OAAZ,CAAoB,wBAApB,CAAnB,CACCQ,KAAK,CAAGC,UAAU,CAAC9D,IAAX,CAAgB,UAAY8D,CAAAA,UAAU,CAACrC,IAAX,CAAgB,OAAhB,CAAZ,CAAuC,OAAvD,CADT,CAEAsC,GAAG,CAACC,MAAJ,CAAWC,KAAX,CAAiBC,QAAjB,CAA0BL,KAA1B,CAAiCvB,QAAQ,OAAzC,CAAqD,CAAE6B,MAAM,CAAR,CAAA,CAAA,CAArD,KACA,CAjCH,CAoCA,CA7CD,EA8CA,CACD;AACD;AACA;AACA;AACA,kCACC,SAAepE,cAAAA,CAAAA,KAAf,CAAsBa,CAAtB,CAAyB,CACxB,IAAA,CAAKb,KAAL,CAAaA,KADW,CAExB,IAAA,CAAKY,IAAL,CAAYZ,KAAK,CAACC,IAAN,CAAW,MAAX,CAFY,CAGxB,IAAA,CAAKwB,MAAL,CAAcG,CAAC,CAACf,CAAC,CAACwD,aAAH,CAHS,CAIxB,IAAA,CAAKC,cAAL,GACA,CA1GF,CACC,CAAA,CAAA,CAAA,CAAA,GAAA,CAAA,UAAA,CAAA,KAAA;AACD;AACA;AACA;AACA,IACC,SAAA,QAAA,CAAgBtE,KAAhB,CAAuBa,CAAvB,CAA0B,CACzB,IAAM0D,IAAI,CAAG,IAAU,MAAA,CAAC,KAAK5D,IAAN,CAAvB,CACA4D,IAAI,CAACC,cAAL,CAAoBxE,KAApB,CAA2Ba,CAA3B,EACA,CATF;;"} \ No newline at end of file +{"version":3,"file":"MassAddDocuments.min.js","sources":["MassAddDocuments.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/**\n * Class Documents_MassAddDocuments_Js.\n * @type {window.Documents_MassAddDocuments_Js}\n */\nwindow.Documents_MassAddDocuments_Js = class Documents_MassAddDocuments_Js {\n\t/**\n\t * Create a class object\n\t * @param {jQuery} modal\n\t * @param {jQuery.Event} e\n\t */\n\tstatic register(modal, e) {\n\t\tconst self = new window[this.name]();\n\t\tself.registerEvents(modal, e);\n\t}\n\tregisterSubmit() {\n\t\tconst uploadButton = this.modal.find('#filesToUpload'),\n\t\t\ttemplate = this.modal.find('.fileContainer'),\n\t\t\tuploadContainer = this.modal.find('.uploadFileContainer');\n\t\tuploadButton.on('change', function () {\n\t\t\tuploadContainer.find('.fileItem').remove();\n\t\t\tlet files = uploadButton[0].files;\n\t\t\tfor (let file of files) {\n\t\t\t\tuploadContainer.append(template.html());\n\t\t\t\tuploadContainer.find('[name=\"nameFile[]\"]:last').val(file.name);\n\t\t\t}\n\t\t});\n\t\tthis.form.on('submit', (e) => {\n\t\t\te.preventDefault();\n\t\t\tthis.submit();\n\t\t});\n\t}\n\t/**\n\t * Submit\n\t */\n\tsubmit() {\n\t\tlet moduleName = app.getModuleName(),\n\t\t\trecordId = app.getRecordId();\n\t\tif (this.modal.find('[name=\"sourceModule\"]').length > 0) {\n\t\t\tmoduleName = this.modal.find('[name=\"sourceModule\"]').val();\n\t\t}\n\t\tif (this.modal.find('[name=\"sourceRecord\"]').length > 0) {\n\t\t\trecordId = this.modal.find('[name=\"sourceRecord\"]').val();\n\t\t}\n\t\tapp.removeEmptyFilesInput(this.form[0]);\n\t\tlet formData = new FormData(this.form[0]);\n\t\tif (this.button.data('view') === 'Detail') {\n\t\t\tformData.append('createmode', 'link');\n\t\t\tformData.append('return_module', moduleName);\n\t\t\tformData.append('return_id', recordId);\n\t\t}\n\t\tconst progressIndicatorElement = $.progressIndicator({\n\t\t\tblockInfo: { enabled: true }\n\t\t});\n\t\tAppConnector.request({\n\t\t\turl: 'index.php',\n\t\t\ttype: 'POST',\n\t\t\tdata: formData,\n\t\t\tprocessData: false,\n\t\t\tcontentType: false\n\t\t}).done((response) => {\n\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\tapp.hideModalWindow(null, this.modal.parent().attr('id'));\n\t\t\tswitch (this.button.data('view')) {\n\t\t\t\tcase 'Detail':\n\t\t\t\t\tconst detailView = Vtiger_Detail_Js.getInstance(),\n\t\t\t\t\t\tselectedTabElement = detailView.getSelectedTab();\n\t\t\t\t\tif (selectedTabElement.data('reference') === 'Documents') {\n\t\t\t\t\t\tdetailView.reloadTabContent();\n\t\t\t\t\t} else if (detailView.getContentHolder().find('.detailViewBlockLink').data('reference') === 'Documents') {\n\t\t\t\t\t\tVtiger_RelatedList_Js.getInstance(\n\t\t\t\t\t\t\tdetailView.getRecordId(),\n\t\t\t\t\t\t\tapp.getModuleName(),\n\t\t\t\t\t\t\tselectedTabElement,\n\t\t\t\t\t\t\t'Documents'\n\t\t\t\t\t\t).loadRelatedList();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst updatesWidget = this.button.closest('.widgetContentBlock');\n\t\t\t\t\t\tif (updatesWidget.length > 0) {\n\t\t\t\t\t\t\tdetailView.loadWidget(updatesWidget, detailView.getFiltersData(updatesWidget)['params']);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'List':\n\t\t\t\t\tconst listInstance = Vtiger_List_Js.getInstance();\n\t\t\t\t\tlistInstance.getListViewRecords().done(function () {\n\t\t\t\t\t\tlistInstance.calculatePages().done(function () {\n\t\t\t\t\t\t\tlistInstance.updatePagination();\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Edit':\n\t\t\t\t\tif (response['result']) {\n\t\t\t\t\t\tconst fieldBlock = this.button.closest('.js-field-block-column'),\n\t\t\t\t\t\t\tfield = fieldBlock.find('[name=\"' + fieldBlock.data('field') + '[]\"]');\n\t\t\t\t\t\tApp.Fields.Utils.setValue(field, response['result'], { extend: true }, false);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t * Register events.\n\t * @param {jQuery} modal\n\t * @param {jQuery.Event} e\n\t */\n\tregisterEvents(modal, e) {\n\t\tthis.modal = modal;\n\t\tthis.form = modal.find('form');\n\t\tthis.button = $(e.currentTarget);\n\t\tthis.registerSubmit();\n\t}\n};\n"],"names":["_typeof","o","Symbol","iterator","constructor","prototype","_createForOfIteratorHelper","allowArrayLike","it","Array","isArray","_unsupportedIterableToArray","length","i","F","s","n","done","value","e","_e","f","TypeError","err","normalCompletion","didErr","call","step","next","_e2","return","minLen","_arrayLikeToArray","Object","toString","slice","name","from","test","arr","len","arr2","_classCallCheck","instance","Constructor","_defineProperties","target","props","descriptor","enumerable","configurable","writable","defineProperty","_toPropertyKey","key","_createClass","protoProps","staticProps","arg","_toPrimitive","String","input","hint","prim","toPrimitive","res","Number","window","Documents_MassAddDocuments_Js","registerSubmit","_this","uploadButton","modal","find","template","uploadContainer","on","remove","_step","files","_iterator","file","append","html","val","form","preventDefault","submit","_this2","moduleName","app","getModuleName","recordId","getRecordId","removeEmptyFilesInput","formData","FormData","button","data","progressIndicatorElement","$","progressIndicator","blockInfo","enabled","AppConnector","request","url","type","processData","contentType","response","mode","hideModalWindow","parent","attr","detailView","Vtiger_Detail_Js","getInstance","selectedTabElement","getSelectedTab","reloadTabContent","getContentHolder","Vtiger_RelatedList_Js","loadRelatedList","updatesWidget","closest","loadWidget","getFiltersData","params","listInstance","Vtiger_List_Js","getListViewRecords","calculatePages","updatePagination","result","fieldBlock","field","App","Fields","Utils","setValue","extend","registerEvents","currentTarget","register","self"],"mappings":";;AAAA,kKACA,YAAY,CAEZ;AACA;AACA;AACA,GAHA,SAAAA,OAAAC,CAAAA,CAAA,CAAAD,CAAAA,yBAAAA,CAAAA,OAAAA,OAAA,oBAAAE,MAAA,EAAA,QAAA,EAAA,OAAAA,MAAA,CAAAC,QAAA,CAAAF,SAAAA,CAAA,CAAAA,CAAAA,OAAAA,OAAAA,CAAA,WAAAA,CAAA,CAAA,CAAA,OAAAA,CAAA,EAAA,UAAA,EAAA,OAAAC,MAAA,EAAAD,CAAA,CAAAG,WAAA,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A4H,cAAAA,CAAetE,KAAK,CAAErD,CAAC,CAAE,CACxB,IAAI,CAACqD,KAAK,CAAGA,KAAK,CAClB,IAAI,CAACa,IAAI,CAAGb,KAAK,CAACC,IAAI,CAAC,MAAM,CAAC,CAC9B,IAAI,CAACwB,MAAM,CAAGG,CAAC,CAACjF,CAAC,CAAC4H,aAAa,CAAC,CAChC,IAAI,CAAC1E,cAAc,GACpB,CAAC,CAAAf,CAAAA,CAAAA,CAAAA,CAAAA,GAAA,CAAApC,UAAAA,CAAAA,KAAA;AAxGF;AACA;AACA;AACA,IACC,SAAA8H,QAAAA,CAAgBxE,KAAK,CAAErD,CAAC,CAAE,CACzB,IAAM8H,IAAI,CAAG,IAAI9E,MAAM,CAAC,IAAI,CAAC/B,IAAI,CAAG,CACpC6G,IAAI,CAACH,cAAc,CAACtE,KAAK,CAAErD,CAAC,EAC7B,CAAC,CAAA,CAAA,CAAA,CAAAiD,6BAAA,CAkGD,EAAA;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/EmailTemplates/resources/Edit.min.js b/public_html/layouts/basic/modules/EmailTemplates/resources/Edit.min.js index ad0662390078..bca008c8e696 100644 --- a/public_html/layouts/basic/modules/EmailTemplates/resources/Edit.min.js +++ b/public_html/layouts/basic/modules/EmailTemplates/resources/Edit.min.js @@ -1,4 +1,4 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */"use strict";Vtiger_Edit_Js("EmailTemplates_Edit_Js",{},{loadVariablePanel:function loadVariablePanel(form){var thisInstance=this;"undefined"==typeof form&&(form=this.getForm());var panel=form.find("#variablePanel");panel.progressIndicator(),AppConnector.request({module:"EmailTemplates",record:app.getRecordId(),view:"VariablePanel",type:"mail",selectedModule:form.find("[name=\"module_name\"]").val()}).done(function(response){panel.html(response),thisInstance.afterLoadVariablePanel(panel),App.Tools.VariablesPanel.registerRefreshCompanyVariables(panel);}).fail(function(){panel.progressIndicator({mode:"hide"});});},afterLoadVariablePanel:function afterLoadVariablePanel(html){App.Fields.Picklist.showSelect2ElementView(html.find("select.select2")),App.Fields.Text.registerCopyClipboard(html);},registerVariablePanelEvent:function registerVariablePanelEvent(form){var thisInstance=this;"undefined"==typeof form&&(form=this.getForm()),form.find(".js-toggle-panel[data-label=\"LBL_CONTENT_MAIL\"] .blockContent").prepend("
    "),thisInstance.loadVariablePanel(form),form.find("[name=\"module_name\"]").on("change",function(){thisInstance.loadVariablePanel(form);});},registerBasicEvents:function registerBasicEvents(container){this._super(container),this.registerVariablePanelEvent(container),App.Tools.VariablesPanel.registerRefreshCompanyVariables(container),App.Tools.VariablesPanel.refreshCompanyVariables(container);}}); +/* {[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]} */"use strict";Vtiger_Edit_Js("EmailTemplates_Edit_Js",{},{loadVariablePanel:function loadVariablePanel(form){var thisInstance=this;"undefined"==typeof form&&(form=this.getForm());var panel=form.find("#variablePanel");panel.progressIndicator(),AppConnector.request({module:"EmailTemplates",record:app.getRecordId(),view:"VariablePanel",type:"mail",selectedModule:form.find("[name=\"module_name\"]").val()}).done(function(response){panel.html(response),thisInstance.afterLoadVariablePanel(panel),App.Tools.VariablesPanel.registerRefreshCompanyVariables(panel);}).fail(function(){panel.progressIndicator({mode:"hide"});});},afterLoadVariablePanel:function afterLoadVariablePanel(html){App.Fields.Picklist.showSelect2ElementView(html.find("select.select2")),App.Fields.Text.registerCopyClipboard(html);},registerVariablePanelEvent:function registerVariablePanelEvent(form){var thisInstance=this;"undefined"==typeof form&&(form=this.getForm()),form.find(".js-toggle-panel[data-label=\"LBL_CONTENT_MAIL\"] .blockContent").prepend("
    "),thisInstance.loadVariablePanel(form),form.find("[name=\"module_name\"]").on("change",function(){thisInstance.loadVariablePanel(form);});},registerBasicEvents:function registerBasicEvents(container){this._super(container),this.registerVariablePanelEvent(container),App.Tools.VariablesPanel.registerRefreshCompanyVariables(container),App.Tools.VariablesPanel.refreshCompanyVariables(container);}}); //# sourceMappingURL=Edit.min.js.map diff --git a/public_html/layouts/basic/modules/EmailTemplates/resources/Edit.min.js.map b/public_html/layouts/basic/modules/EmailTemplates/resources/Edit.min.js.map index 4dc9d6bcee7d..e05ee364067e 100644 --- a/public_html/layouts/basic/modules/EmailTemplates/resources/Edit.min.js.map +++ b/public_html/layouts/basic/modules/EmailTemplates/resources/Edit.min.js.map @@ -1 +1 @@ -{"version":3,"file":"Edit.min.js","sources":["Edit.js"],"sourcesContent":["/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */\n'use strict';\n\nVtiger_Edit_Js(\n\t'EmailTemplates_Edit_Js',\n\t{},\n\t{\n\t\tloadVariablePanel: function (form) {\n\t\t\tvar thisInstance = this;\n\t\t\tif (typeof form === 'undefined') {\n\t\t\t\tform = this.getForm();\n\t\t\t}\n\t\t\tvar panel = form.find('#variablePanel');\n\t\t\tpanel.progressIndicator();\n\t\t\tAppConnector.request({\n\t\t\t\tmodule: 'EmailTemplates',\n\t\t\t\trecord: app.getRecordId(),\n\t\t\t\tview: 'VariablePanel',\n\t\t\t\ttype: 'mail',\n\t\t\t\tselectedModule: form.find('[name=\"module_name\"]').val()\n\t\t\t})\n\t\t\t\t.done(function (response) {\n\t\t\t\t\tpanel.html(response);\n\t\t\t\t\tthisInstance.afterLoadVariablePanel(panel);\n\t\t\t\t\tApp.Tools.VariablesPanel.registerRefreshCompanyVariables(panel);\n\t\t\t\t})\n\t\t\t\t.fail(function () {\n\t\t\t\t\tpanel.progressIndicator({ mode: 'hide' });\n\t\t\t\t});\n\t\t},\n\t\tafterLoadVariablePanel: function (html) {\n\t\t\tApp.Fields.Picklist.showSelect2ElementView(html.find('select.select2'));\n\t\t\tApp.Fields.Text.registerCopyClipboard(html);\n\t\t},\n\t\tregisterVariablePanelEvent: function (form) {\n\t\t\tvar thisInstance = this;\n\t\t\tif (typeof form === 'undefined') {\n\t\t\t\tform = this.getForm();\n\t\t\t}\n\t\t\tform\n\t\t\t\t.find('.js-toggle-panel[data-label=\"LBL_CONTENT_MAIL\"] .blockContent')\n\t\t\t\t.prepend('
    ');\n\t\t\tthisInstance.loadVariablePanel(form);\n\t\t\tform.find('[name=\"module_name\"]').on('change', function () {\n\t\t\t\tthisInstance.loadVariablePanel(form);\n\t\t\t});\n\t\t},\n\t\tregisterBasicEvents: function (container) {\n\t\t\tthis._super(container);\n\t\t\tthis.registerVariablePanelEvent(container);\n\t\t\tApp.Tools.VariablesPanel.registerRefreshCompanyVariables(container);\n\t\t\tApp.Tools.VariablesPanel.refreshCompanyVariables(container);\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Edit_Js","loadVariablePanel","form","thisInstance","getForm","panel","find","progressIndicator","AppConnector","request","module","record","app","getRecordId","view","type","selectedModule","val","done","response","html","afterLoadVariablePanel","App","Tools","VariablesPanel","registerRefreshCompanyVariables","fail","mode","Fields","Picklist","showSelect2ElementView","Text","registerCopyClipboard","registerVariablePanelEvent","prepend","on","registerBasicEvents","container","_super","refreshCompanyVariables"],"mappings":";;AAAA,kKACA,YAEAA,CAAAA,cAAc,CACb,wBADa,CAEb,EAFa,CAGb,CACCC,iBAAiB,CAAE,SAAUC,iBAAAA,CAAAA,IAAV,CAAgB,CAClC,IAAIC,YAAY,CAAG,IAAnB,CACoB,WAAhB,EAAOD,OAAAA,IAFuB,GAGjCA,IAAI,CAAG,IAAA,CAAKE,OAAL,EAH0B,EAKlC,IAAIC,KAAK,CAAGH,IAAI,CAACI,IAAL,CAAU,gBAAV,CAAZ,CACAD,KAAK,CAACE,iBAAN,EANkC,CAOlCC,YAAY,CAACC,OAAb,CAAqB,CACpBC,MAAM,CAAE,gBADY,CAEpBC,MAAM,CAAEC,GAAG,CAACC,WAAJ,EAFY,CAGpBC,IAAI,CAAE,eAHc,CAIpBC,IAAI,CAAE,MAJc,CAKpBC,cAAc,CAAEd,IAAI,CAACI,IAAL,CAAU,wBAAV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AAL,CAAgCI,SAAhC,CAFyC,CAGzCf,GAAG,CAACC,KAAJ,CAAUC,cAAV,CAAyBC,+BAAzB,CAAyDY,SAAzD,CAHyC,CAIzCf,GAAG,CAACC,KAAJ,CAAUC,cAAV,CAAyBe,uBAAzB,CAAiDF,SAAjD,EACA,CA9CF,CAHa;;"} \ No newline at end of file +{"version":3,"file":"Edit.min.js","sources":["Edit.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\nVtiger_Edit_Js(\n\t'EmailTemplates_Edit_Js',\n\t{},\n\t{\n\t\tloadVariablePanel: function (form) {\n\t\t\tvar thisInstance = this;\n\t\t\tif (typeof form === 'undefined') {\n\t\t\t\tform = this.getForm();\n\t\t\t}\n\t\t\tvar panel = form.find('#variablePanel');\n\t\t\tpanel.progressIndicator();\n\t\t\tAppConnector.request({\n\t\t\t\tmodule: 'EmailTemplates',\n\t\t\t\trecord: app.getRecordId(),\n\t\t\t\tview: 'VariablePanel',\n\t\t\t\ttype: 'mail',\n\t\t\t\tselectedModule: form.find('[name=\"module_name\"]').val()\n\t\t\t})\n\t\t\t\t.done(function (response) {\n\t\t\t\t\tpanel.html(response);\n\t\t\t\t\tthisInstance.afterLoadVariablePanel(panel);\n\t\t\t\t\tApp.Tools.VariablesPanel.registerRefreshCompanyVariables(panel);\n\t\t\t\t})\n\t\t\t\t.fail(function () {\n\t\t\t\t\tpanel.progressIndicator({ mode: 'hide' });\n\t\t\t\t});\n\t\t},\n\t\tafterLoadVariablePanel: function (html) {\n\t\t\tApp.Fields.Picklist.showSelect2ElementView(html.find('select.select2'));\n\t\t\tApp.Fields.Text.registerCopyClipboard(html);\n\t\t},\n\t\tregisterVariablePanelEvent: function (form) {\n\t\t\tvar thisInstance = this;\n\t\t\tif (typeof form === 'undefined') {\n\t\t\t\tform = this.getForm();\n\t\t\t}\n\t\t\tform\n\t\t\t\t.find('.js-toggle-panel[data-label=\"LBL_CONTENT_MAIL\"] .blockContent')\n\t\t\t\t.prepend('
    ');\n\t\t\tthisInstance.loadVariablePanel(form);\n\t\t\tform.find('[name=\"module_name\"]').on('change', function () {\n\t\t\t\tthisInstance.loadVariablePanel(form);\n\t\t\t});\n\t\t},\n\t\tregisterBasicEvents: function (container) {\n\t\t\tthis._super(container);\n\t\t\tthis.registerVariablePanelEvent(container);\n\t\t\tApp.Tools.VariablesPanel.registerRefreshCompanyVariables(container);\n\t\t\tApp.Tools.VariablesPanel.refreshCompanyVariables(container);\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Edit_Js","loadVariablePanel","form","thisInstance","getForm","panel","find","progressIndicator","AppConnector","request","module","record","app","getRecordId","view","type","selectedModule","val","done","response","html","afterLoadVariablePanel","App","Tools","VariablesPanel","registerRefreshCompanyVariables","fail","mode","Fields","Picklist","showSelect2ElementView","Text","registerCopyClipboard","registerVariablePanelEvent","prepend","on","registerBasicEvents","container","_super","refreshCompanyVariables"],"mappings":";;AAAA,kKACA,YAAY,CAEZA,cAAc,CACb,wBAAwB,CACxB,EAAE,CACF,CACCC,iBAAiB,CAAE,SAAAA,kBAAUC,IAAI,CAAE,CAClC,IAAIC,YAAY,CAAG,IAAI,CACH,WAAW,EAA3B,OAAOD,IAAoB,GAC9BA,IAAI,CAAG,IAAI,CAACE,OAAO,EAAE,CAAA,CAEtB,IAAIC,KAAK,CAAGH,IAAI,CAACI,IAAI,CAAC,gBAAgB,CAAC,CACvCD,KAAK,CAACE,iBAAiB,EAAE,CACzBC,YAAY,CAACC,OAAO,CAAC,CACpBC,MAAM,CAAE,gBAAgB,CACxBC,MAAM,CAAEC,GAAG,CAACC,WAAW,EAAE,CACzBC,IAAI,CAAE,eAAe,CACrBC,IAAI,CAAE,MAAM,CACZC,cAAc,CAAEd,IAAI,CAACI,IAAI,CAAC,wBAAsB,CAAC,CAACW,GAAG,EACtD,CAAC,CAAC,CACAC,IAAI,CAAC,SAAUC,QAAQ,CAAE,CACzBd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c,CAACe,uBAAuB,CAACF,SAAS,EAC3D,CACD,CACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/FCorectingInvoice/resources/Edit.min.js b/public_html/layouts/basic/modules/FCorectingInvoice/resources/Edit.min.js index 64e45ad3263a..211ab8e9e9e7 100644 --- a/public_html/layouts/basic/modules/FCorectingInvoice/resources/Edit.min.js +++ b/public_html/layouts/basic/modules/FCorectingInvoice/resources/Edit.min.js @@ -1,6 +1,6 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */Vtiger_Edit_Js("FCorectingInvoice_Edit_Js",{},{/** +/* {[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]} */Vtiger_Edit_Js("FCorectingInvoice_Edit_Js",{},{/** * Load correcting invoice data to before block * @param {int} recordId */loadInvoiceData:function loadInvoiceData(){var recordId=!!(0 {\n\t\t\t\t\t\tform.find('.js-before-inventory').html(response);\n\t\t\t\t\t\tprogressLoader.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t})\n\t\t\t\t\t.fail(() => {\n\t\t\t\t\t\tprogressLoader.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * register reference fields events\n\t\t */\n\t\tregisterReferenceFieldsEvents() {\n\t\t\tapp.event.on('EditView.SelectReference', (e, params) => {\n\t\t\t\tif (params.module === 'FInvoice') {\n\t\t\t\t\tthis.loadInvoiceData(params.record);\n\t\t\t\t}\n\t\t\t});\n\t\t\tconst form = this.getForm();\n\t\t\tapp.event.on('EditView.ClearField', (e, params) => {\n\t\t\t\tif (params.fieldName === 'finvoiceid') {\n\t\t\t\t\tconst invoiceidInput = form.find('[name=\"finvoiceid\"]');\n\t\t\t\t\tif (invoiceidInput.length) {\n\t\t\t\t\t\tform\n\t\t\t\t\t\t\t.find('.js-before-inventory')\n\t\t\t\t\t\t\t.html('
    ' + app.vtranslate('JS_FCORECTINGINVOICE_CHOOSE_INVOICE') + '
    ');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Action for copy from correcting invoice button - load data before positions to position in data after block\n\t\t */\n\t\tregisterCopyFromInvoice() {\n\t\t\tconst form = this.getForm();\n\t\t\tconst thisInstance = this;\n\t\t\tform.find('.js-copy-from-invoice').on('click', function (e) {\n\t\t\t\te.preventDefault();\n\t\t\t\te.stopPropagation();\n\t\t\t\tconst finvoiceidInput = form.find('input[name=\"finvoiceid\"]');\n\t\t\t\tif (!finvoiceidInput.length) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tconst finvoiceid = finvoiceidInput.val();\n\t\t\t\tif (!finvoiceid || finvoiceid == 0) {\n\t\t\t\t\treturn Vtiger_Helper_Js.showMessage({\n\t\t\t\t\t\ttype: 'error',\n\t\t\t\t\t\ttext: app.vtranslate('JS_FCORECTINGINVOICE_CHOOSE_INVOICE')\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tthisInstance.inventoryController.loadInventoryData(finvoiceid, 'FInvoice');\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * registerEvents override\n\t\t */\n\t\tregisterEvents() {\n\t\t\tthis._super();\n\t\t\tthis.registerCopyFromInvoice();\n\t\t\tthis.registerReferenceFieldsEvents();\n\t\t\tthis.loadInvoiceData();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Edit_Js","loadInvoiceData","recordId","parseInt","getForm","find","val","progressLoader","$","progressIndicator","blockInfo","enabled","AppConnector","request","module","record","mode","view","done","response","form","html","fail","registerReferenceFieldsEvents","app","event","on","e","params","fieldName","invoiceidInput","length","vtranslate","registerCopyFromInvoice","thisInstance","preventDefault","stopPropagation","finvoiceidInput","finvoiceid","inventoryController","loadInventoryData","Vtiger_Helper_Js","showMessage","type","text","registerEvents","_super"],"mappings":";;AAAA,kKAEAA,cAAc,CACb,2BADa,CAE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IAAI,CAAEpB,GAAG,CAACQ,UAAJ,CAAe,qCAAf,CAF6B,CAA7B,CAMR,CAfD,EAgBA,CAtEF;AAwED;AACA,KACEa,cA1ED,0BA0EkB,CAChB,IAAA,CAAKC,MAAL,EADgB,CAEhB,KAAKb,uBAAL,EAFgB,CAGhB,IAAKV,CAAAA,6BAAL,EAHgB,CAIhB,IAAA,CAAKtB,eAAL,GACA,CA/EF,CAHa;;"} \ No newline at end of file +{"version":3,"file":"Edit.min.js","sources":["Edit.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\nVtiger_Edit_Js(\n\t'FCorectingInvoice_Edit_Js',\n\t{},\n\t{\n\t\t/**\n\t\t * Load correcting invoice data to before block\n\t\t * @param {int} recordId\n\t\t */\n\t\tloadInvoiceData(recordId = false) {\n\t\t\tif (!recordId) {\n\t\t\t\trecordId = parseInt(this.getForm().find('input[name=\"finvoiceid\"]').val());\n\t\t\t}\n\t\t\tif (recordId && recordId != 0) {\n\t\t\t\tconst form = this.getForm();\n\t\t\t\tconst progressLoader = $.progressIndicator({ blockInfo: { enabled: true } });\n\t\t\t\tAppConnector.request({\n\t\t\t\t\tmodule: 'FInvoice',\n\t\t\t\t\trecord: recordId,\n\t\t\t\t\tmode: 'showInventoryDetails',\n\t\t\t\t\tview: 'Detail'\n\t\t\t\t})\n\t\t\t\t\t.done((response) => {\n\t\t\t\t\t\tform.find('.js-before-inventory').html(response);\n\t\t\t\t\t\tprogressLoader.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t})\n\t\t\t\t\t.fail(() => {\n\t\t\t\t\t\tprogressLoader.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * register reference fields events\n\t\t */\n\t\tregisterReferenceFieldsEvents() {\n\t\t\tapp.event.on('EditView.SelectReference', (e, params) => {\n\t\t\t\tif (params.module === 'FInvoice') {\n\t\t\t\t\tthis.loadInvoiceData(params.record);\n\t\t\t\t}\n\t\t\t});\n\t\t\tconst form = this.getForm();\n\t\t\tapp.event.on('EditView.ClearField', (e, params) => {\n\t\t\t\tif (params.fieldName === 'finvoiceid') {\n\t\t\t\t\tconst invoiceidInput = form.find('[name=\"finvoiceid\"]');\n\t\t\t\t\tif (invoiceidInput.length) {\n\t\t\t\t\t\tform\n\t\t\t\t\t\t\t.find('.js-before-inventory')\n\t\t\t\t\t\t\t.html('
    ' + app.vtranslate('JS_FCORECTINGINVOICE_CHOOSE_INVOICE') + '
    ');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Action for copy from correcting invoice button - load data before positions to position in data after block\n\t\t */\n\t\tregisterCopyFromInvoice() {\n\t\t\tconst form = this.getForm();\n\t\t\tconst thisInstance = this;\n\t\t\tform.find('.js-copy-from-invoice').on('click', function (e) {\n\t\t\t\te.preventDefault();\n\t\t\t\te.stopPropagation();\n\t\t\t\tconst finvoiceidInput = form.find('input[name=\"finvoiceid\"]');\n\t\t\t\tif (!finvoiceidInput.length) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tconst finvoiceid = finvoiceidInput.val();\n\t\t\t\tif (!finvoiceid || finvoiceid == 0) {\n\t\t\t\t\treturn Vtiger_Helper_Js.showMessage({\n\t\t\t\t\t\ttype: 'error',\n\t\t\t\t\t\ttext: app.vtranslate('JS_FCORECTINGINVOICE_CHOOSE_INVOICE')\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tthisInstance.inventoryController.loadInventoryData(finvoiceid, 'FInvoice');\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * registerEvents override\n\t\t */\n\t\tregisterEvents() {\n\t\t\tthis._super();\n\t\t\tthis.registerCopyFromInvoice();\n\t\t\tthis.registerReferenceFieldsEvents();\n\t\t\tthis.loadInvoiceData();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Edit_Js","loadInvoiceData","recordId","arguments","length","parseInt","getForm","find","val","form","progressLoader","$","progressIndicator","blockInfo","enabled","AppConnector","request","module","record","mode","view","done","response","html","fail","registerReferenceFieldsEvents","_this","app","event","on","e","params","fieldName","invoiceidInput","vtranslate","registerCopyFromInvoice","thisInstance","preventDefault","stopPropagation","finvoiceidInput","finvoiceid","inventoryController","loadInventoryData","Vtiger_Helper_Js","showMessage","type","text","registerEvents","_super"],"mappings":";;AAAA,kKAEAA,cAAc,CACb,2BAA2B,CAC3B,EAAE,CACF;AAED;AACA;AACA,KACEC,eAAe,CAAA,SAAAA,eAAA,EAAmB,KAAlBC,QAAQ,CAAAC,CAAAA,EAAAA,CAAAA,CAAAA,SAAA,CAAAC,MAAA,EAAAD,KAAAA,CAAAA,GAAAA,SAAA,MAAAA,SAAA,CAAA,CAAA,CAAA,CAIvB,GAHKD,QAAQ,GACZA,QAAQ,CAAGG,QAAQ,CAAC,IAAI,CAACC,OAAO,EAAE,CAACC,IAAI,CAAC,4BAA0B,CAAC,CAACC,GAAG,EAAE,CAAC,CAEvEN,CAAAA,QAAQ,EAAgB,CAAC,EAAbA,QAAa,CAAE,CACxB,IAAAO,IAAI,CAAG,IAAI,CAACH,OAAO,EAAE,CACrBI,cAAc,CAAGC,CAAC,CAACC,iBAAiB,CAAC,CAAEC,SAAS,CAAE,CAAEC,OAAO,CAAO,CAAA,CAAA,CAAE,CAAC,CAAC,CAC5EC,YAAY,CAACC,OAAO,CAAC,CACpBC,MAAM,CAAE,UAAU,CAClBC,MAAM,CAAEhB,QAAQ,CAChBiB,IAAI,CAAE,sBAAsB,CAC5BC,IAAI,CAAE,QACP,CAAC,CAAC,CACAC,IAAI,CAAC,SAACC,QAAQ,CAAK,CACnBb,IAAI,CAACF,IAAI,CAAC,sBAAsB,CAAC,CAACgB,IAAI,CAACD,QAAQ,CAAC,CAChDZ,cAAc,CAACE,iBAAiB,CAAC,CAAEO,IAAI,CAAE,MAAO,CAAC,EAClD,CAAC,CAAC,CACDK,IAAI,CAAC,U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MAAM,CAC1B,OAED,CAAA,CAAA,CAAA,IAAMoC,UAAU,CAAGD,eAAe,CAAC/B,GAAG,EAAE,CAAC,OACpCgC,UAAU,EAAkB,CAAC,EAAfA,UAAe,CAAA,KAMlCJ,YAAY,CAACK,mBAAmB,CAACC,iBAAiB,CAACF,UAAU,CAAE,UAAU,CAAC,CALlEG,gBAAgB,CAACC,WAAW,CAAC,CACnCC,IAAI,CAAE,OAAO,CACbC,IAAI,CAAEnB,GAAG,CAACO,UAAU,CAAC,qCAAqC,CAC3D,CAAC,CAGH,CAAC,EACF,CAAC;AAEH;AACA,KACEa,cAAc,CAAA,SAAAA,cAAA,EAAG,CAChB,IAAI,CAACC,MAAM,EAAE,CACb,IAAI,CAACb,uBAAuB,EAAE,CAC9B,IAAI,CAACV,6BAA6B,EAAE,CACpC,IAAI,CAACxB,eAAe,GACrB,CACD,CACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/Faq/resources/Detail.min.js b/public_html/layouts/basic/modules/Faq/resources/Detail.min.js index 4e67b5b3d2e7..88019d4219af 100644 --- a/public_html/layouts/basic/modules/Faq/resources/Detail.min.js +++ b/public_html/layouts/basic/modules/Faq/resources/Detail.min.js @@ -1,4 +1,4 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */"use strict";Vtiger_Detail_Js("Faq_Detail_Js",{},{registerShowArticlePreview:function registerShowArticlePreview(){$(".js-show-article-preview").on("click",function(e){ArticlePreviewVueComponent.mount({el:"#ArticlePreview",state:{moduleName:$(e.currentTarget).data("moduleName"),recordId:$(e.currentTarget).data("id")}});});},registerEvents:function registerEvents(){this._super(),this.registerShowArticlePreview();}}); +/* {[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]} */"use strict";Vtiger_Detail_Js("Faq_Detail_Js",{},{registerShowArticlePreview:function registerShowArticlePreview(){$(".js-show-article-preview").on("click",function(e){ArticlePreviewVueComponent.mount({el:"#ArticlePreview",state:{moduleName:$(e.currentTarget).data("moduleName"),recordId:$(e.currentTarget).data("id")}});});},registerEvents:function registerEvents(){this._super(),this.registerShowArticlePreview();}}); //# sourceMappingURL=Detail.min.js.map diff --git a/public_html/layouts/basic/modules/Faq/resources/Detail.min.js.map b/public_html/layouts/basic/modules/Faq/resources/Detail.min.js.map index 01f4b08ba8bc..53d1c767c977 100644 --- a/public_html/layouts/basic/modules/Faq/resources/Detail.min.js.map +++ b/public_html/layouts/basic/modules/Faq/resources/Detail.min.js.map @@ -1 +1 @@ -{"version":3,"file":"Detail.min.js","sources":["Detail.js"],"sourcesContent":["/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */\n'use strict';\n\nVtiger_Detail_Js(\n\t'Faq_Detail_Js',\n\t{},\n\t{\n\t\tregisterShowArticlePreview() {\n\t\t\t$('.js-show-article-preview').on('click', (e) => {\n\t\t\t\tArticlePreviewVueComponent.mount({\n\t\t\t\t\tel: '#ArticlePreview',\n\t\t\t\t\tstate: {\n\t\t\t\t\t\tmoduleName: $(e.currentTarget).data('moduleName'),\n\t\t\t\t\t\trecordId: $(e.currentTarget).data('id')\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\tregisterEvents() {\n\t\t\tthis._super();\n\t\t\tthis.registerShowArticlePreview();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Detail_Js","registerShowArticlePreview","$","on","e","ArticlePreviewVueComponent","mount","el","state","moduleName","currentTarget","data","recordId","registerEvents","_super"],"mappings":";;AAAA,kKACA,aAEAA,gBAAgB,CACf,eADe,CAEf,EAFe,CAGf,CACCC,0BADD,CAAA,SAAA,0BAAA,EAC8B,CAC5BC,CAAC,CAAC,0BAAD,CAAD,CAA8BC,EAA9B,CAAiC,OAAjC,CAA0C,SAACC,CAAD,CAAO,CAChDC,0BAA0B,CAACC,KAA3B,CAAiC,CAChCC,EAAE,CAAE,iBAD4B,CAEhCC,KAAK,CAAE,CACNC,UAAU,CAAEP,CAAC,CAACE,CAAC,CAACM,aAAH,CAAD,CAAmBC,IAAnB,CAAwB,YAAxB,CADN,CAENC,QAAQ,CAAEV,CAAC,CAACE,CAAC,CAACM,aAAH,CAAD,CAAmBC,IAAnB,CAAwB,IAAxB,CAFJ,CAFyB,CAAjC,EAOA,CARD,EASA,CAXF,CAYCE,cAZD,CAYkB,SAAA,cAAA,EAAA,CAChB,IAAKC,CAAAA,MAAL,EADgB,CAEhB,IAAA,CAAKb,0BAAL,GACA,CAfF,CAHe;;"} \ No newline at end of file +{"version":3,"file":"Detail.min.js","sources":["Detail.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\nVtiger_Detail_Js(\n\t'Faq_Detail_Js',\n\t{},\n\t{\n\t\tregisterShowArticlePreview() {\n\t\t\t$('.js-show-article-preview').on('click', (e) => {\n\t\t\t\tArticlePreviewVueComponent.mount({\n\t\t\t\t\tel: '#ArticlePreview',\n\t\t\t\t\tstate: {\n\t\t\t\t\t\tmoduleName: $(e.currentTarget).data('moduleName'),\n\t\t\t\t\t\trecordId: $(e.currentTarget).data('id')\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\tregisterEvents() {\n\t\t\tthis._super();\n\t\t\tthis.registerShowArticlePreview();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Detail_Js","registerShowArticlePreview","$","on","e","ArticlePreviewVueComponent","mount","el","state","moduleName","currentTarget","data","recordId","registerEvents","_super"],"mappings":";;AAAA,kKACA,YAAY,CAEZA,gBAAgB,CACf,eAAe,CACf,EAAE,CACF,CACCC,0BAA0B,CAAAA,SAAAA,0BAAAA,EAAG,CAC5BC,CAAC,CAAC,0BAA0B,CAAC,CAACC,EAAE,CAAC,OAAO,CAAE,SAACC,CAAC,CAAK,CAChDC,0BAA0B,CAACC,KAAK,CAAC,CAChCC,EAAE,CAAE,iBAAiB,CACrBC,KAAK,CAAE,CACNC,UAAU,CAAEP,CAAC,CAACE,CAAC,CAACM,aAAa,CAAC,CAACC,IAAI,CAAC,YAAY,CAAC,CACjDC,QAAQ,CAAEV,CAAC,CAACE,CAAC,CAACM,aAAa,CAAC,CAACC,IAAI,CAAC,IAAI,CACvC,CACD,CAAC,EACF,CAAC,EACF,CAAC,CACDE,cAAc,CAAA,SAAAA,gBAAG,CAChB,IAAI,CAACC,MAAM,EAAE,CACb,IAAI,CAACb,0BAA0B,GAChC,CACD,CACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/Faq/resources/KnowledgeBase.min.js b/public_html/layouts/basic/modules/Faq/resources/KnowledgeBase.min.js index 4ec82dfc0757..f1d9bbe1c543 100644 --- a/public_html/layouts/basic/modules/Faq/resources/KnowledgeBase.min.js +++ b/public_html/layouts/basic/modules/Faq/resources/KnowledgeBase.min.js @@ -1,4 +1,4 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */"use strict";jQuery.Class("Faq_KnowledgeBase_Js",{registerEvents:function registerEvents(){KnowledgeBase.mount({el:"#FaqKnowledgeBaseContainer",state:{moduleName:"Faq"}});}}); +/* {[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]} */"use strict";jQuery.Class("Faq_KnowledgeBase_Js",{registerEvents:function registerEvents(){KnowledgeBase.mount({el:"#FaqKnowledgeBaseContainer",state:{moduleName:"Faq"}});}}); //# sourceMappingURL=KnowledgeBase.min.js.map diff --git a/public_html/layouts/basic/modules/Faq/resources/KnowledgeBase.min.js.map b/public_html/layouts/basic/modules/Faq/resources/KnowledgeBase.min.js.map index 583116ce9c8d..e3a6cfb01d65 100644 --- a/public_html/layouts/basic/modules/Faq/resources/KnowledgeBase.min.js.map +++ b/public_html/layouts/basic/modules/Faq/resources/KnowledgeBase.min.js.map @@ -1 +1 @@ -{"version":3,"file":"KnowledgeBase.min.js","sources":["KnowledgeBase.js"],"sourcesContent":["/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */\n\n'use strict';\n\njQuery.Class('Faq_KnowledgeBase_Js', {\n\tregisterEvents: function () {\n\t\tKnowledgeBase.mount({\n\t\t\tel: '#FaqKnowledgeBaseContainer',\n\t\t\tstate: {\n\t\t\t\tmoduleName: 'Faq'\n\t\t\t}\n\t\t});\n\t}\n});\n"],"names":["jQuery","Class","registerEvents","KnowledgeBase","mount","el","state","moduleName"],"mappings":";;AAAA,kKAEA,YAEAA,CAAAA,MAAM,CAACC,KAAP,CAAa,sBAAb,CAAqC,CACpCC,cAAc,CAAE,SAAA,cAAA,EAAY,CAC3BC,aAAa,CAACC,KAAd,CAAoB,CACnBC,EAAE,CAAE,4BADe,CAEnBC,KAAK,CAAE,CACNC,UAAU,CAAE,KADN,CAFY,CAApB,EAMA,CARmC,CAArC;;"} \ No newline at end of file +{"version":3,"file":"KnowledgeBase.min.js","sources":["KnowledgeBase.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\n'use strict';\n\njQuery.Class('Faq_KnowledgeBase_Js', {\n\tregisterEvents: function () {\n\t\tKnowledgeBase.mount({\n\t\t\tel: '#FaqKnowledgeBaseContainer',\n\t\t\tstate: {\n\t\t\t\tmoduleName: 'Faq'\n\t\t\t}\n\t\t});\n\t}\n});\n"],"names":["jQuery","Class","registerEvents","KnowledgeBase","mount","el","state","moduleName"],"mappings":";;AAAA,kKAEA,YAAY,CAEZA,MAAM,CAACC,KAAK,CAAC,sBAAsB,CAAE,CACpCC,cAAc,CAAE,SAAAA,cAAA,EAAY,CAC3BC,aAAa,CAACC,KAAK,CAAC,CACnBC,EAAE,CAAE,4BAA4B,CAChCC,KAAK,CAAE,CACNC,UAAU,CAAE,KACb,CACD,CAAC,EACF,CACD,CAAC,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/HelpDesk/resources/Detail.min.js b/public_html/layouts/basic/modules/HelpDesk/resources/Detail.min.js index 4db801f6a5e8..b612ae58d5d8 100644 --- a/public_html/layouts/basic/modules/HelpDesk/resources/Detail.min.js +++ b/public_html/layouts/basic/modules/HelpDesk/resources/Detail.min.js @@ -1,6 +1,6 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */"use strict";Vtiger_Detail_Js("HelpDesk_Detail_Js",{setAccountsReference:function setAccountsReference(){app.showRecordsList({module:"Accounts",src_module:"HelpDesk",src_record:app.getRecordId()},function(_modal,instance){instance.setSelectEvent(function(responseData){Vtiger_Detail_Js.getInstance().saveFieldValues({field:"parent_id",value:responseData.id}).done(function(){location.reload();});});});}},{registerSetServiceContracts:function registerSetServiceContracts(){var thisInstance=this;$(".selectServiceContracts").on("click","ul li",function(e){var element=jQuery(e.currentTarget);thisInstance.saveFieldValues({setRelatedFields:!0,field:"servicecontractsid",value:element.data("id")}).done(function(){location.reload();});});},/** +/* {[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]} */"use strict";Vtiger_Detail_Js("HelpDesk_Detail_Js",{setAccountsReference:function setAccountsReference(){app.showRecordsList({module:"Accounts",src_module:"HelpDesk",src_record:app.getRecordId()},function(_modal,instance){instance.setSelectEvent(function(responseData){Vtiger_Detail_Js.getInstance().saveFieldValues({field:"parent_id",value:responseData.id}).done(function(){location.reload();});});});}},{registerSetServiceContracts:function registerSetServiceContracts(){var thisInstance=this;$(".selectServiceContracts").on("click","ul li",function(e){var element=jQuery(e.currentTarget);thisInstance.saveFieldValues({setRelatedFields:!0,field:"servicecontractsid",value:element.data("id")}).done(function(){location.reload();});});},/** * Function to get response from hierarchy * @param {array} params * @returns {Promise} @@ -27,5 +27,5 @@ * Add time control when closed ticket * @param {array} params * @returns {Promise} - */addTimeControl:function addTimeControl(params){var callback=1").appendTo(data),jQuery("").appendTo(data),jQuery("").appendTo(data),"undefined"!=typeof relatedField){var field=data.find("[name=\""+relatedField+"\"]");0==field.length&&jQuery("").appendTo(data);}for(index=0;index").appendTo(data);},quickCreateParams.noCache=!0,App.Components.QuickCreate.createRecord("OSSTimeControl",quickCreateParams),aDeferred.promise()},registerEvents:function registerEvents(){this._super(),this.registerSetServiceContracts(),this.registerHierarchyRecordCount(),this.registerShowHierarchy();}}); + */addTimeControl:function addTimeControl(params){var callback=1").appendTo(data),jQuery("").appendTo(data),jQuery("").appendTo(data),"undefined"!=typeof relatedField){var field=data.find("[name=\""+relatedField+"\"]");0==field.length&&jQuery("").appendTo(data);}for(index=0;index").appendTo(data);};if("undefined"!=typeof fullFormUrl&&-1!==fullFormUrl.indexOf("?"))for(var urlSplit=fullFormUrl.split("?"),queryString=urlSplit[1],queryParameters=queryString.split("&"),index=0;index {\n\t\t\t\t\tinstance.setSelectEvent((responseData) => {\n\t\t\t\t\t\tVtiger_Detail_Js.getInstance()\n\t\t\t\t\t\t\t.saveFieldValues({\n\t\t\t\t\t\t\t\tfield: 'parent_id',\n\t\t\t\t\t\t\t\tvalue: responseData.id\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t.done(function () {\n\t\t\t\t\t\t\t\tlocation.reload();\n\t\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t},\n\t{\n\t\tregisterSetServiceContracts: function () {\n\t\t\tvar thisInstance = this;\n\t\t\t$('.selectServiceContracts').on('click', 'ul li', function (e) {\n\t\t\t\tvar element = jQuery(e.currentTarget);\n\t\t\t\tthisInstance\n\t\t\t\t\t.saveFieldValues({\n\t\t\t\t\t\tsetRelatedFields: true,\n\t\t\t\t\t\tfield: 'servicecontractsid',\n\t\t\t\t\t\tvalue: element.data('id')\n\t\t\t\t\t})\n\t\t\t\t\t.done(function (response) {\n\t\t\t\t\t\tlocation.reload();\n\t\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Function to get response from hierarchy\n\t\t * @param {array} params\n\t\t * @returns {Promise}\n\t\t */\n\t\tgetHierarchyResponseData: function (params) {\n\t\t\tlet thisInstance = this,\n\t\t\t\taDeferred = $.Deferred();\n\t\t\tif (!$.isEmptyObject(thisInstance.hierarchyResponseCache)) {\n\t\t\t\taDeferred.resolve(thisInstance.hierarchyResponseCache);\n\t\t\t} else {\n\t\t\t\tAppConnector.request(params).then(function (data) {\n\t\t\t\t\tthisInstance.hierarchyResponseCache = data;\n\t\t\t\t\taDeferred.resolve(thisInstance.hierarchyResponseCache);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn aDeferred.promise();\n\t\t},\n\t\t/**\n\t\t * Function to display the hierarchy response data\n\t\t * @param {array} data\n\t\t */\n\t\tdisplayHierarchyResponseData: function (data) {\n\t\t\tconst thisInstance = this;\n\t\t\tlet callbackFunction = function () {\n\t\t\t\tapp.showScrollBar($('#hierarchyScroll'), {\n\t\t\t\t\theight: '300px',\n\t\t\t\t\trailVisible: true,\n\t\t\t\t\tsize: '6px'\n\t\t\t\t});\n\t\t\t};\n\t\t\tapp.showModalWindow(data, function (modal) {\n\t\t\t\tApp.Components.Scrollbar.xy($('#hierarchyScroll'));\n\t\t\t\tthisInstance.registerChangeStatusInHierarchy(modal);\n\t\t\t\tif (typeof callbackFunction == 'function' && $('#hierarchyScroll').height() > 300) {\n\t\t\t\t\tcallbackFunction();\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Registers read count of hierarchy if it is possible\n\t\t */\n\t\tregisterHierarchyRecordCount: function () {\n\t\t\tlet hierarchyButton = $('.js-detail-hierarchy'),\n\t\t\t\tparams = {\n\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\taction: 'RelationAjax',\n\t\t\t\t\trecord: app.getRecordId(),\n\t\t\t\t\tmode: 'getHierarchyCount'\n\t\t\t\t};\n\t\t\tif (hierarchyButton.length) {\n\t\t\t\tAppConnector.request(params).then(function (response) {\n\t\t\t\t\tif (response.success) {\n\t\t\t\t\t\t$('.hierarchy .badge').html(response.result);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Shows hierarchy\n\t\t */\n\t\tregisterShowHierarchy: function () {\n\t\t\tlet thisInstance = this,\n\t\t\t\thierarchyButton = $('.detailViewTitle'),\n\t\t\t\tparams = {\n\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\tview: 'Hierarchy',\n\t\t\t\t\trecord: app.getRecordId()\n\t\t\t\t};\n\t\t\thierarchyButton.on('click', '.js-detail-hierarchy', function () {\n\t\t\t\tlet progressIndicatorElement = $.progressIndicator({\n\t\t\t\t\tposition: 'html',\n\t\t\t\t\tblockInfo: {\n\t\t\t\t\t\tenabled: true\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tthisInstance.getHierarchyResponseData(params).then(function (data) {\n\t\t\t\t\tthisInstance.displayHierarchyResponseData(data);\n\t\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Function to register events on update hierarchy button\n\t\t *\n\t\t * @param {jQuery} container\n\t\t */\n\t\tregisterChangeStatusInHierarchy: function (container) {\n\t\t\tcontainer.find('.js-update-hierarchy').on('click', function () {\n\t\t\t\tlet params = {\n\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\taction: 'ChangeStatus',\n\t\t\t\t\trecordsType: container.find('.js-selected-records').val(),\n\t\t\t\t\tstatus: container.find('.js-status').val(),\n\t\t\t\t\trecord: app.getRecordId()\n\t\t\t\t};\n\t\t\t\tAppConnector.request(params).done(function (data) {\n\t\t\t\t\tif (data.success) {\n\t\t\t\t\t\tapp.showNotify({ text: data.result.data, type: 'success' });\n\t\t\t\t\t}\n\t\t\t\t\tapp.hideModalWindow();\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Show confirmation on event click\n\t\t * @param {jQuery} element\n\t\t * @param {string} picklistName\n\t\t */\n\t\tshowProgressConfirmation: function (element, picklistName) {\n\t\t\tlet picklistValue = $(element).data('picklistValue');\n\t\t\tapp.showConfirmModal({\n\t\t\t\ttitle: $(element).data('picklistLabel'),\n\t\t\t\ttext: app.vtranslate('JS_CHANGE_VALUE_CONFIRMATION'),\n\t\t\t\tconfirmedCallback: () => {\n\t\t\t\t\tconst progressIndicatorElement = $.progressIndicator();\n\t\t\t\t\tthis.saveFieldValues({\n\t\t\t\t\t\tvalue: picklistValue,\n\t\t\t\t\t\tfield: picklistName\n\t\t\t\t\t})\n\t\t\t\t\t\t.done((data) => {\n\t\t\t\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\t\tif (data.success) {\n\t\t\t\t\t\t\t\twindow.location.reload();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.fail(function (error, err) {\n\t\t\t\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\t\tapp.errorLog(error, err);\n\t\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Function save field values\n\t\t * @param {array} fieldDetailList\n\t\t * @returns {Promise}\n\t\t */\n\t\tsaveFieldValues: function (fieldDetailList) {\n\t\t\tconst self = this;\n\t\t\tvar aDeferred = jQuery.Deferred();\n\t\t\tconst recordId = app.getRecordId();\n\t\t\tvar data = {};\n\t\t\tif (typeof fieldDetailList !== 'undefined') {\n\t\t\t\tdata = fieldDetailList;\n\t\t\t}\n\t\t\tconst saveData = (reload = true) => {\n\t\t\t\tdata['record'] = recordId;\n\t\t\t\tdata['module'] = app.getModuleName();\n\t\t\t\tdata['action'] = 'SaveAjax';\n\t\t\t\tvar params = {};\n\t\t\t\tparams.data = data;\n\t\t\t\tparams.async = false;\n\t\t\t\tparams.dataType = 'json';\n\t\t\t\tAppConnector.request(params).done(function (reponseData) {\n\t\t\t\t\taDeferred.resolve(reponseData);\n\t\t\t\t\tif (reload) {\n\t\t\t\t\t\twindow.location.reload();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t};\n\t\t\tif (\n\t\t\t\tfieldDetailList.field === 'ticketstatus' &&\n\t\t\t\t(CONFIG.checkIfRecordHasTimeControl || CONFIG.checkIfRelatedTicketsAreClosed)\n\t\t\t) {\n\t\t\t\tAppConnector.request({\n\t\t\t\t\taction: 'CheckValidateToClose',\n\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\trecord: recordId,\n\t\t\t\t\tstatus: fieldDetailList.value\n\t\t\t\t}).done((response) => {\n\t\t\t\t\tif (response.result.hasTimeControl.result && response.result.relatedTicketsClosed.result) {\n\t\t\t\t\t\tsaveData(false);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlet addTimeControlCb = saveData;\n\t\t\t\t\t\tif (!response.result.relatedTicketsClosed.result) {\n\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\ttext: response.result.relatedTicketsClosed.message,\n\t\t\t\t\t\t\t\ttype: 'info'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\taddTimeControlCb = () => {\n\t\t\t\t\t\t\t\tthis.saveFieldValues(fieldDetailList);\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!response.result.hasTimeControl.result) {\n\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\ttext: response.result.hasTimeControl.message,\n\t\t\t\t\t\t\t\ttype: 'info'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tself.addTimeControl(\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\trecordId: recordId,\n\t\t\t\t\t\t\t\t\turl: `index.php?module=OSSTimeControl&view=Edit&sourceModule=HelpDesk&sourceRecord=${recordId}&relationOperation=true&subprocess=${recordId}&subprocess=${recordId}`\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\taddTimeControlCb\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\taDeferred.resolve({ success: false });\n\t\t\t\t});\n\t\t\t\treturn aDeferred.promise();\n\t\t\t} else {\n\t\t\t\tsaveData(false);\n\t\t\t\treturn aDeferred.promise();\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Add time control when closed ticket\n\t\t * @param {array} params\n\t\t * @returns {Promise}\n\t\t */\n\t\taddTimeControl(params, callback = () => {}) {\n\t\t\tlet aDeferred = jQuery.Deferred();\n\t\t\tlet referenceModuleName = 'OSSTimeControl';\n\t\t\tlet parentId = params.recordId;\n\t\t\tlet parentModule = 'HelpDesk';\n\t\t\tlet quickCreateParams = {};\n\t\t\tlet relatedParams = {};\n\t\t\tlet relatedField = 'subprocess';\n\t\t\tlet fullFormUrl = params.url;\n\t\t\trelatedParams[relatedField] = parentId;\n\t\t\tlet eliminatedKeys = new Array('view', 'module', 'mode', 'action');\n\n\t\t\tlet preQuickCreateSave = function (data) {\n\t\t\t\tlet index, queryParam, queryParamComponents;\n\t\t\t\tlet queryParameters = [];\n\n\t\t\t\tif (typeof fullFormUrl !== 'undefined' && fullFormUrl.indexOf('?') !== -1) {\n\t\t\t\t\tlet urlSplit = fullFormUrl.split('?');\n\t\t\t\t\tlet queryString = urlSplit[1];\n\t\t\t\t\tqueryParameters = queryString.split('&');\n\t\t\t\t\tfor (index = 0; index < queryParameters.length; index++) {\n\t\t\t\t\t\tqueryParam = queryParameters[index];\n\t\t\t\t\t\tqueryParamComponents = queryParam.split('=');\n\t\t\t\t\t\tif (queryParamComponents[0] == 'mode' && queryParamComponents[1] == 'Calendar') {\n\t\t\t\t\t\t\tdata.find('a[data-tab-name=\"Task\"]').trigger('click');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tjQuery('').appendTo(data);\n\t\t\t\tjQuery('').appendTo(data);\n\t\t\t\tjQuery('').appendTo(data);\n\n\t\t\t\tif (typeof relatedField !== 'undefined') {\n\t\t\t\t\tlet field = data.find('[name=\"' + relatedField + '\"]');\n\t\t\t\t\tif (field.length == 0) {\n\t\t\t\t\t\tjQuery('').appendTo(data);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (index = 0; index < queryParameters.length; index++) {\n\t\t\t\t\tqueryParam = queryParameters[index];\n\t\t\t\t\tqueryParamComponents = queryParam.split('=');\n\t\t\t\t\tif (\n\t\t\t\t\t\tjQuery.inArray(queryParamComponents[0], eliminatedKeys) == '-1' &&\n\t\t\t\t\t\tdata.find('[name=\"' + queryParamComponents[0] + '\"]').length == 0\n\t\t\t\t\t) {\n\t\t\t\t\t\tjQuery(\n\t\t\t\t\t\t\t''\n\t\t\t\t\t\t).appendTo(data);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\tif (typeof fullFormUrl !== 'undefined' && fullFormUrl.indexOf('?') !== -1) {\n\t\t\t\tlet urlSplit = fullFormUrl.split('?');\n\t\t\t\tlet queryString = urlSplit[1];\n\t\t\t\tlet queryParameters = queryString.split('&');\n\t\t\t\tfor (let index = 0; index < queryParameters.length; index++) {\n\t\t\t\t\tlet queryParam = queryParameters[index];\n\t\t\t\t\tlet queryParamComponents = queryParam.split('=');\n\t\t\t\t\tif (jQuery.inArray(queryParamComponents[0], eliminatedKeys) == '-1') {\n\t\t\t\t\t\trelatedParams[queryParamComponents[0]] = queryParamComponents[1];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tquickCreateParams['data'] = relatedParams;\n\t\t\tquickCreateParams['callbackFunction'] = callback;\n\t\t\tquickCreateParams['callbackPostShown'] = preQuickCreateSave;\n\t\t\tquickCreateParams['noCache'] = true;\n\t\t\tApp.Components.QuickCreate.createRecord(referenceModuleName, quickCreateParams);\n\t\t\treturn aDeferred.promise();\n\t\t},\n\t\tregisterEvents: function () {\n\t\t\tthis._super();\n\t\t\tthis.registerSetServiceContracts();\n\t\t\tthis.registerHierarchyRecordCount();\n\t\t\tthis.registerShowHierarchy();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Detail_Js","setAccountsReference","app","showRecordsList","module","src_module","src_record","getRecordId","_modal","instance","setSelectEvent","responseData","getInstance","saveFieldValues","field","value","id","done","location","reload","registerSetServiceContracts","$","on","e","jQuery","currentTarget","thisInstance","setRelatedFields","element","data","getHierarchyResponseData","params","aDeferred","Deferred","isEmptyObject","hierarchyResponseCache","AppConnector","request","then","resolve","promise","displayHierarchyResponseData","callbackFunction","showScrollBar","height","railVisible","size","showModalWindow","modal","App","Components","Scrollbar","xy","registerChangeStatusInHierarchy","registerHierarchyRecordCount","getModuleName","action","record","mode","hierarchyButton","length","response","success","html","result","registerShowHierarchy","view","progressIndicator","position","blockInfo","enabled","progressIndicatorElement","container","find","recordsType","val","status","showNotify","text","type","hideModalWindow","showProgressConfirmation","picklistName","picklistValue","showConfirmModal","title","vtranslate","confirmedCallback","window","fail","error","err","errorLog","fieldDetailList","self","recordId","async","dataType","reponseData","CONFIG","checkIfRecordHasTimeControl","checkIfRelatedTicketsAreClosed","hasTimeControl","relatedTicketsClosed","saveData","message","addTimeControlCb","addTimeControl","url","parentId","quickCreateParams","relatedParams","relatedField","fullFormUrl","eliminatedKeys","indexOf","split","queryString","urlSplit","queryParameters","index","queryParamComponents","queryParam","inArray","callback","preQuickCreateSave","trigger","appendTo","QuickCreate","createRecord","registerEvents","_super"],"mappings":";;AAAA,kKACA,YAEAA,CAAAA,gBAAgB,CACf,oBADe,CAEf,CACCC,oBAAoB,CAAE,SAAA,oBAAA,EAAY,CACjCC,GAAG,CAACC,eAAJ,CACC,CACCC,MAAM,CAAE,UADT,CAECC,UAAU,CAAE,UAFb,CAGCC,UAAU,CAAEJ,GAAG,CAACK,WAAJ,EAHb,CADD,CAMC,SAACC,MAAD,CAASC,QAAT,CAAsB,C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,GAAG,CAACC,UAAJ,CAAe8E,WAAf,CAA2BC,YAA3B,CAlE0B,gBAkE1B,CAA6DnB,iBAA7D,CACA,CAAO9E,SAAS,CAACQ,OAAV,EACP,CA1SF,CA2SC0F,cAAc,CAAE,SAAA,cAAA,EAAY,CAC3B,IAAA,CAAKC,MAAL,EAD2B,CAE3B,IAAA,CAAK/G,2BAAL,EAF2B,CAG3B,IAAA,CAAKkC,4BAAL,EAH2B,CAI3B,IAAA,CAAKW,qBAAL,GACA,CAhTF,CAzBe;;"} \ No newline at end of file +{"version":3,"file":"Detail.min.js","sources":["Detail.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\nVtiger_Detail_Js(\n\t'HelpDesk_Detail_Js',\n\t{\n\t\tsetAccountsReference: function () {\n\t\t\tapp.showRecordsList(\n\t\t\t\t{\n\t\t\t\t\tmodule: 'Accounts',\n\t\t\t\t\tsrc_module: 'HelpDesk',\n\t\t\t\t\tsrc_record: app.getRecordId()\n\t\t\t\t},\n\t\t\t\t(_modal, instance) => {\n\t\t\t\t\tinstance.setSelectEvent((responseData) => {\n\t\t\t\t\t\tVtiger_Detail_Js.getInstance()\n\t\t\t\t\t\t\t.saveFieldValues({\n\t\t\t\t\t\t\t\tfield: 'parent_id',\n\t\t\t\t\t\t\t\tvalue: responseData.id\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t.done(function () {\n\t\t\t\t\t\t\t\tlocation.reload();\n\t\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t},\n\t{\n\t\tregisterSetServiceContracts: function () {\n\t\t\tvar thisInstance = this;\n\t\t\t$('.selectServiceContracts').on('click', 'ul li', function (e) {\n\t\t\t\tvar element = jQuery(e.currentTarget);\n\t\t\t\tthisInstance\n\t\t\t\t\t.saveFieldValues({\n\t\t\t\t\t\tsetRelatedFields: true,\n\t\t\t\t\t\tfield: 'servicecontractsid',\n\t\t\t\t\t\tvalue: element.data('id')\n\t\t\t\t\t})\n\t\t\t\t\t.done(function (response) {\n\t\t\t\t\t\tlocation.reload();\n\t\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Function to get response from hierarchy\n\t\t * @param {array} params\n\t\t * @returns {Promise}\n\t\t */\n\t\tgetHierarchyResponseData: function (params) {\n\t\t\tlet thisInstance = this,\n\t\t\t\taDeferred = $.Deferred();\n\t\t\tif (!$.isEmptyObject(thisInstance.hierarchyResponseCache)) {\n\t\t\t\taDeferred.resolve(thisInstance.hierarchyResponseCache);\n\t\t\t} else {\n\t\t\t\tAppConnector.request(params).then(function (data) {\n\t\t\t\t\tthisInstance.hierarchyResponseCache = data;\n\t\t\t\t\taDeferred.resolve(thisInstance.hierarchyResponseCache);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn aDeferred.promise();\n\t\t},\n\t\t/**\n\t\t * Function to display the hierarchy response data\n\t\t * @param {array} data\n\t\t */\n\t\tdisplayHierarchyResponseData: function (data) {\n\t\t\tconst thisInstance = this;\n\t\t\tlet callbackFunction = function () {\n\t\t\t\tapp.showScrollBar($('#hierarchyScroll'), {\n\t\t\t\t\theight: '300px',\n\t\t\t\t\trailVisible: true,\n\t\t\t\t\tsize: '6px'\n\t\t\t\t});\n\t\t\t};\n\t\t\tapp.showModalWindow(data, function (modal) {\n\t\t\t\tApp.Components.Scrollbar.xy($('#hierarchyScroll'));\n\t\t\t\tthisInstance.registerChangeStatusInHierarchy(modal);\n\t\t\t\tif (typeof callbackFunction == 'function' && $('#hierarchyScroll').height() > 300) {\n\t\t\t\t\tcallbackFunction();\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Registers read count of hierarchy if it is possible\n\t\t */\n\t\tregisterHierarchyRecordCount: function () {\n\t\t\tlet hierarchyButton = $('.js-detail-hierarchy'),\n\t\t\t\tparams = {\n\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\taction: 'RelationAjax',\n\t\t\t\t\trecord: app.getRecordId(),\n\t\t\t\t\tmode: 'getHierarchyCount'\n\t\t\t\t};\n\t\t\tif (hierarchyButton.length) {\n\t\t\t\tAppConnector.request(params).then(function (response) {\n\t\t\t\t\tif (response.success) {\n\t\t\t\t\t\t$('.hierarchy .badge').html(response.result);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Shows hierarchy\n\t\t */\n\t\tregisterShowHierarchy: function () {\n\t\t\tlet thisInstance = this,\n\t\t\t\thierarchyButton = $('.detailViewTitle'),\n\t\t\t\tparams = {\n\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\tview: 'Hierarchy',\n\t\t\t\t\trecord: app.getRecordId()\n\t\t\t\t};\n\t\t\thierarchyButton.on('click', '.js-detail-hierarchy', function () {\n\t\t\t\tlet progressIndicatorElement = $.progressIndicator({\n\t\t\t\t\tposition: 'html',\n\t\t\t\t\tblockInfo: {\n\t\t\t\t\t\tenabled: true\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tthisInstance.getHierarchyResponseData(params).then(function (data) {\n\t\t\t\t\tthisInstance.displayHierarchyResponseData(data);\n\t\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Function to register events on update hierarchy button\n\t\t *\n\t\t * @param {jQuery} container\n\t\t */\n\t\tregisterChangeStatusInHierarchy: function (container) {\n\t\t\tcontainer.find('.js-update-hierarchy').on('click', function () {\n\t\t\t\tlet params = {\n\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\taction: 'ChangeStatus',\n\t\t\t\t\trecordsType: container.find('.js-selected-records').val(),\n\t\t\t\t\tstatus: container.find('.js-status').val(),\n\t\t\t\t\trecord: app.getRecordId()\n\t\t\t\t};\n\t\t\t\tAppConnector.request(params).done(function (data) {\n\t\t\t\t\tif (data.success) {\n\t\t\t\t\t\tapp.showNotify({ text: data.result.data, type: 'success' });\n\t\t\t\t\t}\n\t\t\t\t\tapp.hideModalWindow();\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Show confirmation on event click\n\t\t * @param {jQuery} element\n\t\t * @param {string} picklistName\n\t\t */\n\t\tshowProgressConfirmation: function (element, picklistName) {\n\t\t\tlet picklistValue = $(element).data('picklistValue');\n\t\t\tapp.showConfirmModal({\n\t\t\t\ttitle: $(element).data('picklistLabel'),\n\t\t\t\ttext: app.vtranslate('JS_CHANGE_VALUE_CONFIRMATION'),\n\t\t\t\tconfirmedCallback: () => {\n\t\t\t\t\tconst progressIndicatorElement = $.progressIndicator();\n\t\t\t\t\tthis.saveFieldValues({\n\t\t\t\t\t\tvalue: picklistValue,\n\t\t\t\t\t\tfield: picklistName\n\t\t\t\t\t})\n\t\t\t\t\t\t.done((data) => {\n\t\t\t\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\t\tif (data.success) {\n\t\t\t\t\t\t\t\twindow.location.reload();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.fail(function (error, err) {\n\t\t\t\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\t\tapp.errorLog(error, err);\n\t\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Function save field values\n\t\t * @param {array} fieldDetailList\n\t\t * @returns {Promise}\n\t\t */\n\t\tsaveFieldValues: function (fieldDetailList) {\n\t\t\tconst self = this;\n\t\t\tvar aDeferred = jQuery.Deferred();\n\t\t\tconst recordId = app.getRecordId();\n\t\t\tvar data = {};\n\t\t\tif (typeof fieldDetailList !== 'undefined') {\n\t\t\t\tdata = fieldDetailList;\n\t\t\t}\n\t\t\tconst saveData = (reload = true) => {\n\t\t\t\tdata['record'] = recordId;\n\t\t\t\tdata['module'] = app.getModuleName();\n\t\t\t\tdata['action'] = 'SaveAjax';\n\t\t\t\tvar params = {};\n\t\t\t\tparams.data = data;\n\t\t\t\tparams.async = false;\n\t\t\t\tparams.dataType = 'json';\n\t\t\t\tAppConnector.request(params).done(function (reponseData) {\n\t\t\t\t\taDeferred.resolve(reponseData);\n\t\t\t\t\tif (reload) {\n\t\t\t\t\t\twindow.location.reload();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t};\n\t\t\tif (\n\t\t\t\tfieldDetailList.field === 'ticketstatus' &&\n\t\t\t\t(CONFIG.checkIfRecordHasTimeControl || CONFIG.checkIfRelatedTicketsAreClosed)\n\t\t\t) {\n\t\t\t\tAppConnector.request({\n\t\t\t\t\taction: 'CheckValidateToClose',\n\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\trecord: recordId,\n\t\t\t\t\tstatus: fieldDetailList.value\n\t\t\t\t}).done((response) => {\n\t\t\t\t\tif (response.result.hasTimeControl.result && response.result.relatedTicketsClosed.result) {\n\t\t\t\t\t\tsaveData(false);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlet addTimeControlCb = saveData;\n\t\t\t\t\t\tif (!response.result.relatedTicketsClosed.result) {\n\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\ttext: response.result.relatedTicketsClosed.message,\n\t\t\t\t\t\t\t\ttype: 'info'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\taddTimeControlCb = () => {\n\t\t\t\t\t\t\t\tthis.saveFieldValues(fieldDetailList);\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!response.result.hasTimeControl.result) {\n\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\ttext: response.result.hasTimeControl.message,\n\t\t\t\t\t\t\t\ttype: 'info'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tself.addTimeControl(\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\trecordId: recordId,\n\t\t\t\t\t\t\t\t\turl: `index.php?module=OSSTimeControl&view=Edit&sourceModule=HelpDesk&sourceRecord=${recordId}&relationOperation=true&subprocess=${recordId}&subprocess=${recordId}`\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\taddTimeControlCb\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\taDeferred.resolve({ success: false });\n\t\t\t\t});\n\t\t\t\treturn aDeferred.promise();\n\t\t\t} else {\n\t\t\t\tsaveData(false);\n\t\t\t\treturn aDeferred.promise();\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Add time control when closed ticket\n\t\t * @param {array} params\n\t\t * @returns {Promise}\n\t\t */\n\t\taddTimeControl(params, callback = () => {}) {\n\t\t\tlet aDeferred = jQuery.Deferred();\n\t\t\tlet referenceModuleName = 'OSSTimeControl';\n\t\t\tlet parentId = params.recordId;\n\t\t\tlet parentModule = 'HelpDesk';\n\t\t\tlet quickCreateParams = {};\n\t\t\tlet relatedParams = {};\n\t\t\tlet relatedField = 'subprocess';\n\t\t\tlet fullFormUrl = params.url;\n\t\t\trelatedParams[relatedField] = parentId;\n\t\t\tlet eliminatedKeys = new Array('view', 'module', 'mode', 'action');\n\n\t\t\tlet preQuickCreateSave = function (data) {\n\t\t\t\tlet index, queryParam, queryParamComponents;\n\t\t\t\tlet queryParameters = [];\n\n\t\t\t\tif (typeof fullFormUrl !== 'undefined' && fullFormUrl.indexOf('?') !== -1) {\n\t\t\t\t\tlet urlSplit = fullFormUrl.split('?');\n\t\t\t\t\tlet queryString = urlSplit[1];\n\t\t\t\t\tqueryParameters = queryString.split('&');\n\t\t\t\t\tfor (index = 0; index < queryParameters.length; index++) {\n\t\t\t\t\t\tqueryParam = queryParameters[index];\n\t\t\t\t\t\tqueryParamComponents = queryParam.split('=');\n\t\t\t\t\t\tif (queryParamComponents[0] == 'mode' && queryParamComponents[1] == 'Calendar') {\n\t\t\t\t\t\t\tdata.find('a[data-tab-name=\"Task\"]').trigger('click');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tjQuery('').appendTo(data);\n\t\t\t\tjQuery('').appendTo(data);\n\t\t\t\tjQuery('').appendTo(data);\n\n\t\t\t\tif (typeof relatedField !== 'undefined') {\n\t\t\t\t\tlet field = data.find('[name=\"' + relatedField + '\"]');\n\t\t\t\t\tif (field.length == 0) {\n\t\t\t\t\t\tjQuery('').appendTo(data);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (index = 0; index < queryParameters.length; index++) {\n\t\t\t\t\tqueryParam = queryParameters[index];\n\t\t\t\t\tqueryParamComponents = queryParam.split('=');\n\t\t\t\t\tif (\n\t\t\t\t\t\tjQuery.inArray(queryParamComponents[0], eliminatedKeys) == '-1' &&\n\t\t\t\t\t\tdata.find('[name=\"' + queryParamComponents[0] + '\"]').length == 0\n\t\t\t\t\t) {\n\t\t\t\t\t\tjQuery(\n\t\t\t\t\t\t\t''\n\t\t\t\t\t\t).appendTo(data);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\tif (typeof fullFormUrl !== 'undefined' && fullFormUrl.indexOf('?') !== -1) {\n\t\t\t\tlet urlSplit = fullFormUrl.split('?');\n\t\t\t\tlet queryString = urlSplit[1];\n\t\t\t\tlet queryParameters = queryString.split('&');\n\t\t\t\tfor (let index = 0; index < queryParameters.length; index++) {\n\t\t\t\t\tlet queryParam = queryParameters[index];\n\t\t\t\t\tlet queryParamComponents = queryParam.split('=');\n\t\t\t\t\tif (jQuery.inArray(queryParamComponents[0], eliminatedKeys) == '-1') {\n\t\t\t\t\t\trelatedParams[queryParamComponents[0]] = queryParamComponents[1];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tquickCreateParams['data'] = relatedParams;\n\t\t\tquickCreateParams['callbackFunction'] = callback;\n\t\t\tquickCreateParams['callbackPostShown'] = preQuickCreateSave;\n\t\t\tquickCreateParams['noCache'] = true;\n\t\t\tApp.Components.QuickCreate.createRecord(referenceModuleName, quickCreateParams);\n\t\t\treturn aDeferred.promise();\n\t\t},\n\t\tregisterEvents: function () {\n\t\t\tthis._super();\n\t\t\tthis.registerSetServiceContracts();\n\t\t\tthis.registerHierarchyRecordCount();\n\t\t\tthis.registerShowHierarchy();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Detail_Js","setAccountsReference","app","showRecordsList","module","src_module","src_record","getRecordId","_modal","instance","setSelectEvent","responseData","getInstance","saveFieldValues","field","value","id","done","location","reload","registerSetServiceContracts","thisInstance","$","on","e","element","jQuery","currentTarget","setRelatedFields","data","getHierarchyResponseData","params","aDeferred","Deferred","isEmptyObject","hierarchyResponseCache","AppConnector","request","then","resolve","promise","displayHierarchyResponseData","callbackFunction","showScrollBar","height","railVisible","size","showModalWindow","modal","App","Components","Scrollbar","xy","registerChangeStatusInHierarchy","registerHierarchyRecordCount","hierarchyButton","getModuleName","action","record","mode","length","response","success","html","result","registerShowHierarchy","view","progressIndicatorElement","progressIndicator","position","blockInfo","enabled","container","find","recordsType","val","status","showNotify","text","type","hideModalWindow","showProgressConfirmation","picklistName","_this","picklistValue","showConfirmModal","title","vtranslate","confirmedCallback","window","fail","error","err","errorLog","fieldDetailList","_this2","self","recordId","saveData","arguments","async","dataType","reponseData","CONFIG","checkIfRecordHasTimeControl","checkIfRelatedTicketsAreClosed","hasTimeControl","relatedTicketsClosed","addTimeControlCb","message","addTimeControl","url","concat","callback","parentId","quickCreateParams","relatedParams","relatedField","fullFormUrl","eliminatedKeys","Array","preQuickCreateSave","index","queryParam","queryParamComponents","queryParameters","indexOf","urlSplit","split","queryString","trigger","appendTo","inArray","callbackPostShown","noCache","QuickCreate","createRecord","registerEvents","_super"],"mappings":";;AAAA,kKACA,YAAY,CAEZA,gBAAgB,CACf,oBAAoB,CACpB,CACCC,oBAAoB,CAAE,SAAAA,sBAAY,CACjCC,GAAG,CAACC,eAAe,CAClB,CACCC,MAAM,CAAE,UAAU,CAClBC,UAAU,CA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H,2BAA2B,EAAE,CAClC,IAAI,CAACkC,4BAA4B,EAAE,CACnC,IAAI,CAACW,qBAAqB,GAC3B,CACD,CACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/HelpDesk/resources/Edit.min.js b/public_html/layouts/basic/modules/HelpDesk/resources/Edit.min.js index cb9600faba9f..fd3746cb8035 100644 --- a/public_html/layouts/basic/modules/HelpDesk/resources/Edit.min.js +++ b/public_html/layouts/basic/modules/HelpDesk/resources/Edit.min.js @@ -1,11 +1,11 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */"use strict";Vtiger_Edit_Js("HelpDesk_Edit_Js",{},{/** +/* {[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]} */"use strict";Vtiger_Edit_Js("HelpDesk_Edit_Js",{},{/** * Register pre save event * @param {jQuery} form */registerRecordPreSaveEventEvent:function registerRecordPreSaveEventEvent(form){var _this=this;this._super(form),form.on(Vtiger_Edit_Js.recordPreSave,function(e){try{_this.validateToClose(form).done(function(response){!0!==response&&e.preventDefault();});}catch(error){app.errorLog(error),app.showNotify({text:app.vtranslate("JS_ERROR"),type:"error"}),e.preventDefault();}});},validateToClose:function validateToClose(form){var _this2=this,aDeferred=$.Deferred(),closedStatus=app.getMainParams("closeTicketForStatus",!0),status=form.find("[name=\"ticketstatus\"] :selected").val(),progress=$.progressIndicator({position:"html",blockInfo:{enabled:!0}}),isClosedStatusSet=(status in closedStatus),recordId=form.find("[name=\"record\"]").val();if((app.getMainParams("checkIfRecordHasTimeControl")||app.getMainParams("checkIfRelatedTicketsAreClosed"))&&isClosedStatusSet&&recordId){var formData={action:"CheckValidateToClose",module:app.getModuleName(),record:recordId,status:form.find("[name=\"ticketstatus\"] :selected").val()};AppConnector.request({async:!1,url:"index.php",type:"POST",data:formData}).done(function(response){progress.progressIndicator({mode:"hide"}),response.result.hasTimeControl.result&&response.result.relatedTicketsClosed.result?aDeferred.resolve(!0):(!response.result.hasTimeControl.result&&(app.showNotify({text:response.result.hasTimeControl.message,type:"info"}),_this2.addTimeControl({recordId:recordId,url:"index.php?module=OSSTimeControl&view=Edit&sourceModule=HelpDesk&sourceRecord=".concat(recordId,"&relationOperation=true&subprocess=").concat(recordId,"&subprocess=").concat(recordId)})),!response.result.relatedTicketsClosed.result&&app.showNotify({text:response.result.relatedTicketsClosed.message,type:"info"}),aDeferred.resolve(!1));});}else isClosedStatusSet&&!recordId?(app.showNotify({text:app.vtranslate("JS_CANT_CLOSE_NEW_RECROD"),type:"info"}),progress.progressIndicator({mode:"hide"}),aDeferred.resolve(!1)):aDeferred.resolve(!0);return aDeferred.promise()},/** * Add time control when closed ticket * @param {array} params * @returns {Promise} - */addTimeControl:function addTimeControl(params){var aDeferred=jQuery.Deferred(),parentId=params.recordId,quickCreateParams={},relatedParams={},relatedField="subprocess",fullFormUrl=params.url;relatedParams[relatedField]=parentId;var eliminatedKeys=new Array("view","module","mode","action");if("undefined"!=typeof fullFormUrl&&-1!==fullFormUrl.indexOf("?"))for(var urlSplit=fullFormUrl.split("?"),queryString=urlSplit[1],queryParameters=queryString.split("&"),index=0;index").appendTo(data),jQuery("").appendTo(data),jQuery("").appendTo(data),"undefined"!=typeof relatedField){var field=data.find("[name=\""+relatedField+"\"]");0==field.length&&jQuery("").appendTo(data);}for(index=0;index").appendTo(data);},quickCreateParams.noCache=!0,App.Components.QuickCreate.createRecord("OSSTimeControl",quickCreateParams),aDeferred.promise()}}); + */addTimeControl:function addTimeControl(params){var aDeferred=jQuery.Deferred(),parentId=params.recordId,quickCreateParams={},relatedParams={},relatedField="subprocess",fullFormUrl=params.url;relatedParams[relatedField]=parentId;var eliminatedKeys=new Array("view","module","mode","action"),preQuickCreateSave=function preQuickCreateSave(data){var index,queryParam,queryParamComponents,queryParameters=[];if("undefined"!=typeof fullFormUrl&&-1!==fullFormUrl.indexOf("?")){var urlSplit=fullFormUrl.split("?"),queryString=urlSplit[1];for(queryParameters=queryString.split("&"),index=0;index").appendTo(data),jQuery("").appendTo(data),jQuery("").appendTo(data),"undefined"!=typeof relatedField){var field=data.find("[name=\""+relatedField+"\"]");0==field.length&&jQuery("").appendTo(data);}for(index=0;index").appendTo(data);};if("undefined"!=typeof fullFormUrl&&-1!==fullFormUrl.indexOf("?"))for(var urlSplit=fullFormUrl.split("?"),queryString=urlSplit[1],queryParameters=queryString.split("&"),index=0;index {\n\t\t\t\ttry {\n\t\t\t\t\tthis.validateToClose(form).done((response) => {\n\t\t\t\t\t\tif (response !== true) {\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t} catch (error) {\n\t\t\t\t\tapp.errorLog(error);\n\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\ttext: app.vtranslate('JS_ERROR'),\n\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t});\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tvalidateToClose: function (form) {\n\t\t\tconst aDeferred = $.Deferred();\n\t\t\tlet closedStatus = app.getMainParams('closeTicketForStatus', true);\n\t\t\tlet status = form.find('[name=\"ticketstatus\"] :selected').val();\n\t\t\tlet progress = $.progressIndicator({ position: 'html', blockInfo: { enabled: true } });\n\t\t\tlet isClosedStatusSet = status in closedStatus;\n\t\t\tconst recordId = form.find('[name=\"record\"]').val();\n\t\t\tif (\n\t\t\t\t(app.getMainParams('checkIfRecordHasTimeControl') || app.getMainParams('checkIfRelatedTicketsAreClosed')) &&\n\t\t\t\tisClosedStatusSet &&\n\t\t\t\trecordId\n\t\t\t) {\n\t\t\t\tlet formData = {\n\t\t\t\t\taction: 'CheckValidateToClose',\n\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\trecord: recordId,\n\t\t\t\t\tstatus: form.find('[name=\"ticketstatus\"] :selected').val()\n\t\t\t\t};\n\t\t\t\tAppConnector.request({\n\t\t\t\t\tasync: false,\n\t\t\t\t\turl: 'index.php',\n\t\t\t\t\ttype: 'POST',\n\t\t\t\t\tdata: formData\n\t\t\t\t}).done((response) => {\n\t\t\t\t\tprogress.progressIndicator({ mode: 'hide' });\n\t\t\t\t\tif (response.result.hasTimeControl.result && response.result.relatedTicketsClosed.result) {\n\t\t\t\t\t\taDeferred.resolve(true);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (!response.result.hasTimeControl.result) {\n\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\ttext: response.result.hasTimeControl.message,\n\t\t\t\t\t\t\t\ttype: 'info'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tthis.addTimeControl({\n\t\t\t\t\t\t\t\trecordId: recordId,\n\t\t\t\t\t\t\t\turl: `index.php?module=OSSTimeControl&view=Edit&sourceModule=HelpDesk&sourceRecord=${recordId}&relationOperation=true&subprocess=${recordId}&subprocess=${recordId}`\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!response.result.relatedTicketsClosed.result) {\n\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\ttext: response.result.relatedTicketsClosed.message,\n\t\t\t\t\t\t\t\ttype: 'info'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\taDeferred.resolve(false);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else if (isClosedStatusSet && !recordId) {\n\t\t\t\tapp.showNotify({\n\t\t\t\t\ttext: app.vtranslate('JS_CANT_CLOSE_NEW_RECROD'),\n\t\t\t\t\ttype: 'info'\n\t\t\t\t});\n\t\t\t\tprogress.progressIndicator({ mode: 'hide' });\n\t\t\t\taDeferred.resolve(false);\n\t\t\t} else {\n\t\t\t\taDeferred.resolve(true);\n\t\t\t}\n\n\t\t\treturn aDeferred.promise();\n\t\t},\n\t\t/**\n\t\t * Add time control when closed ticket\n\t\t * @param {array} params\n\t\t * @returns {Promise}\n\t\t */\n\t\taddTimeControl: function (params) {\n\t\t\tlet aDeferred = jQuery.Deferred();\n\t\t\tlet referenceModuleName = 'OSSTimeControl';\n\t\t\tlet parentId = params.recordId;\n\t\t\tlet parentModule = 'HelpDesk';\n\t\t\tlet quickCreateParams = {};\n\t\t\tlet relatedParams = {};\n\t\t\tlet relatedField = 'subprocess';\n\t\t\tlet fullFormUrl = params.url;\n\t\t\trelatedParams[relatedField] = parentId;\n\t\t\tlet eliminatedKeys = new Array('view', 'module', 'mode', 'action');\n\n\t\t\tlet preQuickCreateSave = function (data) {\n\t\t\t\tlet index, queryParam, queryParamComponents;\n\t\t\t\tlet queryParameters = [];\n\n\t\t\t\tif (typeof fullFormUrl !== 'undefined' && fullFormUrl.indexOf('?') !== -1) {\n\t\t\t\t\tlet urlSplit = fullFormUrl.split('?');\n\t\t\t\t\tlet queryString = urlSplit[1];\n\t\t\t\t\tqueryParameters = queryString.split('&');\n\t\t\t\t\tfor (index = 0; index < queryParameters.length; index++) {\n\t\t\t\t\t\tqueryParam = queryParameters[index];\n\t\t\t\t\t\tqueryParamComponents = queryParam.split('=');\n\t\t\t\t\t\tif (queryParamComponents[0] == 'mode' && queryParamComponents[1] == 'Calendar') {\n\t\t\t\t\t\t\tdata.find('a[data-tab-name=\"Task\"]').trigger('click');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tjQuery('').appendTo(data);\n\t\t\t\tjQuery('').appendTo(data);\n\t\t\t\tjQuery('').appendTo(data);\n\n\t\t\t\tif (typeof relatedField !== 'undefined') {\n\t\t\t\t\tlet field = data.find('[name=\"' + relatedField + '\"]');\n\t\t\t\t\tif (field.length == 0) {\n\t\t\t\t\t\tjQuery('').appendTo(data);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (index = 0; index < queryParameters.length; index++) {\n\t\t\t\t\tqueryParam = queryParameters[index];\n\t\t\t\t\tqueryParamComponents = queryParam.split('=');\n\t\t\t\t\tif (\n\t\t\t\t\t\tjQuery.inArray(queryParamComponents[0], eliminatedKeys) == '-1' &&\n\t\t\t\t\t\tdata.find('[name=\"' + queryParamComponents[0] + '\"]').length == 0\n\t\t\t\t\t) {\n\t\t\t\t\t\tjQuery(\n\t\t\t\t\t\t\t''\n\t\t\t\t\t\t).appendTo(data);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\tif (typeof fullFormUrl !== 'undefined' && fullFormUrl.indexOf('?') !== -1) {\n\t\t\t\tlet urlSplit = fullFormUrl.split('?');\n\t\t\t\tlet queryString = urlSplit[1];\n\t\t\t\tlet queryParameters = queryString.split('&');\n\t\t\t\tfor (let index = 0; index < queryParameters.length; index++) {\n\t\t\t\t\tlet queryParam = queryParameters[index];\n\t\t\t\t\tlet queryParamComponents = queryParam.split('=');\n\t\t\t\t\tif (jQuery.inArray(queryParamComponents[0], eliminatedKeys) == '-1') {\n\t\t\t\t\t\trelatedParams[queryParamComponents[0]] = queryParamComponents[1];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tquickCreateParams['data'] = relatedParams;\n\t\t\tquickCreateParams['callbackFunction'] = function () {};\n\t\t\tquickCreateParams['callbackPostShown'] = preQuickCreateSave;\n\t\t\tquickCreateParams['noCache'] = true;\n\t\t\tApp.Components.QuickCreate.createRecord(referenceModuleName, quickCreateParams);\n\t\t\treturn aDeferred.promise();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Edit_Js","registerRecordPreSaveEventEvent","form","_super","on","recordPreSave","e","validateToClose","done","response","preventDefault","error","app","errorLog","showNotify","text","vtranslate","type","aDeferred","$","Deferred","closedStatus","getMainParams","status","find","val","progress","progressIndicator","position","blockInfo","enabled","isClosedStatusSet","recordId","action","module","getModuleName","record","AppConnector","request","async","url","data","formData","mode","result","hasTimeControl","relatedTicketsClosed","resolve","message","addTimeControl","promise","params","jQuery","parentId","quickCreateParams","relatedParams","relatedField","fullFormUrl","eliminatedKeys","indexOf","split","queryString","urlSplit","queryParameters","index","length","queryParam","queryParamComponents","inArray","preQuickCreateSave","trigger","appendTo","field","App","Components","QuickCreate","createRecord"],"mappings":";;AAAA,kKACA,aAEAA,cAAc,CACb,kBADa,CAEb,EAFa,CAGb;AAED;AACA;AACA,KACEC,+BAA+B,CAAE,SAAUC,+BAAAA,CAAAA,IAAV,CAAgB,CAChD,IAAA,KAAA,CAAA,IAAA,CAAA,IAAA,CAAKC,MAAL,CAAYD,IAAZ,CADgD,CAEhDA,IAAI,CAACE,EAAL,CAAQJ,cAAc,CAACK,aAAvB,CAAsC,SAACC,CAAD,CAAa,CAClD,GAAI,CACH,KAAI,CAACC,eAAL,CAAqBL,IAArB,CAAA,CAA2BM,IAA3B,CAAgC,SAACC,QAAD,CAAc,CACzC,CAAA,CAAA,GAAAA,QADyC,EAE5CH,CAAC,CAACI,cAAF,GAED,CAJD,EAKA,CAAC,MAAOC,KAAP,CAAc,CACfC,GAAG,CAACC,QAAJ,CAAaF,KAAb,CADe,CAEfC,GAAG,CAACE,UAAJ,CAAe,CACdC,IAAI,CAAEH,GAAG,CAACI,UAAJ,CAAe,UAAf,CADQ,CAEdC,IAAI,CAAE,OAFQ,CAAf,CAFe,CAMfX,CAAC,CAACI,cAAF,GACA,CACD,CAfD,EAgBA,CAvBF,CAwBCH,eAAe,CAAE,SAAA,eAAA,CAAUL,IAAV,CAAgB,CAAA,IAAA,MAAA,CAAA,IAAA,CAC1BgB,SAAS,CAAGC,CAAC,CAACC,QAAF,EADc,CAE5BC,YAAY,CAAGT,GAAG,CAACU,aAAJ,CAAkB,sBAAlB,CAFa,CAAA,CAAA,CAAA,CAG5BC,MAAM,CAAGrB,IAAI,CAACsB,IAAL,CAAU,mCAAV,EAA6CC,GAA7C,EAHmB,CAI5BC,QAAQ,CAAGP,CAAC,CAACQ,iBAAF,CAAoB,CAAEC,QAAQ,CAAE,MAAZ,CAAoBC,SAAS,CAAE,CAAEC,OAAO,CAAT,CAAA,CAAA,CAA/B,CAApB,CAJiB,C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AxC,CACgE,EAAA,CAAhE,EAAAjB,IAAI,CAACjB,IAAL,CAAU,UAAY2C,CAAAA,oBAAoB,CAAC,CAAD,CAAhC,CAAsC,KAAhD,CAAA,CAAsDF,MALxD,EAOEb,MAAM,CACL,gCAAgCe,CAAAA,oBAAoB,CAAC,CAAD,CAApD,CAA0D,aAA1D,CAAwEA,oBAAoB,CAAC,CAAD,CAA5F,CAAkG,OAD7F,CAAN,CAEEI,QAFF,CAEW9B,IAFX,EAKF,CAmBD,CAFAa,iBAAiB,CAAA,OAAjB,CAEA,CAAA,CAAA,CADAmB,GAAG,CAACC,UAAJ,CAAeC,WAAf,CAA2BC,YAA3B,CAlE0B,gBAkE1B,CAA6DtB,iBAA7D,CACA,CAAOpC,SAAS,CAACgC,OAAV,EACP,CA/JF,CAHa;;"} \ No newline at end of file +{"version":3,"file":"Edit.min.js","sources":["Edit.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\nVtiger_Edit_Js(\n\t'HelpDesk_Edit_Js',\n\t{},\n\t{\n\t\t/**\n\t\t * Register pre save event\n\t\t * @param {jQuery} form\n\t\t */\n\t\tregisterRecordPreSaveEventEvent: function (form) {\n\t\t\tthis._super(form);\n\t\t\tform.on(Vtiger_Edit_Js.recordPreSave, (e, data) => {\n\t\t\t\ttry {\n\t\t\t\t\tthis.validateToClose(form).done((response) => {\n\t\t\t\t\t\tif (response !== true) {\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t} catch (error) {\n\t\t\t\t\tapp.errorLog(error);\n\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\ttext: app.vtranslate('JS_ERROR'),\n\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t});\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tvalidateToClose: function (form) {\n\t\t\tconst aDeferred = $.Deferred();\n\t\t\tlet closedStatus = app.getMainParams('closeTicketForStatus', true);\n\t\t\tlet status = form.find('[name=\"ticketstatus\"] :selected').val();\n\t\t\tlet progress = $.progressIndicator({ position: 'html', blockInfo: { enabled: true } });\n\t\t\tlet isClosedStatusSet = status in closedStatus;\n\t\t\tconst recordId = form.find('[name=\"record\"]').val();\n\t\t\tif (\n\t\t\t\t(app.getMainParams('checkIfRecordHasTimeControl') || app.getMainParams('checkIfRelatedTicketsAreClosed')) &&\n\t\t\t\tisClosedStatusSet &&\n\t\t\t\trecordId\n\t\t\t) {\n\t\t\t\tlet formData = {\n\t\t\t\t\taction: 'CheckValidateToClose',\n\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\trecord: recordId,\n\t\t\t\t\tstatus: form.find('[name=\"ticketstatus\"] :selected').val()\n\t\t\t\t};\n\t\t\t\tAppConnector.request({\n\t\t\t\t\tasync: false,\n\t\t\t\t\turl: 'index.php',\n\t\t\t\t\ttype: 'POST',\n\t\t\t\t\tdata: formData\n\t\t\t\t}).done((response) => {\n\t\t\t\t\tprogress.progressIndicator({ mode: 'hide' });\n\t\t\t\t\tif (response.result.hasTimeControl.result && response.result.relatedTicketsClosed.result) {\n\t\t\t\t\t\taDeferred.resolve(true);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (!response.result.hasTimeControl.result) {\n\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\ttext: response.result.hasTimeControl.message,\n\t\t\t\t\t\t\t\ttype: 'info'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tthis.addTimeControl({\n\t\t\t\t\t\t\t\trecordId: recordId,\n\t\t\t\t\t\t\t\turl: `index.php?module=OSSTimeControl&view=Edit&sourceModule=HelpDesk&sourceRecord=${recordId}&relationOperation=true&subprocess=${recordId}&subprocess=${recordId}`\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!response.result.relatedTicketsClosed.result) {\n\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\ttext: response.result.relatedTicketsClosed.message,\n\t\t\t\t\t\t\t\ttype: 'info'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\taDeferred.resolve(false);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else if (isClosedStatusSet && !recordId) {\n\t\t\t\tapp.showNotify({\n\t\t\t\t\ttext: app.vtranslate('JS_CANT_CLOSE_NEW_RECROD'),\n\t\t\t\t\ttype: 'info'\n\t\t\t\t});\n\t\t\t\tprogress.progressIndicator({ mode: 'hide' });\n\t\t\t\taDeferred.resolve(false);\n\t\t\t} else {\n\t\t\t\taDeferred.resolve(true);\n\t\t\t}\n\n\t\t\treturn aDeferred.promise();\n\t\t},\n\t\t/**\n\t\t * Add time control when closed ticket\n\t\t * @param {array} params\n\t\t * @returns {Promise}\n\t\t */\n\t\taddTimeControl: function (params) {\n\t\t\tlet aDeferred = jQuery.Deferred();\n\t\t\tlet referenceModuleName = 'OSSTimeControl';\n\t\t\tlet parentId = params.recordId;\n\t\t\tlet parentModule = 'HelpDesk';\n\t\t\tlet quickCreateParams = {};\n\t\t\tlet relatedParams = {};\n\t\t\tlet relatedField = 'subprocess';\n\t\t\tlet fullFormUrl = params.url;\n\t\t\trelatedParams[relatedField] = parentId;\n\t\t\tlet eliminatedKeys = new Array('view', 'module', 'mode', 'action');\n\n\t\t\tlet preQuickCreateSave = function (data) {\n\t\t\t\tlet index, queryParam, queryParamComponents;\n\t\t\t\tlet queryParameters = [];\n\n\t\t\t\tif (typeof fullFormUrl !== 'undefined' && fullFormUrl.indexOf('?') !== -1) {\n\t\t\t\t\tlet urlSplit = fullFormUrl.split('?');\n\t\t\t\t\tlet queryString = urlSplit[1];\n\t\t\t\t\tqueryParameters = queryString.split('&');\n\t\t\t\t\tfor (index = 0; index < queryParameters.length; index++) {\n\t\t\t\t\t\tqueryParam = queryParameters[index];\n\t\t\t\t\t\tqueryParamComponents = queryParam.split('=');\n\t\t\t\t\t\tif (queryParamComponents[0] == 'mode' && queryParamComponents[1] == 'Calendar') {\n\t\t\t\t\t\t\tdata.find('a[data-tab-name=\"Task\"]').trigger('click');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tjQuery('').appendTo(data);\n\t\t\t\tjQuery('').appendTo(data);\n\t\t\t\tjQuery('').appendTo(data);\n\n\t\t\t\tif (typeof relatedField !== 'undefined') {\n\t\t\t\t\tlet field = data.find('[name=\"' + relatedField + '\"]');\n\t\t\t\t\tif (field.length == 0) {\n\t\t\t\t\t\tjQuery('').appendTo(data);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (index = 0; index < queryParameters.length; index++) {\n\t\t\t\t\tqueryParam = queryParameters[index];\n\t\t\t\t\tqueryParamComponents = queryParam.split('=');\n\t\t\t\t\tif (\n\t\t\t\t\t\tjQuery.inArray(queryParamComponents[0], eliminatedKeys) == '-1' &&\n\t\t\t\t\t\tdata.find('[name=\"' + queryParamComponents[0] + '\"]').length == 0\n\t\t\t\t\t) {\n\t\t\t\t\t\tjQuery(\n\t\t\t\t\t\t\t''\n\t\t\t\t\t\t).appendTo(data);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\tif (typeof fullFormUrl !== 'undefined' && fullFormUrl.indexOf('?') !== -1) {\n\t\t\t\tlet urlSplit = fullFormUrl.split('?');\n\t\t\t\tlet queryString = urlSplit[1];\n\t\t\t\tlet queryParameters = queryString.split('&');\n\t\t\t\tfor (let index = 0; index < queryParameters.length; index++) {\n\t\t\t\t\tlet queryParam = queryParameters[index];\n\t\t\t\t\tlet queryParamComponents = queryParam.split('=');\n\t\t\t\t\tif (jQuery.inArray(queryParamComponents[0], eliminatedKeys) == '-1') {\n\t\t\t\t\t\trelatedParams[queryParamComponents[0]] = queryParamComponents[1];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tquickCreateParams['data'] = relatedParams;\n\t\t\tquickCreateParams['callbackFunction'] = function () {};\n\t\t\tquickCreateParams['callbackPostShown'] = preQuickCreateSave;\n\t\t\tquickCreateParams['noCache'] = true;\n\t\t\tApp.Components.QuickCreate.createRecord(referenceModuleName, quickCreateParams);\n\t\t\treturn aDeferred.promise();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Edit_Js","registerRecordPreSaveEventEvent","form","_this","_super","on","recordPreSave","e","validateToClose","done","response","preventDefault","error","app","errorLog","showNotify","text","vtranslate","type","_this2","aDeferred","$","Deferred","closedStatus","getMainParams","status","find","val","progress","progressIndicator","position","blockInfo","enabled","isClosedStatusSet","recordId","formData","action","module","getModuleName","record","AppConnector","request","async","url","data","mode","result","hasTimeControl","relatedTicketsClosed","resolve","message","addTimeControl","concat","promise","params","jQuery","parentId","quickCreateParams","relatedParams","relatedField","fullFormUrl","eliminatedKeys","Array","preQuickCreateSave","index","queryParam","queryParamComponents","queryParameters","indexOf","urlSplit","split","queryString","length","trigger","appendTo","field","inArray","callbackFunction","callbackPostShown","noCache","App","Components","QuickCreate","createRecord"],"mappings":";;AAAA,kKACA,YAAY,CAEZA,cAAc,CACb,kBAAkB,CAClB,EAAE,CACF;AAED;AACA;AACA,KACEC,+BAA+B,CAAE,SAAAA,+BAAUC,CAAAA,IAAI,CAAE,CAAAC,IAAAA,KAAA,CAChD,IAAA,CAAA,IAAI,CAACC,MAAM,CAACF,IAAI,CAAC,CACjBA,IAAI,CAACG,EAAE,CAACL,cAAc,CAACM,aAAa,CAAE,SAACC,CAAC,CAAW,CAClD,GAAI,CACHJ,KAAI,CAACK,eAAe,CAACN,IAAI,CAAC,CAACO,IAAI,CAAC,SAACC,QAAQ,CAAK,CACzC,CAAAA,CAAAA,GAAAA,QAAiB,EACpBH,CAAC,CAACI,cAAc,GAElB,CAAC,EACF,CAAE,MAAOC,KAAK,CAAE,CACfC,GAAG,CAACC,QAAQ,CAACF,KAAK,CAAC,CACnBC,GAAG,CAACE,UAAU,CAAC,CACd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AW,EAAlC,OAAOgB,WAA2B,EAAiC,CAAC,CAAC,GAA/BA,WAAW,CAACQ,OAAO,CAAC,GAAG,CAAQ,CAIxE,IAAA,IAHIC,QAAQ,CAAGT,WAAW,CAACU,KAAK,CAAC,GAAG,CAAC,CACjCC,WAAW,CAAGF,QAAQ,CAAC,CAAC,CAAC,CACzBF,eAAe,CAAGI,WAAW,CAACD,KAAK,CAAC,GAAG,CAAC,CACnCN,KAAK,CAAG,CAAC,CAAEA,KAAK,CAAGG,eAAe,CAACK,MAAM,CAAER,KAAK,EAAE,CAAE,CAAA,IACxDC,UAAU,CAAGE,eAAe,CAACH,KAAK,CAAC,CACnCE,oBAAoB,CAAGD,UAAU,CAACK,KAAK,CAAC,GAAG,CAAC,CACe,IAAI,EAA/Df,MAAM,CAACqB,OAAO,CAACV,oBAAoB,CAAC,CAAC,CAAC,CAAEL,cAAc,CAAS,GAClEH,aAAa,CAACQ,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAGA,oBAAoB,CAAC,CAAC,CAAC,EAElE,CAQD,OALAT,iBAAiB,CAAAb,IAAQ,CAAGc,aAAa,CACzCD,iBAAiB,CAAAoB,gBAAoB,CAAG,UAAY,EAAE,CACtDpB,iBAAiB,CAAAqB,iBAAqB,CAAGf,kBAAkB,CAC3DN,iBAAiB,CAAAsB,OAAW,CAAO,CAAA,CAAA,CACnCC,GAAG,CAACC,UAAU,CAACC,WAAW,CAACC,YAAY,CAlEb,gBAAgB,CAkEmB1B,iBAAiB,CAAC,CACxErC,SAAS,CAACiC,OAAO,EACzB,CACD,CACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/IStorages/resources/Detail.min.js b/public_html/layouts/basic/modules/IStorages/resources/Detail.min.js index 1d9d00fe9456..55a90321fd3b 100644 --- a/public_html/layouts/basic/modules/IStorages/resources/Detail.min.js +++ b/public_html/layouts/basic/modules/IStorages/resources/Detail.min.js @@ -1,9 +1,10 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */"use strict";Vtiger_Detail_Js("IStorages_Detail_Js",{},{//It stores the IStorages Hierarchy response data +/* {[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]} */"use strict";Vtiger_Detail_Js("IStorages_Detail_Js",{},{//It stores the IStorages Hierarchy response data hierarchyResponseCache:{},/* * function to get the IStoragesHierarchy response data - */getHierarchyResponseData:function getHierarchyResponseData(params){var thisInstance=this,aDeferred=jQuery.Deferred();return jQuery.isEmptyObject(thisInstance.hierarchyResponseCache)?AppConnector.request(params).done(function(data){thisInstance.hierarchyResponseCache=data,aDeferred.resolve(thisInstance.hierarchyResponseCache);}):aDeferred.resolve(thisInstance.hierarchyResponseCache),aDeferred.promise()},/* + */getHierarchyResponseData:function getHierarchyResponseData(params){var thisInstance=this,aDeferred=jQuery.Deferred();//Check in the cache +return jQuery.isEmptyObject(thisInstance.hierarchyResponseCache)?AppConnector.request(params).done(function(data){thisInstance.hierarchyResponseCache=data,aDeferred.resolve(thisInstance.hierarchyResponseCache);}):aDeferred.resolve(thisInstance.hierarchyResponseCache),aDeferred.promise()},/* * function to display the IStorages Hierarchy response data */displayHierarchyResponseData:function displayHierarchyResponseData(data){var callbackFunction=function(){app.showScrollBar($("#hierarchyScroll"),{height:"300px",railVisible:!0,size:"6px"});};app.showModalWindow(data,function(modalContainer){App.Components.Scrollbar.xy($("#hierarchyScroll",modalContainer)),"function"==typeof callbackFunction&&300 300) {\n\t\t\t\t\tcallbackFunction(data);\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tregisterHierarchyRecordCount: function () {\n\t\t\tvar hierarchyButton = $('.detailViewTitle .hierarchy');\n\t\t\tif (hierarchyButton.length) {\n\t\t\t\tvar params = {\n\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\taction: 'RelationAjax',\n\t\t\t\t\trecord: app.getRecordId(),\n\t\t\t\t\tmode: 'getHierarchyCount'\n\t\t\t\t};\n\t\t\t\tAppConnector.request(params).done(function (response) {\n\t\t\t\t\tif (response.success) {\n\t\t\t\t\t\t$('.detailViewTitle .hierarchy .badge').html(response.result);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tregisterShowHierarchy: function () {\n\t\t\tvar thisInstance = this;\n\t\t\tvar hierarchyButton = $('.detailViewTitle');\n\t\t\tvar url = 'index.php?module=IStorages&view=Hierarchy&record=' + app.getRecordId();\n\t\t\thierarchyButton.on('click', '.js-detail__icon', function (e) {\n\t\t\t\tthisInstance.getHierarchyResponseData(url).done(function (data) {\n\t\t\t\t\tthisInstance.displayHierarchyResponseData(data);\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\tregisterEvents: function () {\n\t\t\tthis._super();\n\t\t\tthis.registerHierarchyRecordCount();\n\t\t\tthis.registerShowHierarchy();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Detail_Js","hierarchyResponseCache","getHierarchyResponseData","params","thisInstance","aDeferred","jQuery","Deferred","isEmptyObject","AppConnector","request","done","data","resolve","promise","displayHierarchyResponseData","app","showScrollBar","$","height","railVisible","size","showModalWindow","modalContainer","App","Components","Scrollbar","xy","callbackFunction","registerHierarchyRecordCount","hierarchyButton","length","module","getModuleName","action","record","getRecordId","mode","response","success","html","result","registerShowHierarchy","url","on","registerEvents","_super"],"mappings":";;AAAA,kKACA,aAEAA,gBAAgB,CACf,qBADe,CAEf,EAFe,CAGf;AAECC,sBAAsB,CAAE,EAFzB;AAID;AACA,KACEC,wBAAwB,CAAE,SAAUC,wBAAAA,CAAAA,MAAV,CAAkB,CACvCC,IAAAA,YAAY,CAAG,IADwB,CAEvCC,SAAS,CAAGC,MAAM,CAACC,QAAP,EAF2B,CAc3C,OATW,MAAA,CAACC,aAAP,CAAqBJ,YAAY,CAACH,sBAAlC,CASL,CANCQ,YAAY,CAACC,OAAb,CAAqBP,MAArB,EAA6BQ,IAA7B,CAAkC,SAAUC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AkC,SAAU2B,QAAV,CAAoB,CACjDA,QAAQ,CAACC,OADwC,EAEpDrB,CAAC,CAAC,oCAAD,CAAD,CAAwCsB,IAAxC,CAA6CF,QAAQ,CAACG,MAAtD,EAED,CAJD,EAKA,CACD,CAvDF,CAwDCC,qBAAqB,CAAE,SAAY,qBAAA,EAAA,CAAA,IAClB,YAAA,CAAG,IADe,CAE9BZ,eAAe,CAAGZ,CAAC,CAAC,kBAAD,CAFW,CAG9ByB,GAAG,CAAG,mDAAsD3B,CAAAA,GAAG,CAACoB,WAAJ,EAH9B,CAIlCN,eAAe,CAACc,EAAhB,CAAmB,OAAnB,CAA4B,kBAA5B,CAAgD,UAAa,CAC5DxC,YAAY,CAACF,wBAAb,CAAsCyC,GAAtC,CAA2ChC,CAAAA,IAA3C,CAAgD,SAAUC,IAAV,CAAgB,CAC/DR,YAAY,CAACW,4BAAb,CAA0CH,IAA1C,EACA,CAFD,EAGA,CAJD,EAKA,CAjEF,CAkECiC,cAAc,CAAE,SAAY,cAAA,EAAA,CAC3B,KAAKC,MAAL,EAD2B,CAE3B,IAAA,CAAKjB,4BAAL,EAF2B,CAG3B,IAAA,CAAKa,qBAAL,GACA,CAtEF,CAHe;;"} \ No newline at end of file +{"version":3,"file":"Detail.min.js","sources":["Detail.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\nVtiger_Detail_Js(\n\t'IStorages_Detail_Js',\n\t{},\n\t{\n\t\t//It stores the IStorages Hierarchy response data\n\t\thierarchyResponseCache: {},\n\t\t/*\n\t\t * function to get the IStoragesHierarchy response data\n\t\t */\n\t\tgetHierarchyResponseData: function (params) {\n\t\t\tvar thisInstance = this;\n\t\t\tvar aDeferred = jQuery.Deferred();\n\n\t\t\t//Check in the cache\n\t\t\tif (!jQuery.isEmptyObject(thisInstance.hierarchyResponseCache)) {\n\t\t\t\taDeferred.resolve(thisInstance.hierarchyResponseCache);\n\t\t\t} else {\n\t\t\t\tAppConnector.request(params).done(function (data) {\n\t\t\t\t\t//store it in the cache, so that we dont do multiple request\n\t\t\t\t\tthisInstance.hierarchyResponseCache = data;\n\t\t\t\t\taDeferred.resolve(thisInstance.hierarchyResponseCache);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn aDeferred.promise();\n\t\t},\n\t\t/*\n\t\t * function to display the IStorages Hierarchy response data\n\t\t */\n\t\tdisplayHierarchyResponseData: function (data) {\n\t\t\tlet callbackFunction = function (data) {\n\t\t\t\tapp.showScrollBar($('#hierarchyScroll'), {\n\t\t\t\t\theight: '300px',\n\t\t\t\t\trailVisible: true,\n\t\t\t\t\tsize: '6px'\n\t\t\t\t});\n\t\t\t};\n\t\t\tapp.showModalWindow(data, function (modalContainer) {\n\t\t\t\tApp.Components.Scrollbar.xy($('#hierarchyScroll', modalContainer));\n\t\t\t\tif (typeof callbackFunction == 'function' && jQuery('#hierarchyScroll', modalContainer).height() > 300) {\n\t\t\t\t\tcallbackFunction(data);\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tregisterHierarchyRecordCount: function () {\n\t\t\tvar hierarchyButton = $('.detailViewTitle .hierarchy');\n\t\t\tif (hierarchyButton.length) {\n\t\t\t\tvar params = {\n\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\taction: 'RelationAjax',\n\t\t\t\t\trecord: app.getRecordId(),\n\t\t\t\t\tmode: 'getHierarchyCount'\n\t\t\t\t};\n\t\t\t\tAppConnector.request(params).done(function (response) {\n\t\t\t\t\tif (response.success) {\n\t\t\t\t\t\t$('.detailViewTitle .hierarchy .badge').html(response.result);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tregisterShowHierarchy: function () {\n\t\t\tvar thisInstance = this;\n\t\t\tvar hierarchyButton = $('.detailViewTitle');\n\t\t\tvar url = 'index.php?module=IStorages&view=Hierarchy&record=' + app.getRecordId();\n\t\t\thierarchyButton.on('click', '.js-detail__icon', function (e) {\n\t\t\t\tthisInstance.getHierarchyResponseData(url).done(function (data) {\n\t\t\t\t\tthisInstance.displayHierarchyResponseData(data);\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\tregisterEvents: function () {\n\t\t\tthis._super();\n\t\t\tthis.registerHierarchyRecordCount();\n\t\t\tthis.registerShowHierarchy();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Detail_Js","hierarchyResponseCache","getHierarchyResponseData","params","thisInstance","aDeferred","jQuery","Deferred","isEmptyObject","AppConnector","request","done","data","resolve","promise","displayHierarchyResponseData","callbackFunction","app","showScrollBar","$","height","railVisible","size","showModalWindow","modalContainer","App","Components","Scrollbar","xy","registerHierarchyRecordCount","hierarchyButton","length","module","getModuleName","action","record","getRecordId","mode","response","success","html","result","registerShowHierarchy","url","on","registerEvents","_super"],"mappings":";;AAAA,kKACA,YAAY,CAEZA,gBAAgB,CACf,qBAAqB,CACrB,EAAE,CACF;AAECC,sBAAsB,CAAE,EAAE;AAE5B;AACA,KACEC,wBAAwB,CAAE,SAAAA,yBAAUC,MAAM,CAAE,KACvCC,YAAY,CAAG,IAAI,CACnBC,SAAS,CAAGC,MAAM,CAACC,QAAQ,EAAE,CAEjC;AAUA,OATKD,MAAM,CAACE,aAAa,CAACJ,YAAY,CAACH,sBAAsB,CAAC,CAG7DQ,YAAY,CAACC,OAAO,CAACP,MAAM,CAAC,CAACQ,IAAI,CAAC,SAAUC,IAAI,CAAE,CAEjDR,YAAY,CAACH,sBAAsB,CAAGW,IAAI,CAC1CP,SAAS,CAACQ,OAAO,CAACT,YAAY,CAACH,sBAAsB,EACtD,CAAC,CAAC,CANFI,SAAS,CAACQ,OAAO,CAACT,YAAY,CAACH,sBAAsB,CAAC,CAQhDI,SAAS,CAACS,OAAO,EACzB,CAAC;AAEH;AACA,KACEC,4BAA4B,CAAE,SAAAA,4BAAAA,CAAUH,IAAI,CAAE,CAC7C,IAAII,gBAAgB,CAAG,UAAgB,CACtCC,GAAG,CAACC,aAA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AC5DxC,YAAY,CAACF,wBAAwB,CAACyC,GAAG,CAAC,CAAChC,IAAI,CAAC,SAAUC,IAAI,CAAE,CAC/DR,YAAY,CAACW,4BAA4B,CAACH,IAAI,EAC/C,CAAC,EACF,CAAC,EACF,CAAC,CACDiC,cAAc,CAAE,SAAAA,cAAA,EAAY,CAC3B,IAAI,CAACC,MAAM,EAAE,CACb,IAAI,CAACjB,4BAA4B,EAAE,CACnC,IAAI,CAACa,qBAAqB,GAC3B,CACD,CACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/IStorages/resources/RelatedList.min.js b/public_html/layouts/basic/modules/IStorages/resources/RelatedList.min.js index 6e7f19635dcc..ec4ea433ad6f 100644 --- a/public_html/layouts/basic/modules/IStorages/resources/RelatedList.min.js +++ b/public_html/layouts/basic/modules/IStorages/resources/RelatedList.min.js @@ -1,4 +1,4 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */"use strict";Vtiger_RelatedList_Js("IStorages_RelatedList_Js",{registerEditQty:function registerEditQty(){var thisInstance=this,element=this.content.find(".js-edit-qtyproductinstock");element.validationEngine(app.validationEngineOptions),element.on("change",function(e){e.stopPropagation();var element=$(e.currentTarget);element.formatNumber(),element.validationEngine("validate")||AppConnector.request({module:thisInstance.parentModuleName,record:element.closest(".js-list__row").data("id"),action:"RelationAjax",mode:"setQtyProducts",src_record:thisInstance.parentRecordId,related_module:thisInstance.moduleName,qty:element.val()}).done(function(responseData){responseData.result&&app.showNotify({text:app.vtranslate("JS_SAVE_NOTIFY_OK"),type:"success"});});});},registerPostLoadEvents:function registerPostLoadEvents(){this._super(),this.registerEditQty();}}); +/* {[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]} */"use strict";Vtiger_RelatedList_Js("IStorages_RelatedList_Js",{registerEditQty:function registerEditQty(){var thisInstance=this,element=this.content.find(".js-edit-qtyproductinstock");element.validationEngine(app.validationEngineOptions),element.on("change",function(e){e.stopPropagation();var element=$(e.currentTarget);element.formatNumber(),element.validationEngine("validate")||AppConnector.request({module:thisInstance.parentModuleName,record:element.closest(".js-list__row").data("id"),action:"RelationAjax",mode:"setQtyProducts",src_record:thisInstance.parentRecordId,related_module:thisInstance.moduleName,qty:element.val()}).done(function(responseData){responseData.result&&app.showNotify({text:app.vtranslate("JS_SAVE_NOTIFY_OK"),type:"success"});});});},registerPostLoadEvents:function registerPostLoadEvents(){this._super(),this.registerEditQty();}}); //# sourceMappingURL=RelatedList.min.js.map diff --git a/public_html/layouts/basic/modules/IStorages/resources/RelatedList.min.js.map b/public_html/layouts/basic/modules/IStorages/resources/RelatedList.min.js.map index 6d8560051ed5..88153a2a663f 100644 --- a/public_html/layouts/basic/modules/IStorages/resources/RelatedList.min.js.map +++ b/public_html/layouts/basic/modules/IStorages/resources/RelatedList.min.js.map @@ -1 +1 @@ -{"version":3,"file":"RelatedList.min.js","sources":["RelatedList.js"],"sourcesContent":["/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */\n'use strict';\n\nVtiger_RelatedList_Js('IStorages_RelatedList_Js', {\n\tregisterEditQty: function () {\n\t\tlet thisInstance = this;\n\t\tlet element = this.content.find('.js-edit-qtyproductinstock');\n\t\telement.validationEngine(app.validationEngineOptions);\n\t\telement.on('change', (e) => {\n\t\t\te.stopPropagation();\n\t\t\tlet element = $(e.currentTarget);\n\t\t\telement.formatNumber();\n\t\t\tif (!element.validationEngine('validate')) {\n\t\t\t\tAppConnector.request({\n\t\t\t\t\tmodule: thisInstance.parentModuleName,\n\t\t\t\t\trecord: element.closest('.js-list__row').data('id'),\n\t\t\t\t\taction: 'RelationAjax',\n\t\t\t\t\tmode: 'setQtyProducts',\n\t\t\t\t\tsrc_record: thisInstance.parentRecordId,\n\t\t\t\t\trelated_module: thisInstance.moduleName,\n\t\t\t\t\tqty: element.val()\n\t\t\t\t}).done(function (responseData) {\n\t\t\t\t\tif (responseData.result) {\n\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\ttext: app.vtranslate('JS_SAVE_NOTIFY_OK'),\n\t\t\t\t\t\t\ttype: 'success'\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t},\n\tregisterPostLoadEvents: function () {\n\t\tthis._super();\n\t\tthis.registerEditQty();\n\t}\n});\n"],"names":["Vtiger_RelatedList_Js","registerEditQty","element","content","find","validationEngine","app","validationEngineOptions","on","e","stopPropagation","$","currentTarget","formatNumber","AppConnector","request","module","thisInstance","parentModuleName","record","closest","data","action","mode","src_record","parentRecordId","related_module","moduleName","qty","val","done","responseData","result","showNotify","text","vtranslate","type","registerPostLoadEvents","_super"],"mappings":";;AAAA,kKACA,aAEAA,qBAAqB,CAAC,0BAAD,CAA6B,CACjDC,eAAe,CAAE,SAAY,eAAA,EAAA,CAAA,gBACZ,CAAG,IADS,CAExBC,OAAO,CAAG,KAAKC,OAAL,CAAaC,IAAb,CAAkB,4BAAlB,CAFc,CAG5BF,OAAO,CAACG,gBAAR,CAAyBC,GAAG,CAACC,uBAA7B,CAH4B,CAI5BL,OAAO,CAACM,EAAR,CAAW,QAAX,CAAqB,SAACC,CAAD,CAAO,CAC3BA,CAAC,CAACC,eAAF,EAD2B,CAE3B,WAAW,CAAGC,CAAC,CAACF,CAAC,CAACG,aAAH,CAAf,CACAV,OAAO,CAACW,YAAR,EAH2B,CAItBX,OAAO,CAACG,gBAAR,CAAyB,UAAzB,CAJsB,EAK1BS,YAAY,CAACC,OAAb,CAAqB,CACpBC,MAAM,CAAEC,YAAY,CAACC,gBADD,CAEpBC,MAAM,CAAEjB,OAAO,CAACkB,OAAR,CAAgB,eAAhB,CAAiCC,CAAAA,IAAjC,CAAsC,IAAtC,CAFY,CAGpBC,MAAM,CAAE,cAHY,CAIpBC,IAAI,CAAE,gBAJc,CAKpBC,UAAU,CAAEP,YAAY,CAACQ,cALL,CAMpBC,cAAc,CAAET,YAAY,CAACU,UANT,CAOpBC,GAAG,CAAE1B,OAAO,CAAC2B,GAAR,EAPe,CAArB,CAAA,CAQGC,IARH,CAQQ,SAAUC,YAAV,CAAwB,CAC3BA,YAAY,CAACC,MADc,EAE9B1B,GAAG,CAAC2B,UAAJ,CAAe,CACdC,IAAI,CAAE5B,GAAG,CAAC6B,UAAJ,CAAe,mBAAf,CADQ,CAEdC,IAAI,CAAE,SAFQ,CAAf,EAKD,CAfD,EAiBD,CAtBD,EAuBA,CA5BgD,CA6BjDC,sBAAsB,CAAE,SAAY,sBAAA,EAAA,CACnC,IAAKC,CAAAA,MAAL,EADmC,CAEnC,IAAA,CAAKrC,eAAL,GACA,CAhCgD,CAA7B;;"} \ No newline at end of file +{"version":3,"file":"RelatedList.min.js","sources":["RelatedList.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\nVtiger_RelatedList_Js('IStorages_RelatedList_Js', {\n\tregisterEditQty: function () {\n\t\tlet thisInstance = this;\n\t\tlet element = this.content.find('.js-edit-qtyproductinstock');\n\t\telement.validationEngine(app.validationEngineOptions);\n\t\telement.on('change', (e) => {\n\t\t\te.stopPropagation();\n\t\t\tlet element = $(e.currentTarget);\n\t\t\telement.formatNumber();\n\t\t\tif (!element.validationEngine('validate')) {\n\t\t\t\tAppConnector.request({\n\t\t\t\t\tmodule: thisInstance.parentModuleName,\n\t\t\t\t\trecord: element.closest('.js-list__row').data('id'),\n\t\t\t\t\taction: 'RelationAjax',\n\t\t\t\t\tmode: 'setQtyProducts',\n\t\t\t\t\tsrc_record: thisInstance.parentRecordId,\n\t\t\t\t\trelated_module: thisInstance.moduleName,\n\t\t\t\t\tqty: element.val()\n\t\t\t\t}).done(function (responseData) {\n\t\t\t\t\tif (responseData.result) {\n\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\ttext: app.vtranslate('JS_SAVE_NOTIFY_OK'),\n\t\t\t\t\t\t\ttype: 'success'\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t},\n\tregisterPostLoadEvents: function () {\n\t\tthis._super();\n\t\tthis.registerEditQty();\n\t}\n});\n"],"names":["Vtiger_RelatedList_Js","registerEditQty","thisInstance","element","content","find","validationEngine","app","validationEngineOptions","on","e","stopPropagation","$","currentTarget","formatNumber","AppConnector","request","module","parentModuleName","record","closest","data","action","mode","src_record","parentRecordId","related_module","moduleName","qty","val","done","responseData","result","showNotify","text","vtranslate","type","registerPostLoadEvents","_super"],"mappings":";;AAAA,kKACA,YAAY,CAEZA,qBAAqB,CAAC,0BAA0B,CAAE,CACjDC,eAAe,CAAE,SAAAA,eAAA,EAAY,KACxBC,YAAY,CAAG,IAAI,CACnBC,OAAO,CAAG,IAAI,CAACC,OAAO,CAACC,IAAI,CAAC,4BAA4B,CAAC,CAC7DF,OAAO,CAACG,gBAAgB,CAACC,GAAG,CAACC,uBAAuB,CAAC,CACrDL,OAAO,CAACM,EAAE,CAAC,QAAQ,CAAE,SAACC,CAAC,CAAK,CAC3BA,CAAC,CAACC,eAAe,EAAE,CACnB,IAAIR,OAAO,CAAGS,CAAC,CAACF,CAAC,CAACG,aAAa,CAAC,CAChCV,OAAO,CAACW,YAAY,EAAE,CACjBX,OAAO,CAACG,gBAAgB,CAAC,UAAU,CAAC,EACxCS,YAAY,CAACC,OAAO,CAAC,CACpBC,MAAM,CAAEf,YAAY,CAACgB,gBAAgB,CACrCC,MAAM,CAAEhB,OAAO,CAACiB,OAAO,CAAC,eAAe,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC,CACnDC,MAAM,CAAE,cAAc,CACtBC,IAAI,CAAE,gBAAgB,CACtBC,UAAU,CAAEtB,YAAY,CAACuB,cAAc,CACvCC,cAAc,CAAExB,YAAY,CAACyB,UAAU,CACvCC,GAAG,CAAEzB,OAAO,CAAC0B,GAAG,EACjB,CAAC,CAAC,CAACC,IAAI,CAAC,SAAUC,YAAY,CAAE,CAC3BA,YAAY,CAACC,MAAM,EACtBzB,GAAG,CAAC0B,UAAU,CAAC,CACdC,IAAI,CAAE3B,GAAG,CAAC4B,UAAU,CAAC,mBAAmB,CAAC,CACzCC,IAAI,CAAE,SACP,CAAC,EAEH,CAAC,EAEH,CAAC,EACF,CAAC,CACDC,sBAAsB,CAAE,SAAAA,wBAAY,CACnC,IAAI,CAACC,MAAM,EAAE,CACb,IAAI,CAACrC,eAAe,GACrB,CACD,CAAC,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/Import/resources/Import.min.js.map b/public_html/layouts/basic/modules/Import/resources/Import.min.js.map index ece150e65846..6debbe66a64e 100644 --- a/public_html/layouts/basic/modules/Import/resources/Import.min.js.map +++ b/public_html/layouts/basic/modules/Import/resources/Import.min.js.map @@ -1 +1 @@ -{"version":3,"file":"Import.min.js","sources":["Import.js"],"sourcesContent":["/*+**********************************************************************************\n * The contents of this file are subject to the vtiger CRM Public License Version 1.0\n * (\"License\"); You may not use this file except in compliance with the License\n * The Original Code is: vtiger CRM Open Source\n * The Initial Developer of the Original Code is vtiger.\n * Portions created by vtiger are Copyright (C) vtiger.\n * All Rights Reserved.\n * Contributor(s): YetiForce S.A.\n ************************************************************************************/\n'use strict';\n\nif (typeof ImportJs === 'undefined') {\n\t/*\n\t * Namespaced javascript class for Import\n\t */\n\tvar ImportJs = {\n\t\ttoogleMergeConfiguration: function () {\n\t\t\tvar mergeChecked = jQuery('#auto_merge').is(':checked');\n\t\t\tvar duplicateMergeConfiguration = jQuery('#duplicates_merge_configuration');\n\t\t\tif (mergeChecked) {\n\t\t\t\tduplicateMergeConfiguration.show();\n\t\t\t} else {\n\t\t\t\tduplicateMergeConfiguration.hide();\n\t\t\t}\n\t\t},\n\t\tcheckFileType: function () {\n\t\t\tvar filePath = jQuery('#import_file').val();\n\t\t\tif (filePath != '') {\n\t\t\t\tvar fileExtension = filePath.split('.').pop();\n\t\t\t\tjQuery('.js-type').val(fileExtension);\n\t\t\t\tImportJs.handleFileTypeChange();\n\t\t\t}\n\t\t},\n\t\thandleFileTypeChange: function () {\n\t\t\tvar fileType = jQuery('.js-type').val();\n\t\t\tvar delimiterContainer = jQuery('.js-delimiter-container');\n\t\t\tvar hasHeaderContainer = jQuery('.js-has-header-container');\n\t\t\tvar xmlTpl = jQuery('.js-xml-tpl');\n\t\t\tvar extension = jQuery('.js-zip-extension');\n\n\t\t\tswitch (fileType) {\n\t\t\t\tcase 'xml':\n\t\t\t\t\tdelimiterContainer.addClass('d-none');\n\t\t\t\t\thasHeaderContainer.addClass('d-none');\n\t\t\t\t\txmlTpl.removeClass('d-none');\n\t\t\t\t\textension.addClass('d-none');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'zip':\n\t\t\t\t\tdelimiterContainer.addClass('d-none');\n\t\t\t\t\thasHeaderContainer.addClass('d-none');\n\t\t\t\t\textension.removeClass('d-none');\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tdelimiterContainer.removeClass('d-none');\n\t\t\t\t\thasHeaderContainer.removeClass('d-none');\n\t\t\t\t\textension.addClass('d-none');\n\t\t\t\t\txmlTpl.addClass('d-none');\n\t\t\t}\n\t\t},\n\t\tuploadAndParse: function () {\n\t\t\tif (!ImportJs.validateFilePath()) return false;\n\t\t\tif (!ImportJs.validateMergeCriteria()) return false;\n\t\t\treturn true;\n\t\t},\n\t\tregisterImportClickEvent() {\n\t\t\t$('#importButton')\n\t\t\t\t.removeAttr('disabled')\n\t\t\t\t.on('click', function (e) {\n\t\t\t\t\treturn ImportJs.sanitizeAndSubmit();\n\t\t\t\t});\n\t\t},\n\t\tvalidateFilePath: function () {\n\t\t\tvar importFile = jQuery('#import_file');\n\t\t\tvar filePath = importFile.val();\n\t\t\tif (jQuery.trim(filePath) == '') {\n\t\t\t\tvar errorMessage = app.vtranslate('JS_IMPORT_FILE_CAN_NOT_BE_EMPTY');\n\t\t\t\tvar params = {\n\t\t\t\t\ttext: errorMessage,\n\t\t\t\t\ttype: 'error'\n\t\t\t\t};\n\t\t\t\tVtiger_Helper_Js.showMessage(params);\n\t\t\t\timportFile.focus();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (!ImportJs.uploadFilter('import_file', 'csv|vcf|xml|zip|ics|ical')) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (!ImportJs.uploadFileSize('import_file')) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\t\tuploadFilter: function (elementId, allowedExtensions) {\n\t\t\tvar obj = jQuery('#' + elementId);\n\t\t\tif (obj) {\n\t\t\t\tvar filePath = obj.val();\n\t\t\t\tvar fileParts = filePath.toLowerCase().split('.');\n\t\t\t\tvar fileType = fileParts[fileParts.length - 1];\n\t\t\t\tvar validExtensions = allowedExtensions.toLowerCase().split('|');\n\t\t\t\tif (validExtensions.indexOf(fileType) < 0) {\n\t\t\t\t\tvar errorMessage = app.vtranslate('JS_SELECT_FILE_EXTENSION') + '\\n' + validExtensions;\n\t\t\t\t\tvar params = {\n\t\t\t\t\t\ttext: errorMessage,\n\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t};\n\t\t\t\t\tVtiger_Helper_Js.showMessage(params);\n\t\t\t\t\tobj.focus();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\t\tuploadFileSize: function (elementId) {\n\t\t\tvar element = jQuery('#' + elementId);\n\t\t\tvar importMaxUploadSize = element.closest('td').data('importUploadSize');\n\t\t\tvar importMaxUploadSizeInMb = element.closest('td').data('importUploadSizeMb');\n\t\t\tvar uploadedFileSize = element.get(0).files[0].size;\n\t\t\tif (uploadedFileSize > importMaxUploadSize) {\n\t\t\t\tvar errorMessage =\n\t\t\t\t\tapp.vtranslate('JS_UPLOADED_FILE_SIZE_EXCEEDS') +\n\t\t\t\t\t' ' +\n\t\t\t\t\timportMaxUploadSizeInMb +\n\t\t\t\t\t' MB.' +\n\t\t\t\t\tapp.vtranslate('JS_PLEASE_SPLIT_FILE_AND_IMPORT_AGAIN');\n\t\t\t\tvar params = {\n\t\t\t\t\ttext: errorMessage,\n\t\t\t\t\ttype: 'error'\n\t\t\t\t};\n\t\t\t\tVtiger_Helper_Js.showMessage(params);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\t\tvalidateMergeCriteria: function () {\n\t\t\tvar mergeChecked = jQuery('#auto_merge').is(':checked');\n\t\t\tif (mergeChecked) {\n\t\t\t\tvar selectedOptions = jQuery('#selected_merge_fields option');\n\t\t\t\tif (selectedOptions.length == 0) {\n\t\t\t\t\tvar errorMessage = app.vtranslate('JS_PLEASE_SELECT_ONE_FIELD_FOR_MERGE');\n\t\t\t\t\tvar params = {\n\t\t\t\t\t\ttext: errorMessage,\n\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t};\n\t\t\t\t\tVtiger_Helper_Js.showMessage(params);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tImportJs.convertOptionsToJSONArray('#selected_merge_fields', '#merge_fields');\n\t\t\treturn true;\n\t\t},\n\t\tconvertOptionsToJSONArray: function (objName, targetObjName) {\n\t\t\tlet obj = jQuery(objName);\n\t\t\tlet arr = [];\n\t\t\tif (typeof obj !== 'undefined' && obj[0] != '') {\n\t\t\t\tfor (let i = 0; i < obj[0].length; ++i) {\n\t\t\t\t\tif (obj[0].options[i].selected) {\n\t\t\t\t\t\tarr.push(obj[0].options[i].value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (targetObjName !== 'undefined') {\n\t\t\t\tlet targetObj = $(targetObjName);\n\t\t\t\tif (typeof targetObj !== 'undefined') targetObj.val(JSON.stringify(arr));\n\t\t\t}\n\t\t\treturn arr;\n\t\t},\n\t\tcopySelectedOptions: function (source, destination) {\n\t\t\tlet srcObj = jQuery(source);\n\t\t\tlet destObj = jQuery(destination);\n\n\t\t\tif (typeof srcObj === 'undefined' || typeof destObj === 'undefined') return;\n\n\t\t\tfor (let i = 0; i < srcObj[0].length; i++) {\n\t\t\t\tif (srcObj[0].options[i].selected == true) {\n\t\t\t\t\tlet rowFound = false;\n\t\t\t\t\tlet existingObj = null;\n\t\t\t\t\tfor (let j = 0; j < destObj[0].length; j++) {\n\t\t\t\t\t\tif (destObj[0].options[j].value == srcObj[0].options[i].value) {\n\t\t\t\t\t\t\trowFound = true;\n\t\t\t\t\t\t\texistingObj = destObj[0].options[j];\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (rowFound != true) {\n\t\t\t\t\t\tlet opt = $('
  • \n\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t
    ".concat(user.name,"
    \n\t\t\t\t\t\t\t\t\t\t
    ").concat(user.mail,"
    \n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
  • ")}(item)).appendTo(ul)}});},/** * Register autocomplete * - * @return {object} autocomplete instance - */registerAutocomplete:function registerAutocomplete(){return this.container.find(".js-search-input").autocomplete({delay:"600",minLength:"3",classes:{"ui-autocomplete":"mobile"},source:function source(request,response){window.MailIntegration_Compose.findEmail(request,response);},select:function select(e,ui){window.MailIntegration_Compose.onSelectRecipient(e.toElement,ui.item);}})},/** + * @return {jQuery} autocomplete instance + */registerAutocomplete:function registerAutocomplete(){return this.container.find(".js-search-input").autocomplete({delay:"600",minLength:"3",classes:{"ui-autocomplete":"mobile"},source:function source(request,response){window.MailIntegration_Compose.findEmail(request,response);},select:function select(e,ui){var toElement="to";e.target.dataset.copyTarget?toElement=e.target.dataset.copyTarget:e.originalEvent.target.dataset.copyTarget?toElement=e.originalEvent.target.dataset.copyTarget:e.originalEvent.originalEvent.target.dataset.copyTarget&&(toElement=e.originalEvent.originalEvent.target.dataset.copyTarget),window.MailIntegration_Compose.copyRecipient(toElement,[{displayName:ui.item.name,emailAddress:ui.item.mail}]);}})},/** * Find mail action for autocomplete source * * @param {object} request autocomplete param * @param {fuction} callBack autocomplete callBack */findEmail:function findEmail(request,callBack){this.connector({module:"MailIntegration",action:"Mail",mode:"findEmail",search:request.term}).done(function(responseData){var data=responseData.result.map(function(user){var userData=user.split(" <"),name=userData[0],mail=userData[1].slice(0,-1);return {name:name,mail:mail}});callBack(data);});},/** - * [onRecipientSelect description] - * - * @param {object} toElement html node object - * @param {object} item selected item object - */onSelectRecipient:function onSelectRecipient(toElement,item){this.copyRecipient(toElement.dataset.copyTarget?toElement.dataset.copyTarget:"to",[{displayName:item.name,emailAddress:item.mail}]);},/** * Copy recipient to outlook field * * @param {string} recipientsField to, cc, bcc diff --git a/public_html/layouts/basic/modules/MailIntegration/resources/outlookMessageCompose.min.js.map b/public_html/layouts/basic/modules/MailIntegration/resources/outlookMessageCompose.min.js.map index 7c53434d757d..e0f5b27444f1 100644 --- a/public_html/layouts/basic/modules/MailIntegration/resources/outlookMessageCompose.min.js.map +++ b/public_html/layouts/basic/modules/MailIntegration/resources/outlookMessageCompose.min.js.map @@ -1 +1 @@ -{"version":3,"file":"outlookMessageCompose.min.js","sources":["outlookMessageCompose.js"],"sourcesContent":["/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */\n'use strict';\n\nwindow.MailIntegration_Compose = {\n\t/**\n\t * AppConnector wrapper\n\t *\n\t * @param {object} request\n\t *\n\t * @return {object} AppConnector object with done method\n\t */\n\tconnector(request) {\n\t\treturn AppConnector.request(request).fail((error) => {\n\t\t\tthis.showResponseMessage(false);\n\t\t});\n\t},\n\t/**\n\t * Show response message\n\t *\n\t * @param {boolean} success\n\t * @param {string} message\n\t */\n\tshowResponseMessage(success, message = '') {\n\t\tif (success) {\n\t\t\tOffice.context.mailbox.item.notificationMessages.replaceAsync('information', {\n\t\t\t\ttype: 'informationalMessage',\n\t\t\t\tmessage: message,\n\t\t\t\ticon: 'iconid',\n\t\t\t\tpersistent: false\n\t\t\t});\n\t\t} else {\n\t\t\tOffice.context.mailbox.item.notificationMessages.replaceAsync('error', {\n\t\t\t\ttype: 'errorMessage',\n\t\t\t\tmessage: app.vtranslate('JS_ERROR') + ' ' + message\n\t\t\t});\n\t\t}\n\t},\n\t/**\n\t * Registered autocomplete template\n\t *\n\t * @return {object} overwrite ui-autocomplete list item template\n\t */\n\tregisterAutocompleteTemplate() {\n\t\t$.widget('ui.autocomplete', $.ui.autocomplete, {\n\t\t\t_renderItem: function (ul, item) {\n\t\t\t\tlet listItemTemplate = (user) => {\n\t\t\t\t\treturn `
  • \n\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t
    ${user.name}
    \n\t\t\t\t\t\t\t\t\t\t
    ${user.mail}
    \n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
  • `;\n\t\t\t\t};\n\t\t\t\treturn $(listItemTemplate(item)).appendTo(ul);\n\t\t\t}\n\t\t});\n\t},\n\t/**\n\t * Register autocomplete\n\t *\n\t * @return {object} autocomplete instance\n\t */\n\tregisterAutocomplete() {\n\t\treturn this.container.find('.js-search-input').autocomplete({\n\t\t\tdelay: '600',\n\t\t\tminLength: '3',\n\t\t\tclasses: {\n\t\t\t\t'ui-autocomplete': 'mobile'\n\t\t\t},\n\t\t\tsource: function (request, response) {\n\t\t\t\twindow.MailIntegration_Compose.findEmail(request, response);\n\t\t\t},\n\t\t\tselect: function (e, ui) {\n\t\t\t\twindow.MailIntegration_Compose.onSelectRecipient(e.toElement, ui.item);\n\t\t\t}\n\t\t});\n\t},\n\t/**\n\t * Find mail action for autocomplete source\n\t *\n\t * @param {object} request autocomplete param\n\t * @param {fuction} callBack autocomplete callBack\n\t */\n\tfindEmail(request, callBack) {\n\t\tthis.connector({\n\t\t\tmodule: 'MailIntegration',\n\t\t\taction: 'Mail',\n\t\t\tmode: 'findEmail',\n\t\t\tsearch: request.term\n\t\t}).done((responseData) => {\n\t\t\tlet data = responseData.result.map((user) => {\n\t\t\t\tlet userData = user.split(' <');\n\t\t\t\tlet name = userData[0];\n\t\t\t\tlet mail = userData[1].slice(0, -1);\n\t\t\t\treturn { name, mail };\n\t\t\t});\n\t\t\tcallBack(data);\n\t\t});\n\t},\n\t/**\n\t * [onRecipientSelect description]\n\t *\n\t * @param {object} toElement html node object\n\t * @param {object} item selected item object\n\t */\n\tonSelectRecipient(toElement, item) {\n\t\tthis.copyRecipient(toElement.dataset.copyTarget ? toElement.dataset.copyTarget : 'to', [\n\t\t\t{\n\t\t\t\tdisplayName: item.name,\n\t\t\t\temailAddress: item.mail\n\t\t\t}\n\t\t]);\n\t},\n\t/**\n\t * Copy recipient to outlook field\n\t *\n\t * @param {string} recipientsField to, cc, bcc\n\t * @param {object} newRecipient\n\t */\n\tcopyRecipient(recipientsField, newRecipient) {\n\t\tOffice.context.mailbox.item[recipientsField].addAsync(newRecipient, function (result) {\n\t\t\tif (result.error) {\n\t\t\t\tOffice.context.mailbox.item.notificationMessages.replaceAsync('error', {\n\t\t\t\t\ttype: 'errorMessage',\n\t\t\t\t\tmessage: app.vtranslate('JS_ERROR') + ' ' + result.error\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t},\n\tregisterEvents() {\n\t\tif (!$('.js-exception-error').length) {\n\t\t\tthis.container = $('#page');\n\t\t\tthis.registerAutocompleteTemplate();\n\t\t\tthis.registerAutocomplete();\n\t\t}\n\t}\n};\nif (typeof Office === 'undefined') {\n\tapp.showNotify({\n\t\ttitle: app.vtranslate('JS_ERROR'),\n\t\ttype: 'error'\n\t});\n} else {\n\t(function ($) {\n\t\tOffice.onReady((info) => {\n\t\t\tif (info.host === Office.HostType.Outlook) {\n\t\t\t\twindow.MailIntegration_Compose.registerEvents();\n\t\t\t}\n\t\t});\n\t})($);\n}\n"],"names":["window","MailIntegration_Compose","connector","request","AppConnector","fail","showResponseMessage","success","Office","context","mailbox","item","notificationMessages","replaceAsync","type","message","icon","persistent","app","vtranslate","registerAutocompleteTemplate","$","widget","ui","autocomplete","_renderItem","ul","user","name","mail","appendTo","registerAutocomplete","container","find","delay","minLength","classes","source","response","findEmail","select","e","onSelectRecipient","toElement","callBack","module","action","mode","search","term","done","responseData","result","map","userData","split","slice","data","copyRecipient","dataset","copyTarget","displayName","emailAddress","recipientsField","newRecipient","addAsync","error","registerEvents","length","showNotify","title","onReady","info","host","HostType","Outlook"],"mappings":";;AAAA,kKACA,YAEAA,CAAAA,MAAM,CAACC,uBAAP,CAAiC;AAEjC;AACA;AACA;AACA;AACA;AACA,IACCC,SARgC,oBAQtBC,OARsB,CAQb,gBAClB,OAAOC,YAAY,CAACD,OAAb,CAAqBA,OAArB,EAA8BE,IAA9B,CAAmC,UAAW,CACpD,KAAI,CAACC,mBAAL,CACA,CAAA,CAAA,EAAA,CAFM,CAGP,CAZ+B;AAcjC;AACA;AACA;AACA;AACA,IACCA,mBAnBgC,CAmBZC,SAAAA,mBAAAA,CAAAA,OAnBY,CAmBW,CAAA,WAAA,CAAJ,CAAA,CAAA,SAAA,CAAA,MAAA,EAAA,SAAA,CAAA,CAAA,CAAA,GAAA,KAAA,CAAA,CAAA,SAAA,CAAA,CAAA,CAAA,CAAA,EAAI,CACtCA,OADsC,CAEzCC,MAAM,CAACC,OAAP,CAAeC,OAAf,CAAuBC,IAAvB,CAA4BC,oBAA5B,CAAiDC,YAAjD,CAA8D,aAA9D,CAA6E,CAC5EC,IAAI,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P,CAAe,SAACC,IAAD,CAAU,CACpBA,IAAI,CAACC,IAAL,GAAcjE,MAAM,CAACkE,QAAP,CAAgBC,OADV,EAEvB3E,MAAM,CAACC,uBAAP,CAA+BkE,cAA/B,GAED,CAJD,EAKA,CAND,CAMG9C,CANH;;"} \ No newline at end of file +{"version":3,"file":"outlookMessageCompose.min.js","sources":["outlookMessageCompose.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\nwindow.MailIntegration_Compose = {\n\t/**\n\t * AppConnector wrapper\n\t *\n\t * @param {object} request\n\t *\n\t * @return {object} AppConnector object with done method\n\t */\n\tconnector(request) {\n\t\treturn AppConnector.request(request).fail((error) => {\n\t\t\tthis.showResponseMessage(false);\n\t\t});\n\t},\n\t/**\n\t * Show response message\n\t *\n\t * @param {boolean} success\n\t * @param {string} message\n\t */\n\tshowResponseMessage(success, message = '') {\n\t\tif (success) {\n\t\t\tOffice.context.mailbox.item.notificationMessages.replaceAsync('information', {\n\t\t\t\ttype: 'informationalMessage',\n\t\t\t\tmessage: message,\n\t\t\t\ticon: 'iconid',\n\t\t\t\tpersistent: false\n\t\t\t});\n\t\t} else {\n\t\t\tOffice.context.mailbox.item.notificationMessages.replaceAsync('error', {\n\t\t\t\ttype: 'errorMessage',\n\t\t\t\tmessage: app.vtranslate('JS_ERROR') + ' ' + message\n\t\t\t});\n\t\t}\n\t},\n\t/**\n\t * Registered autocomplete template\n\t *\n\t * @return {object} overwrite ui-autocomplete list item template\n\t */\n\tregisterAutocompleteTemplate() {\n\t\t$.widget('ui.autocomplete', $.ui.autocomplete, {\n\t\t\t_renderItem: function (ul, item) {\n\t\t\t\tlet listItemTemplate = (user) => {\n\t\t\t\t\treturn `
  • \n\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t
    ${user.name}
    \n\t\t\t\t\t\t\t\t\t\t
    ${user.mail}
    \n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
  • `;\n\t\t\t\t};\n\t\t\t\treturn $(listItemTemplate(item)).appendTo(ul);\n\t\t\t}\n\t\t});\n\t},\n\t/**\n\t * Register autocomplete\n\t *\n\t * @return {jQuery} autocomplete instance\n\t */\n\tregisterAutocomplete() {\n\t\treturn this.container.find('.js-search-input').autocomplete({\n\t\t\tdelay: '600',\n\t\t\tminLength: '3',\n\t\t\tclasses: {\n\t\t\t\t'ui-autocomplete': 'mobile'\n\t\t\t},\n\t\t\tsource: function (request, response) {\n\t\t\t\twindow.MailIntegration_Compose.findEmail(request, response);\n\t\t\t},\n\t\t\tselect: function (e, ui) {\n\t\t\t\tlet toElement = 'to';\n\t\t\t\tif (e.target.dataset.copyTarget) {\n\t\t\t\t\ttoElement = e.target.dataset.copyTarget;\n\t\t\t\t} else if (e.originalEvent.target.dataset.copyTarget) {\n\t\t\t\t\ttoElement = e.originalEvent.target.dataset.copyTarget;\n\t\t\t\t} else if (e.originalEvent.originalEvent.target.dataset.copyTarget) {\n\t\t\t\t\ttoElement = e.originalEvent.originalEvent.target.dataset.copyTarget;\n\t\t\t\t}\n\t\t\t\twindow.MailIntegration_Compose.copyRecipient(toElement, [\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: ui.item.name,\n\t\t\t\t\t\temailAddress: ui.item.mail\n\t\t\t\t\t}\n\t\t\t\t]);\n\t\t\t}\n\t\t});\n\t},\n\t/**\n\t * Find mail action for autocomplete source\n\t *\n\t * @param {object} request autocomplete param\n\t * @param {fuction} callBack autocomplete callBack\n\t */\n\tfindEmail(request, callBack) {\n\t\tthis.connector({\n\t\t\tmodule: 'MailIntegration',\n\t\t\taction: 'Mail',\n\t\t\tmode: 'findEmail',\n\t\t\tsearch: request.term\n\t\t}).done((responseData) => {\n\t\t\tlet data = responseData.result.map((user) => {\n\t\t\t\tlet userData = user.split(' <');\n\t\t\t\tlet name = userData[0];\n\t\t\t\tlet mail = userData[1].slice(0, -1);\n\t\t\t\treturn { name, mail };\n\t\t\t});\n\t\t\tcallBack(data);\n\t\t});\n\t},\n\t/**\n\t * Copy recipient to outlook field\n\t *\n\t * @param {string} recipientsField to, cc, bcc\n\t * @param {object} newRecipient\n\t */\n\tcopyRecipient(recipientsField, newRecipient) {\n\t\tOffice.context.mailbox.item[recipientsField].addAsync(newRecipient, function (result) {\n\t\t\tif (result.error) {\n\t\t\t\tOffice.context.mailbox.item.notificationMessages.replaceAsync('error', {\n\t\t\t\t\ttype: 'errorMessage',\n\t\t\t\t\tmessage: app.vtranslate('JS_ERROR') + ' ' + result.error\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t},\n\tregisterEvents() {\n\t\tif (!$('.js-exception-error').length) {\n\t\t\tthis.container = $('#page');\n\t\t\tthis.registerAutocompleteTemplate();\n\t\t\tthis.registerAutocomplete();\n\t\t}\n\t}\n};\nif (typeof Office === 'undefined') {\n\tapp.showNotify({\n\t\ttitle: app.vtranslate('JS_ERROR'),\n\t\ttype: 'error'\n\t});\n} else {\n\t(function ($) {\n\t\tOffice.onReady((info) => {\n\t\t\tif (info.host === Office.HostType.Outlook) {\n\t\t\t\twindow.MailIntegration_Compose.registerEvents();\n\t\t\t}\n\t\t});\n\t})($);\n}\n"],"names":["window","MailIntegration_Compose","connector","request","_this","AppConnector","fail","showResponseMessage","success","message","arguments","length","Office","context","mailbox","item","notificationMessages","replaceAsync","type","icon","persistent","app","vtranslate","registerAutocompleteTemplate","$","widget","ui","autocomplete","_renderItem","ul","listItemTemplate","user","concat","name","mail","appendTo","registerAutocomplete","container","find","delay","minLength","classes","\"ui-autocomplete\"","source","response","findEmail","select","e","toElement","target","dataset","copyTarget","originalEvent","copyRecipient","displayName","emailAddress","callBack","module","action","mode","search","term","done","responseData","data","result","map","userData","split","slice","recipientsField","newRecipient","addAsync","error","registerEvents","showNotify","title","onReady","info","host","HostType","Outlook"],"mappings":";;AAAA,kKACA,YAAY,CAEZA,MAAM,CAACC,uBAAuB,CAAG;AAEjC;AACA;AACA;AACA;AACA;AACA,IACCC,SAAS,CAAA,SAAAA,SAACC,CAAAA,OAAO,CAAE,CAAA,IAAAC,KAAA,CAAA,IAAA,CAClB,OAAOC,YAAY,CAACF,OAAO,CAACA,OAAO,CAAC,CAACG,IAAI,CAAC,UAAW,CACpDF,KAAI,CAACG,mBAAmB,CAAM,CAAA,CAAA,EAC/B,CAAC,CACF,CAAC;AAEF;AACA;AACA;AACA;AACA,IACCA,mBAAmB,CAAAA,SAAAA,mBAAAA,CAACC,OAAO,CAAgB,CAAA,IAAdC,OAAO,CAAA,CAAA,CAAAC,SAAA,CAAAC,MAAA,EAAAD,SAAA,aAAAA,SAAA,CAAA,CAAA,CAAA,CAAG,EAAE,CACpCF,OAAO,CACVI,MAAM,CAACC,OAAO,CAACC,OAAO,CAACC,IAAI,CAACC,oBAAoB,CAACC,YAAY,CAAC,aAAa,CAAE,CAC5EC,IAAI,CAAE,sBAAsB,CAC5BT,OAAO,CAAEA,OAAO,CAChBU,IAAI,CAAE,QAAQ,CACdC,UAAU,CACX,CAAA,CAAA,CAAC,CAAC,CAEFR,MAAM,CAACC,OAAO,CAACC,OAAO,CAACC,IAAI,CAACC,oBAAoB,CAACC,YAAY,CAAC,OAAO,CAAE,CACtEC,IAAI,CAAE,cAAc,CACpBT,OAAO,CAAEY,GAAG,CAACC,UAAU,CAAC,UAAU,CAAC,CAAG,GAAG,CAAGb,OAC7C,CAAC,EAEH,CAAC;AAEF;AACA;AACA;AACA,IACCc,4BAA4B,CAAAA,SAAAA,4BAAAA,EAAG,CAC9BC,CAAC,CAACC,MAAM,CAAC,iBAAiB,CAAED,CAAC,CAACE,EAAE,CAACC,YAAY,CAAE,CAC9CC,WAAW,CAAE,S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ACE,QAAQ,CAACD,YAAY,CAAE,SAAUN,MAAM,CAAE,CACjFA,MAAM,CAACQ,KAAK,EACf7D,MAAM,CAACC,OAAO,CAACC,OAAO,CAACC,IAAI,CAACC,oBAAoB,CAACC,YAAY,CAAC,OAAO,CAAE,CACtEC,IAAI,CAAE,cAAc,CACpBT,OAAO,CAAEY,GAAG,CAACC,UAAU,CAAC,UAAU,CAAC,CAAG,GAAG,CAAG2C,MAAM,CAACQ,KACpD,CAAC,EAEH,CAAC,EACF,CAAC,CACDC,cAAc,CAAAA,SAAAA,cAAAA,EAAG,CACXlD,CAAC,CAAC,qBAAqB,CAAC,CAACb,MAAM,GACnC,IAAI,CAAC0B,SAAS,CAAGb,CAAC,CAAC,OAAO,CAAC,CAC3B,IAAI,CAACD,4BAA4B,EAAE,CACnC,IAAI,CAACa,oBAAoB,EAAE,EAE7B,CACD,CAAC,CACqB,WAAW,EAA7B,OAAOxB,MAAsB,CAChCS,GAAG,CAACsD,UAAU,CAAC,CACdC,KAAK,CAAEvD,GAAG,CAACC,UAAU,CAAC,UAAU,CAAC,CACjCJ,IAAI,CAAE,OACP,CAAC,CAAC,CAED,UAAa,CACbN,MAAM,CAACiE,OAAO,CAAC,SAACC,IAAI,CAAK,CACpBA,IAAI,CAACC,IAAI,GAAKnE,MAAM,CAACoE,QAAQ,CAACC,OAAO,EACxCjF,MAAM,CAACC,uBAAuB,CAACyE,cAAc,GAE/C,CAAC,EACF,CAAC,CAAElD,CAAC,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/MailIntegration/resources/outlookMessageDetail.min.js b/public_html/layouts/basic/modules/MailIntegration/resources/outlookMessageDetail.min.js index 5db71a6ae47d..9b60cb9936c6 100644 --- a/public_html/layouts/basic/modules/MailIntegration/resources/outlookMessageDetail.min.js +++ b/public_html/layouts/basic/modules/MailIntegration/resources/outlookMessageDetail.min.js @@ -1,6 +1,6 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */window.MailIntegration_Start={iframe:{},/** +/* {[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]} */window.MailIntegration_Start={iframe:{},/** * Set iframe element. */setIframe:function setIframe(){this.iframe=$("#js-iframe");},/** * Show detail view. diff --git a/public_html/layouts/basic/modules/MailIntegration/resources/outlookMessageDetail.min.js.map b/public_html/layouts/basic/modules/MailIntegration/resources/outlookMessageDetail.min.js.map index c05d3ffc825e..95fe18f8a127 100644 --- a/public_html/layouts/basic/modules/MailIntegration/resources/outlookMessageDetail.min.js.map +++ b/public_html/layouts/basic/modules/MailIntegration/resources/outlookMessageDetail.min.js.map @@ -1 +1 @@ -{"version":3,"file":"outlookMessageDetail.min.js","sources":["outlookMessageDetail.js"],"sourcesContent":["/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */\nwindow.MailIntegration_Start = {\n\tiframe: {},\n\t/**\n\t * Set iframe element.\n\t */\n\tsetIframe() {\n\t\tthis.iframe = $('#js-iframe');\n\t},\n\t/**\n\t * Show detail view.\n\t *\n\t * @param {object} mailItem Office mailbox.item\n\t */\n\tshowDetailView(mailItem) {\n\t\tAppConnector.request(\n\t\t\t$.extend(\n\t\t\t\t{\n\t\t\t\t\tmodule: 'MailIntegration',\n\t\t\t\t\tview: 'Iframe',\n\t\t\t\t\tmailFrom: mailItem.from.emailAddress,\n\t\t\t\t\tmailSender: mailItem.sender.emailAddress,\n\t\t\t\t\tmailSubject: mailItem.subject,\n\t\t\t\t\tmailNormalizedSubject: mailItem.normalizedSubject,\n\t\t\t\t\tmailMessageId: mailItem.internetMessageId,\n\t\t\t\t\tmailDateTimeCreated: mailItem.dateTimeCreated.toISOString()\n\t\t\t\t},\n\t\t\t\twindow.PanelParams\n\t\t\t)\n\t\t)\n\t\t\t.done((responseData) => {\n\t\t\t\t$('#page').html(responseData);\n\t\t\t\tthis.registerLogoutEvents();\n\t\t\t})\n\t\t\t.fail((_) => {\n\t\t\t\tOffice.context.mailbox.item.notificationMessages.replaceAsync('error', {\n\t\t\t\t\ttype: 'errorMessage',\n\t\t\t\t\tmessage: app.vtranslate('JS_ERROR')\n\t\t\t\t});\n\t\t\t});\n\t},\n\t/**\n\t * Register logout events\n\t */\n\tregisterLogoutEvents() {\n\t\tthis.setIframe();\n\t\tlet reloadPanelAfterLogout = () => {\n\t\t\tif (!this.isUserLoggedIn()) {\n\t\t\t\twindow.location.reload();\n\t\t\t}\n\t\t};\n\t\tthis.iframe.on('load', reloadPanelAfterLogout);\n\t},\n\t/**\n\t * Register login events.\n\t */\n\tregisterLoginEvents() {\n\t\tlet loader;\n\t\tlet reloadPanelAfterLogin = () => {\n\t\t\tif (this.isUserLoggedIn()) {\n\t\t\t\twindow.location.reload();\n\t\t\t} else {\n\t\t\t\tloader.progressIndicator({ mode: 'hide' });\n\t\t\t}\n\t\t};\n\t\tlet showLoader = () => {\n\t\t\tloader = $.progressIndicator({\n\t\t\t\tblockInfo: { enabled: true },\n\t\t\t\tmessage: false,\n\t\t\t\tblockOverlayCSS: {\n\t\t\t\t\t'background-color': 'white',\n\t\t\t\t\topacity: 1\n\t\t\t\t}\n\t\t\t});\n\t\t};\n\t\tthis.iframe.on('load', reloadPanelAfterLogin);\n\t\t$(this.iframe[0].contentWindow).on('unload', showLoader);\n\t\tlet src = this.iframe[0].getAttribute('src-a');\n\t\tif (src && this.iframe[0].getAttribute('src') == undefined) {\n\t\t\tthis.iframe[0].removeAttribute('src-a');\n\t\t\tthis.iframe[0].setAttribute('src', src);\n\t\t}\n\t},\n\t/**\n\t * Is user logged in.\n\t *\n\t * @return {boolean}\n\t */\n\tisUserLoggedIn() {\n\t\treturn !(\n\t\t\tthis.iframe[0].contentWindow.document.body.dataset.module == 'Users' &&\n\t\t\tthis.iframe[0].contentWindow.document.body.dataset.view == 'Login'\n\t\t);\n\t},\n\tshowConsole() {\n\t\tlet s = '';\n\t\tlet x = '';\n\t\tfor (var p in navigator) {\n\t\t\ts += p + ' : ' + navigator[p] + '
    ';\n\t\t\tx += p + ' : ' + navigator[p] + '\\n';\n\t\t}\n\t\tconsole.log(x);\n\t\tdocument.body.innerHTML +=\n\t\t\t'
    ' +\n\t\t\ts +\n\t\t\t'
    ';\n\t},\n\t/**\n\t * Register events.\n\t *\n\t * @param {object} mailbox Office mailbox\n\t */\n\tregisterEvents(mailbox) {\n\t\t//this.showConsole();\n\t\tif (!$('.js-exception-error').length) {\n\t\t\tthis.setIframe();\n\t\t\tif (this.iframe.data('view') === 'login') {\n\t\t\t\tthis.registerLoginEvents();\n\t\t\t} else {\n\t\t\t\tthis.showDetailView(mailbox.item);\n\t\t\t}\n\t\t}\n\t},\n\treloadView(data) {\n\t\twindow.MailIntegration_Start.showDetailView(Office.context.mailbox.item);\n\t}\n};\nif (typeof Office === 'undefined') {\n\tapp.showNotify({\n\t\ttitle: app.vtranslate('JS_ERROR'),\n\t\ttype: 'error'\n\t});\n} else {\n\tOffice.onReady((info) => {\n\t\twindow.PanelParams = {\n\t\t\tsource: 'Outlook',\n\t\t\tdevice: Office.context.mailbox.diagnostics.hostName\n\t\t};\n\t\tif (info.host === Office.HostType.Outlook) {\n\t\t\twindow.MailIntegration_Start.registerEvents(Office.context.mailbox);\n\t\t\tOffice.context.mailbox.addHandlerAsync(Office.EventType.ItemChanged, window.MailIntegration_Start.reloadView);\n\t\t}\n\t});\n}\n"],"names":["window","MailIntegration_Start","iframe","setIframe","$","showDetailView","mailItem","AppConnector","request","extend","module","view","mailFrom","from","emailAddress","mailSender","sender","mailSubject","subject","mailNormalizedSubject","normalizedSubject","mailMessageId","internetMessageId","mailDateTimeCreated","dateTimeCreated","toISOString","PanelParams","done","responseData","html","registerLogoutEvents","fail","Office","context","mailbox","item","notificationMessages","replaceAsync","type","message","app","vtranslate","on","reloadPanelAfterLogout","isUserLoggedIn","location","reload","registerLoginEvents","loader","reloadPanelAfterLogin","progressIndicator","mode","contentWindow","showLoader","blockInfo","enabled","blockOverlayCSS","opacity","getAttribute","src","removeAttribute","setAttribute","document","body","dataset","showConsole","x","s","p","navigator","console","log","innerHTML","registerEvents","length","data","reloadView","showNotify","title","onReady","info","source","device","diagnostics","hostName","host","HostType","Outlook","addHandlerAsync","EventType","ItemChanged"],"mappings":";;AAAA,kKACAA,MAAM,CAACC,qBAAP,CAA+B,CAC9BC,MAAM,CAAE,EADsB;AAG/B;AACA,IACCC,SAL8B,CAKlB,SAAA,SAAA,EAAA,CACX,IAAKD,CAAAA,MAAL,CAAcE,CAAC,CAAC,YAAD,EACf,CAP6B;AAS/B;AACA;AACA;AACA,IACCC,cAb8B,CAAA,SAAA,cAAA,CAafC,QAbe,CAaL,CACxBC,IAAAA,KAAAA,CAAAA,IAAAA,CAAAA,YAAY,CAACC,OAAb,CACCJ,CAAC,CAACK,MAAF,CACC,CACCC,MAAM,CAAE,iBADT,CAECC,IAAI,CAAE,QAFP,CAGCC,QAAQ,CAAEN,QAAQ,CAACO,IAAT,CAAcC,YAHzB,CAICC,UAAU,CAAET,QAAQ,CAACU,MAAT,CAAgBF,YAJ7B,CAKCG,WAAW,CAAEX,QAAQ,CAACY,OALvB,CAMCC,qBAAqB,CAAEb,QAAQ,CAACc,iBANjC,CAOCC,aAAa,CAAEf,QAAQ,CAACgB,iBAPzB,CAQCC,mBAAmB,CAAEjB,QAAQ,CAACkB,eAAT,CAAyBC,WAAzB,EARtB,CADD,CAWCzB,MAAM,CAAC0B,WAXR,CADD,CAeEC,CAAAA,IAfF,CAeO,SAACC,YAAD,CAAkB,CACvBxB,CAAC,CAAC,OAAD,CAAD,CAAWyB,IAAX,CAAgBD,YAAhB,CADuB,CAEvB,KAAI,CAACE,oBAAL,GACA,CAlBF,CAmBEC,CAAAA,IAnBF,CAmBO,UAAO,CACZC,MAAM,CAACC,OAAP,CAAeC,OAAf,CAAuBC,IAAvB,CAA4BC,oBAA5B,CAAiDC,YAAjD,CAA8D,OAA9D,CAAuE,CAC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FP,GAGtB,IAAA,CAAKvE,SAAL,EAHsB,CAIW,OAA7B,GAAA,IAAA,CAAKD,MAAL,CAAYyE,IAAZ,CAAiB,MAAjB,CAJkB,CAKrB,KAAK5B,mBAAL,EALqB,CAOrB,IAAA,CAAK1C,cAAL,CAAoB6B,OAAO,CAACC,IAA5B,CAPqB,EAUvB,CAzH6B,CA0H9ByC,UA1H8B,CAAA,SAAA,UAAA,CA0HnBD,IA1HmB,CA0Hb,CAChB3E,MAAM,CAACC,qBAAP,CAA6BI,cAA7B,CAA4C2B,MAAM,CAACC,OAAP,CAAeC,OAAf,CAAuBC,IAAnE,EACA,CA5H6B,EA8HT,WAAlB,EAAOH,OAAAA,OACVQ,GAAG,CAACqC,UAAJ,CAAe,CACdC,KAAK,CAAEtC,GAAG,CAACC,UAAJ,CAAe,UAAf,CADO,CAEdH,IAAI,CAAE,OAFQ,CAAf,EAKAN,MAAM,CAAC+C,OAAP,CAAe,SAACC,IAAD,CAAU,CACxBhF,MAAM,CAAC0B,WAAP,CAAqB,CACpBuD,MAAM,CAAE,SADY,CAEpBC,MAAM,CAAElD,MAAM,CAACC,OAAP,CAAeC,OAAf,CAAuBiD,WAAvB,CAAmCC,QAFvB,CADG,CAKpBJ,IAAI,CAACK,IAAL,GAAcrD,MAAM,CAACsD,QAAP,CAAgBC,OALV,GAMvBvF,MAAM,CAACC,qBAAP,CAA6BwE,cAA7B,CAA4CzC,MAAM,CAACC,OAAP,CAAeC,OAA3D,CANuB,CAOvBF,MAAM,CAACC,OAAP,CAAeC,OAAf,CAAuBsD,eAAvB,CAAuCxD,MAAM,CAACyD,SAAP,CAAiBC,WAAxD,CAAqE1F,MAAM,CAACC,qBAAP,CAA6B2E,UAAlG,CAPuB,EASxB,CATD;;"} \ No newline at end of file +{"version":3,"file":"outlookMessageDetail.min.js","sources":["outlookMessageDetail.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]} */\nwindow.MailIntegration_Start = {\n\tiframe: {},\n\t/**\n\t * Set iframe element.\n\t */\n\tsetIframe() {\n\t\tthis.iframe = $('#js-iframe');\n\t},\n\t/**\n\t * Show detail view.\n\t *\n\t * @param {object} mailItem Office mailbox.item\n\t */\n\tshowDetailView(mailItem) {\n\t\tAppConnector.request(\n\t\t\t$.extend(\n\t\t\t\t{\n\t\t\t\t\tmodule: 'MailIntegration',\n\t\t\t\t\tview: 'Iframe',\n\t\t\t\t\tmailFrom: mailItem.from.emailAddress,\n\t\t\t\t\tmailSender: mailItem.sender.emailAddress,\n\t\t\t\t\tmailSubject: mailItem.subject,\n\t\t\t\t\tmailNormalizedSubject: mailItem.normalizedSubject,\n\t\t\t\t\tmailMessageId: mailItem.internetMessageId,\n\t\t\t\t\tmailDateTimeCreated: mailItem.dateTimeCreated.toISOString()\n\t\t\t\t},\n\t\t\t\twindow.PanelParams\n\t\t\t)\n\t\t)\n\t\t\t.done((responseData) => {\n\t\t\t\t$('#page').html(responseData);\n\t\t\t\tthis.registerLogoutEvents();\n\t\t\t})\n\t\t\t.fail((_) => {\n\t\t\t\tOffice.context.mailbox.item.notificationMessages.replaceAsync('error', {\n\t\t\t\t\ttype: 'errorMessage',\n\t\t\t\t\tmessage: app.vtranslate('JS_ERROR')\n\t\t\t\t});\n\t\t\t});\n\t},\n\t/**\n\t * Register logout events\n\t */\n\tregisterLogoutEvents() {\n\t\tthis.setIframe();\n\t\tlet reloadPanelAfterLogout = () => {\n\t\t\tif (!this.isUserLoggedIn()) {\n\t\t\t\twindow.location.reload();\n\t\t\t}\n\t\t};\n\t\tthis.iframe.on('load', reloadPanelAfterLogout);\n\t},\n\t/**\n\t * Register login events.\n\t */\n\tregisterLoginEvents() {\n\t\tlet loader;\n\t\tlet reloadPanelAfterLogin = () => {\n\t\t\tif (this.isUserLoggedIn()) {\n\t\t\t\twindow.location.reload();\n\t\t\t} else {\n\t\t\t\tloader.progressIndicator({ mode: 'hide' });\n\t\t\t}\n\t\t};\n\t\tlet showLoader = () => {\n\t\t\tloader = $.progressIndicator({\n\t\t\t\tblockInfo: { enabled: true },\n\t\t\t\tmessage: false,\n\t\t\t\tblockOverlayCSS: {\n\t\t\t\t\t'background-color': 'white',\n\t\t\t\t\topacity: 1\n\t\t\t\t}\n\t\t\t});\n\t\t};\n\t\tthis.iframe.on('load', reloadPanelAfterLogin);\n\t\t$(this.iframe[0].contentWindow).on('unload', showLoader);\n\t\tlet src = this.iframe[0].getAttribute('src-a');\n\t\tif (src && this.iframe[0].getAttribute('src') == undefined) {\n\t\t\tthis.iframe[0].removeAttribute('src-a');\n\t\t\tthis.iframe[0].setAttribute('src', src);\n\t\t}\n\t},\n\t/**\n\t * Is user logged in.\n\t *\n\t * @return {boolean}\n\t */\n\tisUserLoggedIn() {\n\t\treturn !(\n\t\t\tthis.iframe[0].contentWindow.document.body.dataset.module == 'Users' &&\n\t\t\tthis.iframe[0].contentWindow.document.body.dataset.view == 'Login'\n\t\t);\n\t},\n\tshowConsole() {\n\t\tlet s = '';\n\t\tlet x = '';\n\t\tfor (var p in navigator) {\n\t\t\ts += p + ' : ' + navigator[p] + '
    ';\n\t\t\tx += p + ' : ' + navigator[p] + '\\n';\n\t\t}\n\t\tconsole.log(x);\n\t\tdocument.body.innerHTML +=\n\t\t\t'
    ' +\n\t\t\ts +\n\t\t\t'
    ';\n\t},\n\t/**\n\t * Register events.\n\t *\n\t * @param {object} mailbox Office mailbox\n\t */\n\tregisterEvents(mailbox) {\n\t\t//this.showConsole();\n\t\tif (!$('.js-exception-error').length) {\n\t\t\tthis.setIframe();\n\t\t\tif (this.iframe.data('view') === 'login') {\n\t\t\t\tthis.registerLoginEvents();\n\t\t\t} else {\n\t\t\t\tthis.showDetailView(mailbox.item);\n\t\t\t}\n\t\t}\n\t},\n\treloadView(data) {\n\t\twindow.MailIntegration_Start.showDetailView(Office.context.mailbox.item);\n\t}\n};\nif (typeof Office === 'undefined') {\n\tapp.showNotify({\n\t\ttitle: app.vtranslate('JS_ERROR'),\n\t\ttype: 'error'\n\t});\n} else {\n\tOffice.onReady((info) => {\n\t\twindow.PanelParams = {\n\t\t\tsource: 'Outlook',\n\t\t\tdevice: Office.context.mailbox.diagnostics.hostName\n\t\t};\n\t\tif (info.host === Office.HostType.Outlook) {\n\t\t\twindow.MailIntegration_Start.registerEvents(Office.context.mailbox);\n\t\t\tOffice.context.mailbox.addHandlerAsync(Office.EventType.ItemChanged, window.MailIntegration_Start.reloadView);\n\t\t}\n\t});\n}\n"],"names":["window","MailIntegration_Start","iframe","setIframe","$","showDetailView","mailItem","_this","AppConnector","request","extend","module","view","mailFrom","from","emailAddress","mailSender","sender","mailSubject","subject","mailNormalizedSubject","normalizedSubject","mailMessageId","internetMessageId","mailDateTimeCreated","dateTimeCreated","toISOString","PanelParams","done","responseData","html","registerLogoutEvents","fail","Office","context","mailbox","item","notificationMessages","replaceAsync","type","message","app","vtranslate","_this2","on","reloadPanelAfterLogout","isUserLoggedIn","location","reload","registerLoginEvents","loader","_this3","reloadPanelAfterLogin","progressIndicator","mode","contentWindow","showLoader","blockInfo","enabled","blockOverlayCSS","\"background-color\"","opacity","src","getAttribute","removeAttribute","setAttribute","document","body","dataset","showConsole","s","x","p","navigator","console","log","innerHTML","registerEvents","length","data","reloadView","showNotify","title","onReady","info","source","device","diagnostics","hostName","host","HostType","Outlook","addHandlerAsync","EventType","ItemChanged"],"mappings":";;AAAA,kKACAA,MAAM,CAACC,qBAAqB,CAAG,CAC9BC,MAAM,CAAE,EAAE;AAEX;AACA,IACCC,SAAS,CAAA,SAAAA,SAAA,EAAG,CACX,IAAI,CAACD,MAAM,CAAGE,CAAC,CAAC,YAAY,EAC7B,CAAC;AAEF;AACA;AACA;AACA,IACCC,cAAc,CAAA,SAAAA,cAACC,CAAAA,QAAQ,CAAE,CAAA,IAAAC,KAAA,CAAA,IAAA,CACxBC,YAAY,CAACC,OAAO,CACnBL,CAAC,CAACM,MAAM,CACP,CACCC,MAAM,CAAE,iBAAiB,CACzBC,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ACoD,WAAW,CAACC,QAC5C,CAAC,CACGJ,IAAI,CAACK,IAAI,GAAKxD,MAAM,CAACyD,QAAQ,CAACC,OAAO,GACxC3F,MAAM,CAACC,qBAAqB,CAAC4E,cAAc,CAAC5C,MAAM,CAACC,OAAO,CAACC,OAAO,CAAC,CACnEF,MAAM,CAACC,OAAO,CAACC,OAAO,CAACyD,eAAe,CAAC3D,MAAM,CAAC4D,SAAS,CAACC,WAAW,CAAE9F,MAAM,CAACC,qBAAqB,CAAC+E,UAAU,CAAC,EAE/G,CAAC,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/MultiCompany/resources/Detail.min.js b/public_html/layouts/basic/modules/MultiCompany/resources/Detail.min.js index 85a76bf42f70..2ec444f1187f 100644 --- a/public_html/layouts/basic/modules/MultiCompany/resources/Detail.min.js +++ b/public_html/layouts/basic/modules/MultiCompany/resources/Detail.min.js @@ -1,9 +1,10 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */"use strict";Vtiger_Detail_Js("MultiCompany_Detail_Js",{},{//It stores the IStorages Hierarchy response data +/* {[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]} */"use strict";Vtiger_Detail_Js("MultiCompany_Detail_Js",{},{//It stores the IStorages Hierarchy response data hierarchyResponseCache:{},/* * function to get the IStoragesHierarchy response data - */getHierarchyResponseData:function getHierarchyResponseData(params){var thisInstance=this,aDeferred=jQuery.Deferred();return jQuery.isEmptyObject(thisInstance.hierarchyResponseCache)?AppConnector.request(params).done(function(data){thisInstance.hierarchyResponseCache=data,aDeferred.resolve(thisInstance.hierarchyResponseCache);}):aDeferred.resolve(thisInstance.hierarchyResponseCache),aDeferred.promise()},/* + */getHierarchyResponseData:function getHierarchyResponseData(params){var thisInstance=this,aDeferred=jQuery.Deferred();//Check in the cache +return jQuery.isEmptyObject(thisInstance.hierarchyResponseCache)?AppConnector.request(params).done(function(data){thisInstance.hierarchyResponseCache=data,aDeferred.resolve(thisInstance.hierarchyResponseCache);}):aDeferred.resolve(thisInstance.hierarchyResponseCache),aDeferred.promise()},/* * function to display the IStorages Hierarchy response data */displayHierarchyResponseData:function displayHierarchyResponseData(data){var callbackFunction=function(){app.showScrollBar($("#hierarchyScroll"),{height:"300px",railVisible:!0,size:"6px"});};app.showModalWindow(data,function(modalContainer){App.Components.Scrollbar.xy($("#hierarchyScroll",modalContainer)),"function"==typeof callbackFunction&&300<$("#hierarchyScroll",modalContainer).height()&&callbackFunction(data);});},registerHierarchyRecordCount:function registerHierarchyRecordCount(){var hierarchyButton=$(".detailViewTitle .hierarchy");if(hierarchyButton.length){var params={module:app.getModuleName(),action:"RelationAjax",record:app.getRecordId(),mode:"getHierarchyCount"};AppConnector.request(params).done(function(response){response.success&&$(".detailViewTitle .hierarchy .badge").html(response.result);});}},registerShowHierarchy:function registerShowHierarchy(){var thisInstance=this,hierarchyButton=$(".detailViewTitle"),params={module:app.getModuleName(),view:"Hierarchy",record:app.getRecordId()};hierarchyButton.on("click",".js-detail__icon",function(){thisInstance.getHierarchyResponseData(params).done(function(data){thisInstance.displayHierarchyResponseData(data);});});},registerEvents:function registerEvents(){this._super(),this.registerHierarchyRecordCount(),this.registerShowHierarchy();}}); //# sourceMappingURL=Detail.min.js.map diff --git a/public_html/layouts/basic/modules/MultiCompany/resources/Detail.min.js.map b/public_html/layouts/basic/modules/MultiCompany/resources/Detail.min.js.map index 6d56875de1a5..fdf508d43026 100644 --- a/public_html/layouts/basic/modules/MultiCompany/resources/Detail.min.js.map +++ b/public_html/layouts/basic/modules/MultiCompany/resources/Detail.min.js.map @@ -1 +1 @@ -{"version":3,"file":"Detail.min.js","sources":["Detail.js"],"sourcesContent":["/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */\n'use strict';\n\nVtiger_Detail_Js(\n\t'MultiCompany_Detail_Js',\n\t{},\n\t{\n\t\t//It stores the IStorages Hierarchy response data\n\t\thierarchyResponseCache: {},\n\t\t/*\n\t\t * function to get the IStoragesHierarchy response data\n\t\t */\n\t\tgetHierarchyResponseData: function (params) {\n\t\t\tvar thisInstance = this;\n\t\t\tvar aDeferred = jQuery.Deferred();\n\n\t\t\t//Check in the cache\n\t\t\tif (!jQuery.isEmptyObject(thisInstance.hierarchyResponseCache)) {\n\t\t\t\taDeferred.resolve(thisInstance.hierarchyResponseCache);\n\t\t\t} else {\n\t\t\t\tAppConnector.request(params).done(function (data) {\n\t\t\t\t\t//store it in the cache, so that we dont do multiple request\n\t\t\t\t\tthisInstance.hierarchyResponseCache = data;\n\t\t\t\t\taDeferred.resolve(thisInstance.hierarchyResponseCache);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn aDeferred.promise();\n\t\t},\n\t\t/*\n\t\t * function to display the IStorages Hierarchy response data\n\t\t */\n\t\tdisplayHierarchyResponseData: function (data) {\n\t\t\tlet callbackFunction = function (data) {\n\t\t\t\tapp.showScrollBar($('#hierarchyScroll'), {\n\t\t\t\t\theight: '300px',\n\t\t\t\t\trailVisible: true,\n\t\t\t\t\tsize: '6px'\n\t\t\t\t});\n\t\t\t};\n\t\t\tapp.showModalWindow(data, function (modalContainer) {\n\t\t\t\tApp.Components.Scrollbar.xy($('#hierarchyScroll', modalContainer));\n\t\t\t\tif (typeof callbackFunction == 'function' && $('#hierarchyScroll', modalContainer).height() > 300) {\n\t\t\t\t\tcallbackFunction(data);\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tregisterHierarchyRecordCount: function () {\n\t\t\tvar hierarchyButton = $('.detailViewTitle .hierarchy');\n\t\t\tif (hierarchyButton.length) {\n\t\t\t\tvar params = {\n\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\taction: 'RelationAjax',\n\t\t\t\t\trecord: app.getRecordId(),\n\t\t\t\t\tmode: 'getHierarchyCount'\n\t\t\t\t};\n\t\t\t\tAppConnector.request(params).done(function (response) {\n\t\t\t\t\tif (response.success) {\n\t\t\t\t\t\t$('.detailViewTitle .hierarchy .badge').html(response.result);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tregisterShowHierarchy: function () {\n\t\t\tvar thisInstance = this;\n\t\t\tvar hierarchyButton = $('.detailViewTitle');\n\t\t\tvar params = {\n\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\tview: 'Hierarchy',\n\t\t\t\trecord: app.getRecordId()\n\t\t\t};\n\t\t\thierarchyButton.on('click', '.js-detail__icon', function (e) {\n\t\t\t\tthisInstance.getHierarchyResponseData(params).done(function (data) {\n\t\t\t\t\tthisInstance.displayHierarchyResponseData(data);\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\tregisterEvents: function () {\n\t\t\tthis._super();\n\t\t\tthis.registerHierarchyRecordCount();\n\t\t\tthis.registerShowHierarchy();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Detail_Js","hierarchyResponseCache","getHierarchyResponseData","params","thisInstance","aDeferred","jQuery","Deferred","isEmptyObject","AppConnector","request","done","data","resolve","promise","displayHierarchyResponseData","app","showScrollBar","$","height","railVisible","size","showModalWindow","modalContainer","App","Components","Scrollbar","xy","callbackFunction","registerHierarchyRecordCount","hierarchyButton","length","module","getModuleName","action","record","getRecordId","mode","response","success","html","result","registerShowHierarchy","view","on","registerEvents","_super"],"mappings":";;AAAA,kKACA,aAEAA,gBAAgB,CACf,wBADe,CAEf,EAFe,CAGf;AAECC,sBAAsB,CAAE,EAFzB;AAID;AACA,KACEC,wBAAwB,CAAE,SAAUC,wBAAAA,CAAAA,MAAV,CAAkB,CACvCC,IAAAA,YAAY,CAAG,IADwB,CAEvCC,SAAS,CAAGC,MAAM,CAACC,QAAP,EAF2B,CAc3C,OATW,MAAA,CAACC,aAAP,CAAqBJ,YAAY,CAACH,sBAAlC,CASL,CANCQ,YAAY,CAACC,OAAb,CAAqBP,MAArB,EAA6BQ,IAA7B,CAAkC,SAAUC,I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AkC,SAAU2B,QAAV,CAAoB,CACjDA,QAAQ,CAACC,OADwC,EAEpDrB,CAAC,CAAC,oCAAD,CAAD,CAAwCsB,IAAxC,CAA6CF,QAAQ,CAACG,MAAtD,EAED,CAJD,EAKA,CACD,CAvDF,CAwDCC,qBAAqB,CAAE,SAAY,qBAAA,EAAA,CAAA,IAClB,YAAA,CAAG,IADe,CAE9BZ,eAAe,CAAGZ,CAAC,CAAC,kBAAD,CAFW,CAG9Bf,MAAM,CAAG,CACZ6B,MAAM,CAAEhB,GAAG,CAACiB,aAAJ,EADI,CAEZU,IAAI,CAAE,WAFM,CAGZR,MAAM,CAAEnB,GAAG,CAACoB,WAAJ,EAHI,CAHqB,CAQlCN,eAAe,CAACc,EAAhB,CAAmB,OAAnB,CAA4B,kBAA5B,CAAgD,UAAa,CAC5DxC,YAAY,CAACF,wBAAb,CAAsCC,MAAtC,CAA8CQ,CAAAA,IAA9C,CAAmD,SAAUC,IAAV,CAAgB,CAClER,YAAY,CAACW,4BAAb,CAA0CH,IAA1C,EACA,CAFD,EAGA,CAJD,EAKA,CArEF,CAsECiC,cAAc,CAAE,SAAA,cAAA,EAAY,CAC3B,IAAA,CAAKC,MAAL,EAD2B,CAE3B,IAAA,CAAKjB,4BAAL,EAF2B,CAG3B,IAAA,CAAKa,qBAAL,GACA,CA1EF,CAHe;;"} \ No newline at end of file +{"version":3,"file":"Detail.min.js","sources":["Detail.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\nVtiger_Detail_Js(\n\t'MultiCompany_Detail_Js',\n\t{},\n\t{\n\t\t//It stores the IStorages Hierarchy response data\n\t\thierarchyResponseCache: {},\n\t\t/*\n\t\t * function to get the IStoragesHierarchy response data\n\t\t */\n\t\tgetHierarchyResponseData: function (params) {\n\t\t\tvar thisInstance = this;\n\t\t\tvar aDeferred = jQuery.Deferred();\n\n\t\t\t//Check in the cache\n\t\t\tif (!jQuery.isEmptyObject(thisInstance.hierarchyResponseCache)) {\n\t\t\t\taDeferred.resolve(thisInstance.hierarchyResponseCache);\n\t\t\t} else {\n\t\t\t\tAppConnector.request(params).done(function (data) {\n\t\t\t\t\t//store it in the cache, so that we dont do multiple request\n\t\t\t\t\tthisInstance.hierarchyResponseCache = data;\n\t\t\t\t\taDeferred.resolve(thisInstance.hierarchyResponseCache);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn aDeferred.promise();\n\t\t},\n\t\t/*\n\t\t * function to display the IStorages Hierarchy response data\n\t\t */\n\t\tdisplayHierarchyResponseData: function (data) {\n\t\t\tlet callbackFunction = function (data) {\n\t\t\t\tapp.showScrollBar($('#hierarchyScroll'), {\n\t\t\t\t\theight: '300px',\n\t\t\t\t\trailVisible: true,\n\t\t\t\t\tsize: '6px'\n\t\t\t\t});\n\t\t\t};\n\t\t\tapp.showModalWindow(data, function (modalContainer) {\n\t\t\t\tApp.Components.Scrollbar.xy($('#hierarchyScroll', modalContainer));\n\t\t\t\tif (typeof callbackFunction == 'function' && $('#hierarchyScroll', modalContainer).height() > 300) {\n\t\t\t\t\tcallbackFunction(data);\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tregisterHierarchyRecordCount: function () {\n\t\t\tvar hierarchyButton = $('.detailViewTitle .hierarchy');\n\t\t\tif (hierarchyButton.length) {\n\t\t\t\tvar params = {\n\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\taction: 'RelationAjax',\n\t\t\t\t\trecord: app.getRecordId(),\n\t\t\t\t\tmode: 'getHierarchyCount'\n\t\t\t\t};\n\t\t\t\tAppConnector.request(params).done(function (response) {\n\t\t\t\t\tif (response.success) {\n\t\t\t\t\t\t$('.detailViewTitle .hierarchy .badge').html(response.result);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tregisterShowHierarchy: function () {\n\t\t\tvar thisInstance = this;\n\t\t\tvar hierarchyButton = $('.detailViewTitle');\n\t\t\tvar params = {\n\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\tview: 'Hierarchy',\n\t\t\t\trecord: app.getRecordId()\n\t\t\t};\n\t\t\thierarchyButton.on('click', '.js-detail__icon', function (e) {\n\t\t\t\tthisInstance.getHierarchyResponseData(params).done(function (data) {\n\t\t\t\t\tthisInstance.displayHierarchyResponseData(data);\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\tregisterEvents: function () {\n\t\t\tthis._super();\n\t\t\tthis.registerHierarchyRecordCount();\n\t\t\tthis.registerShowHierarchy();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Detail_Js","hierarchyResponseCache","getHierarchyResponseData","params","thisInstance","aDeferred","jQuery","Deferred","isEmptyObject","AppConnector","request","done","data","resolve","promise","displayHierarchyResponseData","callbackFunction","app","showScrollBar","$","height","railVisible","size","showModalWindow","modalContainer","App","Components","Scrollbar","xy","registerHierarchyRecordCount","hierarchyButton","length","module","getModuleName","action","record","getRecordId","mode","response","success","html","result","registerShowHierarchy","view","on","registerEvents","_super"],"mappings":";;AAAA,kKACA,YAAY,CAEZA,gBAAgB,CACf,wBAAwB,CACxB,EAAE,CACF;AAECC,sBAAsB,CAAE,EAAE;AAE5B;AACA,KACEC,wBAAwB,CAAE,SAAAA,yBAAUC,MAAM,CAAE,KACvCC,YAAY,CAAG,IAAI,CACnBC,SAAS,CAAGC,MAAM,CAACC,QAAQ,EAAE,CAEjC;AAUA,OATKD,MAAM,CAACE,aAAa,CAACJ,YAAY,CAACH,sBAAsB,CAAC,CAG7DQ,YAAY,CAACC,OAAO,CAACP,MAAM,CAAC,CAACQ,IAAI,CAAC,SAAUC,IAAI,CAAE,CAEjDR,YAAY,CAACH,sBAAsB,CAAGW,IAAI,CAC1CP,SAAS,CAACQ,OAAO,CAACT,YAAY,CAACH,sBAAsB,EACtD,CAAC,CAAC,CANFI,SAAS,CAACQ,OAAO,CAACT,YAAY,CAACH,sBAAsB,CAAC,CAQhDI,SAAS,CAACS,OAAO,EACz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AAC,CACvChB,MAAM,CAAG,CACZ6B,MAAM,CAAEf,GAAG,CAACgB,aAAa,EAAE,CAC3BU,IAAI,CAAE,WAAW,CACjBR,MAAM,CAAElB,GAAG,CAACmB,WAAW,EACxB,CAAC,CACDN,eAAe,CAACc,EAAE,CAAC,OAAO,CAAE,kBAAkB,CAAE,UAAa,CAC5DxC,YAAY,CAACF,wBAAwB,CAACC,MAAM,CAAC,CAACQ,IAAI,CAAC,SAAUC,IAAI,CAAE,CAClER,YAAY,CAACW,4BAA4B,CAACH,IAAI,EAC/C,CAAC,EACF,CAAC,EACF,CAAC,CACDiC,cAAc,CAAE,SAAAA,cAAAA,EAAY,CAC3B,IAAI,CAACC,MAAM,EAAE,CACb,IAAI,CAACjB,4BAA4B,EAAE,CACnC,IAAI,CAACa,qBAAqB,GAC3B,CACD,CACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/Notification/resources/List.min.js b/public_html/layouts/basic/modules/Notification/resources/List.min.js index d1698cadbf4a..4fe9649a3dc6 100644 --- a/public_html/layouts/basic/modules/Notification/resources/List.min.js +++ b/public_html/layouts/basic/modules/Notification/resources/List.min.js @@ -1,4 +1,4 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */"use strict";Vtiger_List_Js("Notification_List_Js",{setAsMarked:function setAsMarked(id){Vtiger_Index_Js.markNotifications(id).done(function(){Vtiger_Index_Js.getNotificationsForReminder(),Vtiger_List_Js.getInstance().getListViewRecords();});}},{}); +/* {[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]} */"use strict";Vtiger_List_Js("Notification_List_Js",{setAsMarked:function setAsMarked(id){Vtiger_Index_Js.markNotifications(id).done(function(){Vtiger_Index_Js.getNotificationsForReminder(),Vtiger_List_Js.getInstance().getListViewRecords();});}},{}); //# sourceMappingURL=List.min.js.map diff --git a/public_html/layouts/basic/modules/Notification/resources/List.min.js.map b/public_html/layouts/basic/modules/Notification/resources/List.min.js.map index 1d704441a2e4..5a5a95ecf8b5 100644 --- a/public_html/layouts/basic/modules/Notification/resources/List.min.js.map +++ b/public_html/layouts/basic/modules/Notification/resources/List.min.js.map @@ -1 +1 @@ -{"version":3,"file":"List.min.js","sources":["List.js"],"sourcesContent":["/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */\n'use strict';\n\nVtiger_List_Js(\n\t'Notification_List_Js',\n\t{\n\t\tsetAsMarked: function (id) {\n\t\t\tVtiger_Index_Js.markNotifications(id).done(function () {\n\t\t\t\tVtiger_Index_Js.getNotificationsForReminder();\n\t\t\t\tVtiger_List_Js.getInstance().getListViewRecords();\n\t\t\t});\n\t\t}\n\t},\n\t{}\n);\n"],"names":["Vtiger_List_Js","setAsMarked","id","Vtiger_Index_Js","markNotifications","done","getNotificationsForReminder","getInstance","getListViewRecords"],"mappings":";;AAAA,kKACA,aAEAA,cAAc,CACb,sBADa,CAEb,CACCC,WAAW,CAAE,SAAUC,WAAAA,CAAAA,EAAV,CAAc,CAC1BC,eAAe,CAACC,iBAAhB,CAAkCF,EAAlC,CAAsCG,CAAAA,IAAtC,CAA2C,UAAY,CACtDF,eAAe,CAACG,2BAAhB,EADsD,CAEtDN,cAAc,CAACO,WAAf,EAA6BC,CAAAA,kBAA7B,GACA,CAHD,EAIA,CANF,CAFa,CAUb,EAVa;;"} \ No newline at end of file +{"version":3,"file":"List.min.js","sources":["List.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\nVtiger_List_Js(\n\t'Notification_List_Js',\n\t{\n\t\tsetAsMarked: function (id) {\n\t\t\tVtiger_Index_Js.markNotifications(id).done(function () {\n\t\t\t\tVtiger_Index_Js.getNotificationsForReminder();\n\t\t\t\tVtiger_List_Js.getInstance().getListViewRecords();\n\t\t\t});\n\t\t}\n\t},\n\t{}\n);\n"],"names":["Vtiger_List_Js","setAsMarked","id","Vtiger_Index_Js","markNotifications","done","getNotificationsForReminder","getInstance","getListViewRecords"],"mappings":";;AAAA,kKACA,YAAY,CAEZA,cAAc,CACb,sBAAsB,CACtB,CACCC,WAAW,CAAE,SAAAA,YAAUC,EAAE,CAAE,CAC1BC,eAAe,CAACC,iBAAiB,CAACF,EAAE,CAAC,CAACG,IAAI,CAAC,UAAY,CACtDF,eAAe,CAACG,2BAA2B,EAAE,CAC7CN,cAAc,CAACO,WAAW,EAAE,CAACC,kBAAkB,GAChD,CAAC,EACF,CACD,CAAC,CACD,EACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/Notification/resources/NotificationConfig.min.js b/public_html/layouts/basic/modules/Notification/resources/NotificationConfig.min.js index 2175f30e1341..40ad8185423c 100644 --- a/public_html/layouts/basic/modules/Notification/resources/NotificationConfig.min.js +++ b/public_html/layouts/basic/modules/Notification/resources/NotificationConfig.min.js @@ -1,4 +1,4 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */"use strict";jQuery.Class("Notification_NotificationConfig_Js",{},{registerEventForModal:function registerEventForModal(container){var self=this,table=app.registerDataTables(container.find(".js-watching-data-table"));app.showPopoverElementView(container.find(".infoPopover")),container.on("switchChange.bootstrapSwitch",".sendNotificationsSwitch",function(e,state){state?container.find(".schedule").removeClass("d-none"):container.find(".schedule").addClass("d-none");}),container.find("[name=\"saveButton\"]").on("click",function(){var selectedModules=[],sendNoticeModules=[];table.$("[type=\"checkbox\"]").each(function(){var currentTarget=$(this);currentTarget.is(":checked")&&selectedModules.push(currentTarget.val());}),table.$(".sandNoticeOn").each(function(){var value=$(this).closest("tr").data("id");sendNoticeModules.push(value);});var params={module:"Notification",action:"Notification",mode:"saveWatchingModules",selectedModules:selectedModules,sendNotifications:sendNoticeModules,frequency:container.find("select[name=\"frequency\"]").val()},progress=jQuery.progressIndicator();AppConnector.request(params).done(function(){progress.progressIndicator({mode:"hide"}),app.hideModalWindow();}).fail(function(){progress.progressIndicator({mode:"hide"}),app.hideModalWindow();});}),container.find(".selectAllModules").on("click",function(e){e.stopPropagation(),table.$(".watchingModule:not(:disabled)").prop("checked",$(this).is(":checked"));}),container.find(".sentNoticeAll").on("click",function(e){e.stopPropagation();var element=$(e.currentTarget).find(".fas"),val=!element.hasClass("sandNoticeOn");self.changeSendNoticeState(element,val),table.$(".sandNoticeOn,.sandNoticeOff").each(function(){self.changeSendNoticeState($(this),val);});}),table.$(".sentNotice").on("click",function(e){e.stopPropagation();var element=$(e.currentTarget).find(".fas");self.changeSendNoticeState(element);});},changeSendNoticeState:function changeSendNoticeState(element,val){val===void 0?(element.toggleClass("fa-bell fa-bell-slash"),element.toggleClass("sandNoticeOn sandNoticeOff")):!0===val?(element.addClass("fa-bell").removeClass("fa-bell-slash"),element.addClass("sandNoticeOn").removeClass("sandNoticeOff")):(element.addClass("fa-bell-slash").removeClass("fa-bell"),element.addClass("sandNoticeOff").removeClass("sandNoticeOn"));},registerEvents:function registerEvents(){var container=$(".modalNotificationNotificationConfig");this.registerEventForModal(container);}}),jQuery(document).ready(function(){var instance=new Notification_NotificationConfig_Js;instance.registerEvents();}); +/* {[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]} */"use strict";jQuery.Class("Notification_NotificationConfig_Js",{},{registerEventForModal:function registerEventForModal(container){var self=this,table=app.registerDataTables(container.find(".js-watching-data-table"));app.showPopoverElementView(container.find(".infoPopover")),container.on("switchChange.bootstrapSwitch",".sendNotificationsSwitch",function(e,state){state?container.find(".schedule").removeClass("d-none"):container.find(".schedule").addClass("d-none");}),container.find("[name=\"saveButton\"]").on("click",function(){var selectedModules=[],sendNoticeModules=[];table.$("[type=\"checkbox\"]").each(function(){var currentTarget=$(this);currentTarget.is(":checked")&&selectedModules.push(currentTarget.val());}),table.$(".sandNoticeOn").each(function(){var value=$(this).closest("tr").data("id");sendNoticeModules.push(value);});var params={module:"Notification",action:"Notification",mode:"saveWatchingModules",selectedModules:selectedModules,sendNotifications:sendNoticeModules,frequency:container.find("select[name=\"frequency\"]").val()},progress=jQuery.progressIndicator();AppConnector.request(params).done(function(){progress.progressIndicator({mode:"hide"}),app.hideModalWindow();}).fail(function(){progress.progressIndicator({mode:"hide"}),app.hideModalWindow();});}),container.find(".selectAllModules").on("click",function(e){e.stopPropagation(),table.$(".watchingModule:not(:disabled)").prop("checked",$(this).is(":checked"));}),container.find(".sentNoticeAll").on("click",function(e){e.stopPropagation();var element=$(e.currentTarget).find(".fas"),val=!element.hasClass("sandNoticeOn");self.changeSendNoticeState(element,val),table.$(".sandNoticeOn,.sandNoticeOff").each(function(){self.changeSendNoticeState($(this),val);});}),table.$(".sentNotice").on("click",function(e){e.stopPropagation();var element=$(e.currentTarget).find(".fas");self.changeSendNoticeState(element);});},changeSendNoticeState:function changeSendNoticeState(element,val){val===void 0?(element.toggleClass("fa-bell fa-bell-slash"),element.toggleClass("sandNoticeOn sandNoticeOff")):!0===val?(element.addClass("fa-bell").removeClass("fa-bell-slash"),element.addClass("sandNoticeOn").removeClass("sandNoticeOff")):(element.addClass("fa-bell-slash").removeClass("fa-bell"),element.addClass("sandNoticeOff").removeClass("sandNoticeOn"));},registerEvents:function registerEvents(){var container=$(".modalNotificationNotificationConfig");this.registerEventForModal(container);}}),jQuery(document).ready(function(){var instance=new Notification_NotificationConfig_Js;instance.registerEvents();}); //# sourceMappingURL=NotificationConfig.min.js.map diff --git a/public_html/layouts/basic/modules/Notification/resources/NotificationConfig.min.js.map b/public_html/layouts/basic/modules/Notification/resources/NotificationConfig.min.js.map index 79ab6f639b89..7dff5ff5b6cb 100644 --- a/public_html/layouts/basic/modules/Notification/resources/NotificationConfig.min.js.map +++ b/public_html/layouts/basic/modules/Notification/resources/NotificationConfig.min.js.map @@ -1 +1 @@ -{"version":3,"file":"NotificationConfig.min.js","sources":["NotificationConfig.js"],"sourcesContent":["/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */\n'use strict';\n\njQuery.Class(\n\t'Notification_NotificationConfig_Js',\n\t{},\n\t{\n\t\tregisterEventForModal: function (container) {\n\t\t\tconst self = this;\n\t\t\tlet table = app.registerDataTables(container.find('.js-watching-data-table'));\n\t\t\tapp.showPopoverElementView(container.find('.infoPopover'));\n\t\t\tcontainer.on('switchChange.bootstrapSwitch', '.sendNotificationsSwitch', function (e, state) {\n\t\t\t\tif (state) {\n\t\t\t\t\tcontainer.find('.schedule').removeClass('d-none');\n\t\t\t\t} else {\n\t\t\t\t\tcontainer.find('.schedule').addClass('d-none');\n\t\t\t\t}\n\t\t\t});\n\t\t\tcontainer.find('[name=\"saveButton\"]').on('click', function () {\n\t\t\t\tlet selectedModules = [];\n\t\t\t\tlet sendNoticeModules = [];\n\t\t\t\ttable.$('[type=\"checkbox\"]').each(function () {\n\t\t\t\t\tlet currentTarget = $(this);\n\t\t\t\t\tif (currentTarget.is(':checked')) {\n\t\t\t\t\t\tselectedModules.push(currentTarget.val());\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\ttable.$('.sandNoticeOn').each(function (e) {\n\t\t\t\t\tlet value = $(this).closest('tr').data('id');\n\t\t\t\t\tsendNoticeModules.push(value);\n\t\t\t\t});\n\t\t\t\tlet params = {\n\t\t\t\t\tmodule: 'Notification',\n\t\t\t\t\taction: 'Notification',\n\t\t\t\t\tmode: 'saveWatchingModules',\n\t\t\t\t\tselectedModules: selectedModules,\n\t\t\t\t\tsendNotifications: sendNoticeModules,\n\t\t\t\t\tfrequency: container.find('select[name=\"frequency\"]').val()\n\t\t\t\t};\n\t\t\t\tlet progress = jQuery.progressIndicator();\n\t\t\t\tAppConnector.request(params)\n\t\t\t\t\t.done(function () {\n\t\t\t\t\t\tprogress.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\tapp.hideModalWindow();\n\t\t\t\t\t})\n\t\t\t\t\t.fail(function () {\n\t\t\t\t\t\tprogress.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\tapp.hideModalWindow();\n\t\t\t\t\t});\n\t\t\t});\n\t\t\tcontainer.find('.selectAllModules').on('click', function (e) {\n\t\t\t\te.stopPropagation();\n\t\t\t\ttable.$('.watchingModule:not(:disabled)').prop('checked', $(this).is(':checked'));\n\t\t\t});\n\t\t\tcontainer.find('.sentNoticeAll').on('click', function (e) {\n\t\t\t\te.stopPropagation();\n\t\t\t\tlet element = $(e.currentTarget).find('.fas');\n\t\t\t\tlet val = !element.hasClass('sandNoticeOn');\n\t\t\t\tself.changeSendNoticeState(element, val);\n\t\t\t\ttable.$('.sandNoticeOn,.sandNoticeOff').each(function () {\n\t\t\t\t\tself.changeSendNoticeState($(this), val);\n\t\t\t\t});\n\t\t\t});\n\t\t\ttable.$('.sentNotice').on('click', function (e) {\n\t\t\t\te.stopPropagation();\n\t\t\t\tlet element = $(e.currentTarget).find('.fas');\n\t\t\t\tself.changeSendNoticeState(element);\n\t\t\t});\n\t\t},\n\t\tchangeSendNoticeState: function (element, val) {\n\t\t\tif (val !== undefined) {\n\t\t\t\tif (val === true) {\n\t\t\t\t\telement.addClass('fa-bell').removeClass('fa-bell-slash');\n\t\t\t\t\telement.addClass('sandNoticeOn').removeClass('sandNoticeOff');\n\t\t\t\t} else {\n\t\t\t\t\telement.addClass('fa-bell-slash').removeClass('fa-bell');\n\t\t\t\t\telement.addClass('sandNoticeOff').removeClass('sandNoticeOn');\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\telement.toggleClass('fa-bell fa-bell-slash');\n\t\t\t\telement.toggleClass('sandNoticeOn sandNoticeOff');\n\t\t\t}\n\t\t},\n\t\tregisterEvents: function () {\n\t\t\tlet container = $('.modalNotificationNotificationConfig');\n\t\t\tthis.registerEventForModal(container);\n\t\t}\n\t}\n);\njQuery(document).ready(function () {\n\tlet instance = new Notification_NotificationConfig_Js();\n\tinstance.registerEvents();\n});\n"],"names":["jQuery","Class","registerEventForModal","container","self","table","app","registerDataTables","find","showPopoverElementView","on","e","state","removeClass","addClass","sendNoticeModules","$","each","currentTarget","is","selectedModules","push","val","value","closest","data","params","module","action","mode","sendNotifications","frequency","progress","progressIndicator","AppConnector","request","done","hideModalWindow","fail","stopPropagation","prop","element","hasClass","changeSendNoticeState","toggleClass","registerEvents","document","ready","instance"],"mappings":";;AAAA,kKACA,YAEAA,CAAAA,MAAM,CAACC,KAAP,CACC,oCADD,CAEC,EAFD,CAGC,CACCC,qBAAqB,CAAE,+BAAUC,SAAV,CAAqB,CACrCC,IAAAA,IAAI,CAAG,IAD8B,CAEvCC,KAAK,CAAGC,GAAG,CAACC,kBAAJ,CAAuBJ,SAAS,CAACK,IAAV,CAAe,yBAAf,CAAvB,CAF+B,CAG3CF,GAAG,CAACG,sBAAJ,CAA2BN,SAAS,CAACK,IAAV,CAAe,cAAf,CAA3B,CAH2C,CAI3CL,SAAS,CAACO,EAAV,CAAa,8BAAb,CAA6C,0BAA7C,CAAyE,SAAUC,CAAV,CAAaC,KAAb,CAAoB,CACxFA,KADwF,CAE3FT,SAAS,CAACK,IAAV,CAAe,WAAf,CAA4BK,CAAAA,WAA5B,CAAwC,QAAxC,CAF2F,CAI3FV,SAAS,CAACK,IAAV,CAAe,WAAf,CAAA,CAA4BM,QAA5B,CAAqC,QAArC,EAED,CAND,CAJ2C,CAW3CX,SAAS,CAACK,IAAV,CAAe,uBAAf,CAAA,CAAsCE,EAAtC,CAAyC,OAAzC,CAAkD,UAAY,CAAA,mBAC1C,CAAG,EADuC,CAEzDK,iBAAiB,CAAG,EAFqC,CAG7DV,KAAK,CAACW,CAAN,CAAQ,qBAAR,CAA6BC,CAAAA,IAA7B,CAAkC,UAAY,CAC7C,IAAIC,aAAa,CAAGF,CAAC,CAAC,IAAD,CAArB,CACIE,aAAa,CAACC,EAAd,CAAiB,UAAjB,CAFyC,EAG5CC,eAAe,CAACC,IAAhB,CAAqBH,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QAAR,CAAiB,cAAjB,EAAiCD,WAAjC,CAA6C,eAA7C,CAJ4C,GAM5C4B,OAAO,CAAC3B,QAAR,CAAiB,eAAjB,CAAkCD,CAAAA,WAAlC,CAA8C,SAA9C,CAN4C,CAO5C4B,OAAO,CAAC3B,QAAR,CAAiB,eAAjB,CAAkCD,CAAAA,WAAlC,CAA8C,cAA9C,CAP4C,EAa9C,CA5EF,CA6ECgC,cAAc,CAAE,SAAA,cAAA,EAAY,CAC3B,aAAa,CAAG7B,CAAC,CAAC,sCAAD,CAAjB,CACA,IAAKd,CAAAA,qBAAL,CAA2BC,SAA3B,EACA,CAhFF,CAHD,EAsFAH,MAAM,CAAC8C,QAAD,CAAN,CAAiBC,KAAjB,CAAuB,UAAY,CAClC,YAAY,CAAG,IAAf,kCAAA,CACAC,QAAQ,CAACH,cAAT,GACA,CAHD;;"} \ No newline at end of file +{"version":3,"file":"NotificationConfig.min.js","sources":["NotificationConfig.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\njQuery.Class(\n\t'Notification_NotificationConfig_Js',\n\t{},\n\t{\n\t\tregisterEventForModal: function (container) {\n\t\t\tconst self = this;\n\t\t\tlet table = app.registerDataTables(container.find('.js-watching-data-table'));\n\t\t\tapp.showPopoverElementView(container.find('.infoPopover'));\n\t\t\tcontainer.on('switchChange.bootstrapSwitch', '.sendNotificationsSwitch', function (e, state) {\n\t\t\t\tif (state) {\n\t\t\t\t\tcontainer.find('.schedule').removeClass('d-none');\n\t\t\t\t} else {\n\t\t\t\t\tcontainer.find('.schedule').addClass('d-none');\n\t\t\t\t}\n\t\t\t});\n\t\t\tcontainer.find('[name=\"saveButton\"]').on('click', function () {\n\t\t\t\tlet selectedModules = [];\n\t\t\t\tlet sendNoticeModules = [];\n\t\t\t\ttable.$('[type=\"checkbox\"]').each(function () {\n\t\t\t\t\tlet currentTarget = $(this);\n\t\t\t\t\tif (currentTarget.is(':checked')) {\n\t\t\t\t\t\tselectedModules.push(currentTarget.val());\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\ttable.$('.sandNoticeOn').each(function (e) {\n\t\t\t\t\tlet value = $(this).closest('tr').data('id');\n\t\t\t\t\tsendNoticeModules.push(value);\n\t\t\t\t});\n\t\t\t\tlet params = {\n\t\t\t\t\tmodule: 'Notification',\n\t\t\t\t\taction: 'Notification',\n\t\t\t\t\tmode: 'saveWatchingModules',\n\t\t\t\t\tselectedModules: selectedModules,\n\t\t\t\t\tsendNotifications: sendNoticeModules,\n\t\t\t\t\tfrequency: container.find('select[name=\"frequency\"]').val()\n\t\t\t\t};\n\t\t\t\tlet progress = jQuery.progressIndicator();\n\t\t\t\tAppConnector.request(params)\n\t\t\t\t\t.done(function () {\n\t\t\t\t\t\tprogress.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\tapp.hideModalWindow();\n\t\t\t\t\t})\n\t\t\t\t\t.fail(function () {\n\t\t\t\t\t\tprogress.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\tapp.hideModalWindow();\n\t\t\t\t\t});\n\t\t\t});\n\t\t\tcontainer.find('.selectAllModules').on('click', function (e) {\n\t\t\t\te.stopPropagation();\n\t\t\t\ttable.$('.watchingModule:not(:disabled)').prop('checked', $(this).is(':checked'));\n\t\t\t});\n\t\t\tcontainer.find('.sentNoticeAll').on('click', function (e) {\n\t\t\t\te.stopPropagation();\n\t\t\t\tlet element = $(e.currentTarget).find('.fas');\n\t\t\t\tlet val = !element.hasClass('sandNoticeOn');\n\t\t\t\tself.changeSendNoticeState(element, val);\n\t\t\t\ttable.$('.sandNoticeOn,.sandNoticeOff').each(function () {\n\t\t\t\t\tself.changeSendNoticeState($(this), val);\n\t\t\t\t});\n\t\t\t});\n\t\t\ttable.$('.sentNotice').on('click', function (e) {\n\t\t\t\te.stopPropagation();\n\t\t\t\tlet element = $(e.currentTarget).find('.fas');\n\t\t\t\tself.changeSendNoticeState(element);\n\t\t\t});\n\t\t},\n\t\tchangeSendNoticeState: function (element, val) {\n\t\t\tif (val !== undefined) {\n\t\t\t\tif (val === true) {\n\t\t\t\t\telement.addClass('fa-bell').removeClass('fa-bell-slash');\n\t\t\t\t\telement.addClass('sandNoticeOn').removeClass('sandNoticeOff');\n\t\t\t\t} else {\n\t\t\t\t\telement.addClass('fa-bell-slash').removeClass('fa-bell');\n\t\t\t\t\telement.addClass('sandNoticeOff').removeClass('sandNoticeOn');\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\telement.toggleClass('fa-bell fa-bell-slash');\n\t\t\t\telement.toggleClass('sandNoticeOn sandNoticeOff');\n\t\t\t}\n\t\t},\n\t\tregisterEvents: function () {\n\t\t\tlet container = $('.modalNotificationNotificationConfig');\n\t\t\tthis.registerEventForModal(container);\n\t\t}\n\t}\n);\njQuery(document).ready(function () {\n\tlet instance = new Notification_NotificationConfig_Js();\n\tinstance.registerEvents();\n});\n"],"names":["jQuery","Class","registerEventForModal","container","self","table","app","registerDataTables","find","showPopoverElementView","on","e","state","removeClass","addClass","selectedModules","sendNoticeModules","$","each","currentTarget","is","push","val","value","closest","data","params","module","action","mode","sendNotifications","frequency","progress","progressIndicator","AppConnector","request","done","hideModalWindow","fail","stopPropagation","prop","element","hasClass","changeSendNoticeState","toggleClass","registerEvents","document","ready","instance","Notification_NotificationConfig_Js"],"mappings":";;AAAA,kKACA,YAAY,CAEZA,MAAM,CAACC,KAAK,CACX,oCAAoC,CACpC,EAAE,CACF,CACCC,qBAAqB,CAAE,SAAAA,qBAAAA,CAAUC,SAAS,CAAE,CACrC,IAAAC,IAAI,CAAG,IAAI,CACbC,KAAK,CAAGC,GAAG,CAACC,kBAAkB,CAACJ,SAAS,CAACK,IAAI,CAAC,yBAAyB,CAAC,CAAC,CAC7EF,GAAG,CAACG,sBAAsB,CAACN,SAAS,CAACK,IAAI,CAAC,cAAc,CAAC,CAAC,CAC1DL,SAAS,CAACO,EAAE,CAAC,8BAA8B,CAAE,0B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ACQ,aAAa,CAAC,CAACX,IAAI,CAAC,MAAM,CAAC,CAC7CJ,IAAI,CAACuC,qBAAqB,CAACF,OAAO,EACnC,CAAC,EACF,CAAC,CACDE,qBAAqB,CAAE,SAAAA,sBAAUF,OAAO,CAAEnB,GAAG,CAAE,CAC1CA,GAAG,GAAA,KAAA,CAAc,EASpBmB,OAAO,CAACG,WAAW,CAAC,uBAAuB,CAAC,CAC5CH,OAAO,CAACG,WAAW,CAAC,4BAA4B,CAAC,EAT7C,CAAA,CAAA,GAAAtB,GAAY,EACfmB,OAAO,CAAC3B,QAAQ,CAAC,SAAS,CAAC,CAACD,WAAW,CAAC,eAAe,CAAC,CACxD4B,OAAO,CAAC3B,QAAQ,CAAC,cAAc,CAAC,CAACD,WAAW,CAAC,eAAe,CAAC,GAE7D4B,OAAO,CAAC3B,QAAQ,CAAC,eAAe,CAAC,CAACD,WAAW,CAAC,SAAS,CAAC,CACxD4B,OAAO,CAAC3B,QAAQ,CAAC,eAAe,CAAC,CAACD,WAAW,CAAC,cAAc,CAAC,EAMhE,CAAC,CACDgC,cAAc,CAAE,SAAAA,cAAAA,EAAY,CAC3B,IAAI1C,SAAS,CAAGc,CAAC,CAAC,sCAAsC,CAAC,CACzD,IAAI,CAACf,qBAAqB,CAACC,SAAS,EACrC,CACD,CACD,CAAC,CACDH,MAAM,CAAC8C,QAAQ,CAAC,CAACC,KAAK,CAAC,UAAY,CAClC,IAAIC,QAAQ,CAAG,IAAIC,kCAAoC,CACvDD,QAAQ,CAACH,cAAc,GACxB,CAAC,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/OSSEmployees/resources/Detail.min.js b/public_html/layouts/basic/modules/OSSEmployees/resources/Detail.min.js index 64d58b71b54a..d1d3abc6992d 100644 --- a/public_html/layouts/basic/modules/OSSEmployees/resources/Detail.min.js +++ b/public_html/layouts/basic/modules/OSSEmployees/resources/Detail.min.js @@ -1,4 +1,4 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */"use strict";Vtiger_Detail_Js("OSSEmployees_Detail_Js",{employeeHierarchyResponseCache:{},triggerEmployeeHierarchy:function triggerEmployeeHierarchy(HierarchyUrl){OSSEmployees_Detail_Js.getEmployeeHierarchyResponseData(HierarchyUrl).done(function(data){app.showModalWindow(data);});},getEmployeeHierarchyResponseData:function getEmployeeHierarchyResponseData(params){var aDeferred=jQuery.Deferred();return jQuery.isEmptyObject(OSSEmployees_Detail_Js.employeeHierarchyResponseCache)?AppConnector.request(params).done(function(data){OSSEmployees_Detail_Js.employeeHierarchyResponseCache=data,aDeferred.resolve(OSSEmployees_Detail_Js.employeeHierarchyResponseCache);}).fail(function(textStatus,errorThrown){aDeferred.reject(textStatus,errorThrown);}):aDeferred.resolve(OSSEmployees_Detail_Js.employeeHierarchyResponseCache),aDeferred.promise()}},{registerEvents:function registerEvents(){this._super();}}); +/* {[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]} */"use strict";Vtiger_Detail_Js("OSSEmployees_Detail_Js",{employeeHierarchyResponseCache:{},triggerEmployeeHierarchy:function triggerEmployeeHierarchy(HierarchyUrl){OSSEmployees_Detail_Js.getEmployeeHierarchyResponseData(HierarchyUrl).done(function(data){app.showModalWindow(data);});},getEmployeeHierarchyResponseData:function getEmployeeHierarchyResponseData(params){var aDeferred=jQuery.Deferred();return jQuery.isEmptyObject(OSSEmployees_Detail_Js.employeeHierarchyResponseCache)?AppConnector.request(params).done(function(data){OSSEmployees_Detail_Js.employeeHierarchyResponseCache=data,aDeferred.resolve(OSSEmployees_Detail_Js.employeeHierarchyResponseCache);}).fail(function(textStatus,errorThrown){aDeferred.reject(textStatus,errorThrown);}):aDeferred.resolve(OSSEmployees_Detail_Js.employeeHierarchyResponseCache),aDeferred.promise()}},{registerEvents:function registerEvents(){this._super();}}); //# sourceMappingURL=Detail.min.js.map diff --git a/public_html/layouts/basic/modules/OSSEmployees/resources/Detail.min.js.map b/public_html/layouts/basic/modules/OSSEmployees/resources/Detail.min.js.map index 567ae50b9f58..6b8f196f863a 100644 --- a/public_html/layouts/basic/modules/OSSEmployees/resources/Detail.min.js.map +++ b/public_html/layouts/basic/modules/OSSEmployees/resources/Detail.min.js.map @@ -1 +1 @@ -{"version":3,"file":"Detail.min.js","sources":["Detail.js"],"sourcesContent":["/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */\n'use strict';\n\nVtiger_Detail_Js(\n\t'OSSEmployees_Detail_Js',\n\t{\n\t\temployeeHierarchyResponseCache: {},\n\t\ttriggerEmployeeHierarchy: function (HierarchyUrl) {\n\t\t\tOSSEmployees_Detail_Js.getEmployeeHierarchyResponseData(HierarchyUrl).done(function (data) {\n\t\t\t\tapp.showModalWindow(data);\n\t\t\t});\n\t\t},\n\t\tgetEmployeeHierarchyResponseData: function (params) {\n\t\t\tvar aDeferred = jQuery.Deferred();\n\t\t\tif (!jQuery.isEmptyObject(OSSEmployees_Detail_Js.employeeHierarchyResponseCache)) {\n\t\t\t\taDeferred.resolve(OSSEmployees_Detail_Js.employeeHierarchyResponseCache);\n\t\t\t} else {\n\t\t\t\tAppConnector.request(params)\n\t\t\t\t\t.done(function (data) {\n\t\t\t\t\t\tOSSEmployees_Detail_Js.employeeHierarchyResponseCache = data;\n\t\t\t\t\t\taDeferred.resolve(OSSEmployees_Detail_Js.employeeHierarchyResponseCache);\n\t\t\t\t\t})\n\t\t\t\t\t.fail(function (textStatus, errorThrown) {\n\t\t\t\t\t\taDeferred.reject(textStatus, errorThrown);\n\t\t\t\t\t});\n\t\t\t}\n\t\t\treturn aDeferred.promise();\n\t\t}\n\t},\n\t{\n\t\tregisterEvents: function () {\n\t\t\tthis._super();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Detail_Js","employeeHierarchyResponseCache","triggerEmployeeHierarchy","HierarchyUrl","OSSEmployees_Detail_Js","getEmployeeHierarchyResponseData","done","data","app","showModalWindow","params","aDeferred","jQuery","Deferred","isEmptyObject","AppConnector","request","resolve","fail","textStatus","errorThrown","reject","promise","registerEvents","_super"],"mappings":";;AAAA,kKACA,YAEAA,CAAAA,gBAAgB,CACf,wBADe,CAEf,CACCC,8BAA8B,CAAE,EADjC,CAECC,wBAAwB,CAAE,kCAAUC,YAAV,CAAwB,CACjDC,sBAAsB,CAACC,gCAAvB,CAAwDF,YAAxD,CAAsEG,CAAAA,IAAtE,CAA2E,SAAUC,IAAV,CAAgB,CAC1FC,GAAG,CAACC,eAAJ,CAAoBF,IAApB,EACA,CAFD,EAGA,CANF,CAOCF,gCAAgC,CAAE,SAAUK,gCAAAA,CAAAA,MAAV,CAAkB,CACnD,IAAIC,SAAS,CAAGC,MAAM,CAACC,QAAP,EAAhB,CAaA,OAZW,MAAA,CAACC,aAAP,CAAqBV,sBAAsB,CAACH,8BAA5C,CAYL,CATCc,YAAY,CAACC,OAAb,CAAqBN,MAArB,CACEJ,CAAAA,IADF,CACO,SAAUC,IAAV,CAAgB,CACrBH,sBAAsB,CAACH,8BAAvB,CAAwDM,IADnC,CAErBI,SAAS,CAACM,OAAV,CAAkBb,sBAAsB,CAACH,8BAAzC,EACA,CAJF,CAAA,CAKEiB,IALF,CAKO,SAAUC,UAAV,CAAsBC,WAAtB,CAAmC,CACxCT,SAAS,CAACU,MAAV,CAAiBF,UAAjB,CAA6BC,WAA7B,EACA,CAPF,CASD,CAXCT,SAAS,CAACM,OAAV,CAAkBb,sBAAsB,CAACH,8BAAzC,CAWD,CAAOU,SAAS,CAACW,OAAV,EACP,CAtBF,CAFe,CA0Bf,CACCC,cAAc,CAAE,SAAY,cAAA,EAAA,CAC3B,IAAKC,CAAAA,MAAL,GACA,CAHF,CA1Be;;"} \ No newline at end of file +{"version":3,"file":"Detail.min.js","sources":["Detail.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\nVtiger_Detail_Js(\n\t'OSSEmployees_Detail_Js',\n\t{\n\t\temployeeHierarchyResponseCache: {},\n\t\ttriggerEmployeeHierarchy: function (HierarchyUrl) {\n\t\t\tOSSEmployees_Detail_Js.getEmployeeHierarchyResponseData(HierarchyUrl).done(function (data) {\n\t\t\t\tapp.showModalWindow(data);\n\t\t\t});\n\t\t},\n\t\tgetEmployeeHierarchyResponseData: function (params) {\n\t\t\tvar aDeferred = jQuery.Deferred();\n\t\t\tif (!jQuery.isEmptyObject(OSSEmployees_Detail_Js.employeeHierarchyResponseCache)) {\n\t\t\t\taDeferred.resolve(OSSEmployees_Detail_Js.employeeHierarchyResponseCache);\n\t\t\t} else {\n\t\t\t\tAppConnector.request(params)\n\t\t\t\t\t.done(function (data) {\n\t\t\t\t\t\tOSSEmployees_Detail_Js.employeeHierarchyResponseCache = data;\n\t\t\t\t\t\taDeferred.resolve(OSSEmployees_Detail_Js.employeeHierarchyResponseCache);\n\t\t\t\t\t})\n\t\t\t\t\t.fail(function (textStatus, errorThrown) {\n\t\t\t\t\t\taDeferred.reject(textStatus, errorThrown);\n\t\t\t\t\t});\n\t\t\t}\n\t\t\treturn aDeferred.promise();\n\t\t}\n\t},\n\t{\n\t\tregisterEvents: function () {\n\t\t\tthis._super();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Detail_Js","employeeHierarchyResponseCache","triggerEmployeeHierarchy","HierarchyUrl","OSSEmployees_Detail_Js","getEmployeeHierarchyResponseData","done","data","app","showModalWindow","params","aDeferred","jQuery","Deferred","isEmptyObject","AppConnector","request","resolve","fail","textStatus","errorThrown","reject","promise","registerEvents","_super"],"mappings":";;AAAA,kKACA,YAAY,CAEZA,gBAAgB,CACf,wBAAwB,CACxB,CACCC,8BAA8B,CAAE,EAAE,CAClCC,wBAAwB,CAAE,SAAAA,wBAAUC,CAAAA,YAAY,CAAE,CACjDC,sBAAsB,CAACC,gCAAgC,CAACF,YAAY,CAAC,CAACG,IAAI,CAAC,SAAUC,IAAI,CAAE,CAC1FC,GAAG,CAACC,eAAe,CAACF,IAAI,EACzB,CAAC,EACF,CAAC,CACDF,gCAAgC,CAAE,SAAAA,gCAAUK,CAAAA,MAAM,CAAE,CACnD,IAAIC,SAAS,CAAGC,MAAM,CAACC,QAAQ,EAAE,CAajC,OAZKD,MAAM,CAACE,aAAa,CAACV,sBAAsB,CAACH,8BAA8B,CAAC,CAG/Ec,YAAY,CAACC,OAAO,CAACN,MAAM,CAAC,CAC1BJ,IAAI,CAAC,SAAUC,IAAI,CAAE,CACrBH,sBAAsB,CAACH,8BAA8B,CAAGM,IAAI,CAC5DI,SAAS,CAACM,OAAO,CAACb,sBAAsB,CAACH,8BAA8B,EACxE,CAAC,CAAC,CACDiB,IAAI,CAAC,SAAUC,UAAU,CAAEC,WAAW,CAAE,CACxCT,SAAS,CAACU,MAAM,CAACF,UAAU,CAAEC,WAAW,EACzC,CAAC,CAAC,CATHT,SAAS,CAACM,OAAO,CAACb,sBAAsB,CAACH,8BAA8B,CAAC,CAWlEU,SAAS,CAACW,OAAO,EACzB,CACD,CAAC,CACD,CACCC,cAAc,CAAE,SAAAA,cAAA,EAAY,CAC3B,IAAI,CAACC,MAAM,GACZ,CACD,CACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/OSSMail/resources/checkmails.min.js b/public_html/layouts/basic/modules/OSSMail/resources/checkmails.min.js index ecc5618256c2..e0ca2f33fa2d 100644 --- a/public_html/layouts/basic/modules/OSSMail/resources/checkmails.min.js +++ b/public_html/layouts/basic/modules/OSSMail/resources/checkmails.min.js @@ -1,4 +1,4 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */"use strict";jQuery(function(){$(".js-header__btn--mail").data("numberunreademails")!=null&&(window.stopScanMails=!1,"Popup"!=getUrlVars().view&&startCheckMails()),0<$(".js-header__btn--mail select").length&®isterUserList();});function registerUserList(){var selectUsers=$(".js-header__btn--mail select");selectUsers.data("select2")?selectUsers.select2("destroy"):selectUsers.on("change",handleChangeUserEvent),App.Fields.Picklist.showSelect2ElementView(selectUsers,{templateResult:function templateResult(state){if(!state.id)return state.text;var element=jQuery(state.element),text=element.data("nomail")?" ("+element.data("nomail")+")":"",$state=$(""+state.text+""+text+"");return $state},templateSelection:function templateSelection(data){var element=jQuery(data.element),text=element.data("nomail")?" ("+element.data("nomail")+")":"",resultContainer=jQuery("");return resultContainer.append(data.text+text),resultContainer},closeOnSelect:!0});var select2Instance=selectUsers.data("select2");select2Instance.$dropdown.on("mouseup","li",function(e){"true"==jQuery(e.currentTarget).attr("aria-selected")&&selectUsers.trigger("change");}),select2Instance.$container.find(".select2-selection__rendered").on("mousedown",function(e){e.stopPropagation(),selectUsers.trigger("change");}),$(".js-mail-list").on("click",".js-mail-link",handleChangeUserEvent);}function handleChangeUserEvent(){var params={module:"OSSMail",action:"SetUser",user:$(this).val()};AppConnector.request(params).done(function(){window.location.href="OSSMail"==app.getModuleName()?window.location.href:"index.php?module=OSSMail&view=Index";});}function startCheckMails(){var users=[],timeCheckingMails=$(".js-header__btn--mail").data("interval");if($(".js-header__btn--mail .noMails").each(function(){users.push($(this).data("id"));}),0"+num+""),element.html(text),!1===initial&&("SPAN"===this.tagName||this.selected)&&(prevVal"+num+""),element.html(text),!1===initial&&("SPAN"===this.tagName||this.selected)&&(prevVal 0) {\n\t\tregisterUserList();\n\t}\n});\n\nfunction registerUserList() {\n\tvar selectUsers = $('.js-header__btn--mail select');\n\tif (selectUsers.data('select2')) {\n\t\tselectUsers.select2('destroy');\n\t} else {\n\t\tselectUsers.on('change', handleChangeUserEvent);\n\t}\n\tApp.Fields.Picklist.showSelect2ElementView(selectUsers, {\n\t\ttemplateResult: function (state) {\n\t\t\tif (!state.id) {\n\t\t\t\treturn state.text;\n\t\t\t}\n\t\t\tvar element = jQuery(state.element);\n\t\t\tvar text = element.data('nomail') ? ' (' + element.data('nomail') + ')' : '';\n\t\t\tvar $state = $('' + state.text + '' + text + '');\n\t\t\treturn $state;\n\t\t},\n\t\ttemplateSelection: function (data) {\n\t\t\tvar element = jQuery(data.element);\n\t\t\tvar text = element.data('nomail') ? ' (' + element.data('nomail') + ')' : '';\n\t\t\tvar resultContainer = jQuery('');\n\t\t\tresultContainer.append(data.text + text);\n\t\t\treturn resultContainer;\n\t\t},\n\t\tcloseOnSelect: true\n\t});\n\tvar select2Instance = selectUsers.data('select2');\n\tselect2Instance.$dropdown.on('mouseup', 'li', function (e) {\n\t\tif (jQuery(e.currentTarget).attr('aria-selected') == 'true') {\n\t\t\tselectUsers.trigger('change');\n\t\t}\n\t});\n\tselect2Instance.$container.find('.select2-selection__rendered').on('mousedown', function (e) {\n\t\te.stopPropagation();\n\t\tselectUsers.trigger('change');\n\t});\n\t$('.js-mail-list').on('click', '.js-mail-link', handleChangeUserEvent);\n}\n\nfunction handleChangeUserEvent() {\n\tvar params = {\n\t\tmodule: 'OSSMail',\n\t\taction: 'SetUser',\n\t\tuser: $(this).val()\n\t};\n\tAppConnector.request(params).done(function (_) {\n\t\tif (app.getModuleName() == 'OSSMail') {\n\t\t\twindow.location.href = window.location.href;\n\t\t} else {\n\t\t\twindow.location.href = 'index.php?module=OSSMail&view=Index';\n\t\t}\n\t});\n}\n\nfunction startCheckMails() {\n\tvar users = [];\n\tvar timeCheckingMails = $('.js-header__btn--mail').data('interval');\n\t$('.js-header__btn--mail .noMails').each(function (_) {\n\t\tusers.push($(this).data('id'));\n\t});\n\tif (users.length > 0) {\n\t\tcheckMails(users, true);\n\t\tvar refreshIntervalId = setInterval(function () {\n\t\t\tif (window.stopScanMails == false) {\n\t\t\t\tcheckMails(users);\n\t\t\t} else {\n\t\t\t\tclearInterval(refreshIntervalId);\n\t\t\t}\n\t\t}, timeCheckingMails * 1000);\n\t}\n}\n\nfunction checkMails(users, initial = false) {\n\tlet reloadSelect = false;\n\tAppConnector.request({\n\t\tmodule: 'OSSMail',\n\t\taction: 'CheckMails',\n\t\tusers: users\n\t})\n\t\t.done(function (response) {\n\t\t\tif (response.success && response.success.error != true && response.result.error != true) {\n\t\t\t\tlet result = response.result;\n\t\t\t\t$('.js-header__btn--mail .noMails').each(function (_) {\n\t\t\t\t\tlet element = jQuery(this);\n\t\t\t\t\tlet id = element.data('id');\n\t\t\t\t\tif (jQuery.inArray(id, result)) {\n\t\t\t\t\t\tlet num = result[id];\n\t\t\t\t\t\tif (element.is('option')) {\n\t\t\t\t\t\t\telement.data('nomail', num);\n\t\t\t\t\t\t\treloadSelect = true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlet prevVal = element.data('nomail');\n\t\t\t\t\t\t\telement.data('nomail', num);\n\t\t\t\t\t\t\tlet text = '';\n\t\t\t\t\t\t\tif (num > 0) {\n\t\t\t\t\t\t\t\ttext = ' ' + num + '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telement.html(text);\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tinitial === false &&\n\t\t\t\t\t\t\t\t(this.tagName === 'SPAN' || this.selected) &&\n\t\t\t\t\t\t\t\t((prevVal < num && prevVal >= 0) || (!prevVal && num > 0))\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\telement.parent().effect('pulsate', 1500);\n\t\t\t\t\t\t\t\tapp.playSound('MAILS');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tif (reloadSelect) {\n\t\t\t\t\tregisterUserList();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twindow.stopScanMails = true;\n\t\t\t}\n\t\t})\n\t\t.fail(function () {\n\t\t\twindow.stopScanMails = true;\n\t\t});\n}\n\nfunction getUrlVars() {\n\tvar vars = {};\n\twindow.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function (m, key, value) {\n\t\tvars[key] = value;\n\t});\n\treturn vars;\n}\n"],"names":["jQuery","$","data","window","stopScanMails","getUrlVars","startCheckMails","length","registerUserList","selectUsers","select2","on","handleChangeUserEvent","App","Fields","Picklist","showSelect2ElementView","templateResult","state","id","text","element","$state","templateSelection","resultContainer","append","closeOnSelect","select2Instance","$dropdown","e","currentTarget","attr","trigger","$container","find","stopPropagation","params","module","action","user","val","AppConnector","request","done","location","href","app","getModuleName","timeCheckingMails","each","users","push","checkMails","setInterval","clearInterval","refreshIntervalId","reloadSelect","response","success","error","result","inArray","is","num","html","initial","tagName","selected","prevVal","parent","effect","playSound","fail","vars","replace","m","key","value"],"mappings":";;AAAA,kKACA,aACAA,MAAM,CAAC,UAAY,CACdC,CAAC,CAAC,uBAAD,CAAD,CAA2BC,IAA3B,CAAgC,oBAAhC,CADc,EAAA,IAAA,GAEjBC,MAAM,CAACC,aAAP,GAFiB,CAGW,OAAxB,EAAAC,UAAU,OAHG,EAIhBC,eAAe,EAJC,CAO6B,CAAA,CAA3C,CAAAL,CAAC,CAAC,8BAAD,CAAD,CAAkCM,MAPpB,EAQjBC,gBAAgB,GAEjB,CAVK,EAYN,SAASA,gBAAT,EAA4B,CAC3B,IAAe,WAAA,CAAGP,CAAC,CAAC,8BAAD,CAAnB,CACIQ,WAAW,CAACP,IAAZ,CAAiB,SAAjB,CAFuB,CAG1BO,WAAW,CAACC,OAAZ,CAAoB,SAApB,CAH0B,CAK1BD,WAAW,CAACE,EAAZ,CAAe,QAAf,CAAyBC,qBAAzB,CAL0B,CAO3BC,GAAG,CAACC,MAAJ,CAAWC,QAAX,CAAoBC,sBAApB,CAA2CP,WAA3C,CAAwD,CACvDQ,cAAc,CAAE,SAAUC,cAAAA,CAAAA,KAAV,CAAiB,CAChC,GAAI,CAACA,KAAK,CAACC,EAAX,CACC,YAAY,CAACC,IAAb,CAF+B,IAI5BC,OAAO,CAAGrB,MAAM,CAACkB,KAAK,CAACG,OAAP,CAJY,CAK5BD,IAAI,CAAGC,OAAO,CAACnB,IAAR,CAAa,QAAb,CAAyB,CAAA,IAAA,CAAOmB,OAAO,CAACnB,IAAR,CAAa,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AO,CAAGL,GAAV,EAA4B,CAAX,EAAAK,OAAlB,EAAoC,CAACA,OAAD,EAAkB,CAAN,CAAAL,GAFjD,CATK,GAaL1C,OAAO,CAACgD,MAAR,GAAiBC,MAAjB,CAAwB,SAAxB,CAAmC,IAAnC,CAbK,CAcLxB,GAAG,CAACyB,SAAJ,CAAc,OAAd,CAdK,EAgBN,CACD,CACD,CA1BD,CAFwF,CA6BpFf,YA7BoF,EA8BvFhD,gBAAgB,GAEjB,CAhCD,WAiCO,CAACJ,aAAP,IAED,CAzCF,CAAA,CA0CEoE,IA1CF,CA0CO,UAAY,CACjBrE,MAAM,CAACC,aAAP,CAAA,CAAA,EACA,CA5CF,EA6CA,CAED,SAAA,UAAA,EAAsB,CACrB,IAAIqE,IAAI,CAAG,EAAX,CAIA,OAHM,MAAA,CAAC7B,QAAP,CAAgBC,IAAhB,CAAqB6B,OAArB,CAA6B,yBAA7B,CAAwD,SAAUC,CAAV,CAAaC,GAAb,CAAkBC,KAAlB,CAAyB,CAChFJ,IAAI,CAACG,GAAD,CAAJ,CAAYC,MACZ,CAFD,CAGA,CAAOJ,IACP;;"} \ No newline at end of file +{"version":3,"file":"checkmails.min.js","sources":["checkmails.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';\njQuery(function () {\n\tif ($('.js-header__btn--mail').data('numberunreademails') != undefined) {\n\t\twindow.stopScanMails = false;\n\t\tif (getUrlVars()['view'] != 'Popup') {\n\t\t\tstartCheckMails();\n\t\t}\n\t}\n\tif ($('.js-header__btn--mail select').length > 0) {\n\t\tregisterUserList();\n\t}\n});\n\nfunction registerUserList() {\n\tvar selectUsers = $('.js-header__btn--mail select');\n\tif (selectUsers.data('select2')) {\n\t\tselectUsers.select2('destroy');\n\t} else {\n\t\tselectUsers.on('change', handleChangeUserEvent);\n\t}\n\tApp.Fields.Picklist.showSelect2ElementView(selectUsers, {\n\t\ttemplateResult: function (data) {\n\t\t\tconst main = document.createElement('span');\n\t\t\tif (data.id) {\n\t\t\t\tconst element = $(data.element),\n\t\t\t\t\tmail = document.createElement('span');\n\t\t\t\tmail.innerText = data.text;\n\t\t\t\tmain.appendChild(mail);\n\t\t\t\tif (element.data('nomail')) {\n\t\t\t\t\tconst badge = document.createElement('span');\n\t\t\t\t\tbadge.className = 'badge badge-danger ml-1';\n\t\t\t\t\tbadge.innerText = element.data('nomail');\n\t\t\t\t\tmain.appendChild(badge);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tmain.innerText = data.text;\n\t\t\t}\n\t\t\treturn main;\n\t\t},\n\t\ttemplateSelection: function (data) {\n\t\t\tconst element = $(data.element),\n\t\t\t\tmain = document.createElement('span'),\n\t\t\t\tmail = document.createElement('span');\n\t\t\tmail.innerText = data.text;\n\t\t\tmain.appendChild(mail);\n\t\t\tif (element.data('nomail')) {\n\t\t\t\tconst badge = document.createElement('span');\n\t\t\t\tbadge.className = 'badge badge-danger ml-1';\n\t\t\t\tbadge.innerText = element.data('nomail');\n\t\t\t\tmain.appendChild(badge);\n\t\t\t}\n\t\t\treturn main;\n\t\t},\n\t\tcloseOnSelect: true\n\t});\n\tconst select2Instance = selectUsers.data('select2');\n\tselect2Instance.$dropdown.on('mouseup', 'li', function (e) {\n\t\tif (jQuery(e.currentTarget).attr('aria-selected') == 'true') {\n\t\t\tselectUsers.trigger('change');\n\t\t}\n\t});\n\tselect2Instance.$container.find('.select2-selection__rendered').on('mousedown', function (e) {\n\t\te.stopPropagation();\n\t\tselectUsers.trigger('change');\n\t});\n\t$('.js-mail-list').on('click', '.js-mail-link', handleChangeUserEvent);\n}\n\nfunction handleChangeUserEvent() {\n\tAppConnector.request({\n\t\tmodule: 'OSSMail',\n\t\taction: 'SetUser',\n\t\tuser: $(this).val()\n\t}).done(function (_) {\n\t\tif (app.getModuleName() == 'OSSMail') {\n\t\t\twindow.location.href = window.location.href;\n\t\t} else {\n\t\t\twindow.location.href = 'index.php?module=OSSMail&view=Index';\n\t\t}\n\t});\n}\n\nfunction startCheckMails() {\n\tlet users = [];\n\tlet timeCheckingMails = $('.js-header__btn--mail').data('interval');\n\t$('.js-header__btn--mail .noMails').each(function (_) {\n\t\tusers.push($(this).data('id'));\n\t});\n\tif (users.length > 0) {\n\t\tcheckMails(users, true);\n\t\tlet refreshIntervalId = setInterval(function () {\n\t\t\tif (window.stopScanMails == false) {\n\t\t\t\tcheckMails(users);\n\t\t\t} else {\n\t\t\t\tclearInterval(refreshIntervalId);\n\t\t\t}\n\t\t}, timeCheckingMails * 1000);\n\t}\n}\n\nfunction checkMails(users, initial = false) {\n\tlet reloadSelect = false;\n\tAppConnector.request({\n\t\tmodule: 'OSSMail',\n\t\taction: 'CheckMails',\n\t\tusers: users\n\t})\n\t\t.done(function (response) {\n\t\t\tif (response.success && response.success.error != true && response.result.error != true) {\n\t\t\t\tlet result = response.result;\n\t\t\t\t$('.js-header__btn--mail .noMails').each(function (_) {\n\t\t\t\t\tlet element = jQuery(this);\n\t\t\t\t\tlet id = element.data('id');\n\t\t\t\t\tif (jQuery.inArray(id, result)) {\n\t\t\t\t\t\tlet num = result[id];\n\t\t\t\t\t\tif (element.is('option')) {\n\t\t\t\t\t\t\telement.data('nomail', num);\n\t\t\t\t\t\t\treloadSelect = true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlet prevVal = element.data('nomail');\n\t\t\t\t\t\t\telement.data('nomail', num);\n\t\t\t\t\t\t\tlet text = '';\n\t\t\t\t\t\t\tif (num > 0) {\n\t\t\t\t\t\t\t\ttext = ' ' + num + '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telement.html(text);\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tinitial === false &&\n\t\t\t\t\t\t\t\t(this.tagName === 'SPAN' || this.selected) &&\n\t\t\t\t\t\t\t\t((prevVal < num && prevVal >= 0) || (!prevVal && num > 0))\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\telement.parent().effect('pulsate', 1500);\n\t\t\t\t\t\t\t\tapp.playSound('MAILS');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tif (reloadSelect) {\n\t\t\t\t\tregisterUserList();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twindow.stopScanMails = true;\n\t\t\t}\n\t\t})\n\t\t.fail(function () {\n\t\t\twindow.stopScanMails = true;\n\t\t});\n}\n\nfunction getUrlVars() {\n\tlet vars = {};\n\twindow.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function (m, key, value) {\n\t\tvars[key] = value;\n\t});\n\treturn vars;\n}\n"],"names":["jQuery","$","data","window","stopScanMails","getUrlVars","view","startCheckMails","length","registerUserList","selectUsers","select2","on","handleChangeUserEvent","App","Fields","Picklist","showSelect2ElementView","templateResult","main","document","createElement","id","element","mail","innerText","text","appendChild","badge","className","templateSelection","closeOnSelect","select2Instance","$dropdown","e","currentTarget","attr","trigger","$container","find","stopPropagation","AppConnector","request","module","action","user","val","done","location","href","app","getModuleName","users","timeCheckingMails","each","push","checkMails","refreshIntervalId","setInterval","clearInterval","initial","arguments","reloadSelect","response","success","error","result","inArray","num","is","prevVal","html","tagName","selected","parent","effect","playSound","fail","vars","replace","m","key","value"],"mappings":";;AAAA,kKACA,YAAY,CACZA,MAAM,CAAC,UAAY,CACdC,CAAC,CAAC,uBAAuB,CAAC,CAACC,IAAI,CAAC,oBAAoB,CAAC,EAAA,IAAa,GACrEC,MAAM,CAACC,aAAa,CAAA,CAAA,CAAQ,CACA,OAAO,EAA/BC,UAAU,EAAE,CAAAC,IAAmB,EAClCC,eAAe,EAAE,CAG4B,CAAA,CAAC,CAA5CN,CAAC,CAAC,8BAA8B,CAAC,CAACO,MAAU,EAC/CC,gBAAgB,GAElB,CAAC,CAAC,CAEF,SAASA,gBAAgBA,EAAG,CAC3B,IAAIC,WAAW,CAAGT,CAAC,CAAC,8BAA8B,CAAC,CAC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ACD,CAAC,CAAC,CACEd,YAAY,EACfrD,gBAAgB,GAElB,CAAC,KACAN,MAAM,CAACC,aAAa,CAAA,CAAA,EAEtB,CAAC,CAAC,CACDyE,IAAI,CAAC,UAAY,CACjB1E,MAAM,CAACC,aAAa,CACrB,CAAA,EAAA,CAAC,EACH,CAEA,SAASC,UAAUA,EAAG,CACrB,IAAIyE,IAAI,CAAG,EAAE,CAIb,OAHA3E,MAAM,CAAC6C,QAAQ,CAACC,IAAI,CAAC8B,OAAO,CAAC,yBAAyB,CAAE,SAAUC,CAAC,CAAEC,GAAG,CAAEC,KAAK,CAAE,CAChFJ,IAAI,CAACG,GAAG,CAAC,CAAGC,MACb,CAAC,CAAC,CACKJ,IACR;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/OSSMailView/resources/Detail.min.js b/public_html/layouts/basic/modules/OSSMailView/resources/Detail.min.js index 49f6e02313f0..5e9de801a395 100644 --- a/public_html/layouts/basic/modules/OSSMailView/resources/Detail.min.js +++ b/public_html/layouts/basic/modules/OSSMailView/resources/Detail.min.js @@ -1,4 +1,4 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */"use strict";Vtiger_Detail_Js("OSSMailView_Detail_Js",{printMail:function printMail(){var subject=$("#subject").val(),from=$("#from_email").val(),to=$("#to_email").val(),cc=$("#cc_email").val(),date=jQuery("#createdtime").val(),body=$("#content").html(),content=window.open();content.document.write(""+app.vtranslate("Subject")+": "+subject+"
    "),content.document.write("
    "+app.vtranslate("From")+": "+from+"
    "),content.document.write(app.vtranslate("To")+" :"+to+"
    "),null!=cc&&content.document.write(app.vtranslate("CC")+": "+cc+"
    "),content.document.write(app.vtranslate("Date")+": "+date+"
    "),content.document.write("
    "+body+"
    "),content.print();}},{registerEvents:function registerEvents(){this._super(),Vtiger_Index_Js.registerMailButtons($(".detailViewContainer .js-btn-toolbar"));}}); +/* {[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]} */"use strict";Vtiger_Detail_Js("OSSMailView_Detail_Js",{printMail:function printMail(){var subject=$("#subject").val(),from=$("#from_email").val(),to=$("#to_email").val(),cc=$("#cc_email").val(),date=jQuery("#createdtime").val(),body=$("#content").html(),content=window.open();content.document.write(""+app.vtranslate("Subject")+": "+subject+"
    "),content.document.write("
    "+app.vtranslate("From")+": "+from+"
    "),content.document.write(app.vtranslate("To")+" :"+to+"
    "),null!=cc&&content.document.write(app.vtranslate("CC")+": "+cc+"
    "),content.document.write(app.vtranslate("Date")+": "+date+"
    "),content.document.write("
    "+body+"
    "),content.print();}},{registerEvents:function registerEvents(){this._super(),Vtiger_Index_Js.registerMailButtons($(".detailViewContainer .js-btn-toolbar"));}}); //# sourceMappingURL=Detail.min.js.map diff --git a/public_html/layouts/basic/modules/OSSMailView/resources/Detail.min.js.map b/public_html/layouts/basic/modules/OSSMailView/resources/Detail.min.js.map index d13fc85e4c1c..5460d24d3c45 100644 --- a/public_html/layouts/basic/modules/OSSMailView/resources/Detail.min.js.map +++ b/public_html/layouts/basic/modules/OSSMailView/resources/Detail.min.js.map @@ -1 +1 @@ -{"version":3,"file":"Detail.min.js","sources":["Detail.js"],"sourcesContent":["/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */\n'use strict';\n\nVtiger_Detail_Js(\n\t'OSSMailView_Detail_Js',\n\t{\n\t\tprintMail: function () {\n\t\t\tvar subject = $('#subject').val();\n\t\t\tvar from = $('#from_email').val();\n\t\t\tvar to = $('#to_email').val();\n\t\t\tvar cc = $('#cc_email').val();\n\t\t\tvar date = jQuery('#createdtime').val();\n\t\t\tvar body = $('#content').html();\n\t\t\tvar content = window.open();\n\t\t\tcontent.document.write('' + app.vtranslate('Subject') + ': ' + subject + '
    ');\n\t\t\tcontent.document.write('
    ' + app.vtranslate('From') + ': ' + from + '
    ');\n\t\t\tcontent.document.write(app.vtranslate('To') + ' :' + to + '
    ');\n\t\t\tif (cc != null) {\n\t\t\t\tcontent.document.write(app.vtranslate('CC') + ': ' + cc + '
    ');\n\t\t\t}\n\t\t\tcontent.document.write(app.vtranslate('Date') + ': ' + date + '
    ');\n\t\t\tcontent.document.write('
    ' + body + '
    ');\n\t\t\tcontent.print();\n\t\t}\n\t},\n\t{\n\t\tregisterEvents: function () {\n\t\t\tthis._super();\n\t\t\tVtiger_Index_Js.registerMailButtons($('.detailViewContainer .js-btn-toolbar'));\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Detail_Js","printMail","subject","$","val","from","to","cc","date","jQuery","body","html","content","window","open","document","write","app","vtranslate","print","registerEvents","_super","Vtiger_Index_Js","registerMailButtons"],"mappings":";;AAAA,kKACA,YAAA,CAEAA,gBAAgB,CACf,uBADe,CAEf,CACCC,SAAS,CAAE,SAAA,SAAA,EAAY,CAClBC,IAAAA,OAAO,CAAGC,CAAC,CAAC,UAAD,CAAD,CAAcC,GAAd,EADQ,CAElBC,IAAI,CAAGF,CAAC,CAAC,aAAD,CAAD,CAAiBC,GAAjB,EAFW,CAGlBE,EAAE,CAAGH,CAAC,CAAC,WAAD,CAAD,CAAeC,GAAf,EAHa,CAIlBG,EAAE,CAAGJ,CAAC,CAAC,WAAD,CAAD,CAAeC,GAAf,EAJa,CAKlBI,IAAI,CAAGC,MAAM,CAAC,cAAD,CAAN,CAAuBL,GAAvB,EALW,CAMlBM,IAAI,CAAGP,CAAC,CAAC,UAAD,CAAD,CAAcQ,IAAd,EANW,CAOlBC,OAAO,CAAGC,MAAM,CAACC,IAAP,EAPQ,CAQtBF,OAAO,CAACG,QAAR,CAAiBC,KAAjB,CAAuB,KAAA,CAAQC,GAAG,CAACC,UAAJ,CAAe,SAAf,CAAR,CAAoC,IAApC,CAA2ChB,OAA3C,CAAqD,YAA5E,CARsB,CAStBU,OAAO,CAACG,QAAR,CAAiBC,KAAjB,CAAuB,QAAA,CAAWC,GAAG,CAACC,UAAJ,CAAe,MAAf,CAAX,CAAoC,IAApC,CAA2Cb,IAA3C,CAAkD,QAAzE,CATsB,CAUtBO,OAAO,CAACG,QAAR,CAAiBC,KAAjB,CAAuBC,GAAG,CAACC,UAAJ,CAAe,IAAf,EAAuB,IAAvB,CAA8BZ,EAA9B,CAAmC,QAA1D,CAVsB,CAWZ,IAAN,EAAAC,EAXkB,EAYrBK,OAAO,CAACG,QAAR,CAAiBC,KAAjB,CAAuBC,GAAG,CAACC,UAAJ,CAAe,IAAf,CAAA,CAAuB,IAAvB,CAA8BX,EAA9B,CAAmC,QAA1D,CAZqB,CActBK,OAAO,CAACG,QAAR,CAAiBC,KAAjB,CAAuBC,GAAG,CAACC,UAAJ,CAAe,MAAf,EAAyB,IAAzB,CAAgCV,IAAhC,CAAuC,QAA9D,CAdsB,CAetBI,OAAO,CAACG,QAAR,CAAiBC,KAAjB,CAAuB,QAAUN,IAAV,CAAiB,QAAxC,CAfsB,CAgBtBE,OAAO,CAACO,KAAR,GACA,CAlBF,CAFe,CAsBf,CACCC,cAAc,CAAE,SAAA,cAAA,EAAY,CAC3B,IAAA,CAAKC,MAAL,EAD2B,CAE3BC,eAAe,CAACC,mBAAhB,CAAoCpB,CAAC,CAAC,sCAAD,CAArC,EACA,CAJF,CAtBe;;"} \ No newline at end of file +{"version":3,"file":"Detail.min.js","sources":["Detail.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\nVtiger_Detail_Js(\n\t'OSSMailView_Detail_Js',\n\t{\n\t\tprintMail: function () {\n\t\t\tvar subject = $('#subject').val();\n\t\t\tvar from = $('#from_email').val();\n\t\t\tvar to = $('#to_email').val();\n\t\t\tvar cc = $('#cc_email').val();\n\t\t\tvar date = jQuery('#createdtime').val();\n\t\t\tvar body = $('#content').html();\n\t\t\tvar content = window.open();\n\t\t\tcontent.document.write('' + app.vtranslate('Subject') + ': ' + subject + '
    ');\n\t\t\tcontent.document.write('
    ' + app.vtranslate('From') + ': ' + from + '
    ');\n\t\t\tcontent.document.write(app.vtranslate('To') + ' :' + to + '
    ');\n\t\t\tif (cc != null) {\n\t\t\t\tcontent.document.write(app.vtranslate('CC') + ': ' + cc + '
    ');\n\t\t\t}\n\t\t\tcontent.document.write(app.vtranslate('Date') + ': ' + date + '
    ');\n\t\t\tcontent.document.write('
    ' + body + '
    ');\n\t\t\tcontent.print();\n\t\t}\n\t},\n\t{\n\t\tregisterEvents: function () {\n\t\t\tthis._super();\n\t\t\tVtiger_Index_Js.registerMailButtons($('.detailViewContainer .js-btn-toolbar'));\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Detail_Js","printMail","subject","$","val","from","to","cc","date","jQuery","body","html","content","window","open","document","write","app","vtranslate","print","registerEvents","_super","Vtiger_Index_Js","registerMailButtons"],"mappings":";;AAAA,kKACA,YAAY,CAEZA,gBAAgB,CACf,uBAAuB,CACvB,CACCC,SAAS,CAAE,SAAAA,SAAAA,EAAY,CAAA,IAClBC,OAAO,CAAGC,CAAC,CAAC,UAAU,CAAC,CAACC,GAAG,EAAE,CAC7BC,IAAI,CAAGF,CAAC,CAAC,aAAa,CAAC,CAACC,GAAG,EAAE,CAC7BE,EAAE,CAAGH,CAAC,CAAC,WAAW,CAAC,CAACC,GAAG,EAAE,CACzBG,EAAE,CAAGJ,CAAC,CAAC,WAAW,CAAC,CAACC,GAAG,EAAE,CACzBI,IAAI,CAAGC,MAAM,CAAC,cAAc,CAAC,CAACL,GAAG,EAAE,CACnCM,IAAI,CAAGP,CAAC,CAAC,UAAU,CAAC,CAACQ,IAAI,EAAE,CAC3BC,OAAO,CAAGC,MAAM,CAACC,IAAI,EAAE,CAC3BF,OAAO,CAACG,QAAQ,CAACC,KAAK,CAAC,KAAK,CAAGC,GAAG,CAACC,UAAU,CAAC,SAAS,CAAC,CAAG,IAAI,CAAGhB,OAAO,CAAG,YAAY,CAAC,CACzFU,OAAO,CAACG,QAAQ,CAACC,KAAK,CAAC,QAAQ,CAAGC,GAAG,CAACC,UAAU,CAAC,MAAM,CAAC,CAAG,IAAI,CAAGb,IAAI,CAAG,QAAQ,CAAC,CAClFO,OAAO,CAACG,QAAQ,CAACC,KAAK,CAACC,GAAG,CAACC,UAAU,CAAC,IAAI,CAAC,CAAG,IAAI,CAAGZ,EAAE,CAAG,QAAQ,CAAC,CACzD,IAAI,EAAVC,EAAU,EACbK,OAAO,CAACG,QAAQ,CAACC,KAAK,CAACC,GAAG,CAACC,UAAU,CAAC,IAAI,CAAC,CAAG,IAAI,CAAGX,EAAE,CAAG,QAAQ,CAAC,CAEpEK,OAAO,CAACG,QAAQ,CAACC,KAAK,CAACC,GAAG,CAACC,UAAU,CAAC,MAAM,CAAC,CAAG,IAAI,CAAGV,IAAI,CAAG,QAAQ,CAAC,CACvEI,OAAO,CAACG,QAAQ,CAACC,KAAK,CAAC,OAAO,CAAGN,IAAI,CAAG,QAAQ,CAAC,CACjDE,OAAO,CAACO,KAAK,GACd,CACD,CAAC,CACD,CACCC,cAAc,CAAE,SAAAA,cAAA,EAAY,CAC3B,IAAI,CAACC,MAAM,EAAE,CACbC,eAAe,CAACC,mBAAmB,CAACpB,CAAC,CAAC,sCAAsC,CAAC,EAC9E,CACD,CACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/OSSMailView/resources/List.min.js b/public_html/layouts/basic/modules/OSSMailView/resources/List.min.js index fb057af4b32b..2441ac293cd0 100644 --- a/public_html/layouts/basic/modules/OSSMailView/resources/List.min.js +++ b/public_html/layouts/basic/modules/OSSMailView/resources/List.min.js @@ -1,4 +1,4 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */"use strict";Vtiger_List_Js("OSSMailView_List_Js",{bindMails:function bindMails(){var listInstance=Vtiger_List_Js.getInstance(),validationResult=listInstance.checkListRecordSelected();!0==validationResult?listInstance.noRecordSelectedAlert():app.showConfirmModal({text:app.vtranslate("JS_BIND_CONFIRM"),confirmedCallback:function confirmedCallback(){var params={};params.data={module:"OSSMailView",action:"BindMails"},$.extend(params.data,Vtiger_List_Js.getSelectedRecordsParams()),params.async=!1,AppConnector.request(params).done(function(data){var message="string"==typeof data?JSON.parse(data).result:data.result;app.showNotify({text:message,delay:"4000",type:"success"});});}});},triggerChangeTypeForm:function triggerChangeTypeForm(){var listInstance=Vtiger_List_Js.getInstance(),selectedIds=listInstance.readSelectedIds(!0);$("#ChangeType").on("submit",function(event){var mail_type=jQuery("#mail_type").val(),save_params={};save_params.data={module:"OSSMailView",action:"ChangeType",data:selectedIds,mail_type:mail_type},save_params.async=!1,AppConnector.request(save_params).done(function(data){var params={title:app.vtranslate("JS_MESSAGE"),text:data.result,type:"info"};app.showNotify(params),Vtiger_List_Js.clearList(),listInstance.getListViewRecords(),app.hideModalWindow();}),event.preventDefault();});},triggerChangeType:function triggerChangeType(url){var thisInstance=this,listInstance=Vtiger_List_Js.getInstance(),validationResult=listInstance.checkListRecordSelected();if(!0!=validationResult){thisInstance.getRelatedModulesContainer=!1;AppConnector.request({type:"POST",url:url,dataType:"html",data:{}}).done(function(data){data&&app.showModalWindow(data,function(){thisInstance.triggerChangeTypeForm();});});}else listInstance.noRecordSelectedAlert();}},{}); +/* {[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]} */"use strict";Vtiger_List_Js("OSSMailView_List_Js",{bindMails:function bindMails(){var listInstance=Vtiger_List_Js.getInstance(),validationResult=listInstance.checkListRecordSelected();!0==validationResult?listInstance.noRecordSelectedAlert():app.showConfirmModal({text:app.vtranslate("JS_BIND_CONFIRM"),confirmedCallback:function confirmedCallback(){var params={};params.data={module:"OSSMailView",action:"BindMails"},$.extend(params.data,Vtiger_List_Js.getSelectedRecordsParams()),params.async=!1,AppConnector.request(params).done(function(data){var message="string"==typeof data?JSON.parse(data).result:data.result;app.showNotify({text:message,delay:"4000",type:"success"});});}});},triggerChangeTypeForm:function triggerChangeTypeForm(){var listInstance=Vtiger_List_Js.getInstance(),selectedIds=listInstance.readSelectedIds(!0);$("#ChangeType").on("submit",function(event){var mail_type=jQuery("#mail_type").val(),save_params={};save_params.data={module:"OSSMailView",action:"ChangeType",data:selectedIds,mail_type:mail_type},save_params.async=!1,AppConnector.request(save_params).done(function(data){var params={title:app.vtranslate("JS_MESSAGE"),text:data.result,type:"info"};app.showNotify(params),Vtiger_List_Js.clearList(),listInstance.getListViewRecords(),app.hideModalWindow();}),event.preventDefault();});},triggerChangeType:function triggerChangeType(url){var thisInstance=this,listInstance=Vtiger_List_Js.getInstance(),validationResult=listInstance.checkListRecordSelected();if(!0!=validationResult){thisInstance.getRelatedModulesContainer=!1;AppConnector.request({type:"POST",url:url,dataType:"html",data:{}}).done(function(data){data&&app.showModalWindow(data,function(){thisInstance.triggerChangeTypeForm();});});}else listInstance.noRecordSelectedAlert();}},{}); //# sourceMappingURL=List.min.js.map diff --git a/public_html/layouts/basic/modules/OSSMailView/resources/List.min.js.map b/public_html/layouts/basic/modules/OSSMailView/resources/List.min.js.map index 1c1caf4c59f5..4800f013a074 100644 --- a/public_html/layouts/basic/modules/OSSMailView/resources/List.min.js.map +++ b/public_html/layouts/basic/modules/OSSMailView/resources/List.min.js.map @@ -1 +1 @@ -{"version":3,"file":"List.min.js","sources":["List.js"],"sourcesContent":["/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */\n'use strict';\n\nVtiger_List_Js(\n\t'OSSMailView_List_Js',\n\t{\n\t\tbindMails: function (_url) {\n\t\t\tlet listInstance = Vtiger_List_Js.getInstance();\n\t\t\tlet validationResult = listInstance.checkListRecordSelected();\n\t\t\tif (validationResult != true) {\n\t\t\t\tapp.showConfirmModal({\n\t\t\t\t\ttext: app.vtranslate('JS_BIND_CONFIRM'),\n\t\t\t\t\tconfirmedCallback: () => {\n\t\t\t\t\t\tlet params = {};\n\t\t\t\t\t\tparams.data = { module: 'OSSMailView', action: 'BindMails' };\n\t\t\t\t\t\t$.extend(params.data, Vtiger_List_Js.getSelectedRecordsParams());\n\t\t\t\t\t\tparams.async = false;\n\t\t\t\t\t\tAppConnector.request(params).done(function (data) {\n\t\t\t\t\t\t\tlet message = typeof data === 'string' ? JSON.parse(data).result : data.result;\n\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\ttext: message,\n\t\t\t\t\t\t\t\tdelay: '4000',\n\t\t\t\t\t\t\t\ttype: 'success'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tlistInstance.noRecordSelectedAlert();\n\t\t\t}\n\t\t},\n\t\ttriggerChangeTypeForm: function () {\n\t\t\tvar listInstance = Vtiger_List_Js.getInstance();\n\t\t\tvar selectedIds = listInstance.readSelectedIds(true);\n\t\t\t$('#ChangeType').on('submit', function (event) {\n\t\t\t\tvar mail_type = jQuery('#mail_type').val();\n\t\t\t\tvar save_params = {};\n\t\t\t\tsave_params.data = {\n\t\t\t\t\tmodule: 'OSSMailView',\n\t\t\t\t\taction: 'ChangeType',\n\t\t\t\t\tdata: selectedIds,\n\t\t\t\t\tmail_type: mail_type\n\t\t\t\t};\n\t\t\t\tsave_params.async = false;\n\t\t\t\tAppConnector.request(save_params).done(function (data) {\n\t\t\t\t\tvar params = {\n\t\t\t\t\t\ttitle: app.vtranslate('JS_MESSAGE'),\n\t\t\t\t\t\ttext: data.result,\n\t\t\t\t\t\ttype: 'info'\n\t\t\t\t\t};\n\t\t\t\t\tapp.showNotify(params);\n\t\t\t\t\tVtiger_List_Js.clearList();\n\t\t\t\t\tlistInstance.getListViewRecords();\n\t\t\t\t\tapp.hideModalWindow();\n\t\t\t\t});\n\t\t\t\tevent.preventDefault();\n\t\t\t});\n\t\t},\n\t\ttriggerChangeType: function (url) {\n\t\t\tvar thisInstance = this;\n\t\t\tvar listInstance = Vtiger_List_Js.getInstance();\n\t\t\tvar validationResult = listInstance.checkListRecordSelected();\n\t\t\tif (validationResult != true) {\n\t\t\t\tthisInstance.getRelatedModulesContainer = false;\n\t\t\t\tvar actionParams = {\n\t\t\t\t\ttype: 'POST',\n\t\t\t\t\turl: url,\n\t\t\t\t\tdataType: 'html',\n\t\t\t\t\tdata: {}\n\t\t\t\t};\n\t\t\t\tAppConnector.request(actionParams).done(function (data) {\n\t\t\t\t\tif (data) {\n\t\t\t\t\t\tapp.showModalWindow(data, function (data) {\n\t\t\t\t\t\t\tthisInstance.triggerChangeTypeForm();\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tlistInstance.noRecordSelectedAlert();\n\t\t\t}\n\t\t}\n\t},\n\t{}\n);\n"],"names":["Vtiger_List_Js","bindMails","getInstance","validationResult","listInstance","checkListRecordSelected","noRecordSelectedAlert","app","showConfirmModal","text","vtranslate","confirmedCallback","params","data","module","action","$","extend","getSelectedRecordsParams","async","AppConnector","request","done","JSON","parse","result","showNotify","message","delay","type","triggerChangeTypeForm","selectedIds","readSelectedIds","on","event","jQuery","val","save_params","mail_type","title","clearList","getListViewRecords","hideModalWindow","preventDefault","triggerChangeType","url","thisInstance","getRelatedModulesContainer","dataType","showModalWindow"],"mappings":";;AAAA,kKACA,aAEAA,cAAc,CACb,qBADa,CAEb,CACCC,SAAS,CAAE,SAAA,SAAA,EAAgB,KACV,YAAA,CAAGD,cAAc,CAACE,WAAf,EADO,CAEtBC,gBAAgB,CAAGC,YAAY,CAACC,uBAAb,EAFG,CAGtB,IAAAF,gBAHsB,CAsBzBC,YAAY,CAACE,qBAAb,EAtByB,CAIzBC,GAAG,CAACC,gBAAJ,CAAqB,CACpBC,IAAI,CAAEF,GAAG,CAACG,UAAJ,CAAe,iBAAf,CADc,CAEpBC,iBAAiB,CAAE,SAAM,iBAAA,EAAA,CACxB,IAAU,MAAA,CAAG,EAAb,CACAC,MAAM,CAACC,IAAP,CAAc,CAAEC,MAAM,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ACG,UAAJ,CAAe,YAAf,CADK,CAEZD,IAAI,CAAEI,IAAI,CAACY,MAFC,CAGZI,IAAI,CAAE,MAHM,CAAb,CAKAtB,GAAG,CAACmB,UAAJ,CAAed,MAAf,CANsD,CAOtDZ,cAAc,CAACwC,SAAf,EAPsD,CAQtDpC,YAAY,CAACqC,kBAAb,EARsD,CAStDlC,GAAG,CAACmC,eAAJ,GACA,CAVD,CAV8C,CAqB9CR,KAAK,CAACS,cAAN,GACA,CAtBD,EAuBA,CApDF,CAqDCC,iBAAiB,CAAE,2BAAUC,GAAV,CAAe,KACjB,YAAA,CAAG,IADc,CAE7BzC,YAAY,CAAGJ,cAAc,CAACE,WAAf,EAFc,CAG7BC,gBAAgB,CAAGC,YAAY,CAACC,uBAAb,EAHU,CAIjC,GAAI,CAAA,CAAA,EAAAF,gBAAJ,CAA8B,CAC7B2C,YAAY,CAACC,0BAAb,GAD6B,CAQ7B3B,YAAY,CAACC,OAAb,CANmB,CAClBQ,IAAI,CAAE,MADY,CAElBgB,GAAG,CAAEA,GAFa,CAGlBG,QAAQ,CAAE,MAHQ,CAIlBnC,IAAI,CAAE,EAJY,CAMnB,CAAA,CAAmCS,IAAnC,CAAwC,SAAUT,IAAV,CAAgB,CACnDA,IADmD,EAEtDN,GAAG,CAAC0C,eAAJ,CAAoBpC,IAApB,CAA0B,UAAgB,CACzCiC,YAAY,CAAChB,qBAAb,GACA,CAFD,EAID,CAND,EAOA,CAfD,KAgBC1B,YAAY,CAACE,qBAAb,GAED,CA3EF,CAFa,CA+Eb,EA/Ea;;"} \ No newline at end of file +{"version":3,"file":"List.min.js","sources":["List.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\nVtiger_List_Js(\n\t'OSSMailView_List_Js',\n\t{\n\t\tbindMails: function (_url) {\n\t\t\tlet listInstance = Vtiger_List_Js.getInstance();\n\t\t\tlet validationResult = listInstance.checkListRecordSelected();\n\t\t\tif (validationResult != true) {\n\t\t\t\tapp.showConfirmModal({\n\t\t\t\t\ttext: app.vtranslate('JS_BIND_CONFIRM'),\n\t\t\t\t\tconfirmedCallback: () => {\n\t\t\t\t\t\tlet params = {};\n\t\t\t\t\t\tparams.data = { module: 'OSSMailView', action: 'BindMails' };\n\t\t\t\t\t\t$.extend(params.data, Vtiger_List_Js.getSelectedRecordsParams());\n\t\t\t\t\t\tparams.async = false;\n\t\t\t\t\t\tAppConnector.request(params).done(function (data) {\n\t\t\t\t\t\t\tlet message = typeof data === 'string' ? JSON.parse(data).result : data.result;\n\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\ttext: message,\n\t\t\t\t\t\t\t\tdelay: '4000',\n\t\t\t\t\t\t\t\ttype: 'success'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tlistInstance.noRecordSelectedAlert();\n\t\t\t}\n\t\t},\n\t\ttriggerChangeTypeForm: function () {\n\t\t\tvar listInstance = Vtiger_List_Js.getInstance();\n\t\t\tvar selectedIds = listInstance.readSelectedIds(true);\n\t\t\t$('#ChangeType').on('submit', function (event) {\n\t\t\t\tvar mail_type = jQuery('#mail_type').val();\n\t\t\t\tvar save_params = {};\n\t\t\t\tsave_params.data = {\n\t\t\t\t\tmodule: 'OSSMailView',\n\t\t\t\t\taction: 'ChangeType',\n\t\t\t\t\tdata: selectedIds,\n\t\t\t\t\tmail_type: mail_type\n\t\t\t\t};\n\t\t\t\tsave_params.async = false;\n\t\t\t\tAppConnector.request(save_params).done(function (data) {\n\t\t\t\t\tvar params = {\n\t\t\t\t\t\ttitle: app.vtranslate('JS_MESSAGE'),\n\t\t\t\t\t\ttext: data.result,\n\t\t\t\t\t\ttype: 'info'\n\t\t\t\t\t};\n\t\t\t\t\tapp.showNotify(params);\n\t\t\t\t\tVtiger_List_Js.clearList();\n\t\t\t\t\tlistInstance.getListViewRecords();\n\t\t\t\t\tapp.hideModalWindow();\n\t\t\t\t});\n\t\t\t\tevent.preventDefault();\n\t\t\t});\n\t\t},\n\t\ttriggerChangeType: function (url) {\n\t\t\tvar thisInstance = this;\n\t\t\tvar listInstance = Vtiger_List_Js.getInstance();\n\t\t\tvar validationResult = listInstance.checkListRecordSelected();\n\t\t\tif (validationResult != true) {\n\t\t\t\tthisInstance.getRelatedModulesContainer = false;\n\t\t\t\tvar actionParams = {\n\t\t\t\t\ttype: 'POST',\n\t\t\t\t\turl: url,\n\t\t\t\t\tdataType: 'html',\n\t\t\t\t\tdata: {}\n\t\t\t\t};\n\t\t\t\tAppConnector.request(actionParams).done(function (data) {\n\t\t\t\t\tif (data) {\n\t\t\t\t\t\tapp.showModalWindow(data, function (data) {\n\t\t\t\t\t\t\tthisInstance.triggerChangeTypeForm();\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tlistInstance.noRecordSelectedAlert();\n\t\t\t}\n\t\t}\n\t},\n\t{}\n);\n"],"names":["Vtiger_List_Js","bindMails","listInstance","getInstance","validationResult","checkListRecordSelected","noRecordSelectedAlert","app","showConfirmModal","text","vtranslate","confirmedCallback","params","data","module","action","$","extend","getSelectedRecordsParams","async","AppConnector","request","done","message","JSON","parse","result","showNotify","delay","type","triggerChangeTypeForm","selectedIds","readSelectedIds","on","event","mail_type","jQuery","val","save_params","title","clearList","getListViewRecords","hideModalWindow","preventDefault","triggerChangeType","url","thisInstance","getRelatedModulesContainer","dataType","showModalWindow"],"mappings":";;AAAA,kKACA,YAAY,CAEZA,cAAc,CACb,qBAAqB,CACrB,CACCC,SAAS,CAAE,SAAAA,SAAAA,EAAgB,CACtB,IAAAC,YAAY,CAAGF,cAAc,CAACG,WAAW,EAAE,CAC3CC,gBAAgB,CAAGF,YAAY,CAACG,uBAAuB,EAAE,CACzD,IAAAD,gBAAwB,CAmB3BF,YAAY,CAACI,qBAAqB,EAAE,CAlBpCC,G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ACDG,WAAW,CAACnB,KAAK,GAAQ,CACzBC,YAAY,CAACC,OAAO,CAACiB,WAAW,CAAC,CAAChB,IAAI,CAAC,SAAUT,IAAI,CAAE,CACtD,IAAID,MAAM,CAAG,CACZ2B,KAAK,CAAEhC,GAAG,CAACG,UAAU,CAAC,YAAY,CAAC,CACnCD,IAAI,CAAEI,IAAI,CAACa,MAAM,CACjBG,IAAI,CAAE,MACP,CAAC,CACDtB,GAAG,CAACoB,UAAU,CAACf,MAAM,CAAC,CACtBZ,cAAc,CAACwC,SAAS,EAAE,CAC1BtC,YAAY,CAACuC,kBAAkB,EAAE,CACjClC,GAAG,CAACmC,eAAe,GACpB,CAAC,CAAC,CACFR,KAAK,CAACS,cAAc,GACrB,CAAC,EACF,CAAC,CACDC,iBAAiB,CAAE,SAAAA,kBAAUC,GAAG,CAAE,CAC7B,IAAAC,YAAY,CAAG,IAAI,CACnB5C,YAAY,CAAGF,cAAc,CAACG,WAAW,EAAE,CAC3CC,gBAAgB,CAAGF,YAAY,CAACG,uBAAuB,EAAE,CAC7D,GAAI,IAAAD,gBAAwB,CAAE,CAC7B0C,YAAY,CAACC,0BAA0B,GAAQ,CAO/C3B,YAAY,CAACC,OAAO,CAND,CAClBQ,IAAI,CAAE,MAAM,CACZgB,GAAG,CAAEA,GAAG,CACRG,QAAQ,CAAE,MAAM,CAChBnC,IAAI,CAAE,EACP,CACiC,CAAC,CAACS,IAAI,CAAC,SAAUT,IAAI,CAAE,CACnDA,IAAI,EACPN,GAAG,CAAC0C,eAAe,CAACpC,IAAI,CAAE,UAAgB,CACzCiC,YAAY,CAAChB,qBAAqB,GACnC,CAAC,EAEH,CAAC,EACF,CAAC,KACA5B,YAAY,CAACI,qBAAqB,GAEpC,CACD,CAAC,CACD,EACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/OSSMailView/resources/Preview.min.js b/public_html/layouts/basic/modules/OSSMailView/resources/Preview.min.js index 9b4c907c09a2..1960a44e8f11 100644 --- a/public_html/layouts/basic/modules/OSSMailView/resources/Preview.min.js +++ b/public_html/layouts/basic/modules/OSSMailView/resources/Preview.min.js @@ -1,4 +1,4 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */"use strict";jQuery.Class("OSSMailView_Preview_Js",{printMail:function printMail(){var content=window.open();$(".emailPreview > div").each(function(){if($(this).hasClass("content")){var html=$(this).find("iframe").attr("srcdoc");content.document.write(html+"
    ");}else content.document.write($.trim($(this).text())+"
    ");}),content.print();}},{registerEvents:function registerEvents(){var container=jQuery("div.mainBody");Vtiger_Index_Js.registerMailButtons(container);}}); +/* {[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]} */"use strict";jQuery.Class("OSSMailView_Preview_Js",{printMail:function printMail(){var content=window.open();$(".emailPreview > div").each(function(){if($(this).hasClass("content")){var html=$(this).find("iframe").attr("srcdoc");content.document.write(html+"
    ");}else content.document.write($.trim($(this).text())+"
    ");}),content.print();}},{registerEvents:function registerEvents(){var container=jQuery("div.mainBody");Vtiger_Index_Js.registerMailButtons(container);}}); //# sourceMappingURL=Preview.min.js.map diff --git a/public_html/layouts/basic/modules/OSSMailView/resources/Preview.min.js.map b/public_html/layouts/basic/modules/OSSMailView/resources/Preview.min.js.map index 0a74444b49c4..adeac3089442 100644 --- a/public_html/layouts/basic/modules/OSSMailView/resources/Preview.min.js.map +++ b/public_html/layouts/basic/modules/OSSMailView/resources/Preview.min.js.map @@ -1 +1 @@ -{"version":3,"file":"Preview.min.js","sources":["Preview.js"],"sourcesContent":["/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */\n'use strict';\n\njQuery.Class(\n\t'OSSMailView_Preview_Js',\n\t{\n\t\tprintMail: function () {\n\t\t\tvar content = window.open();\n\t\t\t$('.emailPreview > div').each(function (index) {\n\t\t\t\tif ($(this).hasClass('content')) {\n\t\t\t\t\tlet html = $(this).find('iframe').attr('srcdoc');\n\t\t\t\t\tcontent.document.write(html + '
    ');\n\t\t\t\t} else {\n\t\t\t\t\tcontent.document.write($.trim($(this).text()) + '
    ');\n\t\t\t\t}\n\t\t\t});\n\t\t\tcontent.print();\n\t\t}\n\t},\n\t{\n\t\tregisterEvents: function () {\n\t\t\tlet container = jQuery('div.mainBody');\n\t\t\tVtiger_Index_Js.registerMailButtons(container);\n\t\t}\n\t}\n);\n"],"names":["jQuery","Class","printMail","window","open","$","each","hasClass","find","attr","content","document","write","html","trim","text","print","registerEvents","container","Vtiger_Index_Js","registerMailButtons"],"mappings":";;AAAA,kKACA,YAAA,CAEAA,MAAM,CAACC,KAAP,CACC,wBADD,CAEC,CACCC,SAAS,CAAE,SAAA,SAAA,EAAY,CACtB,IAAW,OAAA,CAAGC,MAAM,CAACC,IAAP,EAAd,CACAC,CAAC,CAAC,qBAAD,CAAD,CAAyBC,IAAzB,CAA8B,UAAiB,CAC9C,GAAID,CAAC,CAAC,IAAD,CAAD,CAAQE,QAAR,CAAiB,SAAjB,CAAJ,CAAiC,CAChC,IAAQ,IAAA,CAAGF,CAAC,CAAC,IAAD,CAAD,CAAQG,IAAR,CAAa,QAAb,CAAuBC,CAAAA,IAAvB,CAA4B,QAA5B,CAAX,CACAC,OAAO,CAACC,QAAR,CAAiBC,KAAjB,CAAuBC,IAAI,CAAG,QAA9B,EACA,CAHD,KAICH,OAAO,CAACC,QAAR,CAAiBC,KAAjB,CAAuBP,CAAC,CAACS,IAAF,CAAOT,CAAC,CAAC,IAAD,CAAD,CAAQU,IAAR,EAAP,CAAyB,CAAA,QAAhD,EAED,CAPD,CAFsB,CAUtBL,OAAO,CAACM,KAAR,GACA,CAZF,CAFD,CAgBC,CACCC,cAAc,CAAE,SAAY,cAAA,EAAA,CAC3B,IAAIC,SAAS,CAAGlB,MAAM,CAAC,cAAD,CAAtB,CACAmB,eAAe,CAACC,mBAAhB,CAAoCF,SAApC,EACA,CAJF,CAhBD;;"} \ No newline at end of file +{"version":3,"file":"Preview.min.js","sources":["Preview.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\njQuery.Class(\n\t'OSSMailView_Preview_Js',\n\t{\n\t\tprintMail: function () {\n\t\t\tvar content = window.open();\n\t\t\t$('.emailPreview > div').each(function (index) {\n\t\t\t\tif ($(this).hasClass('content')) {\n\t\t\t\t\tlet html = $(this).find('iframe').attr('srcdoc');\n\t\t\t\t\tcontent.document.write(html + '
    ');\n\t\t\t\t} else {\n\t\t\t\t\tcontent.document.write($.trim($(this).text()) + '
    ');\n\t\t\t\t}\n\t\t\t});\n\t\t\tcontent.print();\n\t\t}\n\t},\n\t{\n\t\tregisterEvents: function () {\n\t\t\tlet container = jQuery('div.mainBody');\n\t\t\tVtiger_Index_Js.registerMailButtons(container);\n\t\t}\n\t}\n);\n"],"names":["jQuery","Class","printMail","content","window","open","$","each","hasClass","html","find","attr","document","write","trim","text","print","registerEvents","container","Vtiger_Index_Js","registerMailButtons"],"mappings":";;AAAA,kKACA,YAAY,CAEZA,MAAM,CAACC,KAAK,CACX,wBAAwB,CACxB,CACCC,SAAS,CAAE,SAAAA,WAAY,CACtB,IAAIC,OAAO,CAAGC,MAAM,CAACC,IAAI,EAAE,CAC3BC,CAAC,CAAC,qBAAqB,CAAC,CAACC,IAAI,CAAC,UAAiB,CAC9C,GAAID,CAAC,CAAC,IAAI,CAAC,CAACE,QAAQ,CAAC,SAAS,CAAC,CAAE,CAChC,IAAIC,IAAI,CAAGH,CAAC,CAAC,IAAI,CAAC,CAACI,IAAI,CAAC,QAAQ,CAAC,CAACC,IAAI,CAAC,QAAQ,CAAC,CAChDR,OAAO,CAACS,QAAQ,CAACC,KAAK,CAACJ,IAAI,CAAG,QAAQ,EACvC,CAAC,KACAN,OAAO,CAACS,QAAQ,CAACC,KAAK,CAACP,CAAC,CAACQ,IAAI,CAACR,CAAC,CAAC,IAAI,CAAC,CAACS,IAAI,EAAE,CAAC,CAAG,QAAQ,EAE1D,CAAC,CAAC,CACFZ,OAAO,CAACa,KAAK,GACd,CACD,CAAC,CACD,CACCC,cAAc,CAAE,SAAAA,cAAAA,EAAY,CAC3B,IAAIC,SAAS,CAAGlB,MAAM,CAAC,cAAc,CAAC,CACtCmB,eAAe,CAACC,mBAAmB,CAACF,SAAS,EAC9C,CACD,CACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/OSSTimeControl/resources/InRelation.min.js b/public_html/layouts/basic/modules/OSSTimeControl/resources/InRelation.min.js index ce1285a99d99..6b3fb3c62106 100644 --- a/public_html/layouts/basic/modules/OSSTimeControl/resources/InRelation.min.js +++ b/public_html/layouts/basic/modules/OSSTimeControl/resources/InRelation.min.js @@ -1,4 +1,4 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */"use strict";function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(o,minLen){if(o){if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);return "Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n?Array.from(o):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(o,minLen):void 0}}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);iarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);iarguments.length?target:receiver):desc.value}},_get.apply(this,arguments)}function _superPropBase(object,property){for(;!Object.prototype.hasOwnProperty.call(object,property)&&(object=_getPrototypeOf(object),null!==object););return object}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return !1;if(Reflect.construct.sham)return !1;if("function"==typeof Proxy)return !0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return !1}}function _getPrototypeOf(o){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(o){return o.__proto__||Object.getPrototypeOf(o)},_getPrototypeOf(o)}window.OSSTimeControl_CalendarModal_Js=/*#__PURE__*/function(_Vtiger_Calendar_Js){function OSSTimeControl_CalendarModal_Js(container,readonly){var _this;return _classCallCheck(this,OSSTimeControl_CalendarModal_Js),_this=_super.call(this,container,readonly),_this.isSwitchAllDays=!1,_this.sidebarName="add",_this.eventCreate=!1,_this.module=container.find("[name=\"module\"]").val(),_this.renderCalendar(),_this.registerEvents(),_this}/** + */function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var descriptor,i=0;iarguments.length?target:receiver):desc.value}},_get.apply(this,arguments)}function _superPropBase(object,property){for(;!Object.prototype.hasOwnProperty.call(object,property)&&(object=_getPrototypeOf(object),null!==object););return object}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return !1;if(Reflect.construct.sham)return !1;if("function"==typeof Proxy)return !0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return !1}}function _getPrototypeOf(o){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(o){return o.__proto__||Object.getPrototypeOf(o)},_getPrototypeOf(o)}window.OSSTimeControl_CalendarModal_Js=/*#__PURE__*/function(_Vtiger_Calendar_Js){function OSSTimeControl_CalendarModal_Js(container,readonly){var _this;return _classCallCheck(this,OSSTimeControl_CalendarModal_Js),_this=_super.call(this,container,readonly),_this.isSwitchAllDays=!1,_this.sidebarName="add",_this.eventCreate=!1,_this.module=container.find("[name=\"module\"]").val(),_this.renderCalendar(),_this.registerEvents(),_this}/** * Function sets calendar module's options * @returns {{eventClick: function, headerToolbar: object, selectable: boolean}} */_inherits(OSSTimeControl_CalendarModal_Js,_Vtiger_Calendar_Js);var _super=_createSuper(OSSTimeControl_CalendarModal_Js);return _createClass(OSSTimeControl_CalendarModal_Js,[{key:"setCalendarModuleOptions",value:function setCalendarModuleOptions(){var options=_get(_getPrototypeOf(OSSTimeControl_CalendarModal_Js.prototype),"setCalendarModuleOptions",this).call(this);options.selectable=!0,options.eventClick=function(info){info.jsEvent.preventDefault();};var date=this.container.find(".js-selected-date").val();return date&&(options.initialDate=date),options}/** diff --git a/public_html/layouts/basic/modules/OSSTimeControl/resources/QuickCreate.min.js.map b/public_html/layouts/basic/modules/OSSTimeControl/resources/QuickCreate.min.js.map index c61a452b4b82..1a3151999c98 100644 --- a/public_html/layouts/basic/modules/OSSTimeControl/resources/QuickCreate.min.js.map +++ b/public_html/layouts/basic/modules/OSSTimeControl/resources/QuickCreate.min.js.map @@ -1 +1 @@ -{"version":3,"file":"QuickCreate.min.js","sources":["QuickCreate.js"],"sourcesContent":["/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */\n'use strict';\n\n/**\n * Class representing a modal calendar.\n * @extends Vtiger_Calendar_Js\n */\nwindow.OSSTimeControl_CalendarModal_Js = class OSSTimeControl_CalendarModal_Js extends Vtiger_Calendar_Js {\n\tconstructor(container, readonly) {\n\t\tsuper(container, readonly);\n\t\tthis.isSwitchAllDays = false;\n\t\tthis.sidebarName = 'add'; //available: add, status, edit\n\t\tthis.eventCreate = false;\n\t\tthis.module = container.find('[name=\"module\"]').val();\n\t\tthis.renderCalendar();\n\t\tthis.registerEvents();\n\t}\n\t/**\n\t * Function sets calendar module's options\n\t * @returns {{eventClick: function, headerToolbar: object, selectable: boolean}}\n\t */\n\tsetCalendarModuleOptions() {\n\t\tlet options = super.setCalendarModuleOptions();\n\t\toptions.selectable = true;\n\t\toptions.eventClick = function (info) {\n\t\t\tinfo.jsEvent.preventDefault();\n\t\t};\n\t\tlet date = this.container.find('.js-selected-date').val();\n\t\tif (date) {\n\t\t\toptions.initialDate = date;\n\t\t}\n\t\treturn options;\n\t}\n\t/**\n\t * Function registers calendar events\n\t */\n\tregisterEvents() {\n\t\tconst calendarView = this.getCalendarView();\n\t\tthis.switchContainer = $(`
    `).insertAfter(\n\t\t\tcalendarView.find('.fc-center')\n\t\t);\n\t\tthis.registerSwitchEvents();\n\t\tthis.registerUsersChange();\n\t}\n\t/**\n\t * Function registers calendar switch event\n\t */\n\tregisterSwitchEvents() {\n\t\tif (app.getMainParams('hiddenDays', true) !== false) {\n\t\t\tthis.switchContainer.html(this.createSwitch());\n\t\t\tthis.switchContainer.find('input').on('change', (e) => {\n\t\t\t\tconst currentTarget = $(e.currentTarget);\n\t\t\t\tlet hiddenDays = [];\n\t\t\t\tif (typeof currentTarget.data('on-text') !== 'undefined') {\n\t\t\t\t\thiddenDays = app.getMainParams('hiddenDays', true);\n\t\t\t\t\tthis.isSwitchAllDays = false;\n\t\t\t\t} else {\n\t\t\t\t\tthis.isSwitchAllDays = true;\n\t\t\t\t}\n\t\t\t\tthis.fullCalendar.setOption('hiddenDays', hiddenDays);\n\t\t\t\tthis.registerSwitchEvents();\n\t\t\t});\n\t\t}\n\t}\n\t/**\n\t * Generate filter buttons\n\t * @returns {string}\n\t */\n\tcreateSwitch() {\n\t\tlet on = app.vtranslate('JS_WORK_DAYS'),\n\t\t\toff = app.vtranslate('JS_ALL'),\n\t\t\tstate = this.isSwitchAllDays;\n\t\treturn `
    \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
    `;\n\t}\n\t/**\n\t * Function registers select's user change event\n\t */\n\tregisterUsersChange() {\n\t\tthis.container.find('.assigned_user_id').on('change', () => {\n\t\t\tthis.reloadCalendarData();\n\t\t});\n\t}\n\t/**\n\t * Get selected users\n\t * @returns {{ selectedIds: array, excludedIds: array }}\n\t */\n\tgetSelectedUsersCalendar() {\n\t\treturn { selectedIds: [this.container.find('.assigned_user_id').val()], excludedIds: [] };\n\t}\n\t/**\n\t * Function invokes by FullCalendar, sets selected days in form\n\t * @param {Object} info\n\t */\n\tselectDays(info) {\n\t\tif (this.sidebarName === 'status') {\n\t\t\tthis.sidebarName = 'add';\n\t\t\tthis.getCalendarCreateView().done(() => {\n\t\t\t\tthis.selectDays(info);\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tlet startDate = info.start,\n\t\t\tendDate = info.end;\n\t\tif (info['allDay']) {\n\t\t\tendDate.setDate(endDate.getDate() - 1);\n\t\t\tlet startDateSplitted = this.startHour.split(':');\n\t\t\tlet endDateSplitted = this.endHour.split(':');\n\t\t\tstartDate.setHours(startDateSplitted[0], startDateSplitted[1]);\n\t\t\tendDate.setHours(endDateSplitted[0], endDateSplitted[1]);\n\t\t}\n\t\tthis.container.find('[name=\"date_start\"]').val(App.Fields.Date.dateToUserFormat(startDate));\n\t\tthis.container.find('[name=\"due_date\"]').val(App.Fields.Date.dateToUserFormat(endDate));\n\t\tthis.container.find('[name=\"time_start\"]').val(App.Fields.Time.dateToUserFormat(startDate));\n\t\tthis.container.find('[name=\"time_end\"]').val(App.Fields.Time.dateToUserFormat(endDate));\n\t}\n};\n\n$.Class(\n\t'OSSTimeControl_QuickCreate_Js',\n\t{},\n\t{\n\t\tregisterEvents: function (container) {\n\t\t\tlet className = container.find('[name=\"module\"]').val() + '_CalendarModal_Js';\n\t\t\tthis.calendarView = new window[className](container.closest('.js-modal-container'), true);\n\t\t}\n\t}\n);\n"],"names":["window","OSSTimeControl_CalendarModal_Js","container","readonly","isSwitchAllDays","sidebarName","eventCreate","module","find","val","renderCalendar","registerEvents","options","selectable","eventClick","info","jsEvent","preventDefault","date","initialDate","getCalendarView","switchContainer","$","insertAfter","calendarView","registerSwitchEvents","registerUsersChange","app","getMainParams","html","createSwitch","on","e","currentTarget","hiddenDays","data","fullCalendar","setOption","vtranslate","off","state","reloadCalendarData","selectedIds","excludedIds","getCalendarCreateView","done","selectDays","startDate","start","endDate","end","setDate","getDate","startHour","split","endDateSplitted","endHour","setHours","startDateSplitted","App","Fields","Date","dateToUserFormat","Time","Vtiger_Calendar_Js","Class","className","closest"],"mappings":";;AAAA,kKACA,YAEA,CAAA;AACA;AACA;AACA,0sGACAA,MAAM,CAACC,+BAAP,4CACC,SAAYC,+BAAAA,CAAAA,SAAZ,CAAuBC,QAAvB,CAAiC,CAAA,IAAA,KAAA,CAAA,OAAA,eAAA,CAAA,IAAA,CAAA,+BAAA,CAAA,CAAA,KAAA,CAAA,MAAA,CAAA,IAAA,CAAA,IAAA,CAC1BD,SAD0B,CACfC,QADe,EAEhC,KAAKC,CAAAA,eAAL,GAFgC,CAGhC,KAAA,CAAKC,WAAL,CAAmB,KAHa,CAIhC,MAAKC,WAAL,CAAA,CAAA,CAJgC,CAKhC,KAAKC,CAAAA,MAAL,CAAcL,SAAS,CAACM,IAAV,CAAe,mBAAf,CAAA,CAAkCC,GAAlC,EALkB,CAMhC,MAAKC,cAAL,EANgC,CAOhC,KAAKC,CAAAA,cAAL,EAPgC,CAAA,KAQhC,CACD;AACD;AACA;AACA,IAbA,SAAA,CAAA,+BAAA,CAAA,mBAAA,CAAA,CAAA,IAAA,MAAA,CAAA,YAAA,CAAA,+BAAA,CAAA,CAAA,OAAA,YAAA,CAAA,+BAAA,CAAA,CAAA,CAAA,GAAA,CAAA,0BAAA,CAAA,KAAA,CAcC,mCAA2B,CAC1B,WAAW,CAAX,IAAA,CAAA,eAAA,CAAA,+BAAA,CAAA,SAAA,CAA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ApD,EACA,CACD,IAAA,CAAKrD,SAAL,CAAeM,IAAf,CAAoB,uBAApB,CAAA,CAA2CC,GAA3C,CAA+CkD,GAAG,CAACC,MAAJ,CAAWC,IAAX,CAAgBC,gBAAhB,CAAiCf,SAAjC,CAA/C,CAjBgB,CAkBhB,IAAA,CAAK7C,SAAL,CAAeM,IAAf,CAAoB,qBAApB,CAAA,CAAyCC,GAAzC,CAA6CkD,GAAG,CAACC,MAAJ,CAAWC,IAAX,CAAgBC,gBAAhB,CAAiCb,OAAjC,CAA7C,CAlBgB,CAmBhB,KAAK/C,SAAL,CAAeM,IAAf,CAAoB,uBAApB,CAAA,CAA2CC,GAA3C,CAA+CkD,GAAG,CAACC,MAAJ,CAAWG,IAAX,CAAgBD,gBAAhB,CAAiCf,SAAjC,CAA/C,CAnBgB,CAoBhB,IAAK7C,CAAAA,SAAL,CAAeM,IAAf,CAAoB,qBAApB,CAAyCC,CAAAA,GAAzC,CAA6CkD,GAAG,CAACC,MAAJ,CAAWG,IAAX,CAAgBD,gBAAhB,CAAiCb,OAAjC,CAA7C,EACA,CAlHF,CAAuFe,CAAAA,CAAAA,CAAAA,+BAAAA,CAAAA,CAAAA,kBAAvF,EAqHA1C,CAAC,CAAC2C,KAAF,CACC,+BADD,CAEC,EAFD,CAGC,CACCtD,cAAc,CAAE,SAAA,cAAA,CAAUT,SAAV,CAAqB,CACpC,IAAa,SAAA,CAAGA,SAAS,CAACM,IAAV,CAAe,mBAAf,CAAA,CAAkCC,GAAlC,EAAA,CAA0C,mBAA1D,CACA,IAAKe,CAAAA,YAAL,CAAoB,IAAU,MAAA,CAAC0C,SAAD,CAAV,CAAsBhE,SAAS,CAACiE,OAAV,CAAkB,qBAAlB,CAAtB,CAAA,CAAA,CAAA,EACpB,CAJF,CAHD;;"} \ No newline at end of file +{"version":3,"file":"QuickCreate.min.js","sources":["QuickCreate.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/**\n * Class representing a modal calendar.\n * @extends Vtiger_Calendar_Js\n */\nwindow.OSSTimeControl_CalendarModal_Js = class OSSTimeControl_CalendarModal_Js extends Vtiger_Calendar_Js {\n\tconstructor(container, readonly) {\n\t\tsuper(container, readonly);\n\t\tthis.isSwitchAllDays = false;\n\t\tthis.sidebarName = 'add'; //available: add, status, edit\n\t\tthis.eventCreate = false;\n\t\tthis.module = container.find('[name=\"module\"]').val();\n\t\tthis.renderCalendar();\n\t\tthis.registerEvents();\n\t}\n\t/**\n\t * Function sets calendar module's options\n\t * @returns {{eventClick: function, headerToolbar: object, selectable: boolean}}\n\t */\n\tsetCalendarModuleOptions() {\n\t\tlet options = super.setCalendarModuleOptions();\n\t\toptions.selectable = true;\n\t\toptions.eventClick = function (info) {\n\t\t\tinfo.jsEvent.preventDefault();\n\t\t};\n\t\tlet date = this.container.find('.js-selected-date').val();\n\t\tif (date) {\n\t\t\toptions.initialDate = date;\n\t\t}\n\t\treturn options;\n\t}\n\t/**\n\t * Function registers calendar events\n\t */\n\tregisterEvents() {\n\t\tconst calendarView = this.getCalendarView();\n\t\tthis.switchContainer = $(`
    `).insertAfter(\n\t\t\tcalendarView.find('.fc-center')\n\t\t);\n\t\tthis.registerSwitchEvents();\n\t\tthis.registerUsersChange();\n\t}\n\t/**\n\t * Function registers calendar switch event\n\t */\n\tregisterSwitchEvents() {\n\t\tif (app.getMainParams('hiddenDays', true) !== false) {\n\t\t\tthis.switchContainer.html(this.createSwitch());\n\t\t\tthis.switchContainer.find('input').on('change', (e) => {\n\t\t\t\tconst currentTarget = $(e.currentTarget);\n\t\t\t\tlet hiddenDays = [];\n\t\t\t\tif (typeof currentTarget.data('on-text') !== 'undefined') {\n\t\t\t\t\thiddenDays = app.getMainParams('hiddenDays', true);\n\t\t\t\t\tthis.isSwitchAllDays = false;\n\t\t\t\t} else {\n\t\t\t\t\tthis.isSwitchAllDays = true;\n\t\t\t\t}\n\t\t\t\tthis.fullCalendar.setOption('hiddenDays', hiddenDays);\n\t\t\t\tthis.registerSwitchEvents();\n\t\t\t});\n\t\t}\n\t}\n\t/**\n\t * Generate filter buttons\n\t * @returns {string}\n\t */\n\tcreateSwitch() {\n\t\tlet on = app.vtranslate('JS_WORK_DAYS'),\n\t\t\toff = app.vtranslate('JS_ALL'),\n\t\t\tstate = this.isSwitchAllDays;\n\t\treturn `
    \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
    `;\n\t}\n\t/**\n\t * Function registers select's user change event\n\t */\n\tregisterUsersChange() {\n\t\tthis.container.find('.assigned_user_id').on('change', () => {\n\t\t\tthis.reloadCalendarData();\n\t\t});\n\t}\n\t/**\n\t * Get selected users\n\t * @returns {{ selectedIds: array, excludedIds: array }}\n\t */\n\tgetSelectedUsersCalendar() {\n\t\treturn { selectedIds: [this.container.find('.assigned_user_id').val()], excludedIds: [] };\n\t}\n\t/**\n\t * Function invokes by FullCalendar, sets selected days in form\n\t * @param {Object} info\n\t */\n\tselectDays(info) {\n\t\tif (this.sidebarName === 'status') {\n\t\t\tthis.sidebarName = 'add';\n\t\t\tthis.getCalendarCreateView().done(() => {\n\t\t\t\tthis.selectDays(info);\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tlet startDate = info.start,\n\t\t\tendDate = info.end;\n\t\tif (info['allDay']) {\n\t\t\tendDate.setDate(endDate.getDate() - 1);\n\t\t\tlet startDateSplitted = this.startHour.split(':');\n\t\t\tlet endDateSplitted = this.endHour.split(':');\n\t\t\tstartDate.setHours(startDateSplitted[0], startDateSplitted[1]);\n\t\t\tendDate.setHours(endDateSplitted[0], endDateSplitted[1]);\n\t\t}\n\t\tthis.container.find('[name=\"date_start\"]').val(App.Fields.Date.dateToUserFormat(startDate));\n\t\tthis.container.find('[name=\"due_date\"]').val(App.Fields.Date.dateToUserFormat(endDate));\n\t\tthis.container.find('[name=\"time_start\"]').val(App.Fields.Time.dateToUserFormat(startDate));\n\t\tthis.container.find('[name=\"time_end\"]').val(App.Fields.Time.dateToUserFormat(endDate));\n\t}\n};\n\n$.Class(\n\t'OSSTimeControl_QuickCreate_Js',\n\t{},\n\t{\n\t\tregisterEvents: function (container) {\n\t\t\tlet className = container.find('[name=\"module\"]').val() + '_CalendarModal_Js';\n\t\t\tthis.calendarView = new window[className](container.closest('.js-modal-container'), true);\n\t\t}\n\t}\n);\n"],"names":["_typeof","o","Symbol","iterator","constructor","prototype","_classCallCheck","instance","Constructor","TypeError","_defineProperties","target","props","descriptor","i","length","enumerable","configurable","writable","Object","defineProperty","_toPropertyKey","key","_createClass","protoProps","staticProps","arg","_toPrimitive","String","input","hint","prim","toPrimitive","res","call","Number","_get","Reflect","get","bind","property","receiver","base","_superPropBase","desc","getOwnPropertyDescriptor","arguments","value","apply","object","hasOwnProperty","_getPrototypeOf","_inherits","subClass","superClass","create","_setPrototypeOf","p","setPrototypeOf","__proto__","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","result","Super","NewTarget","construct","_possibleConstructorReturn","self","_assertThisInitialized","ReferenceError","sham","Proxy","Boolean","valueOf","e","getPrototypeOf","window","OSSTimeControl_CalendarModal_Js","_Vtiger_Calendar_Js","container","readonly","_this","_super","isSwitchAllDays","sidebarName","eventCreate","module","find","val","renderCalendar","registerEvents","setCalendarModuleOptions","options","selectable","eventClick","info","jsEvent","preventDefault","date","initialDate","calendarView","getCalendarView","switchContainer","$","insertAfter","registerSwitchEvents","registerUsersChange","_this2","app","getMainParams","html","createSwitch","on","currentTarget","hiddenDays","data","fullCalendar","setOption","vtranslate","off","state","concat","_this3","reloadCalendarData","getSelectedUsersCalendar","selectedIds","excludedIds","selectDays","_this4","getCalendarCreateView","done","startDate","start","endDate","end","allDay","setDate","getDate","startDateSplitted","startHour","split","endDateSplitted","endHour","setHours","App","Fields","Date","dateToUserFormat","Time","Vtiger_Calendar_Js","Class","className","closest"],"mappings":";;AAAA,kKACA,YAAY,CAEZ;AACA;AACA;AACA,GAHA,SAAAA,OAAAA,CA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C,CAAC,CAC9DL,OAAO,CAACU,QAAQ,CAACF,eAAe,CAAC,CAAC,CAAC,CAAEA,eAAe,CAAC,CAAC,CAAC,EACxD,CACA,IAAI,CAAC9D,SAAS,CAACQ,IAAI,CAAC,uBAAqB,CAAC,CAACC,GAAG,CAACwD,GAAG,CAACC,MAAM,CAACC,IAAI,CAACC,gBAAgB,CAAChB,SAAS,CAAC,CAAC,CAC3F,IAAI,CAACpD,SAAS,CAACQ,IAAI,CAAC,qBAAmB,CAAC,CAACC,GAAG,CAACwD,GAAG,CAACC,MAAM,CAACC,IAAI,CAACC,gBAAgB,CAACd,OAAO,CAAC,CAAC,CACvF,IAAI,CAACtD,SAAS,CAACQ,IAAI,CAAC,uBAAqB,CAAC,CAACC,GAAG,CAACwD,GAAG,CAACC,MAAM,CAACG,IAAI,CAACD,gBAAgB,CAAChB,SAAS,CAAC,CAAC,CAC3F,IAAI,CAACpD,SAAS,CAACQ,IAAI,CAAC,qBAAmB,CAAC,CAACC,GAAG,CAACwD,GAAG,CAACC,MAAM,CAACG,IAAI,CAACD,gBAAgB,CAACd,OAAO,CAAC,EACvF,CAAC,CAAAxD,CAAAA,CAAAA,CAAAA,+BAAA,CAlHqFwE,CAAAA,kBAAkB,CAmHxG,CAED9C,CAAC,CAAC+C,KAAK,CACN,+BAA+B,CAC/B,EAAE,CACF,CACC5D,cAAc,CAAE,SAAAA,cAAAA,CAAUX,SAAS,CAAE,CACpC,IAAIwE,SAAS,CAAGxE,SAAS,CAACQ,IAAI,CAAC,mBAAiB,CAAC,CAACC,GAAG,EAAE,CAAG,mBAAmB,CAC7E,IAAI,CAACY,YAAY,CAAG,IAAIxB,MAAM,CAAC2E,SAAS,CAAC,CAACxE,SAAS,CAACyE,OAAO,CAAC,qBAAqB,CAAC,CAAA,CAAA,CAAM,EACzF,CACD,CACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/Occurrences/resources/CalendarView.min.js b/public_html/layouts/basic/modules/Occurrences/resources/CalendarView.min.js index 81afdb4df1ab..7941178aa6a5 100644 --- a/public_html/layouts/basic/modules/Occurrences/resources/CalendarView.min.js +++ b/public_html/layouts/basic/modules/Occurrences/resources/CalendarView.min.js @@ -1,6 +1,6 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */"use strict";function _typeof(obj){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var descriptor,i=0;iarguments.length?target:receiver):desc.value}},_get.apply(this,arguments)}function _superPropBase(object,property){for(;!Object.prototype.hasOwnProperty.call(object,property)&&(object=_getPrototypeOf(object),null!==object););return object}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return !1;if(Reflect.construct.sham)return !1;if("function"==typeof Proxy)return !0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return !1}}function _getPrototypeOf(o){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(o){return o.__proto__||Object.getPrototypeOf(o)},_getPrototypeOf(o)}window.Occurrences_CalendarModal_Js=/*#__PURE__*/function(_Vtiger_Calendar_Js){function Occurrences_CalendarModal_Js(container,readonly){var _this;return _classCallCheck(this,Occurrences_CalendarModal_Js),_this=_super.call(this,container,readonly),_this.isSwitchAllDays=!1,_this.sidebarName="add",_this.eventCreate=!1,_this.module=container.find("[name=\"module\"]").val(),_this.renderCalendar(),_this.registerEvents(),_this}/** + */function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var descriptor,i=0;iarguments.length?target:receiver):desc.value}},_get.apply(this,arguments)}function _superPropBase(object,property){for(;!Object.prototype.hasOwnProperty.call(object,property)&&(object=_getPrototypeOf(object),null!==object););return object}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return !1;if(Reflect.construct.sham)return !1;if("function"==typeof Proxy)return !0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return !1}}function _getPrototypeOf(o){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(o){return o.__proto__||Object.getPrototypeOf(o)},_getPrototypeOf(o)}window.Occurrences_CalendarModal_Js=/*#__PURE__*/function(_Vtiger_Calendar_Js){function Occurrences_CalendarModal_Js(container,readonly){var _this;return _classCallCheck(this,Occurrences_CalendarModal_Js),_this=_super.call(this,container,readonly),_this.isSwitchAllDays=!1,_this.sidebarName="add",_this.eventCreate=!1,_this.module=container.find("[name=\"module\"]").val(),_this.renderCalendar(),_this.registerEvents(),_this}/** * Function sets calendar module's options * @returns {{eventClick: function, headerToolbar: object, selectable: boolean}} */_inherits(Occurrences_CalendarModal_Js,_Vtiger_Calendar_Js);var _super=_createSuper(Occurrences_CalendarModal_Js);return _createClass(Occurrences_CalendarModal_Js,[{key:"setCalendarModuleOptions",value:function setCalendarModuleOptions(){var options=_get(_getPrototypeOf(Occurrences_CalendarModal_Js.prototype),"setCalendarModuleOptions",this).call(this);options.selectable=!0,options.eventClick=function(info){info.jsEvent.preventDefault();};var date=this.container.find(".js-selected-date").val();return date&&(options.initialDate=date),options}/** diff --git a/public_html/layouts/basic/modules/Occurrences/resources/QuickCreate.min.js.map b/public_html/layouts/basic/modules/Occurrences/resources/QuickCreate.min.js.map index c4447479bde8..9c4095c656c4 100644 --- a/public_html/layouts/basic/modules/Occurrences/resources/QuickCreate.min.js.map +++ b/public_html/layouts/basic/modules/Occurrences/resources/QuickCreate.min.js.map @@ -1 +1 @@ -{"version":3,"file":"QuickCreate.min.js","sources":["QuickCreate.js"],"sourcesContent":["/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */\n'use strict';\n\n/**\n * Class representing a modal calendar.\n * @extends Vtiger_Calendar_Js\n */\nwindow.Occurrences_CalendarModal_Js = class Occurrences_CalendarModal_Js extends Vtiger_Calendar_Js {\n\tconstructor(container, readonly) {\n\t\tsuper(container, readonly);\n\t\tthis.isSwitchAllDays = false;\n\t\tthis.sidebarName = 'add'; //available: add, status, edit\n\t\tthis.eventCreate = false;\n\t\tthis.module = container.find('[name=\"module\"]').val();\n\t\tthis.renderCalendar();\n\t\tthis.registerEvents();\n\t}\n\t/**\n\t * Function sets calendar module's options\n\t * @returns {{eventClick: function, headerToolbar: object, selectable: boolean}}\n\t */\n\tsetCalendarModuleOptions() {\n\t\tlet options = super.setCalendarModuleOptions();\n\t\toptions.selectable = true;\n\t\toptions.eventClick = function (info) {\n\t\t\tinfo.jsEvent.preventDefault();\n\t\t};\n\t\tlet date = this.container.find('.js-selected-date').val();\n\t\tif (date) {\n\t\t\toptions.initialDate = date;\n\t\t}\n\t\treturn options;\n\t}\n\t/**\n\t * Function registers calendar events\n\t */\n\tregisterEvents() {\n\t\tconst calendarView = this.getCalendarView();\n\t\tthis.switchContainer = $(`
    `).insertAfter(\n\t\t\tcalendarView.find('.fc-center')\n\t\t);\n\t\tthis.registerSwitchEvents();\n\t\tthis.registerUsersChange();\n\t}\n\t/**\n\t * Function registers calendar switch event\n\t */\n\tregisterSwitchEvents() {\n\t\tif (app.getMainParams('hiddenDays', true) !== false) {\n\t\t\tthis.switchContainer.html(this.createSwitch());\n\t\t\tthis.switchContainer.find('input').on('change', (e) => {\n\t\t\t\tconst currentTarget = $(e.currentTarget);\n\t\t\t\tlet hiddenDays = [];\n\t\t\t\tif (typeof currentTarget.data('on-text') !== 'undefined') {\n\t\t\t\t\thiddenDays = app.getMainParams('hiddenDays', true);\n\t\t\t\t\tthis.isSwitchAllDays = false;\n\t\t\t\t} else {\n\t\t\t\t\tthis.isSwitchAllDays = true;\n\t\t\t\t}\n\t\t\t\tthis.fullCalendar.setOption('hiddenDays', hiddenDays);\n\t\t\t\tthis.registerSwitchEvents();\n\t\t\t});\n\t\t}\n\t}\n\t/**\n\t * Generate filter buttons\n\t * @returns {string}\n\t */\n\tcreateSwitch() {\n\t\tlet on = app.vtranslate('JS_WORK_DAYS'),\n\t\t\toff = app.vtranslate('JS_ALL'),\n\t\t\tstate = this.isSwitchAllDays;\n\t\treturn `
    \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
    `;\n\t}\n\t/**\n\t * Function registers select's user change event\n\t */\n\tregisterUsersChange() {\n\t\tthis.container.find('.assigned_user_id').on('change', () => {\n\t\t\tthis.reloadCalendarData();\n\t\t});\n\t}\n\t/**\n\t * Get selected users\n\t * @returns {{ selectedIds: array, excludedIds: array }}\n\t */\n\tgetSelectedUsersCalendar() {\n\t\treturn { selectedIds: [this.container.find('.assigned_user_id').val()], excludedIds: [] };\n\t}\n\t/**\n\t * Function invokes by FullCalendar, sets selected days in form\n\t * @param {Object} info\n\t * @returns\n\t */\n\tselectDays(info) {\n\t\tif (this.sidebarName === 'status') {\n\t\t\tthis.sidebarName = 'add';\n\t\t\tthis.getCalendarCreateView().done(() => {\n\t\t\t\tthis.selectDays(info);\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tlet startDate = info.start,\n\t\t\tendDate = info.end;\n\t\tif (info['allDay']) {\n\t\t\tendDate.setDate(endDate.getDate() - 1);\n\t\t\tconst d = new Date();\n\t\t\tstartDate.setHours(d.getHours(), d.getMinutes());\n\t\t\tendDate.setHours(d.getHours(), d.getMinutes() + 30);\n\t\t}\n\t\tthis.container.find('[name=\"date_start\"]').val(App.Fields.DateTime.dateToUserFormat(startDate));\n\t\tthis.container.find('[name=\"date_end\"]').val(App.Fields.DateTime.dateToUserFormat(endDate));\n\t}\n};\n\n$.Class(\n\t'Occurrences_QuickCreate_Js',\n\t{},\n\t{\n\t\tregisterEvents: function (container) {\n\t\t\tlet className = container.find('[name=\"module\"]').val() + '_CalendarModal_Js';\n\t\t\tthis.calendarView = new window[className](container.closest('.js-modal-container'), true);\n\t\t}\n\t}\n);\n"],"names":["window","Occurrences_CalendarModal_Js","container","readonly","isSwitchAllDays","sidebarName","eventCreate","module","find","val","renderCalendar","registerEvents","options","selectable","eventClick","info","jsEvent","preventDefault","date","initialDate","getCalendarView","switchContainer","$","insertAfter","calendarView","registerSwitchEvents","registerUsersChange","app","getMainParams","html","createSwitch","on","e","currentTarget","hiddenDays","data","fullCalendar","setOption","vtranslate","off","state","reloadCalendarData","selectedIds","excludedIds","getCalendarCreateView","done","selectDays","startDate","start","endDate","end","setDate","getDate","setHours","d","getHours","getMinutes","App","Fields","DateTime","dateToUserFormat","Vtiger_Calendar_Js","Class","className","closest"],"mappings":";;AAAA,kKACA,YAEA,CAAA;AACA;AACA;AACA,0sGACAA,MAAM,CAACC,4BAAP,4CACC,SAAYC,4BAAAA,CAAAA,SAAZ,CAAuBC,QAAvB,CAAiC,CAAA,IAAA,KAAA,CAAA,OAAA,eAAA,CAAA,IAAA,CAAA,4BAAA,CAAA,CAAA,KAAA,CAAA,MAAA,CAAA,IAAA,CAAA,IAAA,CAC1BD,SAD0B,CACfC,QADe,EAEhC,KAAKC,CAAAA,eAAL,GAFgC,CAGhC,KAAA,CAAKC,WAAL,CAAmB,KAHa,CAIhC,MAAKC,WAAL,CAAA,CAAA,CAJgC,CAKhC,KAAKC,CAAAA,MAAL,CAAcL,SAAS,CAACM,IAAV,CAAe,mBAAf,CAAA,CAAkCC,GAAlC,EALkB,CAMhC,MA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AmBC,CAAC,CAACC,QAAF,EAAnB,CAAiCD,CAAC,CAACE,UAAF,EAAjC,CAHmB,CAInBP,OAAO,CAACI,QAAR,CAAiBC,CAAC,CAACC,QAAF,EAAjB,CAA+BD,CAAC,CAACE,UAAF,EAAA,CAAiB,EAAhD,EACA,CACD,KAAKtD,SAAL,CAAeM,IAAf,CAAoB,uBAApB,EAA2CC,GAA3C,CAA+CgD,GAAG,CAACC,MAAJ,CAAWC,QAAX,CAAoBC,gBAApB,CAAqCb,SAArC,CAA/C,CAhBgB,CAiBhB,KAAK7C,SAAL,CAAeM,IAAf,CAAoB,qBAApB,EAAyCC,GAAzC,CAA6CgD,GAAG,CAACC,MAAJ,CAAWC,QAAX,CAAoBC,gBAApB,CAAqCX,OAArC,CAA7C,EACA,CAhHF,kCAAiFY,kBAAjF,EAmHAvC,CAAC,CAACwC,KAAF,CACC,4BADD,CAEC,EAFD,CAGC,CACCnD,cAAc,CAAE,wBAAUT,SAAV,CAAqB,CACpC,IAAI6D,SAAS,CAAG7D,SAAS,CAACM,IAAV,CAAe,mBAAf,EAAkCC,GAAlC,EAAA,CAA0C,mBAA1D,CACA,IAAA,CAAKe,YAAL,CAAoB,UAAU,CAACuC,SAAD,CAAV,CAAsB7D,SAAS,CAAC8D,OAAV,CAAkB,qBAAlB,CAAtB,CAAA,CAAA,CAAA,EACpB,CAJF,CAHD;;"} \ No newline at end of file +{"version":3,"file":"QuickCreate.min.js","sources":["QuickCreate.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/**\n * Class representing a modal calendar.\n * @extends Vtiger_Calendar_Js\n */\nwindow.Occurrences_CalendarModal_Js = class Occurrences_CalendarModal_Js extends Vtiger_Calendar_Js {\n\tconstructor(container, readonly) {\n\t\tsuper(container, readonly);\n\t\tthis.isSwitchAllDays = false;\n\t\tthis.sidebarName = 'add'; //available: add, status, edit\n\t\tthis.eventCreate = false;\n\t\tthis.module = container.find('[name=\"module\"]').val();\n\t\tthis.renderCalendar();\n\t\tthis.registerEvents();\n\t}\n\t/**\n\t * Function sets calendar module's options\n\t * @returns {{eventClick: function, headerToolbar: object, selectable: boolean}}\n\t */\n\tsetCalendarModuleOptions() {\n\t\tlet options = super.setCalendarModuleOptions();\n\t\toptions.selectable = true;\n\t\toptions.eventClick = function (info) {\n\t\t\tinfo.jsEvent.preventDefault();\n\t\t};\n\t\tlet date = this.container.find('.js-selected-date').val();\n\t\tif (date) {\n\t\t\toptions.initialDate = date;\n\t\t}\n\t\treturn options;\n\t}\n\t/**\n\t * Function registers calendar events\n\t */\n\tregisterEvents() {\n\t\tconst calendarView = this.getCalendarView();\n\t\tthis.switchContainer = $(`
    `).insertAfter(\n\t\t\tcalendarView.find('.fc-center')\n\t\t);\n\t\tthis.registerSwitchEvents();\n\t\tthis.registerUsersChange();\n\t}\n\t/**\n\t * Function registers calendar switch event\n\t */\n\tregisterSwitchEvents() {\n\t\tif (app.getMainParams('hiddenDays', true) !== false) {\n\t\t\tthis.switchContainer.html(this.createSwitch());\n\t\t\tthis.switchContainer.find('input').on('change', (e) => {\n\t\t\t\tconst currentTarget = $(e.currentTarget);\n\t\t\t\tlet hiddenDays = [];\n\t\t\t\tif (typeof currentTarget.data('on-text') !== 'undefined') {\n\t\t\t\t\thiddenDays = app.getMainParams('hiddenDays', true);\n\t\t\t\t\tthis.isSwitchAllDays = false;\n\t\t\t\t} else {\n\t\t\t\t\tthis.isSwitchAllDays = true;\n\t\t\t\t}\n\t\t\t\tthis.fullCalendar.setOption('hiddenDays', hiddenDays);\n\t\t\t\tthis.registerSwitchEvents();\n\t\t\t});\n\t\t}\n\t}\n\t/**\n\t * Generate filter buttons\n\t * @returns {string}\n\t */\n\tcreateSwitch() {\n\t\tlet on = app.vtranslate('JS_WORK_DAYS'),\n\t\t\toff = app.vtranslate('JS_ALL'),\n\t\t\tstate = this.isSwitchAllDays;\n\t\treturn `
    \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
    `;\n\t}\n\t/**\n\t * Function registers select's user change event\n\t */\n\tregisterUsersChange() {\n\t\tthis.container.find('.assigned_user_id').on('change', () => {\n\t\t\tthis.reloadCalendarData();\n\t\t});\n\t}\n\t/**\n\t * Get selected users\n\t * @returns {{ selectedIds: array, excludedIds: array }}\n\t */\n\tgetSelectedUsersCalendar() {\n\t\treturn { selectedIds: [this.container.find('.assigned_user_id').val()], excludedIds: [] };\n\t}\n\t/**\n\t * Function invokes by FullCalendar, sets selected days in form\n\t * @param {Object} info\n\t * @returns\n\t */\n\tselectDays(info) {\n\t\tif (this.sidebarName === 'status') {\n\t\t\tthis.sidebarName = 'add';\n\t\t\tthis.getCalendarCreateView().done(() => {\n\t\t\t\tthis.selectDays(info);\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tlet startDate = info.start,\n\t\t\tendDate = info.end;\n\t\tif (info['allDay']) {\n\t\t\tendDate.setDate(endDate.getDate() - 1);\n\t\t\tconst d = new Date();\n\t\t\tstartDate.setHours(d.getHours(), d.getMinutes());\n\t\t\tendDate.setHours(d.getHours(), d.getMinutes() + 30);\n\t\t}\n\t\tthis.container.find('[name=\"date_start\"]').val(App.Fields.DateTime.dateToUserFormat(startDate));\n\t\tthis.container.find('[name=\"date_end\"]').val(App.Fields.DateTime.dateToUserFormat(endDate));\n\t}\n};\n\n$.Class(\n\t'Occurrences_QuickCreate_Js',\n\t{},\n\t{\n\t\tregisterEvents: function (container) {\n\t\t\tlet className = container.find('[name=\"module\"]').val() + '_CalendarModal_Js';\n\t\t\tthis.calendarView = new window[className](container.closest('.js-modal-container'), true);\n\t\t}\n\t}\n);\n"],"names":["_typeof","o","Symbol","iterator","constructor","prototype","_classCallCheck","instance","Constructor","TypeError","_defineProperties","target","props","descriptor","i","length","enumerable","configurable","writable","Object","defineProperty","_toPropertyKey","key","_createClass","protoProps","staticProps","arg","_toPrimitive","String","input","hint","prim","toPrimitive","res","call","Number","_get","Reflect","get","bind","property","receiver","base","_superPropBase","desc","getOwnPropertyDescriptor","arguments","value","apply","object","hasOwnProperty","_getPrototypeOf","_inherits","subClass","superClass","create","_setPrototypeOf","p","setPrototypeOf","__proto__","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","result","Super","NewTarget","construct","_possibleConstructorReturn","self","_assertThisInitialized","ReferenceError","sham","Proxy","Boolean","valueOf","e","getPrototypeOf","window","Occurrences_CalendarModal_Js","_Vtiger_Calendar_Js","container","readonly","_this","_super","isSwitchAllDays","sidebarName","eventCreate","module","find","val","renderCalendar","registerEvents","setCalendarModuleOptions","options","selectable","eventClick","info","jsEvent","preventDefault","date","initialDate","calendarView","getCalendarView","switchContainer","$","insertAfter","registerSwitchEvents","registerUsersChange","_this2","app","getMainParams","html","createSwitch","on","currentTarget","hiddenDays","data","fullCalendar","setOption","vtranslate","off","state","concat","_this3","reloadCalendarData","getSelectedUsersCalendar","selectedIds","excludedIds","selectDays","_this4","getCalendarCreateView","done","startDate","start","endDate","end","allDay","setDate","getDate","d","Date","setHours","getHours","getMinutes","App","Fields","DateTime","dateToUserFormat","Vtiger_Calendar_Js","Class","className","closest"],"mappings":";;AAAA,kKACA,YAAY,CAEZ;AACA;AACA;AACA,GAHA,SAAAA,OAAAA,CAAAC,CAAA,CAAA,CAAA,yBAAA,CAAA,OAAAD,OAAA,CAAAE,UAAAA,EAAAA,OAAAA,MAAA,EAAAA,QAAAA,EAAAA,OAAAA,MAAA,CAAAC,QAAA,CAAA,SAAAF,CAAA,CAAA,CAAA,OAAA,OAAAA,CAAA,CAAAA,CAAAA,SAAAA,CAAA,CAAAA,CAAAA,OAAAA,CAAA,EAAAC,UAAAA,EAAAA,OAAAA,MAAA,EAAAD,CAAA,CAAAG,WAAA,GAAAF,MAAA,EAAAD,CAAA,GAAAC,MAAA,CAAAG,SAAA,iBAAAJ,CAAA,CAAA,CAAAD,OAAA,CAAAC,CAAA,CAAA,CAAA,SAAAK,eAAAC,CAAAA,QAAA,CA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1D,cAAc,CAAE,SAAAA,cAAUX,CAAAA,SAAS,CAAE,CACpC,IAAIsE,SAAS,CAAGtE,SAAS,CAACQ,IAAI,CAAC,mBAAiB,CAAC,CAACC,GAAG,EAAE,CAAG,mBAAmB,CAC7E,IAAI,CAACY,YAAY,CAAG,IAAIxB,MAAM,CAACyE,SAAS,CAAC,CAACtE,SAAS,CAACuE,OAAO,CAAC,qBAAqB,CAAC,CAAM,CAAA,CAAA,EACzF,CACD,CACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/OpenStreetMap/resources/Map.min.js b/public_html/layouts/basic/modules/OpenStreetMap/resources/Map.min.js index c104d81583e0..74de0bbc2119 100644 --- a/public_html/layouts/basic/modules/OpenStreetMap/resources/Map.min.js +++ b/public_html/layouts/basic/modules/OpenStreetMap/resources/Map.min.js @@ -1,4 +1,4 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */"use strict";jQuery.Class("OpenStreetMap_Map_Js",{},{container:!1,mapInstance:!1,selectedParams:!1,layerMarkers:!1,markers:!1,cacheMarkers:[],polygonLayer:!1,routeLayer:!1,recordsIds:"",cacheLayerMarkers:{},indirectPointLayer:{},setSelectedParams:function setSelectedParams(params){delete params.view,this.selectedParams=params;},registerMap:function registerMap(startCoordinate,startZoom){var attribution="© YetiForce Map powered by Open Street Map";return CONFIG.disableBranding&&(attribution=""),this.mapInstance=L.map("mapid").setView(startCoordinate,startZoom),L.tileLayer($(".js-tile-layer-server").val(),{maxZoom:19,attribution:attribution}).addTo(this.mapInstance),this.mapInstance},setMarkers:function setMarkers(data){var thisInstance=this,markerArray=[],container=this.container,map=this.mapInstance;if("undefined"!=typeof data.coordinates){var markers=L.markerClusterGroup({maxClusterRadius:10});"boolean"!=typeof this.layerMarkers&&map.removeLayer(this.layerMarkers);var records=[];data.coordinates.forEach(function(e){markerArray.push([e.lat,e.lon]);var marker=L.marker([e.lat,e.lon],{icon:L.AwesomeMarkers.icon({icon:"home",markerColor:"blue",prefix:"fa",iconColor:e.color})}).bindPopup(e.label);markers.addLayer(marker),records.push(e.recordId);}),this.recordsIds=records,this.markers=data.coordinates,this.layerMarkers=markers,map.addLayer(markers);}if("boolean"!=typeof this.polygonLayer&&map.removeLayer(this.polygonLayer),"undefined"!=typeof data.coordinatesCenter)if("undefined"==typeof data.coordinatesCenter.error){var radius=container.find(".js-radius").val();markerArray.push([data.coordinatesCenter.lat,data.coordinatesCenter.lon]);var marker=L.marker([data.coordinatesCenter.lat,data.coordinatesCenter.lon],{icon:L.AwesomeMarkers.icon({icon:"search",markerColor:"red",prefix:"fa"})}).bindPopup(this.getMarkerPopup(container.find(".js-search-address").val(),data.coordinatesCenter));if(map.addLayer(marker),$.isNumeric(radius)){radius=1e3*parseInt(radius);var circle=L.circle([data.coordinatesCenter.lat,data.coordinatesCenter.lon],radius,{color:"red",fillColor:"#f03",fillOpacity:.05});this.polygonLayer=L.featureGroup([circle]),map.addLayer(this.polygonLayer);}}else Vtiger_Helper_Js.showMessage({title:app.vtranslate("JS_LBL_PERMISSION"),text:data.coordinatesCenter.error,type:"error"});"undefined"!=typeof data.cache&&Object.keys(data.cache).forEach(function(key){"undefined"!=typeof thisInstance.cacheLayerMarkers[key]&&map.removeLayer(thisInstance.cacheLayerMarkers[key]);var markersCache=L.markerClusterGroup({maxClusterRadius:10}),coordinates=data.cache[key];coordinates.forEach(function(e){if(-1===thisInstance.recordsIds.indexOf(e.recordId)){markerArray.push([e.lat,e.lon]);var marker=L.marker([e.lat,e.lon],{icon:L.AwesomeMarkers.icon({icon:"home",markerColor:"orange",prefix:"fa",iconColor:e.color})}).bindPopup(e.label);markersCache.addLayer(marker);}}),thisInstance.cacheMarkers[key]=coordinates,map.addLayer(markersCache),thisInstance.cacheLayerMarkers[key]=markersCache;});var legendContainer=this.container.find(".js-legend-container");if("undefined"!=typeof data.legend){var html="";data.legend.forEach(function(e){html+="
    "+e.value+"
    ";}),legendContainer.html(html);}else legendContainer.html("");markerArray.length&&map.fitBounds(markerArray),this.container.find(".groupNeighbours").prop("checked",!0);},showCalculateBtn:function showCalculateBtn(){var container=this.container,endAddress=container.find(".end").val(),startAddress=container.find(".start").val();0 :not(.ui-autocomplete-category)");},_renderMenu:function _renderMenu(ul,items){var that=this,currentCategory="";$.each(items,function(_index,item){var li;console.log(item.category!=currentCategory,item),item.category!=currentCategory&&(ul.append("
  • "+item.category+"
  • "),currentCategory=item.category),li=that._renderItemData(ul,item),item.category&&li.attr("aria-label",item.category+" : "+item.label);});},_renderItemData:function _renderItemData(ul,item){return this._renderItem(ul,item).data("ui-autocomplete-item",item)},_renderItem:function _renderItem(ul,item){return $("
  • ").data("item.autocomplete",item).append($("").html(item.label)).appendTo(ul)}}),searchValue.ivAutocomplete({delay:"600",minLength:"3",source:function source(_request,response){AppConnector.request({module:searchModule.val(),currentModule:app.getModuleName(),searchModule:searchModule.val(),view:"BasicAjax",mode:"showSearchResults",value:searchValue.val(),html:!1}).done(function(responseAjax){responseAjax=JSON.parse(responseAjax);var responseDataList=responseAjax.result;0>=responseDataList.length&&responseDataList.push({label:app.vtranslate("JS_NO_RESULTS_FOUND"),type:"no results",category:""}),response(responseDataList);});},select:function select(_event,ui){_this2.recordsIds.push(ui.item.id),AppConnector.request({module:"OpenStreetMap",action:"ClipBoard",mode:"addRecord",record:ui.item.id,srcModuleName:searchModule.val()}).done(function(response){if(1==response.result.length){var marker=L.marker([response.result[0].lat,response.result[0].lon],{icon:L.AwesomeMarkers.icon({icon:"home",markerColor:"cadetblue",prefix:"fa",iconColor:response.result[0].color})}).bindPopup(response.result[0].label);_this2.layerMarkers.addLayer(marker),_this2.mapInstance.addLayer(_this2.layerMarkers),_this2.mapInstance.setView(new L.LatLng(response.result[0].lat,response.result[0].lon),13);}else Vtiger_Helper_Js.showMessage({title:app.vtranslate("JS_LBL_PERMISSION"),text:response.result,type:"error"});});}});},registerSearchAddress:function registerSearchAddress(){var _this3=this,searchValue=this.container.find(".js-search-address"),searchBtn=this.container.find(".js-search-btn"),operator=this.container.find(".js-select-operator");operator.length&&operator.val()&&(searchValue.autocomplete({delay:600,minLength:3,source:function source(request,response){AppConnector.request({module:app.getModuleName(),action:"Fields",mode:"findAddress",type:operator.val(),value:request.term}).done(function(requestData){!1===requestData.result?app.showNotify({title:app.vtranslate("JS_ERROR"),type:"error"}):requestData.result.length?response(requestData.result):response([{label:app.vtranslate("JS_NO_RESULTS_FOUND"),value:""}]);}).fail(function(_textStatus,_errorThrown,jqXHR){app.showNotify({title:app.vtranslate("JS_ERROR"),text:jqXHR.responseJSON.error.message,type:"error",animation:"show"}),response([{label:app.vtranslate("JS_NO_RESULTS_FOUND"),value:""}]);});},select:function select(_event,ui){if(ui.item.coordinates){var marker=L.marker([ui.item.coordinates.lat,ui.item.coordinates.lon],{icon:L.AwesomeMarkers.icon({icon:"home",markerColor:"cadetblue",prefix:"fa"})}).bindPopup(_this3.getMarkerPopup(ui.item.label,ui.item.coordinates));_this3.layerMarkers.addLayer(marker),_this3.mapInstance.addLayer(_this3.layerMarkers),_this3.mapInstance.setView(new L.LatLng(ui.item.coordinates.lat,ui.item.coordinates.lon),10);}else searchValue.val(ui.item.label),searchBtn.trigger("click");}}).autocomplete("instance")._renderItem=function(ul,item){return $("
  • ").append("
    ").concat(item.label,"
    ")).appendTo(ul)}),this.container.find(".js-search-address,.js-radius").on("keydown",function(e){"Enter"===e.code&&searchBtn.trigger("click");}),searchBtn.on("click",function(){var progressIndicatorElement=jQuery.progressIndicator({position:_this3.container,blockInfo:{enabled:!0}}),params={module:"OpenStreetMap",action:"GetMarkers",srcModule:app.getModuleName(),searchValue:_this3.container.find(".js-search-address").val(),cache:_this3.getCacheParamsToRequest()},radiusValue=_this3.container.find(".js-radius").val();""!==radiusValue&&parseInt(radiusValue)&&(params.radius=parseInt(radiusValue)),AppConnector.request($.extend(_this3.selectedParams,params)).done(function(response){progressIndicatorElement.progressIndicator({mode:"hide"}),_this3.setMarkers(response.result);});});},registerMyLocation:function registerMyLocation(){var _this4=this,locationBtn=this.container.find(".js-my-location-btn");return navigator.geolocation?void(navigator.permissions.query({name:"geolocation"}).then(function(response){"denied"===response.state&&locationBtn.addClass("d-none");}),locationBtn.on("click",function(){navigator.geolocation.getCurrentPosition(function(position){var marker=L.marker([position.coords.latitude,position.coords.longitude],{icon:L.AwesomeMarkers.icon({icon:"home",markerColor:"cadetblue",prefix:"fa"})}).bindPopup(_this4.getMarkerPopup(locationBtn.data("label"),{lat:position.coords.latitude,lon:position.coords.longitude}));_this4.layerMarkers.addLayer(marker),_this4.mapInstance.addLayer(_this4.layerMarkers),_this4.mapInstance.setView(new L.LatLng(position.coords.latitude,position.coords.longitude),10);});})):void locationBtn.addClass("d-none")},registerBasicModal:function registerBasicModal(){var layer,description,thisInstance=this,container=this.container,map=thisInstance.mapInstance;app.registerBlockAnimationEvent(container),thisInstance.registerCacheEvents(container),container.find(".groupBy").on("click",function(){var progressIndicatorElement=jQuery.progressIndicator({position:container,blockInfo:{enabled:!0}}),params={module:"OpenStreetMap",action:"GetMarkers",srcModule:app.getModuleName(),groupBy:container.find(".fieldsToGroup").val(),searchValue:container.find(".js-search-address").val(),radius:container.find(".js-radius").val(),cache:thisInstance.getCacheParamsToRequest()};params=$.extend(thisInstance.selectedParams,params),AppConnector.request(params).done(function(response){progressIndicatorElement.progressIndicator({mode:"hide"}),thisInstance.setMarkers(response.result);});}),container.find(".groupNeighbours").on("change",function(e){var currentTarget=$(e.currentTarget);map.removeLayer(thisInstance.layerMarkers);var markers=thisInstance.markers;if(currentTarget.is(":checked"))layer=L.markerClusterGroup({maxClusterRadius:10}),markers.forEach(function(e){var marker=L.marker([e.lat,e.lon],{icon:L.AwesomeMarkers.icon({icon:"home",markerColor:"blue",prefix:"fa",iconColor:e.color})}).bindPopup(e.label);layer.addLayer(marker);}),Object.keys(thisInstance.cacheLayerMarkers).forEach(function(key){map.removeLayer(thisInstance.cacheLayerMarkers[key]);var cacheLayer=L.markerClusterGroup({maxClusterRadius:10});thisInstance.cacheMarkers[key].forEach(function(e){var marker=L.marker([e.lat,e.lon],{icon:L.AwesomeMarkers.icon({icon:"home",markerColor:"orange",prefix:"fa",iconColor:e.color})}).bindPopup(e.label);cacheLayer.addLayer(marker);}),thisInstance.cacheLayerMarkers[key]=cacheLayer,map.addLayer(cacheLayer);});else {var markerArray=[];markers.forEach(function(e){var marker=L.marker([e.lat,e.lon],{icon:L.AwesomeMarkers.icon({icon:"home",markerColor:"blue",prefix:"fa",iconColor:e.color})}).bindPopup(e.label);markerArray.push(marker);}),layer=L.featureGroup(markerArray),Object.keys(thisInstance.cacheLayerMarkers).forEach(function(key){map.removeLayer(thisInstance.cacheLayerMarkers[key]);var markerArray=[];thisInstance.cacheMarkers[key].forEach(function(e){var marker=L.marker([e.lat,e.lon],{icon:L.AwesomeMarkers.icon({icon:"home",markerColor:"orange",prefix:"fa",iconColor:e.color})}).bindPopup(e.label);markerArray.push(marker);}),thisInstance.cacheLayerMarkers[key]=L.featureGroup(markerArray),map.addLayer(thisInstance.cacheLayerMarkers[key]);});}thisInstance.layerMarkers=layer,map.addLayer(layer);});var startIconLayer=!1;container.on("click",".startTrack",function(e){startIconLayer&&map.removeLayer(startIconLayer);var currentTarget=$(e.currentTarget),containerPopup=currentTarget.closest(".leaflet-popup-content");description=containerPopup.find(".description").html();var startElement=container.find(".start"),coordinates=containerPopup.find(".coordinates");description=description.replace(/\/gi,", "),startElement.val(description),startElement.data("lat",coordinates.data("lat")),startElement.data("lon",coordinates.data("lon"));var marker=L.marker([coordinates.data("lat"),coordinates.data("lon")],{icon:L.AwesomeMarkers.icon({icon:"truck",markerColor:"green",prefix:"fa"})}).bindPopup(containerPopup.html());startIconLayer=L.featureGroup([marker]),map.addLayer(startIconLayer),thisInstance.showCalculateBtn();});var endIconLayer=!1;container.on("click",".endTrack",function(e){endIconLayer&&map.removeLayer(endIconLayer);var currentTarget=$(e.currentTarget),containerPopup=currentTarget.closest(".leaflet-popup-content");description=containerPopup.find(".description").html();var endElement=container.find(".end"),coordinates=containerPopup.find(".coordinates");description=description.replace(/\/gi,", "),endElement.val(description),endElement.data("lat",coordinates.data("lat")),endElement.data("lon",coordinates.data("lon"));var marker=L.marker([coordinates.data("lat"),coordinates.data("lon")],{icon:L.AwesomeMarkers.icon({icon:"flag-checkered",markerColor:"red",prefix:"fa"})}).bindPopup(containerPopup.html());endIconLayer=L.featureGroup([marker]),map.addLayer(endIconLayer),thisInstance.showCalculateBtn();}),container.on("click",".indirectPoint",function(e){var currentTarget=$(e.currentTarget),containerPopup=currentTarget.closest(".leaflet-popup-content");description=containerPopup.find(".description").html();var template=container.find(".indirectTemplate"),indirect=template.clone();template.before(indirect),indirect.removeClass("indirectTemplate"),indirect.removeClass("d-none");var coordinates=containerPopup.find(".coordinates");description=description.replace(/\/gi,", "),"undefined"!=typeof thisInstance.indirectPointLayer[description]&&map.removeLayer(thisInstance.indirectPointLayer[description]);var indirectField=indirect.find(".indirect");indirectField.val(description),indirectField.data("lat",coordinates.data("lat")),indirectField.data("lon",coordinates.data("lon"));var marker=L.marker([coordinates.data("lat"),coordinates.data("lon")],{icon:L.AwesomeMarkers.icon({icon:"flag",markerColor:"orange",prefix:"fa"})}).bindPopup(containerPopup.html());thisInstance.indirectPointLayer[description]=L.featureGroup([marker]),map.addLayer(thisInstance.indirectPointLayer[description]);}),container.on("click",".removeIndirect",function(e){var currentTarget=$(e.currentTarget),container=currentTarget.closest(".indirectContainer");map.removeLayer(thisInstance.indirectPointLayer[container.find(".indirect").val()]),currentTarget.closest(".indirectContainer").remove();}),container.on("click",".moveUp",function(e){var currentTarget=$(e.currentTarget),container=currentTarget.closest(".indirectContainer"),previousElement=container.prev();previousElement.hasClass("startContainer")||previousElement.before(container);}),container.on("click",".moveDown",function(e){var currentTarget=$(e.currentTarget),container=currentTarget.closest(".indirectContainer"),nextElement=container.next();nextElement.hasClass("indirectTemplate")||nextElement.after(container);}),container.on("click",".searchInRadius",function(e){endIconLayer&&map.removeLayer(endIconLayer);var currentTarget=$(e.currentTarget),containerPopup=currentTarget.closest(".leaflet-popup-content"),coordinates=containerPopup.find(".coordinates"),progressIndicatorElement=jQuery.progressIndicator({position:container,blockInfo:{enabled:!0}}),params={module:"OpenStreetMap",action:"GetMarkers",srcModule:app.getModuleName(),radius:container.find(".radius").val(),lat:coordinates.data("lat"),lon:coordinates.data("lon"),cache:thisInstance.getCacheParamsToRequest()};params=$.extend(thisInstance.selectedParams,params),AppConnector.request(params).done(function(response){progressIndicatorElement.progressIndicator({mode:"hide"}),thisInstance.setMarkers(response.result);});});var descriptionContainer=container.find(".js-description-container");container.find(".js-calculate-route").on("click",function(){var indirectLon=[],indirectLat=[];container.find(".indirectContainer:not(.d-none) input.indirect").each(function(){var currentTarget=$(this);indirectLat.push(currentTarget.data("lat")),indirectLon.push(currentTarget.data("lon"));});var endElement=container.find(".end"),startElement=container.find(".start"),progressIndicatorElement=jQuery.progressIndicator({position:container,blockInfo:{enabled:!0}});AppConnector.request({url:"index.php",data:{module:"OpenStreetMap",action:"GetRoute",flon:startElement.data("lon"),flat:startElement.data("lat"),ilon:indirectLon,ilat:indirectLat,tlon:endElement.data("lon"),tlat:endElement.data("lat")}}).done(function(response){progressIndicatorElement.progressIndicator({mode:"hide"}),thisInstance.routeLayer&&map.removeLayer(thisInstance.routeLayer);var route=L.geoJson(response.result.geoJson);thisInstance.routeLayer=L.featureGroup([route]),map.addLayer(thisInstance.routeLayer),descriptionContainer.removeClass("d-none");var instruction=container.find(".js-instruction_block");response.result.properties.description?(instruction.removeClass("d-none"),descriptionContainer.find(".js-instruction_body").html(response.result.properties.description)):instruction.addClass("d-none"),descriptionContainer.find(".distance").html(App.Fields.Double.formatToDisplay(response.result.properties.distance)),descriptionContainer.find(".travelTime").html(App.Fields.Double.formatToDisplay(response.result.properties.traveltime/60));}).fail(function(error){progressIndicatorElement.progressIndicator({mode:"hide"}),app.showNotify({titleTrusted:!1,textTrusted:!1,title:app.vtranslate("JS_UNEXPECTED_ERROR"),text:error,type:"error"});});}),container.on("click",".setView",function(e){var currentTarget=$(e.currentTarget),inputInstance=currentTarget.closest(".input-group").find(".end,.start,.indirect"),lat=inputInstance.data("lat"),lon=inputInstance.data("lon");"undefined"==typeof lat&&"undefined"==typeof lon||map.setView(new L.LatLng(lat,lon),11);}),this.registerSearchCompany(),this.registerSearchAddress(),this.registerMyLocation();},registerModalView:function registerModalView(container){var thisInstance=this,progressIndicatorElement=jQuery.progressIndicator({position:container,blockInfo:{enabled:!0}});this.container=container,$("#mapid").css({height:$("body").height()-160}),this.registerMap([0,0],2);var params={module:"OpenStreetMap",action:"GetMarkers",srcModule:app.getModuleName()};params=$.extend(this.selectedParams,params),thisInstance.registerBasicModal(),AppConnector.request(params).done(function(response){progressIndicatorElement.progressIndicator({mode:"hide"}),thisInstance.setMarkers(response.result);});},getMarkerPopup:function getMarkerPopup(label,coordinates){return "".concat(label,"\n\t\t\t
    \n\t\t\t\n\t\t\n\t\t")},registerDetailView:function registerDetailView(container){this.container=container;var coordinates=container.find("#coordinates").val();coordinates=JSON.parse(coordinates);var startCoordinate=[0,0],startZoom=2,$map=container.find("#mapid");coordinates.length&&(startCoordinate=coordinates[0],startZoom=6),$(".mainBody").length?1e3>$(".mainBody").height()?$map.height($(".mainBody").height()-($(".detailViewTitle").height()+$(".detailViewContainer .related").height()+25)):$map.height(1e3):1e3>$(".bodyContents").height()?$map.height($(".bodyContents").height()-($(".detailViewTitle").height()+$(".detailViewContainer .related").height()+25)):$map.height(1e3);var myMap=this.registerMap(startCoordinate,startZoom),markers=L.markerClusterGroup({maxClusterRadius:10});coordinates.forEach(function(e){var marker=L.marker([e.lat,e.lon],{icon:L.AwesomeMarkers.icon({icon:"home",markerColor:"blue",prefix:"fa",iconColor:e.color})}).bindPopup(e.label);markers.addLayer(marker);}),myMap.addLayer(markers);}}); +/* {[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]} */"use strict";jQuery.Class("OpenStreetMap_Map_Js",{},{container:!1,mapInstance:!1,selectedParams:!1,layerMarkers:!1,markers:!1,cacheMarkers:[],polygonLayer:!1,routeLayer:!1,recordsIds:"",cacheLayerMarkers:{},indirectPointLayer:{},setSelectedParams:function setSelectedParams(params){delete params.view,this.selectedParams=params;},registerMap:function registerMap(startCoordinate,startZoom){var attribution="© YetiForce Map powered by Open Street Map";return CONFIG.disableBranding&&(attribution=""),this.mapInstance=L.map("mapid").setView(startCoordinate,startZoom),L.tileLayer($(".js-tile-layer-server").val(),{maxZoom:19,attribution:attribution}).addTo(this.mapInstance),this.mapInstance},setMarkers:function setMarkers(data){var thisInstance=this,markerArray=[],container=this.container,map=this.mapInstance;if("undefined"!=typeof data.coordinates){var markers=L.markerClusterGroup({maxClusterRadius:10});"boolean"!=typeof this.layerMarkers&&map.removeLayer(this.layerMarkers);var records=[];data.coordinates.forEach(function(e){markerArray.push([e.lat,e.lon]);var marker=L.marker([e.lat,e.lon],{icon:L.AwesomeMarkers.icon({icon:"home",markerColor:"blue",prefix:"fa",iconColor:e.color})}).bindPopup(e.label);markers.addLayer(marker),records.push(e.recordId);}),this.recordsIds=records,this.markers=data.coordinates,this.layerMarkers=markers,map.addLayer(markers);}if("boolean"!=typeof this.polygonLayer&&map.removeLayer(this.polygonLayer),"undefined"!=typeof data.coordinatesCenter)if("undefined"==typeof data.coordinatesCenter.error){var radius=container.find(".js-radius").val();markerArray.push([data.coordinatesCenter.lat,data.coordinatesCenter.lon]);var marker=L.marker([data.coordinatesCenter.lat,data.coordinatesCenter.lon],{icon:L.AwesomeMarkers.icon({icon:"search",markerColor:"red",prefix:"fa"})}).bindPopup(this.getMarkerPopup(container.find(".js-search-address").val(),data.coordinatesCenter));if(map.addLayer(marker),$.isNumeric(radius)){radius=1e3*parseInt(radius);var circle=L.circle([data.coordinatesCenter.lat,data.coordinatesCenter.lon],radius,{color:"red",fillColor:"#f03",fillOpacity:.05});this.polygonLayer=L.featureGroup([circle]),map.addLayer(this.polygonLayer);}}else Vtiger_Helper_Js.showMessage({title:app.vtranslate("JS_LBL_PERMISSION"),text:data.coordinatesCenter.error,type:"error"});"undefined"!=typeof data.cache&&Object.keys(data.cache).forEach(function(key){"undefined"!=typeof thisInstance.cacheLayerMarkers[key]&&map.removeLayer(thisInstance.cacheLayerMarkers[key]);var markersCache=L.markerClusterGroup({maxClusterRadius:10}),coordinates=data.cache[key];coordinates.forEach(function(e){if(-1===thisInstance.recordsIds.indexOf(e.recordId)){markerArray.push([e.lat,e.lon]);var marker=L.marker([e.lat,e.lon],{icon:L.AwesomeMarkers.icon({icon:"home",markerColor:"orange",prefix:"fa",iconColor:e.color})}).bindPopup(e.label);markersCache.addLayer(marker);}}),thisInstance.cacheMarkers[key]=coordinates,map.addLayer(markersCache),thisInstance.cacheLayerMarkers[key]=markersCache;});var legendContainer=this.container.find(".js-legend-container");if("undefined"!=typeof data.legend){var html="";data.legend.forEach(function(e){html+="
    "+e.value+"
    ";}),legendContainer.html(html);}else legendContainer.html("");markerArray.length&&map.fitBounds(markerArray),this.container.find(".groupNeighbours").prop("checked",!0);},showCalculateBtn:function showCalculateBtn(){var container=this.container,endAddress=container.find(".end").val(),startAddress=container.find(".start").val();0 :not(.ui-autocomplete-category)");},_renderMenu:function _renderMenu(ul,items){var that=this,currentCategory="";$.each(items,function(_index,item){var li;console.log(item.category!=currentCategory,item),item.category!=currentCategory&&(ul.append("
  • "+item.category+"
  • "),currentCategory=item.category),li=that._renderItemData(ul,item),item.category&&li.attr("aria-label",item.category+" : "+item.label);});},_renderItemData:function _renderItemData(ul,item){return this._renderItem(ul,item).data("ui-autocomplete-item",item)},_renderItem:function _renderItem(ul,item){return $("
  • ").data("item.autocomplete",item).append($("").html(item.label)).appendTo(ul)}}),searchValue.ivAutocomplete({delay:"600",minLength:"3",source:function source(_request,response){AppConnector.request({module:searchModule.val(),currentModule:app.getModuleName(),searchModule:searchModule.val(),view:"BasicAjax",mode:"showSearchResults",value:searchValue.val(),html:!1}).done(function(responseAjax){responseAjax=JSON.parse(responseAjax);var responseDataList=responseAjax.result;0>=responseDataList.length&&responseDataList.push({label:app.vtranslate("JS_NO_RESULTS_FOUND"),type:"no results",category:""}),response(responseDataList);});},select:function select(_event,ui){_this2.recordsIds.push(ui.item.id),AppConnector.request({module:"OpenStreetMap",action:"ClipBoard",mode:"addRecord",record:ui.item.id,srcModuleName:searchModule.val()}).done(function(response){if(1==response.result.length){var marker=L.marker([response.result[0].lat,response.result[0].lon],{icon:L.AwesomeMarkers.icon({icon:"home",markerColor:"cadetblue",prefix:"fa",iconColor:response.result[0].color})}).bindPopup(response.result[0].label);_this2.layerMarkers.addLayer(marker),_this2.mapInstance.addLayer(_this2.layerMarkers),_this2.mapInstance.setView(new L.LatLng(response.result[0].lat,response.result[0].lon),13);}else Vtiger_Helper_Js.showMessage({title:app.vtranslate("JS_LBL_PERMISSION"),text:response.result,type:"error"});});}});},registerSearchAddress:function registerSearchAddress(){var _this3=this,searchValue=this.container.find(".js-search-address"),searchBtn=this.container.find(".js-search-btn"),operator=this.container.find(".js-select-operator");operator.length&&operator.val()&&(searchValue.autocomplete({delay:600,minLength:3,source:function source(request,response){AppConnector.request({module:app.getModuleName(),action:"Fields",mode:"findAddress",type:operator.val(),value:request.term}).done(function(requestData){!1===requestData.result?app.showNotify({title:app.vtranslate("JS_ERROR"),type:"error"}):requestData.result.length?response(requestData.result):response([{label:app.vtranslate("JS_NO_RESULTS_FOUND"),value:""}]);}).fail(function(_textStatus,_errorThrown,jqXHR){app.showNotify({title:app.vtranslate("JS_ERROR"),text:jqXHR.responseJSON.error.message,type:"error",animation:"show"}),response([{label:app.vtranslate("JS_NO_RESULTS_FOUND"),value:""}]);});},select:function select(_event,ui){if(ui.item.coordinates){var marker=L.marker([ui.item.coordinates.lat,ui.item.coordinates.lon],{icon:L.AwesomeMarkers.icon({icon:"home",markerColor:"cadetblue",prefix:"fa"})}).bindPopup(_this3.getMarkerPopup(ui.item.label,ui.item.coordinates));_this3.layerMarkers.addLayer(marker),_this3.mapInstance.addLayer(_this3.layerMarkers),_this3.mapInstance.setView(new L.LatLng(ui.item.coordinates.lat,ui.item.coordinates.lon),10);}else searchValue.val(ui.item.label),searchBtn.trigger("click");}}).autocomplete("instance")._renderItem=function(ul,item){return $("
  • ").append("
    ").concat(item.label,"
    ")).appendTo(ul)}),this.container.find(".js-search-address,.js-radius").on("keydown",function(e){"Enter"===e.code&&searchBtn.trigger("click");}),searchBtn.on("click",function(){var progressIndicatorElement=jQuery.progressIndicator({position:_this3.container,blockInfo:{enabled:!0}}),params={module:"OpenStreetMap",action:"GetMarkers",srcModule:app.getModuleName(),searchValue:_this3.container.find(".js-search-address").val(),cache:_this3.getCacheParamsToRequest()},radiusValue=_this3.container.find(".js-radius").val();""!==radiusValue&&parseInt(radiusValue)&&(params.radius=parseInt(radiusValue)),AppConnector.request($.extend(_this3.selectedParams,params)).done(function(response){progressIndicatorElement.progressIndicator({mode:"hide"}),_this3.setMarkers(response.result);});});},registerMyLocation:function registerMyLocation(){var _this4=this,locationBtn=this.container.find(".js-my-location-btn");return navigator.geolocation?void(navigator.permissions.query({name:"geolocation"}).then(function(response){"denied"===response.state&&locationBtn.addClass("d-none");}),locationBtn.on("click",function(){navigator.geolocation.getCurrentPosition(function(position){var marker=L.marker([position.coords.latitude,position.coords.longitude],{icon:L.AwesomeMarkers.icon({icon:"home",markerColor:"cadetblue",prefix:"fa"})}).bindPopup(_this4.getMarkerPopup(locationBtn.data("label"),{lat:position.coords.latitude,lon:position.coords.longitude}));_this4.layerMarkers.addLayer(marker),_this4.mapInstance.addLayer(_this4.layerMarkers),_this4.mapInstance.setView(new L.LatLng(position.coords.latitude,position.coords.longitude),10);});})):void locationBtn.addClass("d-none")},registerBasicModal:function registerBasicModal(){var layer,description,thisInstance=this,container=this.container,map=thisInstance.mapInstance;app.registerBlockAnimationEvent(container),thisInstance.registerCacheEvents(container),container.find(".groupBy").on("click",function(){var progressIndicatorElement=jQuery.progressIndicator({position:container,blockInfo:{enabled:!0}}),params={module:"OpenStreetMap",action:"GetMarkers",srcModule:app.getModuleName(),groupBy:container.find(".fieldsToGroup").val(),searchValue:container.find(".js-search-address").val(),radius:container.find(".js-radius").val(),cache:thisInstance.getCacheParamsToRequest()};params=$.extend(thisInstance.selectedParams,params),AppConnector.request(params).done(function(response){progressIndicatorElement.progressIndicator({mode:"hide"}),thisInstance.setMarkers(response.result);});}),container.find(".groupNeighbours").on("change",function(e){var currentTarget=$(e.currentTarget);map.removeLayer(thisInstance.layerMarkers);var markers=thisInstance.markers;if(currentTarget.is(":checked"))layer=L.markerClusterGroup({maxClusterRadius:10}),markers.forEach(function(e){var marker=L.marker([e.lat,e.lon],{icon:L.AwesomeMarkers.icon({icon:"home",markerColor:"blue",prefix:"fa",iconColor:e.color})}).bindPopup(e.label);layer.addLayer(marker);}),Object.keys(thisInstance.cacheLayerMarkers).forEach(function(key){map.removeLayer(thisInstance.cacheLayerMarkers[key]);var cacheLayer=L.markerClusterGroup({maxClusterRadius:10});thisInstance.cacheMarkers[key].forEach(function(e){var marker=L.marker([e.lat,e.lon],{icon:L.AwesomeMarkers.icon({icon:"home",markerColor:"orange",prefix:"fa",iconColor:e.color})}).bindPopup(e.label);cacheLayer.addLayer(marker);}),thisInstance.cacheLayerMarkers[key]=cacheLayer,map.addLayer(cacheLayer);});else {var markerArray=[];markers.forEach(function(e){var marker=L.marker([e.lat,e.lon],{icon:L.AwesomeMarkers.icon({icon:"home",markerColor:"blue",prefix:"fa",iconColor:e.color})}).bindPopup(e.label);markerArray.push(marker);}),layer=L.featureGroup(markerArray),Object.keys(thisInstance.cacheLayerMarkers).forEach(function(key){map.removeLayer(thisInstance.cacheLayerMarkers[key]);var markerArray=[];thisInstance.cacheMarkers[key].forEach(function(e){var marker=L.marker([e.lat,e.lon],{icon:L.AwesomeMarkers.icon({icon:"home",markerColor:"orange",prefix:"fa",iconColor:e.color})}).bindPopup(e.label);markerArray.push(marker);}),thisInstance.cacheLayerMarkers[key]=L.featureGroup(markerArray),map.addLayer(thisInstance.cacheLayerMarkers[key]);});}thisInstance.layerMarkers=layer,map.addLayer(layer);});var startIconLayer=!1;container.on("click",".startTrack",function(e){startIconLayer&&map.removeLayer(startIconLayer);var currentTarget=$(e.currentTarget),containerPopup=currentTarget.closest(".leaflet-popup-content");description=containerPopup.find(".description").html();var startElement=container.find(".start"),coordinates=containerPopup.find(".coordinates");description=description.replace(/\/gi,", "),startElement.val(description),startElement.data("lat",coordinates.data("lat")),startElement.data("lon",coordinates.data("lon"));var marker=L.marker([coordinates.data("lat"),coordinates.data("lon")],{icon:L.AwesomeMarkers.icon({icon:"truck",markerColor:"green",prefix:"fa"})}).bindPopup(containerPopup.html());startIconLayer=L.featureGroup([marker]),map.addLayer(startIconLayer),thisInstance.showCalculateBtn();});var endIconLayer=!1;container.on("click",".endTrack",function(e){endIconLayer&&map.removeLayer(endIconLayer);var currentTarget=$(e.currentTarget),containerPopup=currentTarget.closest(".leaflet-popup-content");description=containerPopup.find(".description").html();var endElement=container.find(".end"),coordinates=containerPopup.find(".coordinates");description=description.replace(/\/gi,", "),endElement.val(description),endElement.data("lat",coordinates.data("lat")),endElement.data("lon",coordinates.data("lon"));var marker=L.marker([coordinates.data("lat"),coordinates.data("lon")],{icon:L.AwesomeMarkers.icon({icon:"flag-checkered",markerColor:"red",prefix:"fa"})}).bindPopup(containerPopup.html());endIconLayer=L.featureGroup([marker]),map.addLayer(endIconLayer),thisInstance.showCalculateBtn();}),container.on("click",".indirectPoint",function(e){var currentTarget=$(e.currentTarget),containerPopup=currentTarget.closest(".leaflet-popup-content");description=containerPopup.find(".description").html();var template=container.find(".indirectTemplate"),indirect=template.clone();template.before(indirect),indirect.removeClass("indirectTemplate"),indirect.removeClass("d-none");var coordinates=containerPopup.find(".coordinates");description=description.replace(/\/gi,", "),"undefined"!=typeof thisInstance.indirectPointLayer[description]&&map.removeLayer(thisInstance.indirectPointLayer[description]);var indirectField=indirect.find(".indirect");indirectField.val(description),indirectField.data("lat",coordinates.data("lat")),indirectField.data("lon",coordinates.data("lon"));var marker=L.marker([coordinates.data("lat"),coordinates.data("lon")],{icon:L.AwesomeMarkers.icon({icon:"flag",markerColor:"orange",prefix:"fa"})}).bindPopup(containerPopup.html());thisInstance.indirectPointLayer[description]=L.featureGroup([marker]),map.addLayer(thisInstance.indirectPointLayer[description]);}),container.on("click",".removeIndirect",function(e){var currentTarget=$(e.currentTarget),container=currentTarget.closest(".indirectContainer");map.removeLayer(thisInstance.indirectPointLayer[container.find(".indirect").val()]),currentTarget.closest(".indirectContainer").remove();}),container.on("click",".moveUp",function(e){var currentTarget=$(e.currentTarget),container=currentTarget.closest(".indirectContainer"),previousElement=container.prev();previousElement.hasClass("startContainer")||previousElement.before(container);}),container.on("click",".moveDown",function(e){var currentTarget=$(e.currentTarget),container=currentTarget.closest(".indirectContainer"),nextElement=container.next();nextElement.hasClass("indirectTemplate")||nextElement.after(container);}),container.on("click",".searchInRadius",function(e){endIconLayer&&map.removeLayer(endIconLayer);var currentTarget=$(e.currentTarget),containerPopup=currentTarget.closest(".leaflet-popup-content"),coordinates=containerPopup.find(".coordinates"),progressIndicatorElement=jQuery.progressIndicator({position:container,blockInfo:{enabled:!0}}),params={module:"OpenStreetMap",action:"GetMarkers",srcModule:app.getModuleName(),radius:container.find(".radius").val(),lat:coordinates.data("lat"),lon:coordinates.data("lon"),cache:thisInstance.getCacheParamsToRequest()};params=$.extend(thisInstance.selectedParams,params),AppConnector.request(params).done(function(response){progressIndicatorElement.progressIndicator({mode:"hide"}),thisInstance.setMarkers(response.result);});});var descriptionContainer=container.find(".js-description-container");container.find(".js-calculate-route").on("click",function(){var indirectLon=[],indirectLat=[];container.find(".indirectContainer:not(.d-none) input.indirect").each(function(){var currentTarget=$(this);indirectLat.push(currentTarget.data("lat")),indirectLon.push(currentTarget.data("lon"));});var endElement=container.find(".end"),startElement=container.find(".start"),progressIndicatorElement=jQuery.progressIndicator({position:container,blockInfo:{enabled:!0}});AppConnector.request({url:"index.php",data:{module:"OpenStreetMap",action:"GetRoute",flon:startElement.data("lon"),flat:startElement.data("lat"),ilon:indirectLon,ilat:indirectLat,tlon:endElement.data("lon"),tlat:endElement.data("lat")}}).done(function(response){progressIndicatorElement.progressIndicator({mode:"hide"}),thisInstance.routeLayer&&map.removeLayer(thisInstance.routeLayer);var route=L.geoJson(response.result.geoJson);thisInstance.routeLayer=L.featureGroup([route]),map.addLayer(thisInstance.routeLayer),descriptionContainer.removeClass("d-none");var instruction=container.find(".js-instruction_block");response.result.properties.description?(instruction.removeClass("d-none"),descriptionContainer.find(".js-instruction_body").html(response.result.properties.description)):instruction.addClass("d-none"),descriptionContainer.find(".distance").html(App.Fields.Double.formatToDisplay(response.result.properties.distance)),descriptionContainer.find(".travelTime").html(App.Fields.Double.formatToDisplay(response.result.properties.traveltime/60));}).fail(function(error){progressIndicatorElement.progressIndicator({mode:"hide"}),app.showNotify({titleTrusted:!1,textTrusted:!1,title:app.vtranslate("JS_UNEXPECTED_ERROR"),text:error,type:"error"});});}),container.on("click",".setView",function(e){var currentTarget=$(e.currentTarget),inputInstance=currentTarget.closest(".input-group").find(".end,.start,.indirect"),lat=inputInstance.data("lat"),lon=inputInstance.data("lon");"undefined"==typeof lat&&"undefined"==typeof lon||map.setView(new L.LatLng(lat,lon),11);}),this.registerSearchCompany(),this.registerSearchAddress(),this.registerMyLocation();},registerModalView:function registerModalView(container){var thisInstance=this,progressIndicatorElement=jQuery.progressIndicator({position:container,blockInfo:{enabled:!0}});this.container=container,$("#mapid").css({height:$("body").height()-160}),this.registerMap([0,0],2);var params={module:"OpenStreetMap",action:"GetMarkers",srcModule:app.getModuleName()};params=$.extend(this.selectedParams,params),thisInstance.registerBasicModal(),AppConnector.request(params).done(function(response){progressIndicatorElement.progressIndicator({mode:"hide"}),thisInstance.setMarkers(response.result);});},getMarkerPopup:function getMarkerPopup(label,coordinates){return "".concat(label,"\n\t\t\t
    \n\t\t\t\n\t\t\n\t\t")},registerDetailView:function registerDetailView(container){this.container=container;var coordinates=container.find("#coordinates").val();coordinates=JSON.parse(coordinates);var startCoordinate=[0,0],startZoom=2,$map=container.find("#mapid");coordinates.length&&(startCoordinate=coordinates[0],startZoom=6),$(".mainBody").length?1e3>$(".mainBody").height()?$map.height($(".mainBody").height()-($(".detailViewTitle").height()+$(".detailViewContainer .related").height()+25)):$map.height(1e3):1e3>$(".bodyContents").height()?$map.height($(".bodyContents").height()-($(".detailViewTitle").height()+$(".detailViewContainer .related").height()+25)):$map.height(1e3);var myMap=this.registerMap(startCoordinate,startZoom),markers=L.markerClusterGroup({maxClusterRadius:10});coordinates.forEach(function(e){var marker=L.marker([e.lat,e.lon],{icon:L.AwesomeMarkers.icon({icon:"home",markerColor:"blue",prefix:"fa",iconColor:e.color})}).bindPopup(e.label);markers.addLayer(marker);}),myMap.addLayer(markers);}}); //# sourceMappingURL=Map.min.js.map diff --git a/public_html/layouts/basic/modules/OpenStreetMap/resources/Map.min.js.map b/public_html/layouts/basic/modules/OpenStreetMap/resources/Map.min.js.map index 4506c81a6c0f..92aa47b13724 100644 --- a/public_html/layouts/basic/modules/OpenStreetMap/resources/Map.min.js.map +++ b/public_html/layouts/basic/modules/OpenStreetMap/resources/Map.min.js.map @@ -1 +1 @@ -{"version":3,"file":"Map.min.js","sources":["Map.js"],"sourcesContent":["/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */\n'use strict';\n\njQuery.Class(\n\t'OpenStreetMap_Map_Js',\n\t{},\n\t{\n\t\tcontainer: false,\n\t\tmapInstance: false,\n\t\tselectedParams: false,\n\t\tlayerMarkers: false,\n\t\tmarkers: false,\n\t\tcacheMarkers: [],\n\t\tpolygonLayer: false,\n\t\trouteLayer: false,\n\t\trecordsIds: '',\n\t\tcacheLayerMarkers: {},\n\t\tindirectPointLayer: {},\n\t\tsetSelectedParams: function (params) {\n\t\t\tdelete params['view'];\n\t\t\tthis.selectedParams = params;\n\t\t},\n\t\tregisterMap: function (startCoordinate, startZoom) {\n\t\t\tlet attribution =\n\t\t\t\t'© YetiForce Map powered by Open Street Map';\n\t\t\tif (CONFIG.disableBranding) {\n\t\t\t\tattribution = '';\n\t\t\t}\n\t\t\tthis.mapInstance = L.map('mapid').setView(startCoordinate, startZoom);\n\t\t\tL.tileLayer($('.js-tile-layer-server').val(), {\n\t\t\t\tmaxZoom: 19,\n\t\t\t\tattribution: attribution\n\t\t\t}).addTo(this.mapInstance);\n\t\t\treturn this.mapInstance;\n\t\t},\n\t\tsetMarkers: function (data) {\n\t\t\tvar thisInstance = this;\n\t\t\tvar markerArray = [];\n\t\t\tvar container = this.container;\n\t\t\tvar map = this.mapInstance;\n\t\t\tif (typeof data.coordinates !== 'undefined') {\n\t\t\t\tvar markers = L.markerClusterGroup({\n\t\t\t\t\tmaxClusterRadius: 10\n\t\t\t\t});\n\t\t\t\tif (typeof this.layerMarkers !== 'boolean') {\n\t\t\t\t\tmap.removeLayer(this.layerMarkers);\n\t\t\t\t}\n\t\t\t\tvar records = [];\n\t\t\t\tdata.coordinates.forEach(function (e) {\n\t\t\t\t\tmarkerArray.push([e.lat, e.lon]);\n\t\t\t\t\tvar marker = L.marker([e.lat, e.lon], {\n\t\t\t\t\t\ticon: L.AwesomeMarkers.icon({\n\t\t\t\t\t\t\ticon: 'home',\n\t\t\t\t\t\t\tmarkerColor: 'blue',\n\t\t\t\t\t\t\tprefix: 'fa',\n\t\t\t\t\t\t\ticonColor: e.color\n\t\t\t\t\t\t})\n\t\t\t\t\t}).bindPopup(e.label);\n\t\t\t\t\tmarkers.addLayer(marker);\n\t\t\t\t\trecords.push(e.recordId);\n\t\t\t\t});\n\t\t\t\tthis.recordsIds = records;\n\t\t\t\tthis.markers = data.coordinates;\n\t\t\t\tthis.layerMarkers = markers;\n\t\t\t\tmap.addLayer(markers);\n\t\t\t}\n\t\t\tif (typeof this.polygonLayer !== 'boolean') {\n\t\t\t\tmap.removeLayer(this.polygonLayer);\n\t\t\t}\n\t\t\tif (typeof data.coordinatesCenter !== 'undefined') {\n\t\t\t\tif (typeof data.coordinatesCenter.error === 'undefined') {\n\t\t\t\t\tlet radius = container.find('.js-radius').val();\n\t\t\t\t\tmarkerArray.push([data.coordinatesCenter.lat, data.coordinatesCenter.lon]);\n\t\t\t\t\tlet marker = L.marker([data.coordinatesCenter.lat, data.coordinatesCenter.lon], {\n\t\t\t\t\t\ticon: L.AwesomeMarkers.icon({\n\t\t\t\t\t\t\ticon: 'search',\n\t\t\t\t\t\t\tmarkerColor: 'red',\n\t\t\t\t\t\t\tprefix: 'fa'\n\t\t\t\t\t\t})\n\t\t\t\t\t}).bindPopup(this.getMarkerPopup(container.find('.js-search-address').val(), data.coordinatesCenter));\n\t\t\t\t\tmap.addLayer(marker);\n\t\t\t\t\tif ($.isNumeric(radius)) {\n\t\t\t\t\t\tradius = parseInt(radius) * 1000;\n\t\t\t\t\t\tlet circle = L.circle([data.coordinatesCenter.lat, data.coordinatesCenter.lon], radius, {\n\t\t\t\t\t\t\tcolor: 'red',\n\t\t\t\t\t\t\tfillColor: '#f03',\n\t\t\t\t\t\t\tfillOpacity: 0.05\n\t\t\t\t\t\t});\n\t\t\t\t\t\tthis.polygonLayer = L.featureGroup([circle]);\n\t\t\t\t\t\tmap.addLayer(this.polygonLayer);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tVtiger_Helper_Js.showMessage({\n\t\t\t\t\t\ttitle: app.vtranslate('JS_LBL_PERMISSION'),\n\t\t\t\t\t\ttext: data.coordinatesCenter.error,\n\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (typeof data.cache !== 'undefined') {\n\t\t\t\tObject.keys(data.cache).forEach((key) => {\n\t\t\t\t\tif (typeof thisInstance.cacheLayerMarkers[key] !== 'undefined') {\n\t\t\t\t\t\tmap.removeLayer(thisInstance.cacheLayerMarkers[key]);\n\t\t\t\t\t}\n\t\t\t\t\tvar markersCache = L.markerClusterGroup({\n\t\t\t\t\t\tmaxClusterRadius: 10\n\t\t\t\t\t});\n\t\t\t\t\tlet coordinates = data.cache[key];\n\t\t\t\t\tcoordinates.forEach((e) => {\n\t\t\t\t\t\tif (thisInstance.recordsIds.indexOf(e.recordId) === -1) {\n\t\t\t\t\t\t\tmarkerArray.push([e.lat, e.lon]);\n\t\t\t\t\t\t\tvar marker = L.marker([e.lat, e.lon], {\n\t\t\t\t\t\t\t\ticon: L.AwesomeMarkers.icon({\n\t\t\t\t\t\t\t\t\ticon: 'home',\n\t\t\t\t\t\t\t\t\tmarkerColor: 'orange',\n\t\t\t\t\t\t\t\t\tprefix: 'fa',\n\t\t\t\t\t\t\t\t\ticonColor: e.color\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}).bindPopup(e.label);\n\t\t\t\t\t\t\tmarkersCache.addLayer(marker);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tthisInstance.cacheMarkers[key] = coordinates;\n\t\t\t\t\tmap.addLayer(markersCache);\n\t\t\t\t\tthisInstance.cacheLayerMarkers[key] = markersCache;\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tvar legendContainer = this.container.find('.js-legend-container');\n\t\t\tif (typeof data.legend !== 'undefined') {\n\t\t\t\tlet html = '';\n\t\t\t\tdata.legend.forEach(function (e) {\n\t\t\t\t\thtml +=\n\t\t\t\t\t\t'
    ' +\n\t\t\t\t\t\te.value +\n\t\t\t\t\t\t'
    ';\n\t\t\t\t});\n\t\t\t\tlegendContainer.html(html);\n\t\t\t} else {\n\t\t\t\tlegendContainer.html('');\n\t\t\t}\n\t\t\tif (markerArray.length) map.fitBounds(markerArray);\n\t\t\tthis.container.find('.groupNeighbours').prop('checked', true);\n\t\t},\n\t\tshowCalculateBtn: function () {\n\t\t\tvar container = this.container;\n\t\t\tvar endAddress = container.find('.end').val();\n\t\t\tvar startAddress = container.find('.start').val();\n\t\t\tif (endAddress.length > 0 && startAddress.length > 0) {\n\t\t\t\tcontainer.find('.js-calculate-route').parent().removeClass('d-none');\n\t\t\t}\n\t\t},\n\t\tregisterCacheEvents: function (container) {\n\t\t\tvar thisInstance = this;\n\t\t\tcontainer.find('.showRecordsFromCache').on('change', (e) => {\n\t\t\t\tconst currentTarget = $(e.currentTarget),\n\t\t\t\t\tmoduleName = currentTarget.data('module');\n\t\t\t\tif (currentTarget.is(':checked')) {\n\t\t\t\t\tAppConnector.request({\n\t\t\t\t\t\tmodule: 'OpenStreetMap',\n\t\t\t\t\t\taction: 'GetMarkers',\n\t\t\t\t\t\tsrcModule: app.getModuleName(),\n\t\t\t\t\t\tcache: [moduleName]\n\t\t\t\t\t}).done((response) => {\n\t\t\t\t\t\tthis.setMarkers(response.result);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tthis.mapInstance.removeLayer(this.cacheLayerMarkers[moduleName]);\n\t\t\t\t}\n\t\t\t});\n\t\t\tcontainer.find('.copyToClipboard').on('click', function () {\n\t\t\t\tvar params = {\n\t\t\t\t\tmodule: 'OpenStreetMap',\n\t\t\t\t\taction: 'ClipBoard',\n\t\t\t\t\tmode: 'save',\n\t\t\t\t\trecordIds: JSON.stringify(thisInstance.recordsIds),\n\t\t\t\t\tsrcModule: app.getModuleName()\n\t\t\t\t};\n\t\t\t\tAppConnector.request(params).done(function (response) {\n\t\t\t\t\tVtiger_Helper_Js.showMessage({\n\t\t\t\t\t\ttext: app.vtranslate('JS_NOTIFY_COPY_TEXT'),\n\t\t\t\t\t\ttype: 'success'\n\t\t\t\t\t});\n\t\t\t\t\tvar countRecords = container.find('.countRecords' + app.getModuleName());\n\t\t\t\t\tcountRecords.html(response.result);\n\t\t\t\t\tcountRecords.closest('.cacheModuleContainer').find('.js-delete-clip-board').removeClass('d-none');\n\t\t\t\t});\n\t\t\t});\n\t\t\tcontainer.find('.js-delete-clip-board').on('click', function (e) {\n\t\t\t\tvar currentTarget = $(e.currentTarget);\n\t\t\t\tvar moduleName = currentTarget.data('module');\n\t\t\t\tvar params = {\n\t\t\t\t\tmodule: 'OpenStreetMap',\n\t\t\t\t\taction: 'ClipBoard',\n\t\t\t\t\tmode: 'delete',\n\t\t\t\t\tsrcModule: moduleName\n\t\t\t\t};\n\t\t\t\tAppConnector.request(params).done(function (response) {\n\t\t\t\t\tVtiger_Helper_Js.showMessage({\n\t\t\t\t\t\ttitle: app.vtranslate('JS_LBL_PERMISSION'),\n\t\t\t\t\t\ttext: app.vtranslate('JS_SAVE_NOTIFY_OK'),\n\t\t\t\t\t\ttype: 'success'\n\t\t\t\t\t});\n\t\t\t\t\tvar countRecords = container.find('.countRecords' + moduleName);\n\t\t\t\t\tcountRecords.html('');\n\t\t\t\t\tcurrentTarget.addClass('d-none');\n\t\t\t\t\tcountRecords.closest('.cacheModuleContainer').find('.showRecordsFromCache').prop('checked', false);\n\t\t\t\t\tcountRecords.closest('.cacheModuleContainer').find('.showRecordsFromCache').trigger('change');\n\t\t\t\t});\n\t\t\t});\n\t\t\tcontainer.find('.addAllRecords').on('click', function (e) {\n\t\t\t\tvar currentTarget = $(e.currentTarget);\n\t\t\t\tvar moduleName = currentTarget.data('module');\n\t\t\t\tvar params = {\n\t\t\t\t\tmodule: 'OpenStreetMap',\n\t\t\t\t\taction: 'ClipBoard',\n\t\t\t\t\tmode: 'addAllRecords',\n\t\t\t\t\tsrcModule: moduleName\n\t\t\t\t};\n\t\t\t\tAppConnector.request(params).done(function (response) {\n\t\t\t\t\tVtiger_Helper_Js.showMessage({\n\t\t\t\t\t\ttext: app.vtranslate('JS_MESSAGE_DOWNLOADED_ADDRESS_DATA'),\n\t\t\t\t\t\ttype: 'success'\n\t\t\t\t\t});\n\t\t\t\t\tcontainer.find('.countRecords' + moduleName).html(response.result.count);\n\t\t\t\t\tvar moduleContainer = currentTarget.closest('.cacheModuleContainer');\n\t\t\t\t\tmoduleContainer.find('.showRecordsFromCache').prop('checked', true);\n\t\t\t\t\tmoduleContainer.find('.showRecordsFromCache').trigger('change');\n\t\t\t\t\tif (response.result.count != '0') moduleContainer.find('.js-delete-clip-board').removeClass('d-none');\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\tgetCacheParamsToRequest: function () {\n\t\t\tlet params = [];\n\t\t\tthis.container.find('.showRecordsFromCache').each(function () {\n\t\t\t\tvar currentObject = $(this);\n\t\t\t\tif (currentObject.is(':checked')) params.push(currentObject.data('module'));\n\t\t\t});\n\t\t\treturn params;\n\t\t},\n\t\tregisterSearchCompany: function () {\n\t\t\tconst searchValue = this.container.find('.js-search-company');\n\t\t\tconst searchModule = this.container.find('.searchModule');\n\t\t\t$.widget('custom.ivAutocomplete', $.ui.autocomplete, {\n\t\t\t\t_create: function () {\n\t\t\t\t\tthis._super();\n\t\t\t\t\tthis.widget().menu('option', 'items', '> :not(.ui-autocomplete-category)');\n\t\t\t\t},\n\t\t\t\t_renderMenu: function (ul, items) {\n\t\t\t\t\tlet that = this,\n\t\t\t\t\t\tcurrentCategory = '';\n\t\t\t\t\t$.each(items, function (_index, item) {\n\t\t\t\t\t\tlet li;\n\t\t\t\t\t\tconsole.log(item.category != currentCategory, item);\n\t\t\t\t\t\tif (item.category != currentCategory) {\n\t\t\t\t\t\t\tul.append(\"
  • \" + item.category + '
  • ');\n\t\t\t\t\t\t\tcurrentCategory = item.category;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tli = that._renderItemData(ul, item);\n\t\t\t\t\t\tif (item.category) {\n\t\t\t\t\t\t\tli.attr('aria-label', item.category + ' : ' + item.label);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\t_renderItemData: function (ul, item) {\n\t\t\t\t\treturn this._renderItem(ul, item).data('ui-autocomplete-item', item);\n\t\t\t\t},\n\t\t\t\t_renderItem: function (ul, item) {\n\t\t\t\t\treturn $('
  • ').data('item.autocomplete', item).append($('').html(item.label)).appendTo(ul);\n\t\t\t\t}\n\t\t\t});\n\t\t\tsearchValue.ivAutocomplete({\n\t\t\t\tdelay: '600',\n\t\t\t\tminLength: '3',\n\t\t\t\tsource: function (_request, response) {\n\t\t\t\t\tAppConnector.request({\n\t\t\t\t\t\tmodule: searchModule.val(),\n\t\t\t\t\t\tcurrentModule: app.getModuleName(),\n\t\t\t\t\t\tsearchModule: searchModule.val(),\n\t\t\t\t\t\tview: 'BasicAjax',\n\t\t\t\t\t\tmode: 'showSearchResults',\n\t\t\t\t\t\tvalue: searchValue.val(),\n\t\t\t\t\t\thtml: false\n\t\t\t\t\t}).done(function (responseAjax) {\n\t\t\t\t\t\tresponseAjax = JSON.parse(responseAjax);\n\t\t\t\t\t\tlet responseDataList = responseAjax.result;\n\t\t\t\t\t\tif (responseDataList.length <= 0) {\n\t\t\t\t\t\t\tresponseDataList.push({\n\t\t\t\t\t\t\t\tlabel: app.vtranslate('JS_NO_RESULTS_FOUND'),\n\t\t\t\t\t\t\t\ttype: 'no results',\n\t\t\t\t\t\t\t\tcategory: ''\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\tresponse(responseDataList);\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\tselect: (_event, ui) => {\n\t\t\t\t\tthis.recordsIds.push(ui.item.id);\n\t\t\t\t\tAppConnector.request({\n\t\t\t\t\t\tmodule: 'OpenStreetMap',\n\t\t\t\t\t\taction: 'ClipBoard',\n\t\t\t\t\t\tmode: 'addRecord',\n\t\t\t\t\t\trecord: ui.item.id,\n\t\t\t\t\t\tsrcModuleName: searchModule.val()\n\t\t\t\t\t}).done((response) => {\n\t\t\t\t\t\tif (response.result.length == 1) {\n\t\t\t\t\t\t\tlet marker = L.marker([response.result[0].lat, response.result[0].lon], {\n\t\t\t\t\t\t\t\ticon: L.AwesomeMarkers.icon({\n\t\t\t\t\t\t\t\t\ticon: 'home',\n\t\t\t\t\t\t\t\t\tmarkerColor: 'cadetblue',\n\t\t\t\t\t\t\t\t\tprefix: 'fa',\n\t\t\t\t\t\t\t\t\ticonColor: response.result[0].color\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}).bindPopup(response.result[0].label);\n\t\t\t\t\t\t\tthis.layerMarkers.addLayer(marker);\n\t\t\t\t\t\t\tthis.mapInstance.addLayer(this.layerMarkers);\n\t\t\t\t\t\t\tthis.mapInstance.setView(new L.LatLng(response.result[0].lat, response.result[0].lon), 13);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tVtiger_Helper_Js.showMessage({\n\t\t\t\t\t\t\t\ttitle: app.vtranslate('JS_LBL_PERMISSION'),\n\t\t\t\t\t\t\t\ttext: response.result,\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});\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tregisterSearchAddress: function () {\n\t\t\tconst searchValue = this.container.find('.js-search-address'),\n\t\t\t\tsearchBtn = this.container.find('.js-search-btn'),\n\t\t\t\toperator = this.container.find('.js-select-operator');\n\t\t\tif (operator.length && operator.val()) {\n\t\t\t\tsearchValue\n\t\t\t\t\t.autocomplete({\n\t\t\t\t\t\tdelay: 600,\n\t\t\t\t\t\tminLength: 3,\n\t\t\t\t\t\tsource: function (request, response) {\n\t\t\t\t\t\t\tAppConnector.request({\n\t\t\t\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\t\t\t\taction: 'Fields',\n\t\t\t\t\t\t\t\tmode: 'findAddress',\n\t\t\t\t\t\t\t\ttype: operator.val(),\n\t\t\t\t\t\t\t\tvalue: request.term\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.done(function (requestData) {\n\t\t\t\t\t\t\t\t\tif (requestData.result === false) {\n\t\t\t\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\t\t\t\ttitle: app.vtranslate('JS_ERROR'),\n\t\t\t\t\t\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t} else if (requestData.result.length) {\n\t\t\t\t\t\t\t\t\t\tresponse(requestData.result);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tresponse([{ label: app.vtranslate('JS_NO_RESULTS_FOUND'), value: '' }]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.fail(function (_textStatus, _errorThrown, jqXHR) {\n\t\t\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\t\t\ttitle: app.vtranslate('JS_ERROR'),\n\t\t\t\t\t\t\t\t\t\ttext: jqXHR.responseJSON.error.message,\n\t\t\t\t\t\t\t\t\t\ttype: 'error',\n\t\t\t\t\t\t\t\t\t\tanimation: 'show'\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\tresponse([{ label: app.vtranslate('JS_NO_RESULTS_FOUND'), value: '' }]);\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t},\n\t\t\t\t\t\tselect: (_event, ui) => {\n\t\t\t\t\t\t\tif (ui.item.coordinates) {\n\t\t\t\t\t\t\t\tlet marker = L.marker([ui.item.coordinates.lat, ui.item.coordinates.lon], {\n\t\t\t\t\t\t\t\t\ticon: L.AwesomeMarkers.icon({\n\t\t\t\t\t\t\t\t\t\ticon: 'home',\n\t\t\t\t\t\t\t\t\t\tmarkerColor: 'cadetblue',\n\t\t\t\t\t\t\t\t\t\tprefix: 'fa'\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t}).bindPopup(this.getMarkerPopup(ui.item.label, ui.item.coordinates));\n\t\t\t\t\t\t\t\tthis.layerMarkers.addLayer(marker);\n\t\t\t\t\t\t\t\tthis.mapInstance.addLayer(this.layerMarkers);\n\t\t\t\t\t\t\t\tthis.mapInstance.setView(new L.LatLng(ui.item.coordinates.lat, ui.item.coordinates.lon), 10);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tsearchValue.val(ui.item.label);\n\t\t\t\t\t\t\t\tsearchBtn.trigger('click');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\t.autocomplete('instance')._renderItem = function (ul, item) {\n\t\t\t\t\treturn $('
  • ')\n\t\t\t\t\t\t.append(`
    ${item.label}
    `)\n\t\t\t\t\t\t.appendTo(ul);\n\t\t\t\t};\n\t\t\t}\n\t\t\tthis.container.find('.js-search-address,.js-radius').on('keydown', (e) => {\n\t\t\t\tif (e.code === 'Enter') {\n\t\t\t\t\tsearchBtn.trigger('click');\n\t\t\t\t}\n\t\t\t});\n\t\t\tsearchBtn.on('click', () => {\n\t\t\t\tconst progressIndicatorElement = jQuery.progressIndicator({\n\t\t\t\t\tposition: this.container,\n\t\t\t\t\tblockInfo: {\n\t\t\t\t\t\tenabled: true\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tlet params = {\n\t\t\t\t\tmodule: 'OpenStreetMap',\n\t\t\t\t\taction: 'GetMarkers',\n\t\t\t\t\tsrcModule: app.getModuleName(),\n\t\t\t\t\tsearchValue: this.container.find('.js-search-address').val(),\n\t\t\t\t\tcache: this.getCacheParamsToRequest()\n\t\t\t\t};\n\t\t\t\tconst radiusValue = this.container.find('.js-radius').val();\n\t\t\t\tif (radiusValue !== '' && parseInt(radiusValue)) {\n\t\t\t\t\tparams['radius'] = parseInt(radiusValue);\n\t\t\t\t}\n\t\t\t\tAppConnector.request($.extend(this.selectedParams, params)).done((response) => {\n\t\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\t\tthis.setMarkers(response.result);\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\tregisterMyLocation: function () {\n\t\t\tconst locationBtn = this.container.find('.js-my-location-btn');\n\t\t\tif (!navigator.geolocation) {\n\t\t\t\tlocationBtn.addClass('d-none');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tnavigator.permissions.query({ name: 'geolocation' }).then((response) => {\n\t\t\t\tif (response.state === 'denied') {\n\t\t\t\t\tlocationBtn.addClass('d-none');\n\t\t\t\t}\n\t\t\t});\n\t\t\tlocationBtn.on('click', () => {\n\t\t\t\tnavigator.geolocation.getCurrentPosition((position) => {\n\t\t\t\t\tlet marker = L.marker([position.coords.latitude, position.coords.longitude], {\n\t\t\t\t\t\ticon: L.AwesomeMarkers.icon({\n\t\t\t\t\t\t\ticon: 'home',\n\t\t\t\t\t\t\tmarkerColor: 'cadetblue',\n\t\t\t\t\t\t\tprefix: 'fa'\n\t\t\t\t\t\t})\n\t\t\t\t\t}).bindPopup(\n\t\t\t\t\t\tthis.getMarkerPopup(locationBtn.data('label'), {\n\t\t\t\t\t\t\tlat: position.coords.latitude,\n\t\t\t\t\t\t\tlon: position.coords.longitude\n\t\t\t\t\t\t})\n\t\t\t\t\t);\n\t\t\t\t\tthis.layerMarkers.addLayer(marker);\n\t\t\t\t\tthis.mapInstance.addLayer(this.layerMarkers);\n\t\t\t\t\tthis.mapInstance.setView(new L.LatLng(position.coords.latitude, position.coords.longitude), 10);\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\tregisterBasicModal: function () {\n\t\t\tvar thisInstance = this;\n\t\t\tvar container = this.container;\n\t\t\tvar map = thisInstance.mapInstance;\n\t\t\tvar layer, description;\n\t\t\tapp.registerBlockAnimationEvent(container);\n\t\t\tthisInstance.registerCacheEvents(container);\n\t\t\tcontainer.find('.groupBy').on('click', function () {\n\t\t\t\tvar progressIndicatorElement = jQuery.progressIndicator({\n\t\t\t\t\tposition: container,\n\t\t\t\t\tblockInfo: {\n\t\t\t\t\t\tenabled: true\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tvar params = {\n\t\t\t\t\tmodule: 'OpenStreetMap',\n\t\t\t\t\taction: 'GetMarkers',\n\t\t\t\t\tsrcModule: app.getModuleName(),\n\t\t\t\t\tgroupBy: container.find('.fieldsToGroup').val(),\n\t\t\t\t\tsearchValue: container.find('.js-search-address').val(),\n\t\t\t\t\tradius: container.find('.js-radius').val(),\n\t\t\t\t\tcache: thisInstance.getCacheParamsToRequest()\n\t\t\t\t};\n\t\t\t\tparams = $.extend(thisInstance.selectedParams, params);\n\t\t\t\tAppConnector.request(params).done(function (response) {\n\t\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\t\tthisInstance.setMarkers(response.result);\n\t\t\t\t});\n\t\t\t});\n\t\t\tcontainer.find('.groupNeighbours').on('change', function (e) {\n\t\t\t\tvar currentTarget = $(e.currentTarget);\n\t\t\t\tmap.removeLayer(thisInstance.layerMarkers);\n\t\t\t\tvar markers = thisInstance.markers;\n\t\t\t\tif (currentTarget.is(':checked')) {\n\t\t\t\t\tlayer = L.markerClusterGroup({\n\t\t\t\t\t\tmaxClusterRadius: 10\n\t\t\t\t\t});\n\t\t\t\t\tmarkers.forEach(function (e) {\n\t\t\t\t\t\tvar marker = L.marker([e.lat, e.lon], {\n\t\t\t\t\t\t\ticon: L.AwesomeMarkers.icon({\n\t\t\t\t\t\t\t\ticon: 'home',\n\t\t\t\t\t\t\t\tmarkerColor: 'blue',\n\t\t\t\t\t\t\t\tprefix: 'fa',\n\t\t\t\t\t\t\t\ticonColor: e.color\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}).bindPopup(e.label);\n\t\t\t\t\t\tlayer.addLayer(marker);\n\t\t\t\t\t});\n\n\t\t\t\t\tObject.keys(thisInstance.cacheLayerMarkers).forEach(function (key) {\n\t\t\t\t\t\tmap.removeLayer(thisInstance.cacheLayerMarkers[key]);\n\t\t\t\t\t\tvar cacheLayer = L.markerClusterGroup({\n\t\t\t\t\t\t\tmaxClusterRadius: 10\n\t\t\t\t\t\t});\n\t\t\t\t\t\tthisInstance.cacheMarkers[key].forEach(function (e) {\n\t\t\t\t\t\t\tvar marker = L.marker([e.lat, e.lon], {\n\t\t\t\t\t\t\t\ticon: L.AwesomeMarkers.icon({\n\t\t\t\t\t\t\t\t\ticon: 'home',\n\t\t\t\t\t\t\t\t\tmarkerColor: 'orange',\n\t\t\t\t\t\t\t\t\tprefix: 'fa',\n\t\t\t\t\t\t\t\t\ticonColor: e.color\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}).bindPopup(e.label);\n\t\t\t\t\t\t\tcacheLayer.addLayer(marker);\n\t\t\t\t\t\t});\n\t\t\t\t\t\tthisInstance.cacheLayerMarkers[key] = cacheLayer;\n\t\t\t\t\t\tmap.addLayer(cacheLayer);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tvar markerArray = [];\n\t\t\t\t\tmarkers.forEach(function (e) {\n\t\t\t\t\t\tvar marker = L.marker([e.lat, e.lon], {\n\t\t\t\t\t\t\ticon: L.AwesomeMarkers.icon({\n\t\t\t\t\t\t\t\ticon: 'home',\n\t\t\t\t\t\t\t\tmarkerColor: 'blue',\n\t\t\t\t\t\t\t\tprefix: 'fa',\n\t\t\t\t\t\t\t\ticonColor: e.color\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}).bindPopup(e.label);\n\t\t\t\t\t\tmarkerArray.push(marker);\n\t\t\t\t\t});\n\t\t\t\t\tlayer = L.featureGroup(markerArray);\n\t\t\t\t\tObject.keys(thisInstance.cacheLayerMarkers).forEach(function (key) {\n\t\t\t\t\t\tmap.removeLayer(thisInstance.cacheLayerMarkers[key]);\n\t\t\t\t\t\tvar markerArray = [];\n\t\t\t\t\t\tthisInstance.cacheMarkers[key].forEach(function (e) {\n\t\t\t\t\t\t\tvar marker = L.marker([e.lat, e.lon], {\n\t\t\t\t\t\t\t\ticon: L.AwesomeMarkers.icon({\n\t\t\t\t\t\t\t\t\ticon: 'home',\n\t\t\t\t\t\t\t\t\tmarkerColor: 'orange',\n\t\t\t\t\t\t\t\t\tprefix: 'fa',\n\t\t\t\t\t\t\t\t\ticonColor: e.color\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}).bindPopup(e.label);\n\t\t\t\t\t\t\tmarkerArray.push(marker);\n\t\t\t\t\t\t});\n\t\t\t\t\t\tthisInstance.cacheLayerMarkers[key] = L.featureGroup(markerArray);\n\t\t\t\t\t\tmap.addLayer(thisInstance.cacheLayerMarkers[key]);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tthisInstance.layerMarkers = layer;\n\t\t\t\tmap.addLayer(layer);\n\t\t\t});\n\t\t\tvar startIconLayer = false;\n\t\t\tcontainer.on('click', '.startTrack', function (e) {\n\t\t\t\tif (startIconLayer) {\n\t\t\t\t\tmap.removeLayer(startIconLayer);\n\t\t\t\t}\n\t\t\t\tvar currentTarget = $(e.currentTarget);\n\t\t\t\tvar containerPopup = currentTarget.closest('.leaflet-popup-content');\n\t\t\t\tdescription = containerPopup.find('.description').html();\n\t\t\t\tvar startElement = container.find('.start');\n\t\t\t\tvar coordinates = containerPopup.find('.coordinates');\n\t\t\t\tdescription = description.replace(/\\/gi, ', ');\n\t\t\t\tstartElement.val(description);\n\t\t\t\tstartElement.data('lat', coordinates.data('lat'));\n\t\t\t\tstartElement.data('lon', coordinates.data('lon'));\n\t\t\t\tvar marker = L.marker([coordinates.data('lat'), coordinates.data('lon')], {\n\t\t\t\t\ticon: L.AwesomeMarkers.icon({\n\t\t\t\t\t\ticon: 'truck',\n\t\t\t\t\t\tmarkerColor: 'green',\n\t\t\t\t\t\tprefix: 'fa'\n\t\t\t\t\t})\n\t\t\t\t}).bindPopup(containerPopup.html());\n\t\t\t\tstartIconLayer = L.featureGroup([marker]);\n\t\t\t\tmap.addLayer(startIconLayer);\n\t\t\t\tthisInstance.showCalculateBtn();\n\t\t\t});\n\t\t\tvar endIconLayer = false;\n\t\t\tcontainer.on('click', '.endTrack', function (e) {\n\t\t\t\tif (endIconLayer) {\n\t\t\t\t\tmap.removeLayer(endIconLayer);\n\t\t\t\t}\n\t\t\t\tvar currentTarget = $(e.currentTarget);\n\t\t\t\tvar containerPopup = currentTarget.closest('.leaflet-popup-content');\n\t\t\t\tdescription = containerPopup.find('.description').html();\n\t\t\t\tvar endElement = container.find('.end');\n\t\t\t\tvar coordinates = containerPopup.find('.coordinates');\n\t\t\t\tdescription = description.replace(/\\/gi, ', ');\n\t\t\t\tendElement.val(description);\n\t\t\t\tendElement.data('lat', coordinates.data('lat'));\n\t\t\t\tendElement.data('lon', coordinates.data('lon'));\n\t\t\t\tvar marker = L.marker([coordinates.data('lat'), coordinates.data('lon')], {\n\t\t\t\t\ticon: L.AwesomeMarkers.icon({\n\t\t\t\t\t\ticon: 'flag-checkered',\n\t\t\t\t\t\tmarkerColor: 'red',\n\t\t\t\t\t\tprefix: 'fa'\n\t\t\t\t\t})\n\t\t\t\t}).bindPopup(containerPopup.html());\n\t\t\t\tendIconLayer = L.featureGroup([marker]);\n\t\t\t\tmap.addLayer(endIconLayer);\n\t\t\t\tthisInstance.showCalculateBtn();\n\t\t\t});\n\n\t\t\tcontainer.on('click', '.indirectPoint', function (e) {\n\t\t\t\tvar currentTarget = $(e.currentTarget);\n\t\t\t\tvar containerPopup = currentTarget.closest('.leaflet-popup-content');\n\t\t\t\tdescription = containerPopup.find('.description').html();\n\t\t\t\tvar template = container.find('.indirectTemplate');\n\t\t\t\tvar indirect = template.clone();\n\t\t\t\ttemplate.before(indirect);\n\t\t\t\tindirect.removeClass('indirectTemplate');\n\t\t\t\tindirect.removeClass('d-none');\n\t\t\t\tvar coordinates = containerPopup.find('.coordinates');\n\t\t\t\tdescription = description.replace(/\\/gi, ', ');\n\t\t\t\tif (typeof thisInstance.indirectPointLayer[description] !== 'undefined') {\n\t\t\t\t\tmap.removeLayer(thisInstance.indirectPointLayer[description]);\n\t\t\t\t}\n\t\t\t\tvar indirectField = indirect.find('.indirect');\n\t\t\t\tindirectField.val(description);\n\t\t\t\tindirectField.data('lat', coordinates.data('lat'));\n\t\t\t\tindirectField.data('lon', coordinates.data('lon'));\n\t\t\t\tvar marker = L.marker([coordinates.data('lat'), coordinates.data('lon')], {\n\t\t\t\t\ticon: L.AwesomeMarkers.icon({\n\t\t\t\t\t\ticon: 'flag',\n\t\t\t\t\t\tmarkerColor: 'orange',\n\t\t\t\t\t\tprefix: 'fa'\n\t\t\t\t\t})\n\t\t\t\t}).bindPopup(containerPopup.html());\n\t\t\t\tthisInstance.indirectPointLayer[description] = L.featureGroup([marker]);\n\t\t\t\tmap.addLayer(thisInstance.indirectPointLayer[description]);\n\t\t\t});\n\t\t\tcontainer.on('click', '.removeIndirect', function (e) {\n\t\t\t\tvar currentTarget = $(e.currentTarget);\n\t\t\t\tvar container = currentTarget.closest('.indirectContainer');\n\t\t\t\tmap.removeLayer(thisInstance.indirectPointLayer[container.find('.indirect').val()]);\n\t\t\t\tcurrentTarget.closest('.indirectContainer').remove();\n\t\t\t});\n\t\t\tcontainer.on('click', '.moveUp', function (e) {\n\t\t\t\tvar currentTarget = $(e.currentTarget);\n\t\t\t\tvar container = currentTarget.closest('.indirectContainer');\n\t\t\t\tvar previousElement = container.prev();\n\t\t\t\tif (!previousElement.hasClass('startContainer')) {\n\t\t\t\t\tpreviousElement.before(container);\n\t\t\t\t}\n\t\t\t});\n\t\t\tcontainer.on('click', '.moveDown', function (e) {\n\t\t\t\tvar currentTarget = $(e.currentTarget);\n\t\t\t\tvar container = currentTarget.closest('.indirectContainer');\n\t\t\t\tvar nextElement = container.next();\n\t\t\t\tif (!nextElement.hasClass('indirectTemplate')) {\n\t\t\t\t\tnextElement.after(container);\n\t\t\t\t}\n\t\t\t});\n\t\t\tcontainer.on('click', '.searchInRadius', function (e) {\n\t\t\t\tif (endIconLayer) {\n\t\t\t\t\tmap.removeLayer(endIconLayer);\n\t\t\t\t}\n\t\t\t\tvar currentTarget = $(e.currentTarget);\n\t\t\t\tvar containerPopup = currentTarget.closest('.leaflet-popup-content');\n\t\t\t\tvar coordinates = containerPopup.find('.coordinates');\n\t\t\t\tvar progressIndicatorElement = jQuery.progressIndicator({\n\t\t\t\t\tposition: container,\n\t\t\t\t\tblockInfo: {\n\t\t\t\t\t\tenabled: true\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tvar params = {\n\t\t\t\t\tmodule: 'OpenStreetMap',\n\t\t\t\t\taction: 'GetMarkers',\n\t\t\t\t\tsrcModule: app.getModuleName(),\n\t\t\t\t\tradius: container.find('.radius').val(),\n\t\t\t\t\tlat: coordinates.data('lat'),\n\t\t\t\t\tlon: coordinates.data('lon'),\n\t\t\t\t\tcache: thisInstance.getCacheParamsToRequest()\n\t\t\t\t};\n\t\t\t\tparams = $.extend(thisInstance.selectedParams, params);\n\t\t\t\tAppConnector.request(params).done(function (response) {\n\t\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\t\tthisInstance.setMarkers(response.result);\n\t\t\t\t});\n\t\t\t});\n\t\t\tconst descriptionContainer = container.find('.js-description-container');\n\t\t\tcontainer.find('.js-calculate-route').on('click', function () {\n\t\t\t\tlet indirectLon = [];\n\t\t\t\tlet indirectLat = [];\n\t\t\t\tcontainer.find('.indirectContainer:not(.d-none) input.indirect').each(function () {\n\t\t\t\t\tlet currentTarget = $(this);\n\t\t\t\t\tindirectLat.push(currentTarget.data('lat'));\n\t\t\t\t\tindirectLon.push(currentTarget.data('lon'));\n\t\t\t\t});\n\t\t\t\tlet endElement = container.find('.end');\n\t\t\t\tlet startElement = container.find('.start');\n\t\t\t\tlet progressIndicatorElement = jQuery.progressIndicator({\n\t\t\t\t\tposition: container,\n\t\t\t\t\tblockInfo: {\n\t\t\t\t\t\tenabled: true\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tAppConnector.request({\n\t\t\t\t\turl: 'index.php',\n\t\t\t\t\tdata: {\n\t\t\t\t\t\tmodule: 'OpenStreetMap',\n\t\t\t\t\t\taction: 'GetRoute',\n\t\t\t\t\t\tflon: startElement.data('lon'),\n\t\t\t\t\t\tflat: startElement.data('lat'),\n\t\t\t\t\t\tilon: indirectLon,\n\t\t\t\t\t\tilat: indirectLat,\n\t\t\t\t\t\ttlon: endElement.data('lon'),\n\t\t\t\t\t\ttlat: endElement.data('lat')\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t\t.done(function (response) {\n\t\t\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\tif (thisInstance.routeLayer) {\n\t\t\t\t\t\t\tmap.removeLayer(thisInstance.routeLayer);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlet route = L.geoJson(response.result.geoJson);\n\t\t\t\t\t\tthisInstance.routeLayer = L.featureGroup([route]);\n\t\t\t\t\t\tmap.addLayer(thisInstance.routeLayer);\n\t\t\t\t\t\tdescriptionContainer.removeClass('d-none');\n\t\t\t\t\t\tconst instruction = container.find('.js-instruction_block');\n\t\t\t\t\t\tif (response.result.properties.description) {\n\t\t\t\t\t\t\tinstruction.removeClass('d-none');\n\t\t\t\t\t\t\tdescriptionContainer.find('.js-instruction_body').html(response.result.properties.description);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tinstruction.addClass('d-none');\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdescriptionContainer\n\t\t\t\t\t\t\t.find('.distance')\n\t\t\t\t\t\t\t.html(App.Fields.Double.formatToDisplay(response.result.properties.distance));\n\t\t\t\t\t\tdescriptionContainer\n\t\t\t\t\t\t\t.find('.travelTime')\n\t\t\t\t\t\t\t.html(App.Fields.Double.formatToDisplay(response.result.properties.traveltime / 60));\n\t\t\t\t\t})\n\t\t\t\t\t.fail(function (error, title) {\n\t\t\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\ttitleTrusted: false,\n\t\t\t\t\t\t\ttextTrusted: false,\n\t\t\t\t\t\t\ttitle: app.vtranslate('JS_UNEXPECTED_ERROR'),\n\t\t\t\t\t\t\ttext: error,\n\t\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t});\n\t\t\tcontainer.on('click', '.setView', function (e) {\n\t\t\t\tlet currentTarget = $(e.currentTarget);\n\t\t\t\tlet inputInstance = currentTarget.closest('.input-group').find('.end,.start,.indirect');\n\t\t\t\tlet lat = inputInstance.data('lat');\n\t\t\t\tlet lon = inputInstance.data('lon');\n\t\t\t\tif (!(typeof lat === 'undefined' && typeof lon === 'undefined')) {\n\t\t\t\t\tmap.setView(new L.LatLng(lat, lon), 11);\n\t\t\t\t}\n\t\t\t});\n\t\t\tthis.registerSearchCompany();\n\t\t\tthis.registerSearchAddress();\n\t\t\tthis.registerMyLocation();\n\t\t},\n\t\tregisterModalView: function (container) {\n\t\t\tlet thisInstance = this;\n\t\t\tlet progressIndicatorElement = jQuery.progressIndicator({\n\t\t\t\tposition: container,\n\t\t\t\tblockInfo: {\n\t\t\t\t\tenabled: true\n\t\t\t\t}\n\t\t\t});\n\t\t\tthis.container = container;\n\t\t\t$('#mapid').css({\n\t\t\t\theight: $('body').height() - 160\n\t\t\t});\n\t\t\tthis.registerMap([0, 0], 2);\n\t\t\tlet params = {\n\t\t\t\tmodule: 'OpenStreetMap',\n\t\t\t\taction: 'GetMarkers',\n\t\t\t\tsrcModule: app.getModuleName()\n\t\t\t};\n\t\t\tparams = $.extend(this.selectedParams, params);\n\t\t\tthisInstance.registerBasicModal();\n\t\t\tAppConnector.request(params).done(function (response) {\n\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\tthisInstance.setMarkers(response.result);\n\t\t\t});\n\t\t},\n\t\tgetMarkerPopup: function (label, coordinates) {\n\t\t\treturn `${label}\n\t\t\t
    \n\t\t\t\n\t\t\n\t\t`;\n\t\t},\n\t\tregisterDetailView: function (container) {\n\t\t\tthis.container = container;\n\t\t\tvar coordinates = container.find('#coordinates').val();\n\t\t\tcoordinates = JSON.parse(coordinates);\n\t\t\tvar startCoordinate = [0, 0];\n\t\t\tvar startZoom = 2;\n\t\t\tvar $map = container.find('#mapid');\n\t\t\tif (coordinates.length) {\n\t\t\t\tstartCoordinate = coordinates[0];\n\t\t\t\tstartZoom = 6;\n\t\t\t}\n\t\t\tif ($('.mainBody').length) {\n\t\t\t\tif ($('.mainBody').height() < 1000) {\n\t\t\t\t\t$map.height(\n\t\t\t\t\t\t$('.mainBody').height() -\n\t\t\t\t\t\t\t($('.detailViewTitle').height() + $('.detailViewContainer .related').height() + 25)\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\t$map.height(1000);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($('.bodyContents').height() < 1000) {\n\t\t\t\t\t$map.height(\n\t\t\t\t\t\t$('.bodyContents').height() -\n\t\t\t\t\t\t\t($('.detailViewTitle').height() + $('.detailViewContainer .related').height() + 25)\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\t$map.height(1000);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar myMap = this.registerMap(startCoordinate, startZoom);\n\t\t\tvar markers = L.markerClusterGroup({\n\t\t\t\tmaxClusterRadius: 10\n\t\t\t});\n\t\t\tcoordinates.forEach(function (e) {\n\t\t\t\tvar marker = L.marker([e.lat, e.lon], {\n\t\t\t\t\ticon: L.AwesomeMarkers.icon({\n\t\t\t\t\t\ticon: 'home',\n\t\t\t\t\t\tmarkerColor: 'blue',\n\t\t\t\t\t\tprefix: 'fa',\n\t\t\t\t\t\ticonColor: e.color\n\t\t\t\t\t})\n\t\t\t\t}).bindPopup(e.label);\n\t\t\t\tmarkers.addLayer(marker);\n\t\t\t});\n\t\t\tmyMap.addLayer(markers);\n\t\t}\n\t}\n);\n"],"names":["jQuery","Class","container","mapInstance","selectedParams","layerMarkers","markers","cacheMarkers","polygonLayer","routeLayer","recordsIds","cacheLayerMarkers","indirectPointLayer","setSelectedParams","params","registerMap","startCoordinate","startZoom","disableBranding","attribution","L","map","setView","tileLayer","$","val","maxZoom","addTo","setMarkers","data","thisInstance","markerArray","coordinates","markerClusterGroup","maxClusterRadius","removeLayer","records","forEach","e","push","lat","lon","marker","icon","AwesomeMarkers","markerColor","prefix","iconColor","color","bindPopup","label","addLayer","recordId","coordinatesCenter","error","radius","find","getMarkerPopup","isNumeric","parseInt","circle","fillColor","fillOpacity","featureGroup","Vtiger_Helper_Js","showMessage","title","app","vtranslate","text","type","cache","Object","keys","key","markersCache","indexOf","legend","html","value","legendContainer","length","fitBounds","prop","showCalculateBtn","endAddress","startAddress","parent","removeClass","registerCacheEvents","on","currentTarget","moduleName","is","AppConnector","request","module","action","srcModule","getModuleName","done","response","result","mode","recordIds","JSON","stringify","countRecords","closest","addClass","trigger","count","moduleContainer","getCacheParamsToRequest","each","currentObject","registerSearchCompany","searchValue","searchModule","widget","ui","autocomplete","_create","_super","menu","_renderMenu","ul","items","that","currentCategory","_index","item","li","console","log","category","append","_renderItemData","attr","_renderItem","appendTo","ivAutocomplete","delay","minLength","source","_request","currentModule","view","responseAjax","parse","responseDataList","select","_event","id","record","srcModuleName","LatLng","registerSearchAddress","searchBtn","operator","term","requestData","showNotify","fail","_textStatus","_errorThrown","jqXHR","responseJSON","message","animation","countryCode","code","progressIndicatorElement","progressIndicator","position","blockInfo","enabled","radiusValue","extend","registerMyLocation","locationBtn","geolocation","navigator","permissions","query","name","then","state","getCurrentPosition","coords","latitude","longitude","registerBasicModal","layer","description","registerBlockAnimationEvent","groupBy","cacheLayer","startIconLayer","containerPopup","startElement","replace","endIconLayer","endElement","indirect","template","clone","before","indirectField","remove","previousElement","prev","hasClass","nextElement","next","after","indirectLat","indirectLon","url","flon","flat","ilon","ilat","tlon","tlat","geoJson","route","descriptionContainer","properties","instruction","App","Fields","Double","formatToDisplay","distance","traveltime","titleTrusted","textTrusted","inputInstance","registerModalView","css","height","registerDetailView","$map","myMap"],"mappings":";;AAAA,kKACA,aAEAA,MAAM,CAACC,KAAP,CACC,sBADD,CAEC,EAFD,CAGC,CACCC,SAAS,CADV,CAAA,CAAA,CAECC,WAAW,CAFZ,CAAA,CAAA,CAGCC,cAAc,CAHf,CAAA,CAAA,CAICC,YAAY,CAAA,CAAA,CAJb,CAKCC,OAAO,CAAA,CAAA,CALR,CAMCC,YAAY,CAAE,EANf,CAOCC,YAAY,CAAA,CAAA,CAPb,CAQCC,UAAU,CAAA,CAAA,CARX,CAS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nB,EArBmC,CAsBtCE,IAAI,CAACF,MAAL,CACCzN,CAAC,CAAC,eAAD,CAAD,CAAmByN,MAAnB,IACEzN,CAAC,CAAC,kBAAD,CAAD,CAAsByN,MAAtB,EAAA,CAAiCzN,CAAC,CAAC,+BAAD,CAAD,CAAmCyN,MAAnC,EAAjC,CAA+E,EADjF,CADD,CAtBsC,CA2BtCE,IAAI,CAACF,MAAL,CAAY,GAAZ,CA3BsC,KA+B/B,KAAA,CAAG,KAAKlO,WAAL,CAAiBC,eAAjB,CAAkCC,SAAlC,CA/B4B,CAgCpCX,OAAO,CAAGc,CAAC,CAACa,kBAAF,CAAqB,CAClCC,gBAAgB,CAAE,EADgB,CAArB,CAhC0B,CAmCxCF,WAAW,CAACK,OAAZ,CAAoB,SAAUC,CAAV,CAAa,CAChC,IAAU,MAAA,CAAGlB,CAAC,CAACsB,MAAF,CAAS,CAACJ,CAAC,CAACE,GAAH,CAAQF,CAAC,CAACG,GAAV,CAAT,CAAyB,CACrCE,IAAI,CAAEvB,CAAC,CAACwB,cAAF,CAAiBD,IAAjB,CAAsB,CAC3BA,IAAI,CAAE,MADqB,CAE3BE,WAAW,CAAE,MAFc,CAG3BC,MAAM,CAAE,IAHmB,CAI3BC,SAAS,CAAET,CAAC,CAACU,KAJc,CAAtB,CAD+B,CAAzB,CAOVC,CAAAA,SAPU,CAOAX,CAAC,CAACY,KAPF,CAAb,CAQA5C,OAAO,CAAC6C,QAAR,CAAiBT,MAAjB,EACA,CAVD,CAnCwC,CA8CxC0M,KAAK,CAACjM,QAAN,CAAe7C,OAAf,EACA,CAp0BF,CAHD;;"} \ No newline at end of file +{"version":3,"file":"Map.min.js","sources":["Map.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\njQuery.Class(\n\t'OpenStreetMap_Map_Js',\n\t{},\n\t{\n\t\tcontainer: false,\n\t\tmapInstance: false,\n\t\tselectedParams: false,\n\t\tlayerMarkers: false,\n\t\tmarkers: false,\n\t\tcacheMarkers: [],\n\t\tpolygonLayer: false,\n\t\trouteLayer: false,\n\t\trecordsIds: '',\n\t\tcacheLayerMarkers: {},\n\t\tindirectPointLayer: {},\n\t\tsetSelectedParams: function (params) {\n\t\t\tdelete params['view'];\n\t\t\tthis.selectedParams = params;\n\t\t},\n\t\tregisterMap: function (startCoordinate, startZoom) {\n\t\t\tlet attribution =\n\t\t\t\t'© YetiForce Map powered by Open Street Map';\n\t\t\tif (CONFIG.disableBranding) {\n\t\t\t\tattribution = '';\n\t\t\t}\n\t\t\tthis.mapInstance = L.map('mapid').setView(startCoordinate, startZoom);\n\t\t\tL.tileLayer($('.js-tile-layer-server').val(), {\n\t\t\t\tmaxZoom: 19,\n\t\t\t\tattribution: attribution\n\t\t\t}).addTo(this.mapInstance);\n\t\t\treturn this.mapInstance;\n\t\t},\n\t\tsetMarkers: function (data) {\n\t\t\tvar thisInstance = this;\n\t\t\tvar markerArray = [];\n\t\t\tvar container = this.container;\n\t\t\tvar map = this.mapInstance;\n\t\t\tif (typeof data.coordinates !== 'undefined') {\n\t\t\t\tvar markers = L.markerClusterGroup({\n\t\t\t\t\tmaxClusterRadius: 10\n\t\t\t\t});\n\t\t\t\tif (typeof this.layerMarkers !== 'boolean') {\n\t\t\t\t\tmap.removeLayer(this.layerMarkers);\n\t\t\t\t}\n\t\t\t\tvar records = [];\n\t\t\t\tdata.coordinates.forEach(function (e) {\n\t\t\t\t\tmarkerArray.push([e.lat, e.lon]);\n\t\t\t\t\tvar marker = L.marker([e.lat, e.lon], {\n\t\t\t\t\t\ticon: L.AwesomeMarkers.icon({\n\t\t\t\t\t\t\ticon: 'home',\n\t\t\t\t\t\t\tmarkerColor: 'blue',\n\t\t\t\t\t\t\tprefix: 'fa',\n\t\t\t\t\t\t\ticonColor: e.color\n\t\t\t\t\t\t})\n\t\t\t\t\t}).bindPopup(e.label);\n\t\t\t\t\tmarkers.addLayer(marker);\n\t\t\t\t\trecords.push(e.recordId);\n\t\t\t\t});\n\t\t\t\tthis.recordsIds = records;\n\t\t\t\tthis.markers = data.coordinates;\n\t\t\t\tthis.layerMarkers = markers;\n\t\t\t\tmap.addLayer(markers);\n\t\t\t}\n\t\t\tif (typeof this.polygonLayer !== 'boolean') {\n\t\t\t\tmap.removeLayer(this.polygonLayer);\n\t\t\t}\n\t\t\tif (typeof data.coordinatesCenter !== 'undefined') {\n\t\t\t\tif (typeof data.coordinatesCenter.error === 'undefined') {\n\t\t\t\t\tlet radius = container.find('.js-radius').val();\n\t\t\t\t\tmarkerArray.push([data.coordinatesCenter.lat, data.coordinatesCenter.lon]);\n\t\t\t\t\tlet marker = L.marker([data.coordinatesCenter.lat, data.coordinatesCenter.lon], {\n\t\t\t\t\t\ticon: L.AwesomeMarkers.icon({\n\t\t\t\t\t\t\ticon: 'search',\n\t\t\t\t\t\t\tmarkerColor: 'red',\n\t\t\t\t\t\t\tprefix: 'fa'\n\t\t\t\t\t\t})\n\t\t\t\t\t}).bindPopup(this.getMarkerPopup(container.find('.js-search-address').val(), data.coordinatesCenter));\n\t\t\t\t\tmap.addLayer(marker);\n\t\t\t\t\tif ($.isNumeric(radius)) {\n\t\t\t\t\t\tradius = parseInt(radius) * 1000;\n\t\t\t\t\t\tlet circle = L.circle([data.coordinatesCenter.lat, data.coordinatesCenter.lon], radius, {\n\t\t\t\t\t\t\tcolor: 'red',\n\t\t\t\t\t\t\tfillColor: '#f03',\n\t\t\t\t\t\t\tfillOpacity: 0.05\n\t\t\t\t\t\t});\n\t\t\t\t\t\tthis.polygonLayer = L.featureGroup([circle]);\n\t\t\t\t\t\tmap.addLayer(this.polygonLayer);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tVtiger_Helper_Js.showMessage({\n\t\t\t\t\t\ttitle: app.vtranslate('JS_LBL_PERMISSION'),\n\t\t\t\t\t\ttext: data.coordinatesCenter.error,\n\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (typeof data.cache !== 'undefined') {\n\t\t\t\tObject.keys(data.cache).forEach((key) => {\n\t\t\t\t\tif (typeof thisInstance.cacheLayerMarkers[key] !== 'undefined') {\n\t\t\t\t\t\tmap.removeLayer(thisInstance.cacheLayerMarkers[key]);\n\t\t\t\t\t}\n\t\t\t\t\tvar markersCache = L.markerClusterGroup({\n\t\t\t\t\t\tmaxClusterRadius: 10\n\t\t\t\t\t});\n\t\t\t\t\tlet coordinates = data.cache[key];\n\t\t\t\t\tcoordinates.forEach((e) => {\n\t\t\t\t\t\tif (thisInstance.recordsIds.indexOf(e.recordId) === -1) {\n\t\t\t\t\t\t\tmarkerArray.push([e.lat, e.lon]);\n\t\t\t\t\t\t\tvar marker = L.marker([e.lat, e.lon], {\n\t\t\t\t\t\t\t\ticon: L.AwesomeMarkers.icon({\n\t\t\t\t\t\t\t\t\ticon: 'home',\n\t\t\t\t\t\t\t\t\tmarkerColor: 'orange',\n\t\t\t\t\t\t\t\t\tprefix: 'fa',\n\t\t\t\t\t\t\t\t\ticonColor: e.color\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}).bindPopup(e.label);\n\t\t\t\t\t\t\tmarkersCache.addLayer(marker);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tthisInstance.cacheMarkers[key] = coordinates;\n\t\t\t\t\tmap.addLayer(markersCache);\n\t\t\t\t\tthisInstance.cacheLayerMarkers[key] = markersCache;\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tvar legendContainer = this.container.find('.js-legend-container');\n\t\t\tif (typeof data.legend !== 'undefined') {\n\t\t\t\tlet html = '';\n\t\t\t\tdata.legend.forEach(function (e) {\n\t\t\t\t\thtml +=\n\t\t\t\t\t\t'
    ' +\n\t\t\t\t\t\te.value +\n\t\t\t\t\t\t'
    ';\n\t\t\t\t});\n\t\t\t\tlegendContainer.html(html);\n\t\t\t} else {\n\t\t\t\tlegendContainer.html('');\n\t\t\t}\n\t\t\tif (markerArray.length) map.fitBounds(markerArray);\n\t\t\tthis.container.find('.groupNeighbours').prop('checked', true);\n\t\t},\n\t\tshowCalculateBtn: function () {\n\t\t\tvar container = this.container;\n\t\t\tvar endAddress = container.find('.end').val();\n\t\t\tvar startAddress = container.find('.start').val();\n\t\t\tif (endAddress.length > 0 && startAddress.length > 0) {\n\t\t\t\tcontainer.find('.js-calculate-route').parent().removeClass('d-none');\n\t\t\t}\n\t\t},\n\t\tregisterCacheEvents: function (container) {\n\t\t\tvar thisInstance = this;\n\t\t\tcontainer.find('.showRecordsFromCache').on('change', (e) => {\n\t\t\t\tconst currentTarget = $(e.currentTarget),\n\t\t\t\t\tmoduleName = currentTarget.data('module');\n\t\t\t\tif (currentTarget.is(':checked')) {\n\t\t\t\t\tAppConnector.request({\n\t\t\t\t\t\tmodule: 'OpenStreetMap',\n\t\t\t\t\t\taction: 'GetMarkers',\n\t\t\t\t\t\tsrcModule: app.getModuleName(),\n\t\t\t\t\t\tcache: [moduleName]\n\t\t\t\t\t}).done((response) => {\n\t\t\t\t\t\tthis.setMarkers(response.result);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tthis.mapInstance.removeLayer(this.cacheLayerMarkers[moduleName]);\n\t\t\t\t}\n\t\t\t});\n\t\t\tcontainer.find('.copyToClipboard').on('click', function () {\n\t\t\t\tvar params = {\n\t\t\t\t\tmodule: 'OpenStreetMap',\n\t\t\t\t\taction: 'ClipBoard',\n\t\t\t\t\tmode: 'save',\n\t\t\t\t\trecordIds: JSON.stringify(thisInstance.recordsIds),\n\t\t\t\t\tsrcModule: app.getModuleName()\n\t\t\t\t};\n\t\t\t\tAppConnector.request(params).done(function (response) {\n\t\t\t\t\tVtiger_Helper_Js.showMessage({\n\t\t\t\t\t\ttext: app.vtranslate('JS_NOTIFY_COPY_TEXT'),\n\t\t\t\t\t\ttype: 'success'\n\t\t\t\t\t});\n\t\t\t\t\tvar countRecords = container.find('.countRecords' + app.getModuleName());\n\t\t\t\t\tcountRecords.html(response.result);\n\t\t\t\t\tcountRecords.closest('.cacheModuleContainer').find('.js-delete-clip-board').removeClass('d-none');\n\t\t\t\t});\n\t\t\t});\n\t\t\tcontainer.find('.js-delete-clip-board').on('click', function (e) {\n\t\t\t\tvar currentTarget = $(e.currentTarget);\n\t\t\t\tvar moduleName = currentTarget.data('module');\n\t\t\t\tvar params = {\n\t\t\t\t\tmodule: 'OpenStreetMap',\n\t\t\t\t\taction: 'ClipBoard',\n\t\t\t\t\tmode: 'delete',\n\t\t\t\t\tsrcModule: moduleName\n\t\t\t\t};\n\t\t\t\tAppConnector.request(params).done(function (response) {\n\t\t\t\t\tVtiger_Helper_Js.showMessage({\n\t\t\t\t\t\ttitle: app.vtranslate('JS_LBL_PERMISSION'),\n\t\t\t\t\t\ttext: app.vtranslate('JS_SAVE_NOTIFY_OK'),\n\t\t\t\t\t\ttype: 'success'\n\t\t\t\t\t});\n\t\t\t\t\tvar countRecords = container.find('.countRecords' + moduleName);\n\t\t\t\t\tcountRecords.html('');\n\t\t\t\t\tcurrentTarget.addClass('d-none');\n\t\t\t\t\tcountRecords.closest('.cacheModuleContainer').find('.showRecordsFromCache').prop('checked', false);\n\t\t\t\t\tcountRecords.closest('.cacheModuleContainer').find('.showRecordsFromCache').trigger('change');\n\t\t\t\t});\n\t\t\t});\n\t\t\tcontainer.find('.addAllRecords').on('click', function (e) {\n\t\t\t\tvar currentTarget = $(e.currentTarget);\n\t\t\t\tvar moduleName = currentTarget.data('module');\n\t\t\t\tvar params = {\n\t\t\t\t\tmodule: 'OpenStreetMap',\n\t\t\t\t\taction: 'ClipBoard',\n\t\t\t\t\tmode: 'addAllRecords',\n\t\t\t\t\tsrcModule: moduleName\n\t\t\t\t};\n\t\t\t\tAppConnector.request(params).done(function (response) {\n\t\t\t\t\tVtiger_Helper_Js.showMessage({\n\t\t\t\t\t\ttext: app.vtranslate('JS_MESSAGE_DOWNLOADED_ADDRESS_DATA'),\n\t\t\t\t\t\ttype: 'success'\n\t\t\t\t\t});\n\t\t\t\t\tcontainer.find('.countRecords' + moduleName).html(response.result.count);\n\t\t\t\t\tvar moduleContainer = currentTarget.closest('.cacheModuleContainer');\n\t\t\t\t\tmoduleContainer.find('.showRecordsFromCache').prop('checked', true);\n\t\t\t\t\tmoduleContainer.find('.showRecordsFromCache').trigger('change');\n\t\t\t\t\tif (response.result.count != '0') moduleContainer.find('.js-delete-clip-board').removeClass('d-none');\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\tgetCacheParamsToRequest: function () {\n\t\t\tlet params = [];\n\t\t\tthis.container.find('.showRecordsFromCache').each(function () {\n\t\t\t\tvar currentObject = $(this);\n\t\t\t\tif (currentObject.is(':checked')) params.push(currentObject.data('module'));\n\t\t\t});\n\t\t\treturn params;\n\t\t},\n\t\tregisterSearchCompany: function () {\n\t\t\tconst searchValue = this.container.find('.js-search-company');\n\t\t\tconst searchModule = this.container.find('.searchModule');\n\t\t\t$.widget('custom.ivAutocomplete', $.ui.autocomplete, {\n\t\t\t\t_create: function () {\n\t\t\t\t\tthis._super();\n\t\t\t\t\tthis.widget().menu('option', 'items', '> :not(.ui-autocomplete-category)');\n\t\t\t\t},\n\t\t\t\t_renderMenu: function (ul, items) {\n\t\t\t\t\tlet that = this,\n\t\t\t\t\t\tcurrentCategory = '';\n\t\t\t\t\t$.each(items, function (_index, item) {\n\t\t\t\t\t\tlet li;\n\t\t\t\t\t\tconsole.log(item.category != currentCategory, item);\n\t\t\t\t\t\tif (item.category != currentCategory) {\n\t\t\t\t\t\t\tul.append(\"
  • \" + item.category + '
  • ');\n\t\t\t\t\t\t\tcurrentCategory = item.category;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tli = that._renderItemData(ul, item);\n\t\t\t\t\t\tif (item.category) {\n\t\t\t\t\t\t\tli.attr('aria-label', item.category + ' : ' + item.label);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\t_renderItemData: function (ul, item) {\n\t\t\t\t\treturn this._renderItem(ul, item).data('ui-autocomplete-item', item);\n\t\t\t\t},\n\t\t\t\t_renderItem: function (ul, item) {\n\t\t\t\t\treturn $('
  • ').data('item.autocomplete', item).append($('').html(item.label)).appendTo(ul);\n\t\t\t\t}\n\t\t\t});\n\t\t\tsearchValue.ivAutocomplete({\n\t\t\t\tdelay: '600',\n\t\t\t\tminLength: '3',\n\t\t\t\tsource: function (_request, response) {\n\t\t\t\t\tAppConnector.request({\n\t\t\t\t\t\tmodule: searchModule.val(),\n\t\t\t\t\t\tcurrentModule: app.getModuleName(),\n\t\t\t\t\t\tsearchModule: searchModule.val(),\n\t\t\t\t\t\tview: 'BasicAjax',\n\t\t\t\t\t\tmode: 'showSearchResults',\n\t\t\t\t\t\tvalue: searchValue.val(),\n\t\t\t\t\t\thtml: false\n\t\t\t\t\t}).done(function (responseAjax) {\n\t\t\t\t\t\tresponseAjax = JSON.parse(responseAjax);\n\t\t\t\t\t\tlet responseDataList = responseAjax.result;\n\t\t\t\t\t\tif (responseDataList.length <= 0) {\n\t\t\t\t\t\t\tresponseDataList.push({\n\t\t\t\t\t\t\t\tlabel: app.vtranslate('JS_NO_RESULTS_FOUND'),\n\t\t\t\t\t\t\t\ttype: 'no results',\n\t\t\t\t\t\t\t\tcategory: ''\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\tresponse(responseDataList);\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\tselect: (_event, ui) => {\n\t\t\t\t\tthis.recordsIds.push(ui.item.id);\n\t\t\t\t\tAppConnector.request({\n\t\t\t\t\t\tmodule: 'OpenStreetMap',\n\t\t\t\t\t\taction: 'ClipBoard',\n\t\t\t\t\t\tmode: 'addRecord',\n\t\t\t\t\t\trecord: ui.item.id,\n\t\t\t\t\t\tsrcModuleName: searchModule.val()\n\t\t\t\t\t}).done((response) => {\n\t\t\t\t\t\tif (response.result.length == 1) {\n\t\t\t\t\t\t\tlet marker = L.marker([response.result[0].lat, response.result[0].lon], {\n\t\t\t\t\t\t\t\ticon: L.AwesomeMarkers.icon({\n\t\t\t\t\t\t\t\t\ticon: 'home',\n\t\t\t\t\t\t\t\t\tmarkerColor: 'cadetblue',\n\t\t\t\t\t\t\t\t\tprefix: 'fa',\n\t\t\t\t\t\t\t\t\ticonColor: response.result[0].color\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}).bindPopup(response.result[0].label);\n\t\t\t\t\t\t\tthis.layerMarkers.addLayer(marker);\n\t\t\t\t\t\t\tthis.mapInstance.addLayer(this.layerMarkers);\n\t\t\t\t\t\t\tthis.mapInstance.setView(new L.LatLng(response.result[0].lat, response.result[0].lon), 13);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tVtiger_Helper_Js.showMessage({\n\t\t\t\t\t\t\t\ttitle: app.vtranslate('JS_LBL_PERMISSION'),\n\t\t\t\t\t\t\t\ttext: response.result,\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});\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tregisterSearchAddress: function () {\n\t\t\tconst searchValue = this.container.find('.js-search-address'),\n\t\t\t\tsearchBtn = this.container.find('.js-search-btn'),\n\t\t\t\toperator = this.container.find('.js-select-operator');\n\t\t\tif (operator.length && operator.val()) {\n\t\t\t\tsearchValue\n\t\t\t\t\t.autocomplete({\n\t\t\t\t\t\tdelay: 600,\n\t\t\t\t\t\tminLength: 3,\n\t\t\t\t\t\tsource: function (request, response) {\n\t\t\t\t\t\t\tAppConnector.request({\n\t\t\t\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\t\t\t\taction: 'Fields',\n\t\t\t\t\t\t\t\tmode: 'findAddress',\n\t\t\t\t\t\t\t\ttype: operator.val(),\n\t\t\t\t\t\t\t\tvalue: request.term\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.done(function (requestData) {\n\t\t\t\t\t\t\t\t\tif (requestData.result === false) {\n\t\t\t\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\t\t\t\ttitle: app.vtranslate('JS_ERROR'),\n\t\t\t\t\t\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t} else if (requestData.result.length) {\n\t\t\t\t\t\t\t\t\t\tresponse(requestData.result);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tresponse([{ label: app.vtranslate('JS_NO_RESULTS_FOUND'), value: '' }]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.fail(function (_textStatus, _errorThrown, jqXHR) {\n\t\t\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\t\t\ttitle: app.vtranslate('JS_ERROR'),\n\t\t\t\t\t\t\t\t\t\ttext: jqXHR.responseJSON.error.message,\n\t\t\t\t\t\t\t\t\t\ttype: 'error',\n\t\t\t\t\t\t\t\t\t\tanimation: 'show'\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\tresponse([{ label: app.vtranslate('JS_NO_RESULTS_FOUND'), value: '' }]);\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t},\n\t\t\t\t\t\tselect: (_event, ui) => {\n\t\t\t\t\t\t\tif (ui.item.coordinates) {\n\t\t\t\t\t\t\t\tlet marker = L.marker([ui.item.coordinates.lat, ui.item.coordinates.lon], {\n\t\t\t\t\t\t\t\t\ticon: L.AwesomeMarkers.icon({\n\t\t\t\t\t\t\t\t\t\ticon: 'home',\n\t\t\t\t\t\t\t\t\t\tmarkerColor: 'cadetblue',\n\t\t\t\t\t\t\t\t\t\tprefix: 'fa'\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t}).bindPopup(this.getMarkerPopup(ui.item.label, ui.item.coordinates));\n\t\t\t\t\t\t\t\tthis.layerMarkers.addLayer(marker);\n\t\t\t\t\t\t\t\tthis.mapInstance.addLayer(this.layerMarkers);\n\t\t\t\t\t\t\t\tthis.mapInstance.setView(new L.LatLng(ui.item.coordinates.lat, ui.item.coordinates.lon), 10);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tsearchValue.val(ui.item.label);\n\t\t\t\t\t\t\t\tsearchBtn.trigger('click');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\t.autocomplete('instance')._renderItem = function (ul, item) {\n\t\t\t\t\treturn $('
  • ')\n\t\t\t\t\t\t.append(`
    ${item.label}
    `)\n\t\t\t\t\t\t.appendTo(ul);\n\t\t\t\t};\n\t\t\t}\n\t\t\tthis.container.find('.js-search-address,.js-radius').on('keydown', (e) => {\n\t\t\t\tif (e.code === 'Enter') {\n\t\t\t\t\tsearchBtn.trigger('click');\n\t\t\t\t}\n\t\t\t});\n\t\t\tsearchBtn.on('click', () => {\n\t\t\t\tconst progressIndicatorElement = jQuery.progressIndicator({\n\t\t\t\t\tposition: this.container,\n\t\t\t\t\tblockInfo: {\n\t\t\t\t\t\tenabled: true\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tlet params = {\n\t\t\t\t\tmodule: 'OpenStreetMap',\n\t\t\t\t\taction: 'GetMarkers',\n\t\t\t\t\tsrcModule: app.getModuleName(),\n\t\t\t\t\tsearchValue: this.container.find('.js-search-address').val(),\n\t\t\t\t\tcache: this.getCacheParamsToRequest()\n\t\t\t\t};\n\t\t\t\tconst radiusValue = this.container.find('.js-radius').val();\n\t\t\t\tif (radiusValue !== '' && parseInt(radiusValue)) {\n\t\t\t\t\tparams['radius'] = parseInt(radiusValue);\n\t\t\t\t}\n\t\t\t\tAppConnector.request($.extend(this.selectedParams, params)).done((response) => {\n\t\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\t\tthis.setMarkers(response.result);\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\tregisterMyLocation: function () {\n\t\t\tconst locationBtn = this.container.find('.js-my-location-btn');\n\t\t\tif (!navigator.geolocation) {\n\t\t\t\tlocationBtn.addClass('d-none');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tnavigator.permissions.query({ name: 'geolocation' }).then((response) => {\n\t\t\t\tif (response.state === 'denied') {\n\t\t\t\t\tlocationBtn.addClass('d-none');\n\t\t\t\t}\n\t\t\t});\n\t\t\tlocationBtn.on('click', () => {\n\t\t\t\tnavigator.geolocation.getCurrentPosition((position) => {\n\t\t\t\t\tlet marker = L.marker([position.coords.latitude, position.coords.longitude], {\n\t\t\t\t\t\ticon: L.AwesomeMarkers.icon({\n\t\t\t\t\t\t\ticon: 'home',\n\t\t\t\t\t\t\tmarkerColor: 'cadetblue',\n\t\t\t\t\t\t\tprefix: 'fa'\n\t\t\t\t\t\t})\n\t\t\t\t\t}).bindPopup(\n\t\t\t\t\t\tthis.getMarkerPopup(locationBtn.data('label'), {\n\t\t\t\t\t\t\tlat: position.coords.latitude,\n\t\t\t\t\t\t\tlon: position.coords.longitude\n\t\t\t\t\t\t})\n\t\t\t\t\t);\n\t\t\t\t\tthis.layerMarkers.addLayer(marker);\n\t\t\t\t\tthis.mapInstance.addLayer(this.layerMarkers);\n\t\t\t\t\tthis.mapInstance.setView(new L.LatLng(position.coords.latitude, position.coords.longitude), 10);\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\tregisterBasicModal: function () {\n\t\t\tvar thisInstance = this;\n\t\t\tvar container = this.container;\n\t\t\tvar map = thisInstance.mapInstance;\n\t\t\tvar layer, description;\n\t\t\tapp.registerBlockAnimationEvent(container);\n\t\t\tthisInstance.registerCacheEvents(container);\n\t\t\tcontainer.find('.groupBy').on('click', function () {\n\t\t\t\tvar progressIndicatorElement = jQuery.progressIndicator({\n\t\t\t\t\tposition: container,\n\t\t\t\t\tblockInfo: {\n\t\t\t\t\t\tenabled: true\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tvar params = {\n\t\t\t\t\tmodule: 'OpenStreetMap',\n\t\t\t\t\taction: 'GetMarkers',\n\t\t\t\t\tsrcModule: app.getModuleName(),\n\t\t\t\t\tgroupBy: container.find('.fieldsToGroup').val(),\n\t\t\t\t\tsearchValue: container.find('.js-search-address').val(),\n\t\t\t\t\tradius: container.find('.js-radius').val(),\n\t\t\t\t\tcache: thisInstance.getCacheParamsToRequest()\n\t\t\t\t};\n\t\t\t\tparams = $.extend(thisInstance.selectedParams, params);\n\t\t\t\tAppConnector.request(params).done(function (response) {\n\t\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\t\tthisInstance.setMarkers(response.result);\n\t\t\t\t});\n\t\t\t});\n\t\t\tcontainer.find('.groupNeighbours').on('change', function (e) {\n\t\t\t\tvar currentTarget = $(e.currentTarget);\n\t\t\t\tmap.removeLayer(thisInstance.layerMarkers);\n\t\t\t\tvar markers = thisInstance.markers;\n\t\t\t\tif (currentTarget.is(':checked')) {\n\t\t\t\t\tlayer = L.markerClusterGroup({\n\t\t\t\t\t\tmaxClusterRadius: 10\n\t\t\t\t\t});\n\t\t\t\t\tmarkers.forEach(function (e) {\n\t\t\t\t\t\tvar marker = L.marker([e.lat, e.lon], {\n\t\t\t\t\t\t\ticon: L.AwesomeMarkers.icon({\n\t\t\t\t\t\t\t\ticon: 'home',\n\t\t\t\t\t\t\t\tmarkerColor: 'blue',\n\t\t\t\t\t\t\t\tprefix: 'fa',\n\t\t\t\t\t\t\t\ticonColor: e.color\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}).bindPopup(e.label);\n\t\t\t\t\t\tlayer.addLayer(marker);\n\t\t\t\t\t});\n\n\t\t\t\t\tObject.keys(thisInstance.cacheLayerMarkers).forEach(function (key) {\n\t\t\t\t\t\tmap.removeLayer(thisInstance.cacheLayerMarkers[key]);\n\t\t\t\t\t\tvar cacheLayer = L.markerClusterGroup({\n\t\t\t\t\t\t\tmaxClusterRadius: 10\n\t\t\t\t\t\t});\n\t\t\t\t\t\tthisInstance.cacheMarkers[key].forEach(function (e) {\n\t\t\t\t\t\t\tvar marker = L.marker([e.lat, e.lon], {\n\t\t\t\t\t\t\t\ticon: L.AwesomeMarkers.icon({\n\t\t\t\t\t\t\t\t\ticon: 'home',\n\t\t\t\t\t\t\t\t\tmarkerColor: 'orange',\n\t\t\t\t\t\t\t\t\tprefix: 'fa',\n\t\t\t\t\t\t\t\t\ticonColor: e.color\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}).bindPopup(e.label);\n\t\t\t\t\t\t\tcacheLayer.addLayer(marker);\n\t\t\t\t\t\t});\n\t\t\t\t\t\tthisInstance.cacheLayerMarkers[key] = cacheLayer;\n\t\t\t\t\t\tmap.addLayer(cacheLayer);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tvar markerArray = [];\n\t\t\t\t\tmarkers.forEach(function (e) {\n\t\t\t\t\t\tvar marker = L.marker([e.lat, e.lon], {\n\t\t\t\t\t\t\ticon: L.AwesomeMarkers.icon({\n\t\t\t\t\t\t\t\ticon: 'home',\n\t\t\t\t\t\t\t\tmarkerColor: 'blue',\n\t\t\t\t\t\t\t\tprefix: 'fa',\n\t\t\t\t\t\t\t\ticonColor: e.color\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}).bindPopup(e.label);\n\t\t\t\t\t\tmarkerArray.push(marker);\n\t\t\t\t\t});\n\t\t\t\t\tlayer = L.featureGroup(markerArray);\n\t\t\t\t\tObject.keys(thisInstance.cacheLayerMarkers).forEach(function (key) {\n\t\t\t\t\t\tmap.removeLayer(thisInstance.cacheLayerMarkers[key]);\n\t\t\t\t\t\tvar markerArray = [];\n\t\t\t\t\t\tthisInstance.cacheMarkers[key].forEach(function (e) {\n\t\t\t\t\t\t\tvar marker = L.marker([e.lat, e.lon], {\n\t\t\t\t\t\t\t\ticon: L.AwesomeMarkers.icon({\n\t\t\t\t\t\t\t\t\ticon: 'home',\n\t\t\t\t\t\t\t\t\tmarkerColor: 'orange',\n\t\t\t\t\t\t\t\t\tprefix: 'fa',\n\t\t\t\t\t\t\t\t\ticonColor: e.color\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}).bindPopup(e.label);\n\t\t\t\t\t\t\tmarkerArray.push(marker);\n\t\t\t\t\t\t});\n\t\t\t\t\t\tthisInstance.cacheLayerMarkers[key] = L.featureGroup(markerArray);\n\t\t\t\t\t\tmap.addLayer(thisInstance.cacheLayerMarkers[key]);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tthisInstance.layerMarkers = layer;\n\t\t\t\tmap.addLayer(layer);\n\t\t\t});\n\t\t\tvar startIconLayer = false;\n\t\t\tcontainer.on('click', '.startTrack', function (e) {\n\t\t\t\tif (startIconLayer) {\n\t\t\t\t\tmap.removeLayer(startIconLayer);\n\t\t\t\t}\n\t\t\t\tvar currentTarget = $(e.currentTarget);\n\t\t\t\tvar containerPopup = currentTarget.closest('.leaflet-popup-content');\n\t\t\t\tdescription = containerPopup.find('.description').html();\n\t\t\t\tvar startElement = container.find('.start');\n\t\t\t\tvar coordinates = containerPopup.find('.coordinates');\n\t\t\t\tdescription = description.replace(/\\/gi, ', ');\n\t\t\t\tstartElement.val(description);\n\t\t\t\tstartElement.data('lat', coordinates.data('lat'));\n\t\t\t\tstartElement.data('lon', coordinates.data('lon'));\n\t\t\t\tvar marker = L.marker([coordinates.data('lat'), coordinates.data('lon')], {\n\t\t\t\t\ticon: L.AwesomeMarkers.icon({\n\t\t\t\t\t\ticon: 'truck',\n\t\t\t\t\t\tmarkerColor: 'green',\n\t\t\t\t\t\tprefix: 'fa'\n\t\t\t\t\t})\n\t\t\t\t}).bindPopup(containerPopup.html());\n\t\t\t\tstartIconLayer = L.featureGroup([marker]);\n\t\t\t\tmap.addLayer(startIconLayer);\n\t\t\t\tthisInstance.showCalculateBtn();\n\t\t\t});\n\t\t\tvar endIconLayer = false;\n\t\t\tcontainer.on('click', '.endTrack', function (e) {\n\t\t\t\tif (endIconLayer) {\n\t\t\t\t\tmap.removeLayer(endIconLayer);\n\t\t\t\t}\n\t\t\t\tvar currentTarget = $(e.currentTarget);\n\t\t\t\tvar containerPopup = currentTarget.closest('.leaflet-popup-content');\n\t\t\t\tdescription = containerPopup.find('.description').html();\n\t\t\t\tvar endElement = container.find('.end');\n\t\t\t\tvar coordinates = containerPopup.find('.coordinates');\n\t\t\t\tdescription = description.replace(/\\/gi, ', ');\n\t\t\t\tendElement.val(description);\n\t\t\t\tendElement.data('lat', coordinates.data('lat'));\n\t\t\t\tendElement.data('lon', coordinates.data('lon'));\n\t\t\t\tvar marker = L.marker([coordinates.data('lat'), coordinates.data('lon')], {\n\t\t\t\t\ticon: L.AwesomeMarkers.icon({\n\t\t\t\t\t\ticon: 'flag-checkered',\n\t\t\t\t\t\tmarkerColor: 'red',\n\t\t\t\t\t\tprefix: 'fa'\n\t\t\t\t\t})\n\t\t\t\t}).bindPopup(containerPopup.html());\n\t\t\t\tendIconLayer = L.featureGroup([marker]);\n\t\t\t\tmap.addLayer(endIconLayer);\n\t\t\t\tthisInstance.showCalculateBtn();\n\t\t\t});\n\n\t\t\tcontainer.on('click', '.indirectPoint', function (e) {\n\t\t\t\tvar currentTarget = $(e.currentTarget);\n\t\t\t\tvar containerPopup = currentTarget.closest('.leaflet-popup-content');\n\t\t\t\tdescription = containerPopup.find('.description').html();\n\t\t\t\tvar template = container.find('.indirectTemplate');\n\t\t\t\tvar indirect = template.clone();\n\t\t\t\ttemplate.before(indirect);\n\t\t\t\tindirect.removeClass('indirectTemplate');\n\t\t\t\tindirect.removeClass('d-none');\n\t\t\t\tvar coordinates = containerPopup.find('.coordinates');\n\t\t\t\tdescription = description.replace(/\\/gi, ', ');\n\t\t\t\tif (typeof thisInstance.indirectPointLayer[description] !== 'undefined') {\n\t\t\t\t\tmap.removeLayer(thisInstance.indirectPointLayer[description]);\n\t\t\t\t}\n\t\t\t\tvar indirectField = indirect.find('.indirect');\n\t\t\t\tindirectField.val(description);\n\t\t\t\tindirectField.data('lat', coordinates.data('lat'));\n\t\t\t\tindirectField.data('lon', coordinates.data('lon'));\n\t\t\t\tvar marker = L.marker([coordinates.data('lat'), coordinates.data('lon')], {\n\t\t\t\t\ticon: L.AwesomeMarkers.icon({\n\t\t\t\t\t\ticon: 'flag',\n\t\t\t\t\t\tmarkerColor: 'orange',\n\t\t\t\t\t\tprefix: 'fa'\n\t\t\t\t\t})\n\t\t\t\t}).bindPopup(containerPopup.html());\n\t\t\t\tthisInstance.indirectPointLayer[description] = L.featureGroup([marker]);\n\t\t\t\tmap.addLayer(thisInstance.indirectPointLayer[description]);\n\t\t\t});\n\t\t\tcontainer.on('click', '.removeIndirect', function (e) {\n\t\t\t\tvar currentTarget = $(e.currentTarget);\n\t\t\t\tvar container = currentTarget.closest('.indirectContainer');\n\t\t\t\tmap.removeLayer(thisInstance.indirectPointLayer[container.find('.indirect').val()]);\n\t\t\t\tcurrentTarget.closest('.indirectContainer').remove();\n\t\t\t});\n\t\t\tcontainer.on('click', '.moveUp', function (e) {\n\t\t\t\tvar currentTarget = $(e.currentTarget);\n\t\t\t\tvar container = currentTarget.closest('.indirectContainer');\n\t\t\t\tvar previousElement = container.prev();\n\t\t\t\tif (!previousElement.hasClass('startContainer')) {\n\t\t\t\t\tpreviousElement.before(container);\n\t\t\t\t}\n\t\t\t});\n\t\t\tcontainer.on('click', '.moveDown', function (e) {\n\t\t\t\tvar currentTarget = $(e.currentTarget);\n\t\t\t\tvar container = currentTarget.closest('.indirectContainer');\n\t\t\t\tvar nextElement = container.next();\n\t\t\t\tif (!nextElement.hasClass('indirectTemplate')) {\n\t\t\t\t\tnextElement.after(container);\n\t\t\t\t}\n\t\t\t});\n\t\t\tcontainer.on('click', '.searchInRadius', function (e) {\n\t\t\t\tif (endIconLayer) {\n\t\t\t\t\tmap.removeLayer(endIconLayer);\n\t\t\t\t}\n\t\t\t\tvar currentTarget = $(e.currentTarget);\n\t\t\t\tvar containerPopup = currentTarget.closest('.leaflet-popup-content');\n\t\t\t\tvar coordinates = containerPopup.find('.coordinates');\n\t\t\t\tvar progressIndicatorElement = jQuery.progressIndicator({\n\t\t\t\t\tposition: container,\n\t\t\t\t\tblockInfo: {\n\t\t\t\t\t\tenabled: true\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tvar params = {\n\t\t\t\t\tmodule: 'OpenStreetMap',\n\t\t\t\t\taction: 'GetMarkers',\n\t\t\t\t\tsrcModule: app.getModuleName(),\n\t\t\t\t\tradius: container.find('.radius').val(),\n\t\t\t\t\tlat: coordinates.data('lat'),\n\t\t\t\t\tlon: coordinates.data('lon'),\n\t\t\t\t\tcache: thisInstance.getCacheParamsToRequest()\n\t\t\t\t};\n\t\t\t\tparams = $.extend(thisInstance.selectedParams, params);\n\t\t\t\tAppConnector.request(params).done(function (response) {\n\t\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\t\tthisInstance.setMarkers(response.result);\n\t\t\t\t});\n\t\t\t});\n\t\t\tconst descriptionContainer = container.find('.js-description-container');\n\t\t\tcontainer.find('.js-calculate-route').on('click', function () {\n\t\t\t\tlet indirectLon = [];\n\t\t\t\tlet indirectLat = [];\n\t\t\t\tcontainer.find('.indirectContainer:not(.d-none) input.indirect').each(function () {\n\t\t\t\t\tlet currentTarget = $(this);\n\t\t\t\t\tindirectLat.push(currentTarget.data('lat'));\n\t\t\t\t\tindirectLon.push(currentTarget.data('lon'));\n\t\t\t\t});\n\t\t\t\tlet endElement = container.find('.end');\n\t\t\t\tlet startElement = container.find('.start');\n\t\t\t\tlet progressIndicatorElement = jQuery.progressIndicator({\n\t\t\t\t\tposition: container,\n\t\t\t\t\tblockInfo: {\n\t\t\t\t\t\tenabled: true\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tAppConnector.request({\n\t\t\t\t\turl: 'index.php',\n\t\t\t\t\tdata: {\n\t\t\t\t\t\tmodule: 'OpenStreetMap',\n\t\t\t\t\t\taction: 'GetRoute',\n\t\t\t\t\t\tflon: startElement.data('lon'),\n\t\t\t\t\t\tflat: startElement.data('lat'),\n\t\t\t\t\t\tilon: indirectLon,\n\t\t\t\t\t\tilat: indirectLat,\n\t\t\t\t\t\ttlon: endElement.data('lon'),\n\t\t\t\t\t\ttlat: endElement.data('lat')\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t\t.done(function (response) {\n\t\t\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\tif (thisInstance.routeLayer) {\n\t\t\t\t\t\t\tmap.removeLayer(thisInstance.routeLayer);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlet route = L.geoJson(response.result.geoJson);\n\t\t\t\t\t\tthisInstance.routeLayer = L.featureGroup([route]);\n\t\t\t\t\t\tmap.addLayer(thisInstance.routeLayer);\n\t\t\t\t\t\tdescriptionContainer.removeClass('d-none');\n\t\t\t\t\t\tconst instruction = container.find('.js-instruction_block');\n\t\t\t\t\t\tif (response.result.properties.description) {\n\t\t\t\t\t\t\tinstruction.removeClass('d-none');\n\t\t\t\t\t\t\tdescriptionContainer.find('.js-instruction_body').html(response.result.properties.description);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tinstruction.addClass('d-none');\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdescriptionContainer\n\t\t\t\t\t\t\t.find('.distance')\n\t\t\t\t\t\t\t.html(App.Fields.Double.formatToDisplay(response.result.properties.distance));\n\t\t\t\t\t\tdescriptionContainer\n\t\t\t\t\t\t\t.find('.travelTime')\n\t\t\t\t\t\t\t.html(App.Fields.Double.formatToDisplay(response.result.properties.traveltime / 60));\n\t\t\t\t\t})\n\t\t\t\t\t.fail(function (error, title) {\n\t\t\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\ttitleTrusted: false,\n\t\t\t\t\t\t\ttextTrusted: false,\n\t\t\t\t\t\t\ttitle: app.vtranslate('JS_UNEXPECTED_ERROR'),\n\t\t\t\t\t\t\ttext: error,\n\t\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t});\n\t\t\tcontainer.on('click', '.setView', function (e) {\n\t\t\t\tlet currentTarget = $(e.currentTarget);\n\t\t\t\tlet inputInstance = currentTarget.closest('.input-group').find('.end,.start,.indirect');\n\t\t\t\tlet lat = inputInstance.data('lat');\n\t\t\t\tlet lon = inputInstance.data('lon');\n\t\t\t\tif (!(typeof lat === 'undefined' && typeof lon === 'undefined')) {\n\t\t\t\t\tmap.setView(new L.LatLng(lat, lon), 11);\n\t\t\t\t}\n\t\t\t});\n\t\t\tthis.registerSearchCompany();\n\t\t\tthis.registerSearchAddress();\n\t\t\tthis.registerMyLocation();\n\t\t},\n\t\tregisterModalView: function (container) {\n\t\t\tlet thisInstance = this;\n\t\t\tlet progressIndicatorElement = jQuery.progressIndicator({\n\t\t\t\tposition: container,\n\t\t\t\tblockInfo: {\n\t\t\t\t\tenabled: true\n\t\t\t\t}\n\t\t\t});\n\t\t\tthis.container = container;\n\t\t\t$('#mapid').css({\n\t\t\t\theight: $('body').height() - 160\n\t\t\t});\n\t\t\tthis.registerMap([0, 0], 2);\n\t\t\tlet params = {\n\t\t\t\tmodule: 'OpenStreetMap',\n\t\t\t\taction: 'GetMarkers',\n\t\t\t\tsrcModule: app.getModuleName()\n\t\t\t};\n\t\t\tparams = $.extend(this.selectedParams, params);\n\t\t\tthisInstance.registerBasicModal();\n\t\t\tAppConnector.request(params).done(function (response) {\n\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\tthisInstance.setMarkers(response.result);\n\t\t\t});\n\t\t},\n\t\tgetMarkerPopup: function (label, coordinates) {\n\t\t\treturn `${label}\n\t\t\t
    \n\t\t\t\n\t\t\n\t\t`;\n\t\t},\n\t\tregisterDetailView: function (container) {\n\t\t\tthis.container = container;\n\t\t\tvar coordinates = container.find('#coordinates').val();\n\t\t\tcoordinates = JSON.parse(coordinates);\n\t\t\tvar startCoordinate = [0, 0];\n\t\t\tvar startZoom = 2;\n\t\t\tvar $map = container.find('#mapid');\n\t\t\tif (coordinates.length) {\n\t\t\t\tstartCoordinate = coordinates[0];\n\t\t\t\tstartZoom = 6;\n\t\t\t}\n\t\t\tif ($('.mainBody').length) {\n\t\t\t\tif ($('.mainBody').height() < 1000) {\n\t\t\t\t\t$map.height(\n\t\t\t\t\t\t$('.mainBody').height() -\n\t\t\t\t\t\t\t($('.detailViewTitle').height() + $('.detailViewContainer .related').height() + 25)\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\t$map.height(1000);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($('.bodyContents').height() < 1000) {\n\t\t\t\t\t$map.height(\n\t\t\t\t\t\t$('.bodyContents').height() -\n\t\t\t\t\t\t\t($('.detailViewTitle').height() + $('.detailViewContainer .related').height() + 25)\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\t$map.height(1000);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar myMap = this.registerMap(startCoordinate, startZoom);\n\t\t\tvar markers = L.markerClusterGroup({\n\t\t\t\tmaxClusterRadius: 10\n\t\t\t});\n\t\t\tcoordinates.forEach(function (e) {\n\t\t\t\tvar marker = L.marker([e.lat, e.lon], {\n\t\t\t\t\ticon: L.AwesomeMarkers.icon({\n\t\t\t\t\t\ticon: 'home',\n\t\t\t\t\t\tmarkerColor: 'blue',\n\t\t\t\t\t\tprefix: 'fa',\n\t\t\t\t\t\ticonColor: e.color\n\t\t\t\t\t})\n\t\t\t\t}).bindPopup(e.label);\n\t\t\t\tmarkers.addLayer(marker);\n\t\t\t});\n\t\t\tmyMap.addLayer(markers);\n\t\t}\n\t}\n);\n"],"names":["jQuery","Class","container","mapInstance","selectedParams","layerMarkers","markers","cacheMarkers","polygonLayer","routeLayer","recordsIds","cacheLayerMarkers","indirectPointLayer","setSelectedParams","params","view","registerMap","startCoordinate","startZoom","attribution","CONFIG","disableBranding","L","map","setView","tileLayer","$","val","maxZoom","addTo","setMarkers","data","thisInstance","markerArray","coordinates","markerClusterGroup","maxClusterRadius","removeLayer","records","forEach","e","push","lat","lon","marker","icon","AwesomeMarkers","markerColor","prefix","iconColor","color","bindPopup","label","addLayer","recordId","coordinatesCenter","error","radius","find","getMarkerPopup","isNumeric","parseInt","circle","fillColor","fillOpacity","featureGroup","Vtiger_Helper_Js","showMessage","title","app","vtranslate","text","type","cache","Object","keys","key","markersCache","indexOf","legendContainer","legend","html","value","length","fitBounds","prop","showCalculateBtn","endAddress","startAddress","parent","removeClass","registerCacheEvents","_this","on","currentTarget","moduleName","is","AppConnector","request","module","action","srcModule","getModuleName","done","response","result","mode","recordIds","JSON","stringify","countRecords","closest","addClass","trigger","count","moduleContainer","getCacheParamsToRequest","each","currentObject","registerSearchCompany","_this2","searchValue","searchModule","widget","ui","autocomplete","_create","_super","menu","_renderMenu","ul","items","that","currentCategory","_index","item","li","console","log","category","append","_renderItemData","attr","_renderItem","appendTo","ivAutocomplete","delay","minLength","source","_request","currentModule","responseAjax","parse","responseDataList","select","_event","id","record","srcModuleName","LatLng","registerSearchAddress","_this3","searchBtn","operator","term","requestData","showNotify","fail","_textStatus","_errorThrown","jqXHR","responseJSON","message","animation","concat","countryCode","code","progressIndicatorElement","progressIndicator","position","blockInfo","enabled","radiusValue","extend","registerMyLocation","_this4","locationBtn","navigator","geolocation","permissions","query","name","then","state","getCurrentPosition","coords","latitude","longitude","registerBasicModal","layer","description","registerBlockAnimationEvent","groupBy","cacheLayer","startIconLayer","containerPopup","startElement","replace","endIconLayer","endElement","template","indirect","clone","before","indirectField","remove","previousElement","prev","hasClass","nextElement","next","after","descriptionContainer","indirectLon","indirectLat","url","flon","flat","ilon","ilat","tlon","tlat","route","geoJson","instruction","properties","App","Fields","Double","formatToDisplay","distance","traveltime","titleTrusted","textTrusted","inputInstance","registerModalView","css","height","registerDetailView","$map","myMap"],"mappings":";;AAAA,kKACA,YAAY,CAEZA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,CAAC6N,MAAM,EAAS,CACrCE,IAAI,CAACF,MAAM,CACV7N,CAAC,CAAC,eAAe,CAAC,CAAC6N,MAAM,EAAE,EACzB7N,CAAC,CAAC,kBAAkB,CAAC,CAAC6N,MAAM,EAAE,CAAG7N,CAAC,CAAC,+BAA+B,CAAC,CAAC6N,MAAM,EAAE,CAAG,EAAE,CACpF,CAAC,CAEDE,IAAI,CAACF,MAAM,CAAC,GAAI,CAAC,KAIfG,KAAK,CAAG,IAAI,CAAC1O,WAAW,CAACC,eAAe,CAAEC,SAAS,CAAC,CACpDZ,OAAO,CAAGgB,CAAC,CAACa,kBAAkB,CAAC,CAClCC,gBAAgB,CAAE,EACnB,CAAC,CAAC,CACFF,WAAW,CAACK,OAAO,CAAC,SAAUC,CAAC,CAAE,CAChC,IAAII,MAAM,CAAGtB,CAAC,CAACsB,MAAM,CAAC,CAACJ,CAAC,CAACE,GAAG,CAAEF,CAAC,CAACG,GAAG,CAAC,CAAE,CACrCE,IAAI,CAAEvB,CAAC,CAACwB,cAAc,CAACD,IAAI,CAAC,CAC3BA,IAAI,CAAE,MAAM,CACZE,WAAW,CAAE,MAAM,CACnBC,MAAM,CAAE,IAAI,CACZC,SAAS,CAAET,CAAC,CAACU,KACd,CAAC,CACF,CAAC,CAAC,CAACC,SAAS,CAACX,CAAC,CAACY,KAAK,CAAC,CACrB9C,OAAO,CAAC+C,QAAQ,CAACT,MAAM,EACxB,CAAC,CAAC,CACF8M,KAAK,CAACrM,QAAQ,CAAC/C,OAAO,EACvB,CACD,CACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/Partners/resources/Detail.min.js b/public_html/layouts/basic/modules/Partners/resources/Detail.min.js index dd4e2ce586b0..515e5ab80f47 100644 --- a/public_html/layouts/basic/modules/Partners/resources/Detail.min.js +++ b/public_html/layouts/basic/modules/Partners/resources/Detail.min.js @@ -1,6 +1,6 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */"use strict";Vtiger_Detail_Js("Partners_Detail_Js",{},{hierarchyResponseCache:{},/** +/* {[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]} */"use strict";Vtiger_Detail_Js("Partners_Detail_Js",{},{hierarchyResponseCache:{},/** * Get response data * @param {Object} params * @returns {Object} diff --git a/public_html/layouts/basic/modules/Partners/resources/Detail.min.js.map b/public_html/layouts/basic/modules/Partners/resources/Detail.min.js.map index dff048e08af2..f76305ddf4f4 100644 --- a/public_html/layouts/basic/modules/Partners/resources/Detail.min.js.map +++ b/public_html/layouts/basic/modules/Partners/resources/Detail.min.js.map @@ -1 +1 @@ -{"version":3,"file":"Detail.min.js","sources":["Detail.js"],"sourcesContent":["/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */\n'use strict';\n\nVtiger_Detail_Js(\n\t'Partners_Detail_Js',\n\t{},\n\t{\n\t\thierarchyResponseCache: {},\n\t\t/**\n\t\t * Get response data\n\t\t * @param {Object} params\n\t\t * @returns {Object}\n\t\t */\n\t\tgetHierarchyResponseData: function (params) {\n\t\t\tvar thisInstance = this;\n\t\t\tvar aDeferred = jQuery.Deferred();\n\t\t\tif (!jQuery.isEmptyObject(thisInstance.hierarchyResponseCache)) {\n\t\t\t\taDeferred.resolve(thisInstance.hierarchyResponseCache);\n\t\t\t} else {\n\t\t\t\tAppConnector.request(params).done(function (data) {\n\t\t\t\t\tthisInstance.hierarchyResponseCache = data;\n\t\t\t\t\taDeferred.resolve(thisInstance.hierarchyResponseCache);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn aDeferred.promise();\n\t\t},\n\t\t/**\n\t\t * Display hierarchy count\n\t\t */\n\t\tregisterHierarchyRecordCount: function () {\n\t\t\tvar hierarchyButton = $('.detailViewTitle .hierarchy');\n\t\t\tif (hierarchyButton.length) {\n\t\t\t\tvar params = {\n\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\taction: 'RelationAjax',\n\t\t\t\t\trecord: app.getRecordId(),\n\t\t\t\t\tmode: 'getHierarchyCount'\n\t\t\t\t};\n\t\t\t\tAppConnector.request(params).done(function (response) {\n\t\t\t\t\tif (response.success) {\n\t\t\t\t\t\t$('.detailViewTitle .hierarchy .badge').html(response.result);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Display hierarchy\n\t\t */\n\t\tregisterShowHierarchy: function () {\n\t\t\tvar thisInstance = this;\n\t\t\tvar hierarchyButton = $('.detailViewTitle');\n\t\t\tvar params = {\n\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\tview: 'Hierarchy',\n\t\t\t\trecord: app.getRecordId()\n\t\t\t};\n\t\t\thierarchyButton.on('click', '.js-detail__icon', function (e) {\n\t\t\t\tthisInstance.getHierarchyResponseData(params).done(function (data) {\n\t\t\t\t\tapp.showModalWindow(data);\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\tregisterEvents: function () {\n\t\t\tthis._super();\n\t\t\tthis.registerHierarchyRecordCount();\n\t\t\tthis.registerShowHierarchy();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Detail_Js","hierarchyResponseCache","getHierarchyResponseData","params","thisInstance","aDeferred","jQuery","Deferred","isEmptyObject","AppConnector","request","done","data","resolve","promise","registerHierarchyRecordCount","$","hierarchyButton","length","module","app","getModuleName","action","record","getRecordId","mode","response","success","html","result","registerShowHierarchy","view","on","showModalWindow","registerEvents","_super"],"mappings":";;AAAA,kKACA,YAAA,CAEAA,gBAAgB,CACf,oBADe,CAEf,EAFe,CAGf,CACCC,sBAAsB,CAAE,EADzB;AAGD;AACA;AACA;AACA,KACEC,wBAAwB,CAAE,SAAUC,wBAAAA,CAAAA,MAAV,CAAkB,CACvCC,IAAAA,YAAY,CAAG,IADwB,CAEvCC,SAAS,CAAGC,MAAM,CAACC,QAAP,EAF2B,CAW3C,OARW,MAAA,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F,wBAAb,CAAsCC,MAAtC,EAA8CQ,IAA9C,CAAmD,SAAUC,IAAV,CAAgB,CAClEQ,GAAG,CAACa,eAAJ,CAAoBrB,IAApB,EACA,CAFD,EAGA,CAJD,EAKA,CAvDF,CAwDCsB,cAAc,CAAE,SAAY,cAAA,EAAA,CAC3B,KAAKC,MAAL,EAD2B,CAE3B,IAAKpB,CAAAA,4BAAL,EAF2B,CAG3B,IAAA,CAAKe,qBAAL,GACA,CA5DF,CAHe;;"} \ No newline at end of file +{"version":3,"file":"Detail.min.js","sources":["Detail.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\nVtiger_Detail_Js(\n\t'Partners_Detail_Js',\n\t{},\n\t{\n\t\thierarchyResponseCache: {},\n\t\t/**\n\t\t * Get response data\n\t\t * @param {Object} params\n\t\t * @returns {Object}\n\t\t */\n\t\tgetHierarchyResponseData: function (params) {\n\t\t\tvar thisInstance = this;\n\t\t\tvar aDeferred = jQuery.Deferred();\n\t\t\tif (!jQuery.isEmptyObject(thisInstance.hierarchyResponseCache)) {\n\t\t\t\taDeferred.resolve(thisInstance.hierarchyResponseCache);\n\t\t\t} else {\n\t\t\t\tAppConnector.request(params).done(function (data) {\n\t\t\t\t\tthisInstance.hierarchyResponseCache = data;\n\t\t\t\t\taDeferred.resolve(thisInstance.hierarchyResponseCache);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn aDeferred.promise();\n\t\t},\n\t\t/**\n\t\t * Display hierarchy count\n\t\t */\n\t\tregisterHierarchyRecordCount: function () {\n\t\t\tvar hierarchyButton = $('.detailViewTitle .hierarchy');\n\t\t\tif (hierarchyButton.length) {\n\t\t\t\tvar params = {\n\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\taction: 'RelationAjax',\n\t\t\t\t\trecord: app.getRecordId(),\n\t\t\t\t\tmode: 'getHierarchyCount'\n\t\t\t\t};\n\t\t\t\tAppConnector.request(params).done(function (response) {\n\t\t\t\t\tif (response.success) {\n\t\t\t\t\t\t$('.detailViewTitle .hierarchy .badge').html(response.result);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Display hierarchy\n\t\t */\n\t\tregisterShowHierarchy: function () {\n\t\t\tvar thisInstance = this;\n\t\t\tvar hierarchyButton = $('.detailViewTitle');\n\t\t\tvar params = {\n\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\tview: 'Hierarchy',\n\t\t\t\trecord: app.getRecordId()\n\t\t\t};\n\t\t\thierarchyButton.on('click', '.js-detail__icon', function (e) {\n\t\t\t\tthisInstance.getHierarchyResponseData(params).done(function (data) {\n\t\t\t\t\tapp.showModalWindow(data);\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\tregisterEvents: function () {\n\t\t\tthis._super();\n\t\t\tthis.registerHierarchyRecordCount();\n\t\t\tthis.registerShowHierarchy();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Detail_Js","hierarchyResponseCache","getHierarchyResponseData","params","thisInstance","aDeferred","jQuery","Deferred","isEmptyObject","AppConnector","request","done","data","resolve","promise","registerHierarchyRecordCount","hierarchyButton","$","length","module","app","getModuleName","action","record","getRecordId","mode","response","success","html","result","registerShowHierarchy","view","on","showModalWindow","registerEvents","_super"],"mappings":";;AAAA,kKACA,YAAY,CAEZA,gBAAgB,CACf,oBAAoB,CACpB,EAAE,CACF,CACCC,sBAAsB,CAAE,EAAE;AAE5B;AACA;AACA;AACA,KACEC,wBAAwB,CAAE,SAAAA,wBAAUC,CAAAA,MAAM,CAAE,CACvC,IAAAC,YAAY,CAAG,IAAI,CACnBC,SAAS,CAAGC,MAAM,CAACC,QAAQ,EAAE,CASjC,OARKD,MAAM,CAACE,aAAa,CAACJ,YAAY,CAACH,sBAAsB,CAAC,CAG7DQ,YAAY,CAACC,OAAO,CAACP,MAAM,CAAC,CAACQ,IAAI,CAAC,SAAUC,IAAI,CAAE,C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DsB,cAAc,CAAE,SAAAA,gBAAY,CAC3B,IAAI,CAACC,MAAM,EAAE,CACb,IAAI,CAACpB,4BAA4B,EAAE,CACnC,IAAI,CAACe,qBAAqB,GAC3B,CACD,CACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/PriceBooks/resources/RelatedList.min.js b/public_html/layouts/basic/modules/PriceBooks/resources/RelatedList.min.js index f2b01cfe0dc1..cdf5e32774da 100644 --- a/public_html/layouts/basic/modules/PriceBooks/resources/RelatedList.min.js +++ b/public_html/layouts/basic/modules/PriceBooks/resources/RelatedList.min.js @@ -1,4 +1,4 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */"use strict";Vtiger_RelatedList_Js("PriceBooks_RelatedList_Js",{triggerMassMargin:function triggerMassMargin(){var self=Vtiger_RelatedList_Js.relatedListInstance,selected_ids=self.readSelectedIds(!0),excluded_ids=self.readExcludedIds(!0);!0===self.checkListRecordSelected()?self.noRecordSelectedAlert():app.showModalWindow({url:"index.php?module=PriceBooks&view=SpecifyMargin",cb:function cb(modalContainer){modalContainer.find(".js-modal__save").on("click",function(e){var element=modalContainer.find(".js-margin"),resultOfValidation=Vtiger_NumberUserFormat_Validator_Js.invokeValidation(element);if("undefined"!=typeof resultOfValidation)element.validationEngine("showPrompt",resultOfValidation,"","topLeft",!0),e.preventDefault();else {element.validationEngine("hideAll");var postData=self.getCompleteParams();delete postData.view,postData.selected_ids=selected_ids,postData.excluded_ids=excluded_ids,postData.mode="specifyMargin",postData.action="RelationAjax",postData.relatedModule=self.moduleName,postData.record=self.getParentId(),postData.margin=element.val(),AppConnector.request(postData).done(function(response){response.success&&(Vtiger_Detail_Js.reloadRelatedList(),app.hideModalWindow());});}return !1});}});}},{registerEditListPrice:function registerEditListPrice(){var thisInstance=this,element=this.content.find(".js-edit-listprice");element.validationEngine(app.validationEngineOptions),element.on("change",function(e){e.stopPropagation();var element=$(e.currentTarget);element.formatNumber(),element.validationEngine("validate")||AppConnector.request({module:thisInstance.parentModuleName,record:element.closest(".js-list__row").data("id"),action:"RelationAjax",mode:"addListPrice",src_record:thisInstance.parentRecordId,related_module:thisInstance.moduleName,price:element.val()}).done(function(responseData){responseData.result&&app.showNotify({text:app.vtranslate("JS_SAVE_NOTIFY_OK"),type:"success"});});});},registerPostLoadEvents:function registerPostLoadEvents(){this._super(),this.registerEditListPrice();}}); +/* {[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]} */"use strict";Vtiger_RelatedList_Js("PriceBooks_RelatedList_Js",{triggerMassMargin:function triggerMassMargin(){var self=Vtiger_RelatedList_Js.relatedListInstance,selected_ids=self.readSelectedIds(!0),excluded_ids=self.readExcludedIds(!0);!0===self.checkListRecordSelected()?self.noRecordSelectedAlert():app.showModalWindow({url:"index.php?module=PriceBooks&view=SpecifyMargin",cb:function cb(modalContainer){modalContainer.find(".js-modal__save").on("click",function(e){var element=modalContainer.find(".js-margin"),resultOfValidation=Vtiger_NumberUserFormat_Validator_Js.invokeValidation(element);if("undefined"!=typeof resultOfValidation)element.validationEngine("showPrompt",resultOfValidation,"","topLeft",!0),e.preventDefault();else {element.validationEngine("hideAll");var postData=self.getCompleteParams();delete postData.view,postData.selected_ids=selected_ids,postData.excluded_ids=excluded_ids,postData.mode="specifyMargin",postData.action="RelationAjax",postData.relatedModule=self.moduleName,postData.record=self.getParentId(),postData.margin=element.val(),AppConnector.request(postData).done(function(response){response.success&&(Vtiger_Detail_Js.reloadRelatedList(),app.hideModalWindow());});}return !1});}});}},{registerEditListPrice:function registerEditListPrice(){var thisInstance=this,element=this.content.find(".js-edit-listprice");element.validationEngine(app.validationEngineOptions),element.on("change",function(e){e.stopPropagation();var element=$(e.currentTarget);element.formatNumber(),element.validationEngine("validate")||AppConnector.request({module:thisInstance.parentModuleName,record:element.closest(".js-list__row").data("id"),action:"RelationAjax",mode:"addListPrice",src_record:thisInstance.parentRecordId,related_module:thisInstance.moduleName,price:element.val()}).done(function(responseData){responseData.result&&app.showNotify({text:app.vtranslate("JS_SAVE_NOTIFY_OK"),type:"success"});});});},registerPostLoadEvents:function registerPostLoadEvents(){this._super(),this.registerEditListPrice();}}); //# sourceMappingURL=RelatedList.min.js.map diff --git a/public_html/layouts/basic/modules/PriceBooks/resources/RelatedList.min.js.map b/public_html/layouts/basic/modules/PriceBooks/resources/RelatedList.min.js.map index ffc2893edac8..07a1f6ab9752 100644 --- a/public_html/layouts/basic/modules/PriceBooks/resources/RelatedList.min.js.map +++ b/public_html/layouts/basic/modules/PriceBooks/resources/RelatedList.min.js.map @@ -1 +1 @@ -{"version":3,"file":"RelatedList.min.js","sources":["RelatedList.js"],"sourcesContent":["/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */\n'use strict';\n\nVtiger_RelatedList_Js(\n\t'PriceBooks_RelatedList_Js',\n\t{\n\t\ttriggerMassMargin: function () {\n\t\t\tconst self = Vtiger_RelatedList_Js.relatedListInstance;\n\t\t\tlet selected_ids = self.readSelectedIds(true),\n\t\t\t\texcluded_ids = self.readExcludedIds(true);\n\t\t\tif (self.checkListRecordSelected() !== true) {\n\t\t\t\tapp.showModalWindow({\n\t\t\t\t\turl: 'index.php?module=PriceBooks&view=SpecifyMargin',\n\t\t\t\t\tcb: (modalContainer) => {\n\t\t\t\t\t\tmodalContainer.find('.js-modal__save').on('click', (e) => {\n\t\t\t\t\t\t\tlet element = modalContainer.find('.js-margin');\n\t\t\t\t\t\t\tlet resultOfValidation = Vtiger_NumberUserFormat_Validator_Js.invokeValidation(element);\n\t\t\t\t\t\t\tif (typeof resultOfValidation !== 'undefined') {\n\t\t\t\t\t\t\t\telement.validationEngine('showPrompt', resultOfValidation, '', 'topLeft', true);\n\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\telement.validationEngine('hideAll');\n\t\t\t\t\t\t\t\tlet postData = self.getCompleteParams();\n\t\t\t\t\t\t\t\tdelete postData.view;\n\t\t\t\t\t\t\t\tpostData.selected_ids = selected_ids;\n\t\t\t\t\t\t\t\tpostData.excluded_ids = excluded_ids;\n\t\t\t\t\t\t\t\tpostData.mode = 'specifyMargin';\n\t\t\t\t\t\t\t\tpostData.action = 'RelationAjax';\n\t\t\t\t\t\t\t\tpostData.relatedModule = self.moduleName;\n\t\t\t\t\t\t\t\tpostData.record = self.getParentId();\n\t\t\t\t\t\t\t\tpostData.margin = element.val();\n\t\t\t\t\t\t\t\tAppConnector.request(postData).done((response) => {\n\t\t\t\t\t\t\t\t\tif (response.success) {\n\t\t\t\t\t\t\t\t\t\tVtiger_Detail_Js.reloadRelatedList();\n\t\t\t\t\t\t\t\t\t\tapp.hideModalWindow();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tself.noRecordSelectedAlert();\n\t\t\t}\n\t\t}\n\t},\n\t{\n\t\tregisterEditListPrice: function () {\n\t\t\tlet thisInstance = this;\n\t\t\tlet element = this.content.find('.js-edit-listprice');\n\t\t\telement.validationEngine(app.validationEngineOptions);\n\t\t\telement.on('change', (e) => {\n\t\t\t\te.stopPropagation();\n\t\t\t\tlet element = $(e.currentTarget);\n\t\t\t\telement.formatNumber();\n\t\t\t\tif (!element.validationEngine('validate')) {\n\t\t\t\t\tAppConnector.request({\n\t\t\t\t\t\tmodule: thisInstance.parentModuleName,\n\t\t\t\t\t\trecord: element.closest('.js-list__row').data('id'),\n\t\t\t\t\t\taction: 'RelationAjax',\n\t\t\t\t\t\tmode: 'addListPrice',\n\t\t\t\t\t\tsrc_record: thisInstance.parentRecordId,\n\t\t\t\t\t\trelated_module: thisInstance.moduleName,\n\t\t\t\t\t\tprice: element.val()\n\t\t\t\t\t}).done(function (responseData) {\n\t\t\t\t\t\tif (responseData.result) {\n\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\ttext: app.vtranslate('JS_SAVE_NOTIFY_OK'),\n\t\t\t\t\t\t\t\ttype: 'success'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tregisterPostLoadEvents: function () {\n\t\t\tthis._super();\n\t\t\tthis.registerEditListPrice();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_RelatedList_Js","triggerMassMargin","relatedListInstance","selected_ids","self","readSelectedIds","excluded_ids","readExcludedIds","checkListRecordSelected","noRecordSelectedAlert","app","showModalWindow","url","cb","modalContainer","find","on","e","resultOfValidation","Vtiger_NumberUserFormat_Validator_Js","invokeValidation","element","validationEngine","preventDefault","getCompleteParams","view","postData","mode","action","relatedModule","moduleName","record","getParentId","margin","val","AppConnector","request","done","response","success","Vtiger_Detail_Js","reloadRelatedList","hideModalWindow","registerEditListPrice","content","validationEngineOptions","stopPropagation","$","currentTarget","formatNumber","module","thisInstance","parentModuleName","closest","data","src_record","parentRecordId","related_module","price","responseData","result","showNotify","text","vtranslate","type","registerPostLoadEvents","_super"],"mappings":";;AAAA,kKACA,YAAA,CAEAA,qBAAqB,CACpB,2BADoB,CAEpB,CACCC,iBAAiB,CAAE,SAAY,iBAAA,EAAA,CAAA,QACpB,CAAGD,qBAAqB,CAACE,mBADL,CAE1BC,YAAY,CAAGC,IAAI,CAACC,eAAL,CAAA,CAAA,CAAA,CAFW,CAG7BC,YAAY,CAAGF,IAAI,CAACG,eAAL,IAHc,CAI1B,CAAA,CAAA,GAAAH,IAAI,CAACI,uBAAL,EAJ0B,CAqC7BJ,IAAI,CAACK,qBAAL,EArC6B,CAK7BC,GAAG,CAACC,eAAJ,CAAoB,CACnBC,GAAG,CAAE,gDADc,CAEnBC,EAAE,CAAE,YAACC,cAAD,CAAoB,CACvBA,cAAc,C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AAa7B,IAAb,CAAkB,oBAAlB,CAFoB,CAGlCM,OAAO,CAACC,gBAAR,CAAyBZ,GAAG,CAACmC,uBAA7B,CAHkC,CAIlCxB,OAAO,CAACL,EAAR,CAAW,QAAX,CAAqB,SAACC,CAAD,CAAO,CAC3BA,CAAC,CAAC6B,eAAF,EAD2B,CAE3B,WAAW,CAAGC,CAAC,CAAC9B,CAAC,CAAC+B,aAAH,CAAf,CACA3B,OAAO,CAAC4B,YAAR,EAH2B,CAItB5B,OAAO,CAACC,gBAAR,CAAyB,UAAzB,CAJsB,EAK1Ba,YAAY,CAACC,OAAb,CAAqB,CACpBc,MAAM,CAAEC,YAAY,CAACC,gBADD,CAEpBrB,MAAM,CAAEV,OAAO,CAACgC,OAAR,CAAgB,eAAhB,CAAA,CAAiCC,IAAjC,CAAsC,IAAtC,CAFY,CAGpB1B,MAAM,CAAE,cAHY,CAIpBD,IAAI,CAAE,cAJc,CAKpB4B,UAAU,CAAEJ,YAAY,CAACK,cALL,CAMpBC,cAAc,CAAEN,YAAY,CAACrB,UANT,CAOpB4B,KAAK,CAAErC,OAAO,CAACa,GAAR,EAPa,CAArB,CAQGG,CAAAA,IARH,CAQQ,SAAUsB,YAAV,CAAwB,CAC3BA,YAAY,CAACC,MADc,EAE9BlD,GAAG,CAACmD,UAAJ,CAAe,CACdC,IAAI,CAAEpD,GAAG,CAACqD,UAAJ,CAAe,mBAAf,CADQ,CAEdC,IAAI,CAAE,SAFQ,CAAf,EAKD,CAfD,EAiBD,CAtBD,EAuBA,CA5BF,CA6BCC,sBAAsB,CAAE,iCAAY,CACnC,IAAA,CAAKC,MAAL,EADmC,CAEnC,KAAKvB,qBAAL,GACA,CAhCF,CA5CoB;;"} \ No newline at end of file +{"version":3,"file":"RelatedList.min.js","sources":["RelatedList.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\nVtiger_RelatedList_Js(\n\t'PriceBooks_RelatedList_Js',\n\t{\n\t\ttriggerMassMargin: function () {\n\t\t\tconst self = Vtiger_RelatedList_Js.relatedListInstance;\n\t\t\tlet selected_ids = self.readSelectedIds(true),\n\t\t\t\texcluded_ids = self.readExcludedIds(true);\n\t\t\tif (self.checkListRecordSelected() !== true) {\n\t\t\t\tapp.showModalWindow({\n\t\t\t\t\turl: 'index.php?module=PriceBooks&view=SpecifyMargin',\n\t\t\t\t\tcb: (modalContainer) => {\n\t\t\t\t\t\tmodalContainer.find('.js-modal__save').on('click', (e) => {\n\t\t\t\t\t\t\tlet element = modalContainer.find('.js-margin');\n\t\t\t\t\t\t\tlet resultOfValidation = Vtiger_NumberUserFormat_Validator_Js.invokeValidation(element);\n\t\t\t\t\t\t\tif (typeof resultOfValidation !== 'undefined') {\n\t\t\t\t\t\t\t\telement.validationEngine('showPrompt', resultOfValidation, '', 'topLeft', true);\n\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\telement.validationEngine('hideAll');\n\t\t\t\t\t\t\t\tlet postData = self.getCompleteParams();\n\t\t\t\t\t\t\t\tdelete postData.view;\n\t\t\t\t\t\t\t\tpostData.selected_ids = selected_ids;\n\t\t\t\t\t\t\t\tpostData.excluded_ids = excluded_ids;\n\t\t\t\t\t\t\t\tpostData.mode = 'specifyMargin';\n\t\t\t\t\t\t\t\tpostData.action = 'RelationAjax';\n\t\t\t\t\t\t\t\tpostData.relatedModule = self.moduleName;\n\t\t\t\t\t\t\t\tpostData.record = self.getParentId();\n\t\t\t\t\t\t\t\tpostData.margin = element.val();\n\t\t\t\t\t\t\t\tAppConnector.request(postData).done((response) => {\n\t\t\t\t\t\t\t\t\tif (response.success) {\n\t\t\t\t\t\t\t\t\t\tVtiger_Detail_Js.reloadRelatedList();\n\t\t\t\t\t\t\t\t\t\tapp.hideModalWindow();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tself.noRecordSelectedAlert();\n\t\t\t}\n\t\t}\n\t},\n\t{\n\t\tregisterEditListPrice: function () {\n\t\t\tlet thisInstance = this;\n\t\t\tlet element = this.content.find('.js-edit-listprice');\n\t\t\telement.validationEngine(app.validationEngineOptions);\n\t\t\telement.on('change', (e) => {\n\t\t\t\te.stopPropagation();\n\t\t\t\tlet element = $(e.currentTarget);\n\t\t\t\telement.formatNumber();\n\t\t\t\tif (!element.validationEngine('validate')) {\n\t\t\t\t\tAppConnector.request({\n\t\t\t\t\t\tmodule: thisInstance.parentModuleName,\n\t\t\t\t\t\trecord: element.closest('.js-list__row').data('id'),\n\t\t\t\t\t\taction: 'RelationAjax',\n\t\t\t\t\t\tmode: 'addListPrice',\n\t\t\t\t\t\tsrc_record: thisInstance.parentRecordId,\n\t\t\t\t\t\trelated_module: thisInstance.moduleName,\n\t\t\t\t\t\tprice: element.val()\n\t\t\t\t\t}).done(function (responseData) {\n\t\t\t\t\t\tif (responseData.result) {\n\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\ttext: app.vtranslate('JS_SAVE_NOTIFY_OK'),\n\t\t\t\t\t\t\t\ttype: 'success'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tregisterPostLoadEvents: function () {\n\t\t\tthis._super();\n\t\t\tthis.registerEditListPrice();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_RelatedList_Js","triggerMassMargin","self","relatedListInstance","selected_ids","readSelectedIds","excluded_ids","readExcludedIds","checkListRecordSelected","noRecordSelectedAlert","app","showModalWindow","url","cb","modalContainer","find","on","e","element","resultOfValidation","Vtiger_NumberUserFormat_Validator_Js","invokeValidation","validationEngine","preventDefault","postData","getCompleteParams","view","mode","action","relatedModule","moduleName","record","getParentId","margin","val","AppConnector","request","done","response","success","Vtiger_Detail_Js","reloadRelatedList","hideModalWindow","registerEditListPrice","thisInstance","content","validationEngineOptions","stopPropagation","$","currentTarget","formatNumber","module","parentModuleName","closest","data","src_record","parentRecordId","related_module","price","responseData","result","showNotify","text","vtranslate","type","registerPostLoadEvents","_super"],"mappings":";;AAAA,kKACA,YAAY,CAEZA,qBAAqB,CACpB,2BAA2B,CAC3B,CACCC,iBAAiB,CAAE,SAAAA,iBAAAA,EAAY,CACxB,IAAAC,IAAI,CAAGF,qBAAqB,CAACG,mBAAmB,CAClDC,YAAY,CAAGF,IAAI,CAACG,eAAe,CAAK,CAAA,CAAA,CAAC,CAC5CC,YAAY,CAAGJ,IAAI,CAACK,eAAe,CAAK,CAAA,CAAA,CAAC,CACtC,CAAA,CAAA,GAAAL,IAAI,CAACM,uBAAuB,EAAW,CAiC1CN,IAAI,CAACO,qBAAqB,EAAE,CAhC5BC,GAAG,CAACC,eAAe,CAAC,CACnBC,GAAG,CAAE,gDAAgD,CACrDC,EAAE,CAAE,SAAAA,EAAAA,CAACC,cAAc,CAAK,CACvBA,cAAc,CAACC,IAAI,CAAC,iBAAiB,CAAC,CAACC,EAAE,CAAC,OAAO,CAAE,SAACC,CAAC,CAAK,CACrD,IAAAC,OAAO,CAAGJ,cAAc,CAACC,IAAI,CAAC,YAAY,CAAC,CAC3CI,kBAAkB,CAAGC,oCAAoC,CAACC,gBAAgB,CAACH,OAAO,CAAC,CACvF,GAAkC,WAAW,EAAzC,OAAOC,kBAAkC,CAC5CD,OAAO,CAACI,gBAAgB,CAAC,YAAY,CAAEH,kBAAkB,CAAE,EAAE,CAAE,SAAS,CAAA,CAAA,CAAM,CAAC,CAC/EF,CAAC,CAACM,cAAc,EAAE,CACZ,KAAA,CACNL,OAAO,CAACI,gBAAgB,CAAC,SAAS,CAAC,CACnC,IAAIE,QAAQ,CAAGtB,IAAI,CAACuB,iBAAiB,EAAE,CACvC,OAAOD,QAAQ,CAACE,IAAI,CACpB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AM,CAAE,cAAc,CACtBD,IAAI,CAAE,cAAc,CACpB4B,UAAU,CAAEX,YAAY,CAACY,cAAc,CACvCC,cAAc,CAAEb,YAAY,CAACd,UAAU,CACvC4B,KAAK,CAAExC,OAAO,CAACgB,GAAG,EACnB,CAAC,CAAC,CAACG,IAAI,CAAC,SAAUsB,YAAY,CAAE,CAC3BA,YAAY,CAACC,MAAM,EACtBlD,GAAG,CAACmD,UAAU,CAAC,CACdC,IAAI,CAAEpD,GAAG,CAACqD,UAAU,CAAC,mBAAmB,CAAC,CACzCC,IAAI,CAAE,SACP,CAAC,EAEH,CAAC,EAEH,CAAC,EACF,CAAC,CACDC,sBAAsB,CAAE,SAAAA,sBAAA,EAAY,CACnC,IAAI,CAACC,MAAM,EAAE,CACb,IAAI,CAACvB,qBAAqB,GAC3B,CACD,CACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/Products/resources/Edit.min.js.map b/public_html/layouts/basic/modules/Products/resources/Edit.min.js.map index e680669624e2..8e49293f12ab 100644 --- a/public_html/layouts/basic/modules/Products/resources/Edit.min.js.map +++ b/public_html/layouts/basic/modules/Products/resources/Edit.min.js.map @@ -1 +1 @@ -{"version":3,"file":"Edit.min.js","sources":["Edit.js"],"sourcesContent":["/*+***********************************************************************************\n * The contents of this file are subject to the vtiger CRM Public License Version 1.0\n * (\"License\"); You may not use this file except in compliance with the License\n * The Original Code is: vtiger CRM Open Source\n * The Initial Developer of the Original Code is vtiger.\n * Portions created by vtiger are Copyright (C) vtiger.\n * All Rights Reserved.\n * Contributor(s): YetiForce S.A.\n *************************************************************************************/\n'use strict';\n\nVtiger_Edit_Js(\n\t'Products_Edit_Js',\n\t{},\n\t{\n\t\tregisterEventForUsageunit: function () {\n\t\t\tthis.checkUsageUnit();\n\t\t\t$('select[name=\"usageunit\"]').on('change', this.checkUsageUnit);\n\t\t},\n\t\tcheckUsageUnit: function () {\n\t\t\tvar selectUsageunit = $('select[name=\"usageunit\"]');\n\t\t\tvar inputQtyPerUnit = $('input[name=\"qty_per_unit\"]');\n\t\t\tvar value = selectUsageunit.val();\n\t\t\tif (value === 'pack') {\n\t\t\t\tinputQtyPerUnit.prop('disabled', false);\n\t\t\t} else {\n\t\t\t\tinputQtyPerUnit.prop('disabled', true);\n\t\t\t}\n\t\t},\n\t\tregisterEvents: function () {\n\t\t\tthis._super();\n\t\t\tthis.registerEventForUsageunit();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Edit_Js","registerEventForUsageunit","checkUsageUnit","$","on","inputQtyPerUnit","value","selectUsageunit","val","prop","registerEvents","_super"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFACA,aAEAA,cAAc,CACb,kBADa,CAEb,EAFa,CAGb,CACCC,yBAAyB,CAAE,SAAA,yBAAA,EAAY,CACtC,IAAKC,CAAAA,cAAL,EADsC,CAEtCC,CAAC,CAAC,4BAAD,CAAD,CAA8BC,EAA9B,CAAiC,QAAjC,CAA2C,KAAKF,cAAhD,EACA,CAJF,CAKCA,cAAc,CAAE,SAAY,cAAA,EAAA,CAAA,mBACR,CAAGC,CAAC,CAAC,4BAAD,CADI,CAEvBE,eAAe,CAAGF,CAAC,CAAC,8BAAD,CAFI,CAGvBG,KAAK,CAAGC,eAAe,CAACC,GAAhB,EAHe,CAIb,MAAV,GAAAF,KAJuB,CAK1BD,eAAe,CAACI,IAAhB,CAAqB,UAArB,CAL0B,CAAA,CAAA,CAAA,CAO1BJ,eAAe,CAACI,IAAhB,CAAqB,UAArB,KAED,CAdF,CAeCC,cAAc,CAAE,SAAA,cAAA,EAAY,CAC3B,IAAKC,CAAAA,MAAL,EAD2B,CAE3B,IAAA,CAAKV,yBAAL,GACA,CAlBF,CAHa;;"} \ No newline at end of file +{"version":3,"file":"Edit.min.js","sources":["Edit.js"],"sourcesContent":["/*+***********************************************************************************\n * The contents of this file are subject to the vtiger CRM Public License Version 1.0\n * (\"License\"); You may not use this file except in compliance with the License\n * The Original Code is: vtiger CRM Open Source\n * The Initial Developer of the Original Code is vtiger.\n * Portions created by vtiger are Copyright (C) vtiger.\n * All Rights Reserved.\n * Contributor(s): YetiForce S.A.\n *************************************************************************************/\n'use strict';\n\nVtiger_Edit_Js(\n\t'Products_Edit_Js',\n\t{},\n\t{\n\t\tregisterEventForUsageunit: function () {\n\t\t\tthis.checkUsageUnit();\n\t\t\t$('select[name=\"usageunit\"]').on('change', this.checkUsageUnit);\n\t\t},\n\t\tcheckUsageUnit: function () {\n\t\t\tvar selectUsageunit = $('select[name=\"usageunit\"]');\n\t\t\tvar inputQtyPerUnit = $('input[name=\"qty_per_unit\"]');\n\t\t\tvar value = selectUsageunit.val();\n\t\t\tif (value === 'pack') {\n\t\t\t\tinputQtyPerUnit.prop('disabled', false);\n\t\t\t} else {\n\t\t\t\tinputQtyPerUnit.prop('disabled', true);\n\t\t\t}\n\t\t},\n\t\tregisterEvents: function () {\n\t\t\tthis._super();\n\t\t\tthis.registerEventForUsageunit();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Edit_Js","registerEventForUsageunit","checkUsageUnit","$","on","selectUsageunit","inputQtyPerUnit","value","val","prop","registerEvents","_super"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFACA,YAAY,CAEZA,cAAc,CACb,kBAAkB,CAClB,EAAE,CACF,CACCC,yBAAyB,CAAE,SAAAA,yBAAAA,EAAY,CACtC,IAAI,CAACC,cAAc,EAAE,CACrBC,CAAC,CAAC,4BAA0B,CAAC,CAACC,EAAE,CAAC,QAAQ,CAAE,IAAI,CAACF,cAAc,EAC/D,CAAC,CACDA,cAAc,CAAE,SAAAA,cAAA,EAAY,CACvB,IAAAG,eAAe,CAAGF,CAAC,CAAC,4BAA0B,CAAC,CAC/CG,eAAe,CAAGH,CAAC,CAAC,8BAA4B,CAAC,CACjDI,KAAK,CAAGF,eAAe,CAACG,GAAG,EAAE,CACnB,MAAM,GAAhBD,KAAgB,CACnBD,eAAe,CAACG,IAAI,CAAC,UAAU,CAAA,CAAA,CAAO,CAAC,CAEvCH,eAAe,CAACG,IAAI,CAAC,UAAU,CAAM,CAAA,CAAA,EAEvC,CAAC,CACDC,cAAc,CAAE,SAAAA,cAAA,EAAY,CAC3B,IAAI,CAACC,MAAM,EAAE,CACb,IAAI,CAACV,yBAAyB,GAC/B,CACD,CACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/Products/resources/RelatedList.min.js b/public_html/layouts/basic/modules/Products/resources/RelatedList.min.js index 5849e9f14d71..53543975ae79 100644 --- a/public_html/layouts/basic/modules/Products/resources/RelatedList.min.js +++ b/public_html/layouts/basic/modules/Products/resources/RelatedList.min.js @@ -1,4 +1,4 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */"use strict";Vtiger_RelatedList_Js("Products_RelatedList_Js",{},{registerEditListPrice:function registerEditListPrice(){var thisInstance=this,element=this.content.find(".js-edit-listprice");element.validationEngine(app.validationEngineOptions),element.on("change",function(e){e.stopPropagation();var element=$(this);element.formatNumber(),element.validationEngine("validate")||AppConnector.request({module:thisInstance.parentModuleName,record:element.closest(".js-list__row").data("id"),action:"RelationAjax",mode:"addListPrice",src_record:thisInstance.parentRecordId,related_module:thisInstance.moduleName,price:element.val()}).done(function(responseData){responseData.result&&app.showNotify({text:app.vtranslate("JS_SAVE_NOTIFY_OK"),type:"success"});});});},registerEditQtyProducts:function registerEditQtyProducts(){var thisInstance=this,element=this.content.find(".js-edit-qtyinstock");element.validationEngine(app.validationEngineOptions),element.on("change",function(e){e.stopPropagation();var element=$(this);element.formatNumber(),element.validationEngine("validate")||AppConnector.request({module:thisInstance.parentModuleName,record:element.closest(".js-list__row").data("id"),action:"RelationAjax",mode:"setQtyProducts",src_record:thisInstance.parentRecordId,related_module:thisInstance.moduleName,qty:element.val()}).done(function(responseData){responseData.result&&app.showNotify({text:app.vtranslate("JS_SAVE_NOTIFY_OK"),type:"success"});});});},registerPostLoadEvents:function registerPostLoadEvents(){this._super(),this.registerEditListPrice(),this.registerEditQtyProducts();}}); +/* {[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]} */"use strict";Vtiger_RelatedList_Js("Products_RelatedList_Js",{},{registerEditListPrice:function registerEditListPrice(){var thisInstance=this,element=this.content.find(".js-edit-listprice");element.validationEngine(app.validationEngineOptions),element.on("change",function(e){e.stopPropagation();var element=$(this);element.formatNumber(),element.validationEngine("validate")||AppConnector.request({module:thisInstance.parentModuleName,record:element.closest(".js-list__row").data("id"),action:"RelationAjax",mode:"addListPrice",src_record:thisInstance.parentRecordId,related_module:thisInstance.moduleName,price:element.val()}).done(function(responseData){responseData.result&&app.showNotify({text:app.vtranslate("JS_SAVE_NOTIFY_OK"),type:"success"});});});},registerEditQtyProducts:function registerEditQtyProducts(){var thisInstance=this,element=this.content.find(".js-edit-qtyinstock");element.validationEngine(app.validationEngineOptions),element.on("change",function(e){e.stopPropagation();var element=$(this);element.formatNumber(),element.validationEngine("validate")||AppConnector.request({module:thisInstance.parentModuleName,record:element.closest(".js-list__row").data("id"),action:"RelationAjax",mode:"setQtyProducts",src_record:thisInstance.parentRecordId,related_module:thisInstance.moduleName,qty:element.val()}).done(function(responseData){responseData.result&&app.showNotify({text:app.vtranslate("JS_SAVE_NOTIFY_OK"),type:"success"});});});},registerPostLoadEvents:function registerPostLoadEvents(){this._super(),this.registerEditListPrice(),this.registerEditQtyProducts();}}); //# sourceMappingURL=RelatedList.min.js.map diff --git a/public_html/layouts/basic/modules/Products/resources/RelatedList.min.js.map b/public_html/layouts/basic/modules/Products/resources/RelatedList.min.js.map index e06cb63421f1..9025f7511787 100644 --- a/public_html/layouts/basic/modules/Products/resources/RelatedList.min.js.map +++ b/public_html/layouts/basic/modules/Products/resources/RelatedList.min.js.map @@ -1 +1 @@ -{"version":3,"file":"RelatedList.min.js","sources":["RelatedList.js"],"sourcesContent":["/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */\n'use strict';\n\nVtiger_RelatedList_Js(\n\t'Products_RelatedList_Js',\n\t{},\n\t{\n\t\tregisterEditListPrice: function () {\n\t\t\tlet thisInstance = this;\n\t\t\tlet element = this.content.find('.js-edit-listprice');\n\t\t\telement.validationEngine(app.validationEngineOptions);\n\t\t\telement.on('change', function (e) {\n\t\t\t\te.stopPropagation();\n\t\t\t\tlet element = $(this);\n\t\t\t\telement.formatNumber();\n\t\t\t\tif (!element.validationEngine('validate')) {\n\t\t\t\t\tAppConnector.request({\n\t\t\t\t\t\tmodule: thisInstance.parentModuleName,\n\t\t\t\t\t\trecord: element.closest('.js-list__row').data('id'),\n\t\t\t\t\t\taction: 'RelationAjax',\n\t\t\t\t\t\tmode: 'addListPrice',\n\t\t\t\t\t\tsrc_record: thisInstance.parentRecordId,\n\t\t\t\t\t\trelated_module: thisInstance.moduleName,\n\t\t\t\t\t\tprice: element.val()\n\t\t\t\t\t}).done(function (responseData) {\n\t\t\t\t\t\tif (responseData.result) {\n\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\ttext: app.vtranslate('JS_SAVE_NOTIFY_OK'),\n\t\t\t\t\t\t\t\ttype: 'success'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tregisterEditQtyProducts: function () {\n\t\t\tlet thisInstance = this;\n\t\t\tlet element = this.content.find('.js-edit-qtyinstock');\n\t\t\telement.validationEngine(app.validationEngineOptions);\n\t\t\telement.on('change', function (e) {\n\t\t\t\te.stopPropagation();\n\t\t\t\tlet element = $(this);\n\t\t\t\telement.formatNumber();\n\t\t\t\tif (!element.validationEngine('validate')) {\n\t\t\t\t\tAppConnector.request({\n\t\t\t\t\t\tmodule: thisInstance.parentModuleName,\n\t\t\t\t\t\trecord: element.closest('.js-list__row').data('id'),\n\t\t\t\t\t\taction: 'RelationAjax',\n\t\t\t\t\t\tmode: 'setQtyProducts',\n\t\t\t\t\t\tsrc_record: thisInstance.parentRecordId,\n\t\t\t\t\t\trelated_module: thisInstance.moduleName,\n\t\t\t\t\t\tqty: element.val()\n\t\t\t\t\t}).done(function (responseData) {\n\t\t\t\t\t\tif (responseData.result) {\n\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\ttext: app.vtranslate('JS_SAVE_NOTIFY_OK'),\n\t\t\t\t\t\t\t\ttype: 'success'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tregisterPostLoadEvents: function () {\n\t\t\tthis._super();\n\t\t\tthis.registerEditListPrice();\n\t\t\tthis.registerEditQtyProducts();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_RelatedList_Js","registerEditListPrice","thisInstance","element","content","find","validationEngine","app","validationEngineOptions","on","e","stopPropagation","$","formatNumber","AppConnector","request","module","parentModuleName","record","closest","data","action","mode","src_record","parentRecordId","related_module","moduleName","price","val","done","responseData","result","showNotify","text","vtranslate","type","registerEditQtyProducts","qty","registerPostLoadEvents","_super"],"mappings":";;AAAA,kKACA,aAEAA,qBAAqB,CACpB,yBADoB,CAEpB,EAFoB,CAGpB,CACCC,qBAAqB,CAAE,gCAAY,CAC9BC,IAAAA,YAAY,CAAG,IADe,CAE9BC,OAAO,CAAG,IAAKC,CAAAA,OAAL,CAAaC,IAAb,CAAkB,oBAAlB,CAFoB,CAGlCF,OAAO,CAACG,gBAAR,CAAyBC,GAAG,CAACC,uBAA7B,CAHkC,CAIlCL,OAAO,CAACM,EAAR,CAAW,QAAX,CAAqB,SAAUC,CAAV,CAAa,CACjCA,CAAC,CAACC,eAAF,EADiC,CAEjC,IAAW,OAAA,CAAGC,CAAC,CAAC,IAAD,CAAf,CACAT,OAAO,CAACU,YAAR,EAHiC,CAI5BV,OAAO,CAACG,gBAAR,CAAyB,UAAzB,CAJ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HY,CAIpBC,IAAI,CAAE,gBAJc,CAKpBC,UAAU,CAAErB,YAAY,CAACsB,cALL,CAMpBC,cAAc,CAAEvB,YAAY,CAACwB,UANT,CAOpBW,GAAG,CAAElC,OAAO,CAACyB,GAAR,EAPe,CAArB,EAQGC,IARH,CAQQ,SAAUC,YAAV,CAAwB,CAC3BA,YAAY,CAACC,MADc,EAE9BxB,GAAG,CAACyB,UAAJ,CAAe,CACdC,IAAI,CAAE1B,GAAG,CAAC2B,UAAJ,CAAe,mBAAf,CADQ,CAEdC,IAAI,CAAE,SAFQ,CAAf,EAKD,CAfD,EAiBD,CAtBD,EAuBA,CAxDF,CAyDCG,sBAAsB,CAAE,SAAA,sBAAA,EAAY,CACnC,IAAA,CAAKC,MAAL,EADmC,CAEnC,IAAKtC,CAAAA,qBAAL,EAFmC,CAGnC,IAAA,CAAKmC,uBAAL,GACA,CA7DF,CAHoB;;"} \ No newline at end of file +{"version":3,"file":"RelatedList.min.js","sources":["RelatedList.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\nVtiger_RelatedList_Js(\n\t'Products_RelatedList_Js',\n\t{},\n\t{\n\t\tregisterEditListPrice: function () {\n\t\t\tlet thisInstance = this;\n\t\t\tlet element = this.content.find('.js-edit-listprice');\n\t\t\telement.validationEngine(app.validationEngineOptions);\n\t\t\telement.on('change', function (e) {\n\t\t\t\te.stopPropagation();\n\t\t\t\tlet element = $(this);\n\t\t\t\telement.formatNumber();\n\t\t\t\tif (!element.validationEngine('validate')) {\n\t\t\t\t\tAppConnector.request({\n\t\t\t\t\t\tmodule: thisInstance.parentModuleName,\n\t\t\t\t\t\trecord: element.closest('.js-list__row').data('id'),\n\t\t\t\t\t\taction: 'RelationAjax',\n\t\t\t\t\t\tmode: 'addListPrice',\n\t\t\t\t\t\tsrc_record: thisInstance.parentRecordId,\n\t\t\t\t\t\trelated_module: thisInstance.moduleName,\n\t\t\t\t\t\tprice: element.val()\n\t\t\t\t\t}).done(function (responseData) {\n\t\t\t\t\t\tif (responseData.result) {\n\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\ttext: app.vtranslate('JS_SAVE_NOTIFY_OK'),\n\t\t\t\t\t\t\t\ttype: 'success'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tregisterEditQtyProducts: function () {\n\t\t\tlet thisInstance = this;\n\t\t\tlet element = this.content.find('.js-edit-qtyinstock');\n\t\t\telement.validationEngine(app.validationEngineOptions);\n\t\t\telement.on('change', function (e) {\n\t\t\t\te.stopPropagation();\n\t\t\t\tlet element = $(this);\n\t\t\t\telement.formatNumber();\n\t\t\t\tif (!element.validationEngine('validate')) {\n\t\t\t\t\tAppConnector.request({\n\t\t\t\t\t\tmodule: thisInstance.parentModuleName,\n\t\t\t\t\t\trecord: element.closest('.js-list__row').data('id'),\n\t\t\t\t\t\taction: 'RelationAjax',\n\t\t\t\t\t\tmode: 'setQtyProducts',\n\t\t\t\t\t\tsrc_record: thisInstance.parentRecordId,\n\t\t\t\t\t\trelated_module: thisInstance.moduleName,\n\t\t\t\t\t\tqty: element.val()\n\t\t\t\t\t}).done(function (responseData) {\n\t\t\t\t\t\tif (responseData.result) {\n\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\ttext: app.vtranslate('JS_SAVE_NOTIFY_OK'),\n\t\t\t\t\t\t\t\ttype: 'success'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tregisterPostLoadEvents: function () {\n\t\t\tthis._super();\n\t\t\tthis.registerEditListPrice();\n\t\t\tthis.registerEditQtyProducts();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_RelatedList_Js","registerEditListPrice","thisInstance","element","content","find","validationEngine","app","validationEngineOptions","on","e","stopPropagation","$","formatNumber","AppConnector","request","module","parentModuleName","record","closest","data","action","mode","src_record","parentRecordId","related_module","moduleName","price","val","done","responseData","result","showNotify","text","vtranslate","type","registerEditQtyProducts","qty","registerPostLoadEvents","_super"],"mappings":";;AAAA,kKACA,YAAY,CAEZA,qBAAqB,CACpB,yBAAyB,CACzB,EAAE,CACF,CACCC,qBAAqB,CAAE,SAAAA,qBAAAA,EAAY,CAC9B,IAAAC,YAAY,CAAG,IAAI,CACnBC,OAAO,CAAG,IAAI,CAACC,OAAO,CAACC,IAAI,CAAC,oBAAoB,CAAC,CACrDF,OAAO,CAACG,gBAAgB,CAACC,GAAG,CAACC,uBAAuB,CAAC,CACrDL,OAAO,CAACM,EAAE,CAAC,QAAQ,CAAE,SAAUC,CAAC,CAAE,CACjCA,CAAC,CAACC,eAAe,EAAE,CACnB,IAAIR,OAAO,CAAGS,CAAC,CAAC,IAAI,CAAC,CACrBT,OAAO,CAACU,YAAY,EAAE,CACjBV,OAAO,CAACG,gBAAgB,CAAC,UAAU,CAAC,EACxCQ,YAAY,CAACC,OAAO,CAAC,CACpBC,MAAM,CAAEd,YAAY,CAACe,gBAAgB,CACrCC,MAAM,CAAEf,OAAO,CAACgB,OAAO,CAAC,eAAe,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC,CACnDC,MAAM,CAAE,cAAc,CACtBC,IAAI,CAAE,cAAc,CACpBC,UAAU,CAAErB,YAAY,CAACsB,cAAc,CACvCC,cAAc,CAAEvB,YAAY,CAACwB,UAAU,CACvCC,KAAK,CAAExB,OAAO,CAACyB,GAAG,EACnB,CAAC,CAAC,CAACC,IAAI,CAAC,SAAUC,YAAY,CAAE,CAC3BA,YAAY,CAACC,MAAM,EACtBxB,GAAG,CAACyB,UAAU,CAAC,CACdC,IAAI,CAAE1B,GAAG,CAAC2B,UAAU,CAAC,mBAAmB,CAAC,CACzCC,IAAI,CAAE,SACP,CAAC,EAEH,CAAC,EAEH,CAAC,EACF,CAAC,CACDC,uBAAuB,CAAE,SAAAA,uBAAAA,EAAY,CAChC,IAAAlC,YAAY,CAAG,IAAI,CACnBC,OAAO,CAAG,IAAI,CAACC,OAAO,CAACC,IAAI,CAAC,qBAAqB,CAAC,CACtDF,OAAO,CAACG,gBAAgB,CAACC,GAAG,CAACC,uBAAuB,CAAC,CACrDL,OAAO,CAACM,EAAE,CAAC,QAAQ,CAAE,SAAUC,CAAC,CAAE,CACjCA,CAAC,CAACC,eAAe,EAAE,CACnB,IAAIR,OAAO,CAAGS,CAAC,CAAC,IAAI,CAAC,CACrBT,OAAO,CAACU,YAAY,EAAE,CACjBV,OAAO,CAACG,gBAAgB,CAAC,UAAU,CAAC,EACxCQ,YAAY,CAACC,OAAO,CAAC,CACpBC,MAAM,CAAEd,YAAY,CAACe,gBAAgB,CACrCC,MAAM,CAAEf,OAAO,CAACgB,OAAO,CAAC,eAAe,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC,CACnDC,MAAM,CAAE,cAAc,CACtBC,IAAI,CAAE,gBAAgB,CACtBC,UAAU,CAAErB,YAAY,CAACsB,cAAc,CACvCC,cAAc,CAAEvB,YAAY,CAACwB,UAAU,CACvCW,GAAG,CAAElC,OAAO,CAACyB,GAAG,EACjB,CAAC,CAAC,CAACC,IAAI,CAAC,SAAUC,YAAY,CAAE,CAC3BA,YAAY,CAACC,MAAM,EACtBxB,GAAG,CAACyB,UAAU,CAAC,CACdC,IAAI,CAAE1B,GAAG,CAAC2B,UAAU,CAAC,mBAAmB,CAAC,CACzCC,IAAI,CAAE,SACP,CAAC,EAEH,CAAC,EAEH,CAAC,EACF,CAAC,CACDG,sBAAsB,CAAE,SAAAA,sBAAAA,EAAY,CACnC,IAAI,CAACC,MAAM,EAAE,CACb,IAAI,CAACtC,qBAAqB,EAAE,CAC5B,IAAI,CAACmC,uBAAuB,GAC7B,CACD,CACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/Products/resources/StocktakingModal.min.js b/public_html/layouts/basic/modules/Products/resources/StocktakingModal.min.js index 315b538c0fc7..570be1e55b2c 100644 --- a/public_html/layouts/basic/modules/Products/resources/StocktakingModal.min.js +++ b/public_html/layouts/basic/modules/Products/resources/StocktakingModal.min.js @@ -1,6 +1,6 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var descriptor,i=0;i {\n\t\t\tif (!form.validationEngine('validate')) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tlet formData = new FormData(form[0]);\n\t\t\tformData.append('module', 'Products');\n\t\t\tformData.append('action', 'StocktakingModal');\n\t\t\tformData.append('mode', 'analyzeFile');\n\t\t\tlet progress = $.progressIndicator({ position: 'html', blockInfo: { enabled: true } });\n\t\t\tAppConnector.request({\n\t\t\t\turl: 'index.php',\n\t\t\t\ttype: 'POST',\n\t\t\t\tdata: formData,\n\t\t\t\tprocessData: false,\n\t\t\t\tcontentType: false\n\t\t\t})\n\t\t\t\t.done((response) => {\n\t\t\t\t\tthis.showStep('selectColumn');\n\t\t\t\t\tthis.container.find('.js-encoding').val(response.result.encoding);\n\t\t\t\t\tthis.container.find('.js-count').val(response.result.count);\n\t\t\t\t\tthis.container.find('.js-randomKey').val(response.result.randomKey);\n\t\t\t\t\tlet eanField = this.container.find('#skuColumnSeq');\n\t\t\t\t\tlet qtyField = this.container.find('#qtyColumnSeq');\n\t\t\t\t\t$.each(response.result.column, function (index, value) {\n\t\t\t\t\t\teanField.append(``);\n\t\t\t\t\t\tqtyField.append(``);\n\t\t\t\t\t});\n\t\t\t\t\tqtyField.val(1);\n\t\t\t\t\tApp.Fields.Picklist.showSelect2ElementView(qtyField);\n\t\t\t\t\tApp.Fields.Picklist.showSelect2ElementView(eanField);\n\t\t\t\t\tprogress.progressIndicator({ mode: 'hide' });\n\t\t\t\t})\n\t\t\t\t.fail(() => {\n\t\t\t\t\tprogress.progressIndicator({ mode: 'hide' });\n\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\ttext: app.vtranslate('JS_ERROR'),\n\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t});\n\t}\n\t/**\n\t * Register compare stock levels.\n\t */\n\tregisterCompare() {\n\t\tlet form = this.container.find('form');\n\t\tthis.container.find('.js-compare').on('click', () => {\n\t\t\tlet formData = form.serializeFormData();\n\t\t\tformData['module'] = 'Products';\n\t\t\tformData['action'] = 'StocktakingModal';\n\t\t\tformData['mode'] = 'compare';\n\t\t\tlet progress = $.progressIndicator({ position: 'html', blockInfo: { enabled: true } });\n\t\t\tAppConnector.request(formData)\n\t\t\t\t.done((response) => {\n\t\t\t\t\tthis.showStep('showCompare');\n\t\t\t\t\tthis.container.find('.js-entries-update').val(response.result.update);\n\t\t\t\t\tthis.container.find('.js-entries-no-update').val(response.result.same);\n\t\t\t\t\tthis.container.find('.js-entries-not-found').val(response.result.counterNotFound);\n\t\t\t\t\tthis.container.find('.js-list-entries-not-found').val(response.result.notFound);\n\t\t\t\t\tthis.toUpdate = response.result.toUpdate;\n\t\t\t\t\tif (response.result.update === 0) {\n\t\t\t\t\t\tthis.container.find('.js-import').addClass('d-none');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (formData['storage'] != 0) {\n\t\t\t\t\t\t\tthis.container.find('.js-record-name').removeClass('d-none');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tprogress.progressIndicator({ mode: 'hide' });\n\t\t\t\t})\n\t\t\t\t.fail(() => {\n\t\t\t\t\tprogress.progressIndicator({ mode: 'hide' });\n\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\ttext: app.vtranslate('JS_ERROR'),\n\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t});\n\t}\n\t/**\n\t * Register importing stock differences.\n\t */\n\tregisterImport() {\n\t\tlet form = this.container.find('form');\n\t\tthis.container.find('.js-import').on('click', () => {\n\t\t\tlet formData = form.serializeFormData();\n\t\t\tif (formData['storage'] != 0 && !form.validationEngine('validate')) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tformData['module'] = 'Products';\n\t\t\tformData['action'] = 'StocktakingModal';\n\t\t\tformData['mode'] = 'import';\n\t\t\tformData['records'] = this.toUpdate;\n\t\t\tlet progress = $.progressIndicator({ position: 'html', blockInfo: { enabled: true } });\n\t\t\tAppConnector.request(formData)\n\t\t\t\t.done((response) => {\n\t\t\t\t\tthis.showStep('showSummary');\n\t\t\t\t\tif (response.result.product) {\n\t\t\t\t\t\tthis.container.find('.js-imported').removeClass('d-none');\n\t\t\t\t\t\tthis.container.find('.js-imported-counter').val(response.result.product);\n\t\t\t\t\t}\n\t\t\t\t\tif (response.result.igin) {\n\t\t\t\t\t\tthis.container\n\t\t\t\t\t\t\t.find('.js-btn-igin')\n\t\t\t\t\t\t\t.removeClass('d-none')\n\t\t\t\t\t\t\t.attr('href', 'index.php?module=IGIN&view=Detail&record=' + response.result.igin);\n\t\t\t\t\t}\n\t\t\t\t\tif (response.result.iidn) {\n\t\t\t\t\t\tthis.container\n\t\t\t\t\t\t\t.find('.js-btn-iidn')\n\t\t\t\t\t\t\t.removeClass('d-none')\n\t\t\t\t\t\t\t.attr('href', 'index.php?module=IIDN&view=Detail&record=' + response.result.iidn);\n\t\t\t\t\t}\n\t\t\t\t\tif (response.result.igin || response.result.iidn) {\n\t\t\t\t\t\tthis.container.find('.js-alert').removeClass('d-none');\n\t\t\t\t\t}\n\t\t\t\t\tprogress.progressIndicator({ mode: 'hide' });\n\t\t\t\t})\n\t\t\t\t.fail(() => {\n\t\t\t\t\tprogress.progressIndicator({ mode: 'hide' });\n\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\ttext: app.vtranslate('JS_ERROR'),\n\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t});\n\t}\n\t/**\n\t * Register modal events.\n\t * @param {jQuery} modalContainer\n\t */\n\tregisterEvents(modalContainer) {\n\t\tthis.container = modalContainer;\n\t\tthis.registerAnalyzeFile();\n\t\tthis.registerCompare();\n\t\tthis.registerImport();\n\t}\n};\n"],"names":["window","Products_StocktakingModal_JS","name","container","find","addClass","removeClass","form","validationEngine","app","validationEngineOptions","on","formData","append","$","progressIndicator","position","blockInfo","enabled","AppConnector","request","url","type","data","processData","contentType","done","response","showStep","val","result","encoding","count","randomKey","qtyField","each","column","index","value","eanField","App","Fields","Picklist","showSelect2ElementView","progress","mode","fail","showNotify","text","vtranslate","serializeFormData","update","same","counterNotFound","notFound","toUpdate","product","igin","attr","iidn","modalContainer","registerAnalyzeFile","registerCompare","registerImport"],"mappings":";;AAAA,kKACA,urBAEAA,MAAM,CAACC,4BAAP,cACC,UAAA,CAAA,SAAA,MAAA,EAAA,CAAA,eAAA,CAAA,IAAA,CAAA,MAAA,EAAA,CAAA,OAAA,YAAA,CAAA,MAAA,CAAA,CAAA,CAAA,GAAA,CAAA,UAAA,CAAA,KAAA;AACD;AACA;AACA,IACC,SAAA,QAAA,CAASC,IAAT,CAAe,CACd,IAAA,CAAKC,SAAL,CAAeC,IAAf,CAAoB,UAApB,CAAA,CAAgCC,QAAhC,CAAyC,QAAzC,CADc,CAEd,IAAA,CAAKF,SAAL,CAAeC,IAAf,CAAA,uBAAA,CAAA,MAAA,CAA2CF,IAA3C,CAAA,KAAA,CAAA,CAAA,CAAqDI,WAArD,CAAiE,QAAjE,EACA,CACD;AACD;AACA,uCACC,SAAsB,mBAAA,EAAA,CAAA,IAAA,KAAA,CAAA,IAAA,CACjBC,IAAI,CAAG,KAAKJ,SAAL,CAAeC,IAAf,CAAoB,MAApB,CADU,CAErBG,IAAI,CAACC,gBAAL,CAAsBC,GAAG,CAACC,uBAA1B,CAFqB,CAGrB,IAAA,CAAKP,SAAL,CAAeC,IAAf,CAAoB,eAApB,CAAqCO,CAAAA,EAArC,CAAwC,OAAxC,CAA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,MAAR,CAA3B,CADW,CAEXpC,GAAG,CAACsC,UAAJ,CAAe,CACdC,IAAI,CAAEvC,GAAG,CAACwC,UAAJ,CAAe,UAAf,CADQ,CAEd3B,IAAI,CAAE,OAFQ,CAAf,EAIA,CA9BF,EARA,CAuCA,CAzCD,EA0CA,CACD;AACD;AACA;AACA,KAhJA,CAAA,CAAA,GAAA,CAAA,gBAAA,CAAA,KAAA,CAiJC,wBAAesC,cAAf,CAA+B,CAC9B,IAAKzD,CAAAA,SAAL,CAAiByD,cADa,CAE9B,IAAA,CAAKC,mBAAL,EAF8B,CAG9B,KAAKC,eAAL,EAH8B,CAI9B,IAAKC,CAAAA,cAAL,GACA,CAtJF;;"} \ No newline at end of file +{"version":3,"file":"StocktakingModal.min.js","sources":["StocktakingModal.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\nwindow.Products_StocktakingModal_JS = class {\n\t/**\n\t * Show step by name.\n\t * @param {string} name\n\t */\n\tshowStep(name) {\n\t\tthis.container.find('.js-step').addClass('d-none');\n\t\tthis.container.find(`.js-step[data-step=\"${name}\"]`).removeClass('d-none');\n\t}\n\t/**\n\t * Register analyze file events.\n\t */\n\tregisterAnalyzeFile() {\n\t\tlet form = this.container.find('form');\n\t\tform.validationEngine(app.validationEngineOptions);\n\t\tthis.container.find('.js-send-file').on('click', () => {\n\t\t\tif (!form.validationEngine('validate')) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tlet formData = new FormData(form[0]);\n\t\t\tformData.append('module', 'Products');\n\t\t\tformData.append('action', 'StocktakingModal');\n\t\t\tformData.append('mode', 'analyzeFile');\n\t\t\tlet progress = $.progressIndicator({ position: 'html', blockInfo: { enabled: true } });\n\t\t\tAppConnector.request({\n\t\t\t\turl: 'index.php',\n\t\t\t\ttype: 'POST',\n\t\t\t\tdata: formData,\n\t\t\t\tprocessData: false,\n\t\t\t\tcontentType: false\n\t\t\t})\n\t\t\t\t.done((response) => {\n\t\t\t\t\tthis.showStep('selectColumn');\n\t\t\t\t\tthis.container.find('.js-encoding').val(response.result.encoding);\n\t\t\t\t\tthis.container.find('.js-count').val(response.result.count);\n\t\t\t\t\tthis.container.find('.js-randomKey').val(response.result.randomKey);\n\t\t\t\t\tlet eanField = this.container.find('#skuColumnSeq');\n\t\t\t\t\tlet qtyField = this.container.find('#qtyColumnSeq');\n\t\t\t\t\t$.each(response.result.column, function (index, value) {\n\t\t\t\t\t\teanField.append(``);\n\t\t\t\t\t\tqtyField.append(``);\n\t\t\t\t\t});\n\t\t\t\t\tqtyField.val(1);\n\t\t\t\t\tApp.Fields.Picklist.showSelect2ElementView(qtyField);\n\t\t\t\t\tApp.Fields.Picklist.showSelect2ElementView(eanField);\n\t\t\t\t\tprogress.progressIndicator({ mode: 'hide' });\n\t\t\t\t})\n\t\t\t\t.fail(() => {\n\t\t\t\t\tprogress.progressIndicator({ mode: 'hide' });\n\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\ttext: app.vtranslate('JS_ERROR'),\n\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t});\n\t}\n\t/**\n\t * Register compare stock levels.\n\t */\n\tregisterCompare() {\n\t\tlet form = this.container.find('form');\n\t\tthis.container.find('.js-compare').on('click', () => {\n\t\t\tlet formData = form.serializeFormData();\n\t\t\tformData['module'] = 'Products';\n\t\t\tformData['action'] = 'StocktakingModal';\n\t\t\tformData['mode'] = 'compare';\n\t\t\tlet progress = $.progressIndicator({ position: 'html', blockInfo: { enabled: true } });\n\t\t\tAppConnector.request(formData)\n\t\t\t\t.done((response) => {\n\t\t\t\t\tthis.showStep('showCompare');\n\t\t\t\t\tthis.container.find('.js-entries-update').val(response.result.update);\n\t\t\t\t\tthis.container.find('.js-entries-no-update').val(response.result.same);\n\t\t\t\t\tthis.container.find('.js-entries-not-found').val(response.result.counterNotFound);\n\t\t\t\t\tthis.container.find('.js-list-entries-not-found').val(response.result.notFound);\n\t\t\t\t\tthis.toUpdate = response.result.toUpdate;\n\t\t\t\t\tif (response.result.update === 0) {\n\t\t\t\t\t\tthis.container.find('.js-import').addClass('d-none');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (formData['storage'] != 0) {\n\t\t\t\t\t\t\tthis.container.find('.js-record-name').removeClass('d-none');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tprogress.progressIndicator({ mode: 'hide' });\n\t\t\t\t})\n\t\t\t\t.fail(() => {\n\t\t\t\t\tprogress.progressIndicator({ mode: 'hide' });\n\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\ttext: app.vtranslate('JS_ERROR'),\n\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t});\n\t}\n\t/**\n\t * Register importing stock differences.\n\t */\n\tregisterImport() {\n\t\tlet form = this.container.find('form');\n\t\tthis.container.find('.js-import').on('click', () => {\n\t\t\tlet formData = form.serializeFormData();\n\t\t\tif (formData['storage'] != 0 && !form.validationEngine('validate')) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tformData['module'] = 'Products';\n\t\t\tformData['action'] = 'StocktakingModal';\n\t\t\tformData['mode'] = 'import';\n\t\t\tformData['records'] = this.toUpdate;\n\t\t\tlet progress = $.progressIndicator({ position: 'html', blockInfo: { enabled: true } });\n\t\t\tAppConnector.request(formData)\n\t\t\t\t.done((response) => {\n\t\t\t\t\tthis.showStep('showSummary');\n\t\t\t\t\tif (response.result.product) {\n\t\t\t\t\t\tthis.container.find('.js-imported').removeClass('d-none');\n\t\t\t\t\t\tthis.container.find('.js-imported-counter').val(response.result.product);\n\t\t\t\t\t}\n\t\t\t\t\tif (response.result.igin) {\n\t\t\t\t\t\tthis.container\n\t\t\t\t\t\t\t.find('.js-btn-igin')\n\t\t\t\t\t\t\t.removeClass('d-none')\n\t\t\t\t\t\t\t.attr('href', 'index.php?module=IGIN&view=Detail&record=' + response.result.igin);\n\t\t\t\t\t}\n\t\t\t\t\tif (response.result.iidn) {\n\t\t\t\t\t\tthis.container\n\t\t\t\t\t\t\t.find('.js-btn-iidn')\n\t\t\t\t\t\t\t.removeClass('d-none')\n\t\t\t\t\t\t\t.attr('href', 'index.php?module=IIDN&view=Detail&record=' + response.result.iidn);\n\t\t\t\t\t}\n\t\t\t\t\tif (response.result.igin || response.result.iidn) {\n\t\t\t\t\t\tthis.container.find('.js-alert').removeClass('d-none');\n\t\t\t\t\t}\n\t\t\t\t\tprogress.progressIndicator({ mode: 'hide' });\n\t\t\t\t})\n\t\t\t\t.fail(() => {\n\t\t\t\t\tprogress.progressIndicator({ mode: 'hide' });\n\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\ttext: app.vtranslate('JS_ERROR'),\n\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t});\n\t}\n\t/**\n\t * Register modal events.\n\t * @param {jQuery} modalContainer\n\t */\n\tregisterEvents(modalContainer) {\n\t\tthis.container = modalContainer;\n\t\tthis.registerAnalyzeFile();\n\t\tthis.registerCompare();\n\t\tthis.registerImport();\n\t}\n};\n"],"names":["_typeof","o","Symbol","iterator","constructor","prototype","_classCallCheck","instance","Constructor","TypeError","_defineProperties","target","props","descriptor","i","length","enumerable","configurable","writable","Object","defineProperty","_toPropertyKey","key","_createClass","protoProps","staticProps","arg","_toPrimitive","String","input","hint","prim","toPrimitive","res","call","Number","window","Products_StocktakingModal_JS","_class","value","showStep","name","container","find","addClass","concat","removeClass","registerAnalyzeFile","_this","form","validationEngine","app","validationEngineOptions","on","formData","FormData","append","progress","$","progressIndicator","position","blockInfo","enabled","AppConnector","request","url","type","data","processData","contentType","done","response","val","result","encoding","count","randomKey","eanField","qtyField","each","column","index","App","Fields","Picklist","showSelect2ElementView","mode","fail","showNotify","text","vtranslate","registerCompare","_this2","serializeFormData","module","action","update","same","counterNotFound","notFound","toUpdate","storage","registerImport","_this3","records","product","igin","attr","iidn","registerEvents","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,CAACE,MAAM,CAACmC,IAAI,CAAC,CAE/ErC,CAAAA,QAAQ,CAACE,MAAM,CAACiC,IAAI,EAAInC,QAAQ,CAACE,MAAM,CAACmC,IAAI,GAC/CL,MAAI,CAAC7D,SAAS,CAACC,IAAI,CAAC,WAAW,CAAC,CAACG,WAAW,CAAC,QAAQ,CAAC,CAEvDW,QAAQ,CAACE,iBAAiB,CAAC,CAAE2B,IAAI,CAAE,MAAO,CAAC,EAC5C,CAAC,CAAC,CACDC,IAAI,CAAC,UAAM,CACX9B,QAAQ,CAACE,iBAAiB,CAAC,CAAE2B,IAAI,CAAE,MAAO,CAAC,CAAC,CAC5CnC,GAAG,CAACqC,UAAU,CAAC,CACdC,IAAI,CAAEtC,GAAG,CAACuC,UAAU,CAAC,UAAU,CAAC,CAChCxB,IAAI,CAAE,OACP,CAAC,EACF,CAAC,EAAC,CACJ,CAAC,EACF,CACA;AACD;AACA;AACA,OAHC5C,GAAA,CAAA,gBAAA,CAAAiB,KAAA,CAIA,SAAAsE,cAAeC,CAAAA,cAAc,CAAE,CAC9B,IAAI,CAACpE,SAAS,CAAGoE,cAAc,CAC/B,IAAI,CAAC/D,mBAAmB,EAAE,CAC1B,IAAI,CAAC4C,eAAe,EAAE,CACtB,IAAI,CAACW,cAAc,GACpB,CAAC,CAAA,CAAA,CAAA,CAAAhE,MAAA,CACD,EAAA;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/Products/resources/TreeRecords.min.js b/public_html/layouts/basic/modules/Products/resources/TreeRecords.min.js index 33db6d00f94b..9c42943fe93e 100644 --- a/public_html/layouts/basic/modules/Products/resources/TreeRecords.min.js +++ b/public_html/layouts/basic/modules/Products/resources/TreeRecords.min.js @@ -1,4 +1,4 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */"use strict";Vtiger_TreeRecords_Js("Products_TreeRecords_Js",{},{getRecordsParams:function getRecordsParams(container){var selected=[],category=[];return $.each(this.treeInstance.jstree("get_selected",!0),function(index,value){value.original.isrecord?selected.push(value.text):category.push(value.original.record_id);}),{module:app.getModuleName(),view:app.getViewName(),branches:selected,filter:container.find("#moduleFilter").val(),category:category}}}); +/* {[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]} */"use strict";Vtiger_TreeRecords_Js("Products_TreeRecords_Js",{},{getRecordsParams:function getRecordsParams(container){var selected=[],category=[];return $.each(this.treeInstance.jstree("get_selected",!0),function(index,value){value.original.isrecord?selected.push(value.text):category.push(value.original.record_id);}),{module:app.getModuleName(),view:app.getViewName(),branches:selected,filter:container.find("#moduleFilter").val(),category:category}}}); //# sourceMappingURL=TreeRecords.min.js.map diff --git a/public_html/layouts/basic/modules/Products/resources/TreeRecords.min.js.map b/public_html/layouts/basic/modules/Products/resources/TreeRecords.min.js.map index 8d71b3053da1..a279e1463280 100644 --- a/public_html/layouts/basic/modules/Products/resources/TreeRecords.min.js.map +++ b/public_html/layouts/basic/modules/Products/resources/TreeRecords.min.js.map @@ -1 +1 @@ -{"version":3,"file":"TreeRecords.min.js","sources":["TreeRecords.js"],"sourcesContent":["/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */\n'use strict';\n\nVtiger_TreeRecords_Js(\n\t'Products_TreeRecords_Js',\n\t{},\n\t{\n\t\tgetRecordsParams: function (container) {\n\t\t\tlet selected = [],\n\t\t\t\tcategory = [];\n\t\t\t$.each(this.treeInstance.jstree('get_selected', true), function (index, value) {\n\t\t\t\tif (value.original.isrecord) {\n\t\t\t\t\tselected.push(value.text);\n\t\t\t\t} else {\n\t\t\t\t\tcategory.push(value.original.record_id);\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn {\n\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\tview: app.getViewName(),\n\t\t\t\tbranches: selected,\n\t\t\t\tfilter: container.find('#moduleFilter').val(),\n\t\t\t\tcategory: category\n\t\t\t};\n\t\t}\n\t}\n);\n"],"names":["Vtiger_TreeRecords_Js","getRecordsParams","container","selected","category","$","each","treeInstance","jstree","index","value","original","isrecord","push","text","record_id","module","app","getModuleName","view","getViewName","branches","filter","find","val"],"mappings":";;AAAA,kKACA,YAAA,CAEAA,qBAAqB,CACpB,yBADoB,CAEpB,EAFoB,CAGpB,CACCC,gBAAgB,CAAE,SAAA,gBAAA,CAAUC,SAAV,CAAqB,CACtC,IAAIC,QAAQ,CAAG,EAAf,CACCC,QAAQ,CAAG,EADZ,CASA,OAPAC,CAAC,CAACC,IAAF,CAAO,IAAKC,CAAAA,YAAL,CAAkBC,MAAlB,CAAyB,cAAzB,CAAA,CAAA,CAAA,CAAP,CAAuD,SAAUC,KAAV,CAAiBC,KAAjB,CAAwB,CAC1EA,KAAK,CAACC,QAAN,CAAeC,QAD2D,CAE7ET,QAAQ,CAACU,IAAT,CAAcH,KAAK,CAACI,IAApB,CAF6E,CAI7EV,QAAQ,CAACS,IAAT,CAAcH,KAAK,CAACC,QAAN,CAAeI,SAA7B,EAED,CAND,CAOA,CAAO,CACNC,MAAM,CAAEC,GAAG,CAACC,aAAJ,EADF,CAENC,IAAI,CAAEF,GAAG,CAACG,WAAJ,EAFA,CAGNC,QAAQ,CAAElB,QAHJ,CAINmB,MAAM,CAAEpB,SAAS,CAACqB,IAAV,CAAe,eAAf,CAAA,CAAgCC,GAAhC,EAJF,CAKNpB,QAAQ,CAAEA,QALJ,CAOP,CAlBF,CAHoB;;"} \ No newline at end of file +{"version":3,"file":"TreeRecords.min.js","sources":["TreeRecords.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\nVtiger_TreeRecords_Js(\n\t'Products_TreeRecords_Js',\n\t{},\n\t{\n\t\tgetRecordsParams: function (container) {\n\t\t\tlet selected = [],\n\t\t\t\tcategory = [];\n\t\t\t$.each(this.treeInstance.jstree('get_selected', true), function (index, value) {\n\t\t\t\tif (value.original.isrecord) {\n\t\t\t\t\tselected.push(value.text);\n\t\t\t\t} else {\n\t\t\t\t\tcategory.push(value.original.record_id);\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn {\n\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\tview: app.getViewName(),\n\t\t\t\tbranches: selected,\n\t\t\t\tfilter: container.find('#moduleFilter').val(),\n\t\t\t\tcategory: category\n\t\t\t};\n\t\t}\n\t}\n);\n"],"names":["Vtiger_TreeRecords_Js","getRecordsParams","container","selected","category","$","each","treeInstance","jstree","index","value","original","isrecord","push","text","record_id","module","app","getModuleName","view","getViewName","branches","filter","find","val"],"mappings":";;AAAA,kKACA,YAAY,CAEZA,qBAAqB,CACpB,yBAAyB,CACzB,EAAE,CACF,CACCC,gBAAgB,CAAE,SAAAA,iBAAUC,SAAS,CAAE,CACtC,IAAIC,QAAQ,CAAG,EAAE,CAChBC,QAAQ,CAAG,EAAE,CAQd,OAPAC,CAAC,CAACC,IAAI,CAAC,IAAI,CAACC,YAAY,CAACC,MAAM,CAAC,cAAc,CAAA,CAAA,CAAM,CAAC,CAAE,SAAUC,KAAK,CAAEC,KAAK,CAAE,CAC1EA,KAAK,CAACC,QAAQ,CAACC,QAAQ,CAC1BT,QAAQ,CAACU,IAAI,CAACH,KAAK,CAACI,IAAI,CAAC,CAEzBV,QAAQ,CAACS,IAAI,CAACH,KAAK,CAACC,QAAQ,CAACI,SAAS,EAExC,CAAC,CAAC,CACK,CACNC,MAAM,CAAEC,GAAG,CAACC,aAAa,EAAE,CAC3BC,IAAI,CAAEF,GAAG,CAACG,WAAW,EAAE,CACvBC,QAAQ,CAAElB,QAAQ,CAClBmB,MAAM,CAAEpB,SAAS,CAACqB,IAAI,CAAC,eAAe,CAAC,CAACC,GAAG,EAAE,CAC7CpB,QAAQ,CAAEA,QACX,CACD,CACD,CACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/Project/resources/Detail.min.js.map b/public_html/layouts/basic/modules/Project/resources/Detail.min.js.map index f8fe034519f8..a511c4f883e7 100644 --- a/public_html/layouts/basic/modules/Project/resources/Detail.min.js.map +++ b/public_html/layouts/basic/modules/Project/resources/Detail.min.js.map @@ -1 +1 @@ -{"version":3,"file":"Detail.min.js","sources":["Detail.js"],"sourcesContent":["/*+***********************************************************************************\n * The contents of this file are subject to the vtiger CRM Public License Version 1.0\n * (\"License\"); You may not use this file except in compliance with the License\n * The Original Code is: vtiger CRM Open Source\n * The Initial Developer of the Original Code is vtiger.\n * Portions created by vtiger are Copyright (C) vtiger.\n * All Rights Reserved.\n *************************************************************************************/\n'use strict';\n\nVtiger_Detail_Js(\n\t'Project_Detail_Js',\n\t{},\n\t{\n\t\t/**\n\t\t * Function to register event for create related record\n\t\t * in summary view widgets\n\t\t */\n\t\tregisterSummaryViewContainerEvents: function (summaryViewContainer) {\n\t\t\tthis._super(summaryViewContainer);\n\t\t},\n\t\t/**\n\t\t * Function to load module summary of Projects\n\t\t */\n\t\tloadModuleSummary: function () {\n\t\t\tvar summaryParams = {};\n\t\t\tsummaryParams['module'] = app.getModuleName();\n\t\t\tsummaryParams['view'] = 'Detail';\n\t\t\tsummaryParams['mode'] = 'showModuleSummaryView';\n\t\t\tsummaryParams['record'] = jQuery('#recordId').val();\n\t\t\tAppConnector.request(summaryParams).done(function (data) {\n\t\t\t\tjQuery('.js-widget-general-info').html(data);\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Load gantt component\n\t\t */\n\t\tloadGantt() {\n\t\t\tlet ganttContainer = $('.c-gantt', this.detailViewContentHolder);\n\t\t\tif (ganttContainer.length) {\n\t\t\t\tlet gantt = new Project_Gantt_Js(this.detailViewContentHolder);\n\t\t\t\tgantt.registerEvents();\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Load gantt component when needed\n\t\t */\n\t\tregisterGantt() {\n\t\t\tthis.loadGantt();\n\t\t\tapp.event.on('DetailView.Tab.AfterLoad', (e, data, instance) => {\n\t\t\t\tinstance.detailViewContentHolder.ready(() => {\n\t\t\t\t\tthis.loadGantt();\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Function to get response from hierarchy\n\t\t * @param {array} params\n\t\t * @returns {jQuery}\n\t\t */\n\t\tgetHierarchyResponseData: function (params) {\n\t\t\tlet thisInstance = this,\n\t\t\t\taDeferred = $.Deferred();\n\t\t\tif (!$.isEmptyObject(thisInstance.hierarchyResponseCache)) {\n\t\t\t\taDeferred.resolve(thisInstance.hierarchyResponseCache);\n\t\t\t} else {\n\t\t\t\tAppConnector.request(params).then(function (data) {\n\t\t\t\t\tthisInstance.hierarchyResponseCache = data;\n\t\t\t\t\taDeferred.resolve(thisInstance.hierarchyResponseCache);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn aDeferred.promise();\n\t\t},\n\t\t/**\n\t\t * Function to display the hierarchy response data\n\t\t * @param {array} data\n\t\t */\n\t\tdisplayHierarchyResponseData: function (data) {\n\t\t\tlet callbackFunction = function () {\n\t\t\t\tapp.showScrollBar($('#hierarchyScroll'), {\n\t\t\t\t\theight: '300px',\n\t\t\t\t\trailVisible: true,\n\t\t\t\t\tsize: '6px'\n\t\t\t\t});\n\t\t\t};\n\t\t\tapp.showModalWindow(data, function (modalContainer) {\n\t\t\t\tApp.Components.Scrollbar.xy($('#hierarchyScroll', modalContainer));\n\t\t\t\tif (typeof callbackFunction == 'function' && $('#hierarchyScroll', modalContainer).height() > 300) {\n\t\t\t\t\tcallbackFunction();\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Registers read count of hierarchy if it is possible\n\t\t */\n\t\tregisterHierarchyRecordCount: function () {\n\t\t\tlet hierarchyButton = $('.js-detail-hierarchy'),\n\t\t\t\tparams = {\n\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\taction: 'RelationAjax',\n\t\t\t\t\trecord: app.getRecordId(),\n\t\t\t\t\tmode: 'getHierarchyCount'\n\t\t\t\t};\n\t\t\tif (hierarchyButton.length) {\n\t\t\t\tAppConnector.request(params).then(function (response) {\n\t\t\t\t\tif (response.success) {\n\t\t\t\t\t\t$('.hierarchy .badge').html(response.result);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Shows hierarchy\n\t\t */\n\t\tregisterShowHierarchy: function () {\n\t\t\tlet thisInstance = this,\n\t\t\t\thierarchyButton = $('.detailViewTitle'),\n\t\t\t\tparams = {\n\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\tview: 'Hierarchy',\n\t\t\t\t\trecord: app.getRecordId()\n\t\t\t\t};\n\t\t\thierarchyButton.on('click', '.js-detail-hierarchy', function () {\n\t\t\t\tlet progressIndicatorElement = $.progressIndicator({\n\t\t\t\t\tposition: 'html',\n\t\t\t\t\tblockInfo: {\n\t\t\t\t\t\tenabled: true\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tthisInstance.getHierarchyResponseData(params).then(function (data) {\n\t\t\t\t\tthisInstance.displayHierarchyResponseData(data);\n\t\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Register events\n\t\t */\n\t\tregisterEvents: function () {\n\t\t\tvar detailContentsHolder = this.getContentHolder();\n\t\t\tvar thisInstance = this;\n\t\t\tthis._super();\n\t\t\tdetailContentsHolder.on('click', '.moreRecentTickets', function () {\n\t\t\t\tvar recentTicketsTab = thisInstance.getTabByLabel(thisInstance.detailViewRecentTicketsTabLabel);\n\t\t\t\trecentTicketsTab.trigger('click');\n\t\t\t});\n\t\t\tthis.registerGantt();\n\t\t\tthis.registerHierarchyRecordCount();\n\t\t\tthis.registerShowHierarchy();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Detail_Js","registerSummaryViewContainerEvents","summaryViewContainer","_super","loadModuleSummary","summaryParams","app","getModuleName","jQuery","val","AppConnector","request","done","data","html","loadGantt","ganttContainer","$","detailViewContentHolder","length","Project_Gantt_Js","gantt","registerEvents","registerGantt","event","on","e","instance","ready","getHierarchyResponseData","params","aDeferred","Deferred","isEmptyObject","thisInstance","hierarchyResponseCache","then","resolve","promise","displayHierarchyResponseData","callbackFunction","showScrollBar","height","railVisible","size","showModalWindow","modalContainer","App","Components","Scrollbar","xy","registerHierarchyRecordCount","module","action","record","getRecordId","mode","hierarchyButton","response","success","result","registerShowHierarchy","view","progressIndicator","position","blockInfo","enabled","progressIndicatorElement","getContentHolder","detailContentsHolder","getTabByLabel","detailViewRecentTicketsTabLabel","recentTicketsTab","trigger"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFACA,aAEAA,gBAAgB,CACf,mBADe,CAEf,EAFe,CAGf;AAED;AACA;AACA,KACEC,kCAAkC,CAAE,SAAUC,kCAAAA,CAAAA,oBAAV,CAAgC,CACnE,IAAKC,CAAAA,MAAL,CAAYD,oBAAZ,EACA,CAPF;AASD;AACA,KACEE,iBAAiB,CAAE,SAAY,iBAAA,EAAA,CAC9B,IAAIC,aAAa,CAAG,EAApB,CACAA,aAAa,CAAb,MAAA,CAA0BC,GAAG,CAACC,aAAJ,EAFI,CAG9BF,aAAa,CAAb,IAAA,CAAwB,QAHM,CAI9BA,aAAa,CAAA,IAAb,CAAwB,uBAJM,CAK9BA,aAAa,OAAb,CAA0BG,MAAM,CAAC,WAAD,CAAN,CAAoBC,GAApB,EALI,CAM9BC,YAAY,CAACC,OAAb,CAAqBN,aAArB,CAAoCO,CAAAA,IAApC,CAAyC,SAAUC,IAAV,CAAgB,CACxDL,MAAM,CAAC,yBAAD,CAAN,CAAkCM,IAAlC,CAAuCD,IAAvC,EACA,CAFD,EAGA,CApBF;AAsBD;AACA,KACEE,SAxBD,CAwBa,SAAA,SAAA,EAAA,CACX,IAAIC,cAAc,CAAGC,CAAC,CAAC,UAAD,CAAa,KAAKC,uBAAlB,CAAtB,CACA,GAAIF,cAAc,CAACG,MAAnB,CAA2B,CAC1B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AAY,CAC/D,IAA4B,wBAAA,CAAGR,CAAC,CAAC8C,iBAAF,CAAoB,CAClDC,QAAQ,CAAE,MADwC,CAElDC,SAAS,CAAE,CACVC,OAAO,GADG,CAFuC,CAApB,CAA/B,CAMAhC,YAAY,CAACL,wBAAb,CAAsCC,MAAtC,CAA8CM,CAAAA,IAA9C,CAAmD,SAAUvB,IAAV,CAAgB,CAClEqB,YAAY,CAACK,4BAAb,CAA0C1B,IAA1C,CADkE,CAElEsD,wBAAwB,CAACJ,iBAAzB,CAA2C,CAAEP,IAAI,CAAE,MAAR,CAA3C,EACA,CAHD,EAIA,CAXD,EAYA,CAzHF;AA2HD;AACA,KACElC,cAAc,CAAE,SAAY,cAAA,EAAA,CAAA,IACH,oBAAA,CAAG,IAAK8C,CAAAA,gBAAL,EADA,CAEvBlC,YAAY,CAAG,IAFQ,CAG3B,IAAK/B,CAAAA,MAAL,EAH2B,CAI3BkE,oBAAoB,CAAC5C,EAArB,CAAwB,OAAxB,CAAiC,oBAAjC,CAAuD,UAAY,CAClE,IAAoB,gBAAA,CAAGS,YAAY,CAACoC,aAAb,CAA2BpC,YAAY,CAACqC,+BAAxC,CAAvB,CACAC,gBAAgB,CAACC,OAAjB,CAAyB,OAAzB,EACA,CAHD,CAJ2B,CAQ3B,IAAKlD,CAAAA,aAAL,EAR2B,CAS3B,IAAK4B,CAAAA,4BAAL,EAT2B,CAU3B,IAAKU,CAAAA,qBAAL,GACA,CAxIF,CAHe;;"} \ No newline at end of file +{"version":3,"file":"Detail.min.js","sources":["Detail.js"],"sourcesContent":["/*+***********************************************************************************\n * The contents of this file are subject to the vtiger CRM Public License Version 1.0\n * (\"License\"); You may not use this file except in compliance with the License\n * The Original Code is: vtiger CRM Open Source\n * The Initial Developer of the Original Code is vtiger.\n * Portions created by vtiger are Copyright (C) vtiger.\n * All Rights Reserved.\n *************************************************************************************/\n'use strict';\n\nVtiger_Detail_Js(\n\t'Project_Detail_Js',\n\t{},\n\t{\n\t\t/**\n\t\t * Function to register event for create related record\n\t\t * in summary view widgets\n\t\t */\n\t\tregisterSummaryViewContainerEvents: function (summaryViewContainer) {\n\t\t\tthis._super(summaryViewContainer);\n\t\t},\n\t\t/**\n\t\t * Function to load module summary of Projects\n\t\t */\n\t\tloadModuleSummary: function () {\n\t\t\tvar summaryParams = {};\n\t\t\tsummaryParams['module'] = app.getModuleName();\n\t\t\tsummaryParams['view'] = 'Detail';\n\t\t\tsummaryParams['mode'] = 'showModuleSummaryView';\n\t\t\tsummaryParams['record'] = jQuery('#recordId').val();\n\t\t\tAppConnector.request(summaryParams).done(function (data) {\n\t\t\t\tjQuery('.js-widget-general-info').html(data);\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Load gantt component\n\t\t */\n\t\tloadGantt() {\n\t\t\tlet ganttContainer = $('.c-gantt', this.detailViewContentHolder);\n\t\t\tif (ganttContainer.length) {\n\t\t\t\tlet gantt = new Project_Gantt_Js(this.detailViewContentHolder);\n\t\t\t\tgantt.registerEvents();\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Load gantt component when needed\n\t\t */\n\t\tregisterGantt() {\n\t\t\tthis.loadGantt();\n\t\t\tapp.event.on('DetailView.Tab.AfterLoad', (e, data, instance) => {\n\t\t\t\tinstance.detailViewContentHolder.ready(() => {\n\t\t\t\t\tthis.loadGantt();\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Function to get response from hierarchy\n\t\t * @param {array} params\n\t\t * @returns {jQuery}\n\t\t */\n\t\tgetHierarchyResponseData: function (params) {\n\t\t\tlet thisInstance = this,\n\t\t\t\taDeferred = $.Deferred();\n\t\t\tif (!$.isEmptyObject(thisInstance.hierarchyResponseCache)) {\n\t\t\t\taDeferred.resolve(thisInstance.hierarchyResponseCache);\n\t\t\t} else {\n\t\t\t\tAppConnector.request(params).then(function (data) {\n\t\t\t\t\tthisInstance.hierarchyResponseCache = data;\n\t\t\t\t\taDeferred.resolve(thisInstance.hierarchyResponseCache);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn aDeferred.promise();\n\t\t},\n\t\t/**\n\t\t * Function to display the hierarchy response data\n\t\t * @param {array} data\n\t\t */\n\t\tdisplayHierarchyResponseData: function (data) {\n\t\t\tlet callbackFunction = function () {\n\t\t\t\tapp.showScrollBar($('#hierarchyScroll'), {\n\t\t\t\t\theight: '300px',\n\t\t\t\t\trailVisible: true,\n\t\t\t\t\tsize: '6px'\n\t\t\t\t});\n\t\t\t};\n\t\t\tapp.showModalWindow(data, function (modalContainer) {\n\t\t\t\tApp.Components.Scrollbar.xy($('#hierarchyScroll', modalContainer));\n\t\t\t\tif (typeof callbackFunction == 'function' && $('#hierarchyScroll', modalContainer).height() > 300) {\n\t\t\t\t\tcallbackFunction();\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Registers read count of hierarchy if it is possible\n\t\t */\n\t\tregisterHierarchyRecordCount: function () {\n\t\t\tlet hierarchyButton = $('.js-detail-hierarchy'),\n\t\t\t\tparams = {\n\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\taction: 'RelationAjax',\n\t\t\t\t\trecord: app.getRecordId(),\n\t\t\t\t\tmode: 'getHierarchyCount'\n\t\t\t\t};\n\t\t\tif (hierarchyButton.length) {\n\t\t\t\tAppConnector.request(params).then(function (response) {\n\t\t\t\t\tif (response.success) {\n\t\t\t\t\t\t$('.hierarchy .badge').html(response.result);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Shows hierarchy\n\t\t */\n\t\tregisterShowHierarchy: function () {\n\t\t\tlet thisInstance = this,\n\t\t\t\thierarchyButton = $('.detailViewTitle'),\n\t\t\t\tparams = {\n\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\tview: 'Hierarchy',\n\t\t\t\t\trecord: app.getRecordId()\n\t\t\t\t};\n\t\t\thierarchyButton.on('click', '.js-detail-hierarchy', function () {\n\t\t\t\tlet progressIndicatorElement = $.progressIndicator({\n\t\t\t\t\tposition: 'html',\n\t\t\t\t\tblockInfo: {\n\t\t\t\t\t\tenabled: true\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tthisInstance.getHierarchyResponseData(params).then(function (data) {\n\t\t\t\t\tthisInstance.displayHierarchyResponseData(data);\n\t\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Register events\n\t\t */\n\t\tregisterEvents: function () {\n\t\t\tvar detailContentsHolder = this.getContentHolder();\n\t\t\tvar thisInstance = this;\n\t\t\tthis._super();\n\t\t\tdetailContentsHolder.on('click', '.moreRecentTickets', function () {\n\t\t\t\tvar recentTicketsTab = thisInstance.getTabByLabel(thisInstance.detailViewRecentTicketsTabLabel);\n\t\t\t\trecentTicketsTab.trigger('click');\n\t\t\t});\n\t\t\tthis.registerGantt();\n\t\t\tthis.registerHierarchyRecordCount();\n\t\t\tthis.registerShowHierarchy();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Detail_Js","registerSummaryViewContainerEvents","summaryViewContainer","_super","loadModuleSummary","summaryParams","module","app","getModuleName","view","mode","record","jQuery","val","AppConnector","request","done","data","html","loadGantt","ganttContainer","$","detailViewContentHolder","length","gantt","Project_Gantt_Js","registerEvents","registerGantt","_this","event","on","e","instance","ready","getHierarchyResponseData","params","thisInstance","aDeferred","Deferred","isEmptyObject","hierarchyResponseCache","then","resolve","promise","displayHierarchyResponseData","callbackFunction","showScrollBar","height","railVisible","size","showModalWindow","modalContainer","App","Components","Scrollbar","xy","registerHierarchyRecordCount","hierarchyButton","action","getRecordId","response","success","result","registerShowHierarchy","progressIndicatorElement","progressIndicator","position","blockInfo","enabled","detailContentsHolder","getContentHolder","recentTicketsTab","getTabByLabel","detailViewRecentTicketsTabLabel","trigger"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFACA,YAAY,CAEZA,gBAAgB,CACf,mBAAmB,CACnB,EA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bkE,oBAAoB,CAACvC,EAAE,CAAC,OAAO,CAAE,oBAAoB,CAAE,UAAY,CAClE,IAAIyC,gBAAgB,CAAGnC,YAAY,CAACoC,aAAa,CAACpC,YAAY,CAACqC,+BAA+B,CAAC,CAC/FF,gBAAgB,CAACG,OAAO,CAAC,OAAO,EACjC,CAAC,CAAC,CACF,IAAI,CAAC/C,aAAa,EAAE,CACpB,IAAI,CAAC6B,4BAA4B,EAAE,CACnC,IAAI,CAACO,qBAAqB,GAC3B,CACD,CACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/Project/resources/Gantt.min.js b/public_html/layouts/basic/modules/Project/resources/Gantt.min.js index 29b31282e923..248932c278b2 100644 --- a/public_html/layouts/basic/modules/Project/resources/Gantt.min.js +++ b/public_html/layouts/basic/modules/Project/resources/Gantt.min.js @@ -1,13 +1,13 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */"use strict";function _createForOfIteratorHelper(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&"number"==typeof o.length){it&&(o=it);var i=0,F=function(){};return {s:F,n:function n(){return i>=o.length?{done:!0}:{done:!1,value:o[i++]}},e:function e(_e){throw _e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var err,normalCompletion=!0,didErr=!1;return {s:function s(){it=it.call(o);},n:function n(){var step=it.next();return normalCompletion=step.done,step},e:function e(_e2){didErr=!0,err=_e2;},f:function f(){try{normalCompletion||null==it.return||it.return();}finally{if(didErr)throw err}}}}function _unsupportedIterableToArray(o,minLen){if(o){if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);return "Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n?Array.from(o):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(o,minLen):void 0}}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=o.length?{done:!0}:{done:!1,value:o[i++]}},e:function e(_e){throw _e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var err,normalCompletion=!0,didErr=!1;return {s:function s(){it=it.call(o);},n:function n(){var step=it.next();return normalCompletion=step.done,step},e:function e(_e2){didErr=!0,err=_e2;},f:function f(){try{normalCompletion||null==it.return||it.return();}finally{if(didErr)throw err}}}}function _unsupportedIterableToArray(o,minLen){if(o){if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);return "Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n?Array.from(o):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(o,minLen):void 0}}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i ".concat(LANG.JS_GANTT_FILTER,"")}},maxRows:30,times:{timeZoom:20},calendar:{workingDays:[1,2,3,4,5]},title:{label:LANG.JS_GANTT_TITLE,html:!0},taskList:{expander:{straight:!1},columns:[{id:1,label:app.vtranslate("JS_NO."),html:!0,value:"number",width:65},{id:2,label:app.vtranslate("JS_NAME"),html:!0,value:"label",width:280,expander:!0},{id:3,label:app.vtranslate("JS_PRIORITY"),value:"priority_label",width:70},{id:3,label:app.vtranslate("JS_STATUS"),value:"status_label",width:80},{id:4,label:app.vtranslate("JS_DAYS"),value:function value(task){return task.duration/24/60/60/1e3},width:75,style:{"task-list-header-label":{"text-align":"center",width:"100%"},"task-list-item-value-container":{"text-align":"center",width:"100%"}}},{id:5,label:app.vtranslate("JS_PLANNED"),value:function value(task){return task.planned_duration},width:85,style:{"task-list-header-label":{"text-align":"center",width:"100%"},"task-list-item-value-container":{"text-align":"center",width:"100%"}}},{id:6,label:app.vtranslate("JS_REALISATION"),value:"sum_time",width:85,style:{"task-list-header-label":{"text-align":"center",width:"100%"},"task-list-item-value-container":{"text-align":"center",width:"100%"}}},{id:7,label:app.vtranslate("JS_ASSIGNED","Project"),value:"assigned_user_name",width:110},{id:8,label:"%",value:"progress",width:35,style:{"task-list-header-label":{"text-align":"center",width:"100%"},"task-list-item-value-container":{"text-align":"center",width:"100%"}}}]}},this.dynamicStyle={"chart-expander-wrapper":{"line-height":"1"},"chart-row-bar-polygon":{stroke:"#E74C3C00","stroke-width":0,fill:"#F75C4C"},"chart-row-progress-bar-outline":{stroke:"#E74C3C00","stroke-width":0},"chart-days-highlight-rect":{fill:"#f3f5f780"},"header-title":{float:"none",display:"inline-flex",overflow:"hidden"},"header-options":{float:"none",display:"inline-flex"},"header-title--html":{"white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis","padding-left":"0","letter-spacing":"0"},"slot-header-beforeOptions":{height:"100%","vertical-align":"top"}},this.registerLanguage(),"undefined"!=typeof projectData&&(this.options.title.label=projectData,this.loadProject(projectData)),this.registerEvents();}/** * Register language translations globally (replace old ones) - */return _createClass(Gantt,[{key:"registerLanguage",value:function registerLanguage(){this.options.locale={name:CONFIG.langKey,weekStart:this.weekStart,weekdays:[LANG.JS_SUNDAY,LANG.JS_MONDAY,LANG.JS_TUESDAY,LANG.JS_WEDNESDAY,LANG.JS_THURSDAY,LANG.JS_FRIDAY,LANG.JS_SATURDAY],weekdaysShort:[LANG.JS_SUN,LANG.JS_MON,LANG.JS_TUE,LANG.JS_WED,LANG.JS_THU,LANG.JS_FRI,LANG.JS_SAT],weekdaysMin:[LANG.JS_SUN,LANG.JS_MON,LANG.JS_TUE,LANG.JS_WED,LANG.JS_THU,LANG.JS_FRI,LANG.JS_SAT],months:[LANG.JS_JANUARY,LANG.JS_FEBRUARY,LANG.JS_MARCH,LANG.JS_APRIL,LANG.JS_MAY,LANG.JS_JUNE,LANG.JS_JULY,LANG.JS_AUGUST,LANG.JS_SEPTEMBER,LANG.JS_NOVEMBER,LANG.JS_OCTOBER,LANG.JS_DECEMBER],monthsShort:[LANG.JS_JAN,LANG.JS_FEB,LANG.JS_MAR,LANG.JS_APR,LANG.JS_MAY,LANG.JS_JUN,LANG.JS_JUL,LANG.JS_AUG,LANG.JS_SEP,LANG.JS_NOV,LANG.JS_OCT,LANG.JS_DEC],ordinal:function ordinal(n){return "".concat(n)},Now:LANG.JS_GANTT_NOW,"X-Scale":LANG.JS_GANTT_ZOOM_X,"Y-Scale":LANG.JS_GANTT_ZOOM_Y,"Task list width":LANG.JS_GANTT_TASKLIST,"Before/After":LANG.JS_GANTT_EXPAND,"Display task list":LANG.JS_GANTT_TASKLIST_VISIBLE};}/** + */return _createClass(Gantt,[{key:"registerLanguage",value:function registerLanguage(){this.options.locale={name:CONFIG.langKey,weekStart:this.weekStart,weekdays:[LANG.JS_SUNDAY,LANG.JS_MONDAY,LANG.JS_TUESDAY,LANG.JS_WEDNESDAY,LANG.JS_THURSDAY,LANG.JS_FRIDAY,LANG.JS_SATURDAY],weekdaysShort:[LANG.JS_SUN,LANG.JS_MON,LANG.JS_TUE,LANG.JS_WED,LANG.JS_THU,LANG.JS_FRI,LANG.JS_SAT],weekdaysMin:[LANG.JS_SUN,LANG.JS_MON,LANG.JS_TUE,LANG.JS_WED,LANG.JS_THU,LANG.JS_FRI,LANG.JS_SAT],months:[LANG.JS_JANUARY,LANG.JS_FEBRUARY,LANG.JS_MARCH,LANG.JS_APRIL,LANG.JS_MAY,LANG.JS_JUNE,LANG.JS_JULY,LANG.JS_AUGUST,LANG.JS_SEPTEMBER,LANG.JS_OCTOBER,LANG.JS_NOVEMBER,LANG.JS_DECEMBER],monthsShort:[LANG.JS_JAN,LANG.JS_FEB,LANG.JS_MAR,LANG.JS_APR,LANG.JS_MAY,LANG.JS_JUN,LANG.JS_JUL,LANG.JS_AUG,LANG.JS_SEP,LANG.JS_OCT,LANG.JS_NOV,LANG.JS_DEC],ordinal:function ordinal(n){return "".concat(n)},Now:LANG.JS_GANTT_NOW,"X-Scale":LANG.JS_GANTT_ZOOM_X,"Y-Scale":LANG.JS_GANTT_ZOOM_Y,"Task list width":LANG.JS_GANTT_TASKLIST,"Before/After":LANG.JS_GANTT_EXPAND,"Display task list":LANG.JS_GANTT_TASKLIST_VISIBLE};}/** * Filter project data * * @param {Object} _projectData diff --git a/public_html/layouts/basic/modules/Project/resources/Gantt.min.js.map b/public_html/layouts/basic/modules/Project/resources/Gantt.min.js.map index 33f1e3b1f418..a718251c3f7d 100644 --- a/public_html/layouts/basic/modules/Project/resources/Gantt.min.js.map +++ b/public_html/layouts/basic/modules/Project/resources/Gantt.min.js.map @@ -1 +1 @@ -{"version":3,"file":"Gantt.min.js","sources":["Gantt.js"],"sourcesContent":["/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */\n'use strict';\n\nclass Gantt {\n\t/**\n\t * Constructor\n\t *\n\t * @param {jQuery|HTMLElement|string} container\n\t * @param {object} projectData\n\t */\n\tconstructor(container, projectData) {\n\t\tthis.container = $(container);\n\t\tthis.containerParent = this.container.parent();\n\t\tthis.headerContainer = this.containerParent.parent().find('.js-gantt-header').eq(0);\n\t\tthis.weekStart = 6 - CONFIG.firstDayOfWeekNos;\n\t\tlet workingDays = [1, 2, 3, 4, 5];\n\t\tthis.options = {\n\t\t\tslots: {\n\t\t\t\theader: {\n\t\t\t\t\tbeforeOptions: ``\n\t\t\t\t}\n\t\t\t},\n\t\t\tmaxRows: 30,\n\t\t\ttimes: {\n\t\t\t\ttimeZoom: 20\n\t\t\t},\n\t\t\tcalendar: {\n\t\t\t\tworkingDays\n\t\t\t},\n\t\t\ttitle: {\n\t\t\t\tlabel: LANG.JS_GANTT_TITLE,\n\t\t\t\thtml: true\n\t\t\t},\n\t\t\ttaskList: {\n\t\t\t\texpander: {\n\t\t\t\t\tstraight: false\n\t\t\t\t},\n\t\t\t\tcolumns: [\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 1,\n\t\t\t\t\t\tlabel: app.vtranslate('JS_NO.'),\n\t\t\t\t\t\thtml: true,\n\t\t\t\t\t\tvalue: 'number',\n\t\t\t\t\t\twidth: 65\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 2,\n\t\t\t\t\t\tlabel: app.vtranslate('JS_NAME'),\n\t\t\t\t\t\thtml: true,\n\t\t\t\t\t\tvalue: 'label',\n\t\t\t\t\t\twidth: 280,\n\t\t\t\t\t\texpander: true\n\t\t\t\t\t},\n\t\t\t\t\t{ id: 3, label: app.vtranslate('JS_PRIORITY'), value: 'priority_label', width: 70 },\n\t\t\t\t\t{ id: 3, label: app.vtranslate('JS_STATUS'), value: 'status_label', width: 80 },\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 4,\n\t\t\t\t\t\tlabel: app.vtranslate('JS_DAYS'),\n\t\t\t\t\t\tvalue: (task) => {\n\t\t\t\t\t\t\treturn task.duration / 24 / 60 / 60 / 1000;\n\t\t\t\t\t\t},\n\t\t\t\t\t\twidth: 75,\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t'task-list-header-label': {\n\t\t\t\t\t\t\t\t'text-align': 'center',\n\t\t\t\t\t\t\t\twidth: '100%'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t'task-list-item-value-container': {\n\t\t\t\t\t\t\t\t'text-align': 'center',\n\t\t\t\t\t\t\t\twidth: '100%'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 5,\n\t\t\t\t\t\tlabel: app.vtranslate('JS_PLANNED'),\n\t\t\t\t\t\tvalue: (task) => {\n\t\t\t\t\t\t\treturn task.planned_duration;\n\t\t\t\t\t\t},\n\t\t\t\t\t\twidth: 85,\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t'task-list-header-label': {\n\t\t\t\t\t\t\t\t'text-align': 'center',\n\t\t\t\t\t\t\t\twidth: '100%'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t'task-list-item-value-container': {\n\t\t\t\t\t\t\t\t'text-align': 'center',\n\t\t\t\t\t\t\t\twidth: '100%'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 6,\n\t\t\t\t\t\tlabel: app.vtranslate('JS_REALISATION'),\n\t\t\t\t\t\tvalue: 'sum_time',\n\t\t\t\t\t\twidth: 85,\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t'task-list-header-label': {\n\t\t\t\t\t\t\t\t'text-align': 'center',\n\t\t\t\t\t\t\t\twidth: '100%'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t'task-list-item-value-container': {\n\t\t\t\t\t\t\t\t'text-align': 'center',\n\t\t\t\t\t\t\t\twidth: '100%'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 7,\n\t\t\t\t\t\tlabel: app.vtranslate('JS_ASSIGNED', 'Project'),\n\t\t\t\t\t\tvalue: 'assigned_user_name',\n\t\t\t\t\t\twidth: 110\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 8,\n\t\t\t\t\t\tlabel: '%',\n\t\t\t\t\t\tvalue: 'progress',\n\t\t\t\t\t\twidth: 35,\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t'task-list-header-label': {\n\t\t\t\t\t\t\t\t'text-align': 'center',\n\t\t\t\t\t\t\t\twidth: '100%'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t'task-list-item-value-container': {\n\t\t\t\t\t\t\t\t'text-align': 'center',\n\t\t\t\t\t\t\t\twidth: '100%'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t};\n\t\tthis.dynamicStyle = {\n\t\t\t'chart-expander-wrapper': {\n\t\t\t\t'line-height': '1'\n\t\t\t},\n\t\t\t'chart-row-bar-polygon': {\n\t\t\t\tstroke: '#E74C3C00',\n\t\t\t\t'stroke-width': 0,\n\t\t\t\tfill: '#F75C4C'\n\t\t\t},\n\t\t\t'chart-row-progress-bar-outline': {\n\t\t\t\tstroke: '#E74C3C00',\n\t\t\t\t'stroke-width': 0\n\t\t\t},\n\t\t\t'chart-days-highlight-rect': {\n\t\t\t\tfill: '#f3f5f780'\n\t\t\t},\n\t\t\t'header-title': {\n\t\t\t\tfloat: 'none',\n\t\t\t\tdisplay: 'inline-flex',\n\t\t\t\toverflow: 'hidden'\n\t\t\t},\n\t\t\t'header-options': {\n\t\t\t\tfloat: 'none',\n\t\t\t\tdisplay: 'inline-flex'\n\t\t\t},\n\t\t\t'header-title--html': {\n\t\t\t\t'white-space': 'nowrap',\n\t\t\t\toverflow: 'hidden',\n\t\t\t\t'text-overflow': 'ellipsis',\n\t\t\t\t'padding-left': '0',\n\t\t\t\t'letter-spacing': '0'\n\t\t\t},\n\t\t\t'slot-header-beforeOptions': {\n\t\t\t\theight: '100%',\n\t\t\t\t'vertical-align': 'top'\n\t\t\t}\n\t\t};\n\t\tthis.registerLanguage();\n\t\tif (typeof projectData !== 'undefined') {\n\t\t\tthis.options.title.label = projectData;\n\t\t\tthis.loadProject(projectData);\n\t\t}\n\t\tthis.registerEvents();\n\t}\n\n\t/**\n\t * Register language translations globally (replace old ones)\n\t */\n\tregisterLanguage() {\n\t\tthis.options.locale = {\n\t\t\tname: CONFIG.langKey,\n\t\t\tweekStart: this.weekStart,\n\t\t\tweekdays: [\n\t\t\t\tLANG.JS_SUNDAY,\n\t\t\t\tLANG.JS_MONDAY,\n\t\t\t\tLANG.JS_TUESDAY,\n\t\t\t\tLANG.JS_WEDNESDAY,\n\t\t\t\tLANG.JS_THURSDAY,\n\t\t\t\tLANG.JS_FRIDAY,\n\t\t\t\tLANG.JS_SATURDAY\n\t\t\t],\n\t\t\tweekdaysShort: [LANG.JS_SUN, LANG.JS_MON, LANG.JS_TUE, LANG.JS_WED, LANG.JS_THU, LANG.JS_FRI, LANG.JS_SAT],\n\t\t\tweekdaysMin: [LANG.JS_SUN, LANG.JS_MON, LANG.JS_TUE, LANG.JS_WED, LANG.JS_THU, LANG.JS_FRI, LANG.JS_SAT],\n\t\t\tmonths: [\n\t\t\t\tLANG.JS_JANUARY,\n\t\t\t\tLANG.JS_FEBRUARY,\n\t\t\t\tLANG.JS_MARCH,\n\t\t\t\tLANG.JS_APRIL,\n\t\t\t\tLANG.JS_MAY,\n\t\t\t\tLANG.JS_JUNE,\n\t\t\t\tLANG.JS_JULY,\n\t\t\t\tLANG.JS_AUGUST,\n\t\t\t\tLANG.JS_SEPTEMBER,\n\t\t\t\tLANG.JS_NOVEMBER,\n\t\t\t\tLANG.JS_OCTOBER,\n\t\t\t\tLANG.JS_DECEMBER\n\t\t\t],\n\t\t\tmonthsShort: [\n\t\t\t\tLANG.JS_JAN,\n\t\t\t\tLANG.JS_FEB,\n\t\t\t\tLANG.JS_MAR,\n\t\t\t\tLANG.JS_APR,\n\t\t\t\tLANG.JS_MAY,\n\t\t\t\tLANG.JS_JUN,\n\t\t\t\tLANG.JS_JUL,\n\t\t\t\tLANG.JS_AUG,\n\t\t\t\tLANG.JS_SEP,\n\t\t\t\tLANG.JS_NOV,\n\t\t\t\tLANG.JS_OCT,\n\t\t\t\tLANG.JS_DEC\n\t\t\t],\n\t\t\tordinal: (n) => `${n}`,\n\t\t\tNow: LANG.JS_GANTT_NOW,\n\t\t\t'X-Scale': LANG.JS_GANTT_ZOOM_X,\n\t\t\t'Y-Scale': LANG.JS_GANTT_ZOOM_Y,\n\t\t\t'Task list width': LANG.JS_GANTT_TASKLIST,\n\t\t\t'Before/After': LANG.JS_GANTT_EXPAND,\n\t\t\t'Display task list': LANG.JS_GANTT_TASKLIST_VISIBLE\n\t\t};\n\t}\n\n\t/**\n\t * Filter project data\n\t *\n\t * @param {Object} _projectData\n\t * @returns {Object}\n\t */\n\tfilterProjectData(_projectData) {\n\t\tlet tasks = this.allTasks.map((task) => Object.assign({}, task));\n\t\tfor (let moduleName in this.filter.status) {\n\t\t\tif (this.filter.status.hasOwnProperty(moduleName)) {\n\t\t\t\tconst visibleLabels = this.filter.status[moduleName].map((status) => status.label);\n\t\t\t\ttasks = tasks.filter((task) => {\n\t\t\t\t\treturn task.module !== moduleName || visibleLabels.indexOf(task.status_label) >= 0;\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\treturn tasks;\n\t}\n\n\t/**\n\t * Add icons to tasks\n\t * @param {array} tasks\n\t * @returns {array}\n\t */\n\taddIcons(tasks) {\n\t\treturn tasks.map((task) => {\n\t\t\tlet icon = 'briefcase';\n\t\t\tif (task.type === 'milestone') {\n\t\t\t\ticon = 'folder';\n\t\t\t} else if (task.type === 'task') {\n\t\t\t\ticon = 'file';\n\t\t\t}\n\t\t\tconst iconClass = 'fas fa-' + icon;\n\t\t\ttask.label = ` ${task.label}`;\n\t\t\treturn task;\n\t\t});\n\t}\n\n\t/**\n\t * Resize gantt chart\n\t */\n\tresize() {\n\t\tlet offsetTop = this.container.offset().top;\n\t\tlet contentHeight = $('body').eq(0).height() - $('.js-footer').eq(0).height();\n\t\tlet height = contentHeight - offsetTop - 100;\n\t\tif (height < 300) {\n\t\t\theight = 300;\n\t\t}\n\t\tthis.options.maxHeight = height;\n\t\tif (typeof this.ganttState !== 'undefined' && this.ganttState) {\n\t\t\tthis.ganttState.maxHeight = height;\n\t\t}\n\t}\n\n\t/**\n\t * Register gantt header actions\n\t */\n\tregisterHeaderActions() {\n\t\tthis.headerContainer.find('.js-gantt-header__btn-filter').on('click', (e) => {\n\t\t\te.preventDefault();\n\t\t\tthis.showFiltersModal();\n\t\t});\n\t\tthis.headerContainer.find('.js-gantt-header__btn-center').on('click', (e) => {\n\t\t\tthis.ganttElastic.$emit('recenterPosition');\n\t\t});\n\t\tthis.headerContainer.find('.js-gantt-header__range-slider--x').on('input', (e) => {\n\t\t\tthis.ganttElastic.$emit('times-timeZoom-change', Number(e.target.value));\n\t\t});\n\t\tthis.headerContainer.find('.js-gantt-header__range-slider--y').on('input', (e) => {\n\t\t\tthis.ganttElastic.$emit('row-height-change', Number(e.target.value));\n\t\t});\n\t\tthis.headerContainer.find('.js-gantt-header__range-slider--task-list-width').on('input', (e) => {\n\t\t\tthis.ganttElastic.$emit('taskList-width-change', Number(e.target.value));\n\t\t});\n\t\tthis.headerContainer.find('.js-gantt-header__range-slider--scope').on('input', (e) => {\n\t\t\tthis.ganttElastic.$emit('scope-change', Number(e.target.value));\n\t\t});\n\t\tthis.headerContainer.find('.js-gantt-header__range-slider--task-list-visible').on('change', (e) => {\n\t\t\tthis.ganttState.options.taskList.display = $(e.target).is(':checked');\n\t\t});\n\t\tthis.ganttElastic.$watch('state.taskList.display', (value) => {\n\t\t\tthis.headerContainer.find('.js-gantt-header__range-slider--task-list-visible').prop('checked', value);\n\t\t});\n\t\tthis.headerContainer\n\t\t\t.find('.js-gantt-header__range-slider--task-list-visible')\n\t\t\t.prop('checked', this.ganttState.options.taskList.display ? 'checked' : false);\n\t}\n\n\t/**\n\t * Load project\n\t */\n\tloadProject(projectData) {\n\t\tthis.projectData = projectData;\n\t\tif (typeof this.projectData.tasks === 'undefined' || this.projectData.tasks.length === 0) {\n\t\t\t$('.js-hide-filter').addClass('d-none');\n\t\t\t$('.js-show-add-record').removeClass('d-none');\n\t\t\treturn;\n\t\t} else {\n\t\t\tthis.allTasks = this.addIcons(this.projectData.tasks);\n\t\t}\n\t\tthis.statuses = this.projectData.statuses;\n\t\tthis.filter = { status: this.projectData.activeStatuses };\n\t\tthis.container.closest('form').on('submit', (ev) => {\n\t\t\tev.preventDefault();\n\t\t\tev.stopPropagation();\n\t\t\treturn false;\n\t\t});\n\t\tthis.resize();\n\t\tconst self = this;\n\t\tif (typeof self.ganttElastic === 'undefined') {\n\t\t\tthis.ganttApp = GanttElastic.mount({\n\t\t\t\tel: '#' + this.container.attr('id'),\n\t\t\t\tdata: {\n\t\t\t\t\ttasks: this.allTasks,\n\t\t\t\t\toptions: this.options,\n\t\t\t\t\tdynamicStyle: this.dynamicStyle\n\t\t\t\t},\n\t\t\t\tready(ganttElasticInstance) {\n\t\t\t\t\tself.ganttElastic = ganttElasticInstance;\n\t\t\t\t\tself.ganttState = ganttElasticInstance.state;\n\t\t\t\t\tself.registerHeaderActions();\n\t\t\t\t}\n\t\t\t});\n\t\t\tthis.container = this.containerParent.find('.gantt-elastic').eq(0);\n\t\t} else {\n\t\t\tself.ganttApp.tasks = this.allTasks;\n\t\t}\n\t}\n\n\t/**\n\t * Load project from ajax request\n\t * @param {object} params - request params such as module/action and projectId\n\t */\n\tloadProjectFromAjax(params) {\n\t\tconst self = this,\n\t\t\tprogressInstance = jQuery.progressIndicator({\n\t\t\t\tblockInfo: {\n\t\t\t\t\tenabled: true,\n\t\t\t\t\tonBlock: () => {\n\t\t\t\t\t\tAppConnector.request(params).done((response) => {\n\t\t\t\t\t\t\tself.loadProject(response.result);\n\t\t\t\t\t\t\tprogressInstance.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t}\n\n\t/**\n\t * Load new data to gantt\n\t *\n\t * @param {Object} data\n\t */\n\treloadData(data) {\n\t\tthis.loadProject(data);\n\t}\n\n\t/**\n\t * Save filter and reload data.\n\t *\n\t * @param {Object} filterOptions\n\t */\n\tsaveFilter(filterOptions) {\n\t\tthis.filter = filterOptions;\n\t\tthis.ganttApp.tasks = this.filterProjectData(this.projectData);\n\t}\n\n\t/**\n\t * Get status from value (object with other props)\n\t * @param {String} value\n\t * @param {String} moduleName\n\t * @returns {Object}\n\t */\n\tgetStatusFromValue(value, moduleName) {\n\t\tfor (let status of this.statuses[moduleName]) {\n\t\t\tif (status.value === value) {\n\t\t\t\treturn Object.assign({}, status);\n\t\t\t}\n\t\t}\n\t\tapp.errorLog(`Status not found [${value}]`);\n\t}\n\n\t/**\n\t * Open modal with status filters\n\t */\n\tshowFiltersModal() {\n\t\tconst self = this;\n\t\tapp.showModalHtml({\n\t\t\theaderIcon: 'fas fa-filter',\n\t\t\theader: app.vtranslate('JS_FILTER_BY_STATUSES'),\n\t\t\tbody: `
    \n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t
    `,\n\t\t\tfooterButtons: [\n\t\t\t\t{ text: app.vtranslate('JS_UPDATE_GANTT'), icon: 'fas fa-check', class: 'btn-success js-success' },\n\t\t\t\t{ text: app.vtranslate('JS_CANCEL'), icon: 'fas fa-times', class: 'btn-danger', data: { dismiss: 'modal' } }\n\t\t\t],\n\t\t\tcb: function (modal) {\n\t\t\t\tmodal.on('click', '.js-success', function (e) {\n\t\t\t\t\tself.saveFilter({\n\t\t\t\t\t\tstatus: {\n\t\t\t\t\t\t\tProject: modal\n\t\t\t\t\t\t\t\t.find('.js-gantt__filter-project')\n\t\t\t\t\t\t\t\t.val()\n\t\t\t\t\t\t\t\t.map((status) => {\n\t\t\t\t\t\t\t\t\treturn self.getStatusFromValue(status, 'Project');\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tProjectMilestone: modal\n\t\t\t\t\t\t\t\t.find('.js-gantt__filter-milestone')\n\t\t\t\t\t\t\t\t.val()\n\t\t\t\t\t\t\t\t.map((status) => {\n\t\t\t\t\t\t\t\t\treturn self.getStatusFromValue(status, 'ProjectMilestone');\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tProjectTask: modal\n\t\t\t\t\t\t\t\t.find('.js-gantt__filter-task')\n\t\t\t\t\t\t\t\t.val()\n\t\t\t\t\t\t\t\t.map((status) => {\n\t\t\t\t\t\t\t\t\treturn self.getStatusFromValue(status, 'ProjectTask');\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tapp.hideModalWindow();\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Register events for gantt actions in current container\n\t */\n\tregisterEvents() {\n\t\tconst container = this.container;\n\t\tcontainer.find('[data-toggle=\"tooltip\"]').tooltip();\n\t\twindow.addEventListener('resize', () => {\n\t\t\tthis.resize();\n\t\t});\n\t}\n}\n"],"names":["Gantt","container","projectData","$","containerParent","parent","headerContainer","find","eq","weekStart","CONFIG","firstDayOfWeekNos","options","slots","header","beforeOptions","LANG","JS_GANTT_FILTER","maxRows","times","timeZoom","calendar","workingDays","title","label","JS_GANTT_TITLE","html","taskList","expander","straight","columns","id","app","vtranslate","value","width","task","duration","style","planned_duration","dynamicStyle","stroke","fill","float","display","overflow","height","registerLanguage","loadProject","registerEvents","locale","name","langKey","weekdays","JS_SUNDAY","JS_MONDAY","JS_TUESDAY","JS_WEDNESDAY","JS_THURSDAY","JS_FRIDAY","JS_SATURDAY","weekdaysShort","JS_SUN","JS_MON","JS_TUE","JS_WED","JS_THU","JS_FRI","JS_SAT","weekdaysMin","months","JS_JANUARY","JS_FEBRUARY","JS_MARCH","JS_APRIL","JS_MAY","JS_JUNE","JS_JULY","JS_AUGUST","JS_SEPTEMBER","JS_NOVEMBER","JS_OCTOBER","JS_DECEMBER","monthsShort","JS_JAN","JS_FEB","JS_MAR","JS_APR","JS_JUN","JS_JUL","JS_AUG","JS_SEP","JS_NOV","JS_OCT","JS_DEC","ordinal","n","Now","JS_GANTT_NOW","JS_GANTT_ZOOM_X","JS_GANTT_ZOOM_Y","JS_GANTT_TASKLIST","JS_GANTT_EXPAND","JS_GANTT_TASKLIST_VISIBLE","tasks","allTasks","map","Object","assign","moduleName","filter","status","hasOwnProperty","visibleLabels","module","indexOf","status_label","icon","type","iconClass","offsetTop","offset","top","contentHeight","maxHeight","ganttState","on","e","preventDefault","showFiltersModal","ganttElastic","$emit","Number","target","is","$watch","prop","length","addClass","removeClass","addIcons","statuses","activeStatuses","closest","ev","stopPropagation","resize","self","ganttApp","GanttElastic","mount","el","attr","data","ready","ganttElasticInstance","state","registerHeaderActions","params","progressInstance","jQuery","progressIndicator","blockInfo","enabled","onBlock","AppConnector","request","done","response","result","mode","filterOptions","filterProjectData","errorLog","showModalHtml","headerIcon","body","Project","ProjectMilestone","ProjectTask","footerButtons","text","class","dismiss","cb","modal","saveFilter","val","getStatusFromValue","hideModalWindow","tooltip","window","addEventListener"],"mappings":";;AAAA,kKACA,YAAA,UAEMA,0BAAAA,CAAAA,CAAAA,CAAAA,cAAAA,CAAAA,CAAAA,IAAAA,EAAAA,CAAAA,WAAAA,EAAAA,OAAAA,MAAAA,EAAAA,CAAAA,CAAAA,MAAAA,CAAAA,QAAAA,CAAAA,EAAAA,CAAAA,CAAAA,YAAAA,CAAAA,CAAAA,GAAAA,CAAAA,EAAAA,CAAAA,CAAAA,GAAAA,KAAAA,CAAAA,OAAAA,CAAAA,CAAAA,CAAAA,GAAAA,EAAAA,CAAAA,2BAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAAAA,cAAAA,EAAAA,CAAAA,EAAAA,QAAAA,EAAAA,OAAAA,CAAAA,CAAAA,MAAAA,CAAAA,CAAAA,EAAAA,GAAAA,CAAAA,CAAAA,EAAAA,CAAAA,CAAAA,IAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,UAAAA,EAAAA,CAAAA,OAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,SAAAA,CAAAA,EAAAA,CAAAA,OAAAA,CAAAA,EAAAA,CAAAA,CAAAA,MAAAA,CAAAA,CAAAA,IAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,IAAAA,CAAAA,CAAA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AK,CAChBlL,IADW,CACN,wBADM,CAEXoL,CAAAA,GAFW,GAGXjF,GAHW,CAGP,SAACK,MAAD,CAAY,CAChB,OAAOoC,IAAI,CAACyC,kBAAL,CAAwB7E,MAAxB,CAAgC,aAAhC,CACP,CALW,CAbN,CADO,CAAhB,CAD6C,CAuB7C/E,GAAG,CAAC6J,eAAJ,GACA,CAxBD,EAyBA,CArEgB,CAAlB,EAuEA,CAED;AACD;AACA,KACC,CAAA,CAAA,GAAA,CAAA,gBAAA,CAAA,KAAA,CAAA,SAAA,cAAA,EAAiB,CACV5L,IAAAA,MAAAA,CAAAA,IAAAA,CAAAA,SAAS,CAAG,IAAA,CAAKA,SADP,CAEhBA,SAAS,CAACM,IAAV,CAAe,2BAAf,CAA0CuL,CAAAA,OAA1C,EAFgB,CAGhBC,MAAM,CAACC,gBAAP,CAAwB,QAAxB,CAAkC,UAAM,CACvC,MAAI,CAAC9C,MAAL,GACA,CAFD,EAGA;;"} \ No newline at end of file +{"version":3,"file":"Gantt.min.js","sources":["Gantt.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\nclass Gantt {\n\t/**\n\t * Constructor\n\t *\n\t * @param {jQuery|HTMLElement|string} container\n\t * @param {object} projectData\n\t */\n\tconstructor(container, projectData) {\n\t\tthis.container = $(container);\n\t\tthis.containerParent = this.container.parent();\n\t\tthis.headerContainer = this.containerParent.parent().find('.js-gantt-header').eq(0);\n\t\tthis.weekStart = 6 - CONFIG.firstDayOfWeekNos;\n\t\tlet workingDays = [1, 2, 3, 4, 5];\n\t\tthis.options = {\n\t\t\tslots: {\n\t\t\t\theader: {\n\t\t\t\t\tbeforeOptions: ``\n\t\t\t\t}\n\t\t\t},\n\t\t\tmaxRows: 30,\n\t\t\ttimes: {\n\t\t\t\ttimeZoom: 20\n\t\t\t},\n\t\t\tcalendar: {\n\t\t\t\tworkingDays\n\t\t\t},\n\t\t\ttitle: {\n\t\t\t\tlabel: LANG.JS_GANTT_TITLE,\n\t\t\t\thtml: true\n\t\t\t},\n\t\t\ttaskList: {\n\t\t\t\texpander: {\n\t\t\t\t\tstraight: false\n\t\t\t\t},\n\t\t\t\tcolumns: [\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 1,\n\t\t\t\t\t\tlabel: app.vtranslate('JS_NO.'),\n\t\t\t\t\t\thtml: true,\n\t\t\t\t\t\tvalue: 'number',\n\t\t\t\t\t\twidth: 65\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 2,\n\t\t\t\t\t\tlabel: app.vtranslate('JS_NAME'),\n\t\t\t\t\t\thtml: true,\n\t\t\t\t\t\tvalue: 'label',\n\t\t\t\t\t\twidth: 280,\n\t\t\t\t\t\texpander: true\n\t\t\t\t\t},\n\t\t\t\t\t{ id: 3, label: app.vtranslate('JS_PRIORITY'), value: 'priority_label', width: 70 },\n\t\t\t\t\t{ id: 3, label: app.vtranslate('JS_STATUS'), value: 'status_label', width: 80 },\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 4,\n\t\t\t\t\t\tlabel: app.vtranslate('JS_DAYS'),\n\t\t\t\t\t\tvalue: (task) => {\n\t\t\t\t\t\t\treturn task.duration / 24 / 60 / 60 / 1000;\n\t\t\t\t\t\t},\n\t\t\t\t\t\twidth: 75,\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t'task-list-header-label': {\n\t\t\t\t\t\t\t\t'text-align': 'center',\n\t\t\t\t\t\t\t\twidth: '100%'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t'task-list-item-value-container': {\n\t\t\t\t\t\t\t\t'text-align': 'center',\n\t\t\t\t\t\t\t\twidth: '100%'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 5,\n\t\t\t\t\t\tlabel: app.vtranslate('JS_PLANNED'),\n\t\t\t\t\t\tvalue: (task) => {\n\t\t\t\t\t\t\treturn task.planned_duration;\n\t\t\t\t\t\t},\n\t\t\t\t\t\twidth: 85,\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t'task-list-header-label': {\n\t\t\t\t\t\t\t\t'text-align': 'center',\n\t\t\t\t\t\t\t\twidth: '100%'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t'task-list-item-value-container': {\n\t\t\t\t\t\t\t\t'text-align': 'center',\n\t\t\t\t\t\t\t\twidth: '100%'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 6,\n\t\t\t\t\t\tlabel: app.vtranslate('JS_REALISATION'),\n\t\t\t\t\t\tvalue: 'sum_time',\n\t\t\t\t\t\twidth: 85,\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t'task-list-header-label': {\n\t\t\t\t\t\t\t\t'text-align': 'center',\n\t\t\t\t\t\t\t\twidth: '100%'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t'task-list-item-value-container': {\n\t\t\t\t\t\t\t\t'text-align': 'center',\n\t\t\t\t\t\t\t\twidth: '100%'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 7,\n\t\t\t\t\t\tlabel: app.vtranslate('JS_ASSIGNED', 'Project'),\n\t\t\t\t\t\tvalue: 'assigned_user_name',\n\t\t\t\t\t\twidth: 110\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 8,\n\t\t\t\t\t\tlabel: '%',\n\t\t\t\t\t\tvalue: 'progress',\n\t\t\t\t\t\twidth: 35,\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t'task-list-header-label': {\n\t\t\t\t\t\t\t\t'text-align': 'center',\n\t\t\t\t\t\t\t\twidth: '100%'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t'task-list-item-value-container': {\n\t\t\t\t\t\t\t\t'text-align': 'center',\n\t\t\t\t\t\t\t\twidth: '100%'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t};\n\t\tthis.dynamicStyle = {\n\t\t\t'chart-expander-wrapper': {\n\t\t\t\t'line-height': '1'\n\t\t\t},\n\t\t\t'chart-row-bar-polygon': {\n\t\t\t\tstroke: '#E74C3C00',\n\t\t\t\t'stroke-width': 0,\n\t\t\t\tfill: '#F75C4C'\n\t\t\t},\n\t\t\t'chart-row-progress-bar-outline': {\n\t\t\t\tstroke: '#E74C3C00',\n\t\t\t\t'stroke-width': 0\n\t\t\t},\n\t\t\t'chart-days-highlight-rect': {\n\t\t\t\tfill: '#f3f5f780'\n\t\t\t},\n\t\t\t'header-title': {\n\t\t\t\tfloat: 'none',\n\t\t\t\tdisplay: 'inline-flex',\n\t\t\t\toverflow: 'hidden'\n\t\t\t},\n\t\t\t'header-options': {\n\t\t\t\tfloat: 'none',\n\t\t\t\tdisplay: 'inline-flex'\n\t\t\t},\n\t\t\t'header-title--html': {\n\t\t\t\t'white-space': 'nowrap',\n\t\t\t\toverflow: 'hidden',\n\t\t\t\t'text-overflow': 'ellipsis',\n\t\t\t\t'padding-left': '0',\n\t\t\t\t'letter-spacing': '0'\n\t\t\t},\n\t\t\t'slot-header-beforeOptions': {\n\t\t\t\theight: '100%',\n\t\t\t\t'vertical-align': 'top'\n\t\t\t}\n\t\t};\n\t\tthis.registerLanguage();\n\t\tif (typeof projectData !== 'undefined') {\n\t\t\tthis.options.title.label = projectData;\n\t\t\tthis.loadProject(projectData);\n\t\t}\n\t\tthis.registerEvents();\n\t}\n\n\t/**\n\t * Register language translations globally (replace old ones)\n\t */\n\tregisterLanguage() {\n\t\tthis.options.locale = {\n\t\t\tname: CONFIG.langKey,\n\t\t\tweekStart: this.weekStart,\n\t\t\tweekdays: [\n\t\t\t\tLANG.JS_SUNDAY,\n\t\t\t\tLANG.JS_MONDAY,\n\t\t\t\tLANG.JS_TUESDAY,\n\t\t\t\tLANG.JS_WEDNESDAY,\n\t\t\t\tLANG.JS_THURSDAY,\n\t\t\t\tLANG.JS_FRIDAY,\n\t\t\t\tLANG.JS_SATURDAY\n\t\t\t],\n\t\t\tweekdaysShort: [LANG.JS_SUN, LANG.JS_MON, LANG.JS_TUE, LANG.JS_WED, LANG.JS_THU, LANG.JS_FRI, LANG.JS_SAT],\n\t\t\tweekdaysMin: [LANG.JS_SUN, LANG.JS_MON, LANG.JS_TUE, LANG.JS_WED, LANG.JS_THU, LANG.JS_FRI, LANG.JS_SAT],\n\t\t\tmonths: [\n\t\t\t\tLANG.JS_JANUARY,\n\t\t\t\tLANG.JS_FEBRUARY,\n\t\t\t\tLANG.JS_MARCH,\n\t\t\t\tLANG.JS_APRIL,\n\t\t\t\tLANG.JS_MAY,\n\t\t\t\tLANG.JS_JUNE,\n\t\t\t\tLANG.JS_JULY,\n\t\t\t\tLANG.JS_AUGUST,\n\t\t\t\tLANG.JS_SEPTEMBER,\n\t\t\t\tLANG.JS_OCTOBER,\n\t\t\t\tLANG.JS_NOVEMBER,\n\t\t\t\tLANG.JS_DECEMBER\n\t\t\t],\n\t\t\tmonthsShort: [\n\t\t\t\tLANG.JS_JAN,\n\t\t\t\tLANG.JS_FEB,\n\t\t\t\tLANG.JS_MAR,\n\t\t\t\tLANG.JS_APR,\n\t\t\t\tLANG.JS_MAY,\n\t\t\t\tLANG.JS_JUN,\n\t\t\t\tLANG.JS_JUL,\n\t\t\t\tLANG.JS_AUG,\n\t\t\t\tLANG.JS_SEP,\n\t\t\t\tLANG.JS_OCT,\n\t\t\t\tLANG.JS_NOV,\n\t\t\t\tLANG.JS_DEC\n\t\t\t],\n\t\t\tordinal: (n) => `${n}`,\n\t\t\tNow: LANG.JS_GANTT_NOW,\n\t\t\t'X-Scale': LANG.JS_GANTT_ZOOM_X,\n\t\t\t'Y-Scale': LANG.JS_GANTT_ZOOM_Y,\n\t\t\t'Task list width': LANG.JS_GANTT_TASKLIST,\n\t\t\t'Before/After': LANG.JS_GANTT_EXPAND,\n\t\t\t'Display task list': LANG.JS_GANTT_TASKLIST_VISIBLE\n\t\t};\n\t}\n\n\t/**\n\t * Filter project data\n\t *\n\t * @param {Object} _projectData\n\t * @returns {Object}\n\t */\n\tfilterProjectData(_projectData) {\n\t\tlet tasks = this.allTasks.map((task) => Object.assign({}, task));\n\t\tfor (let moduleName in this.filter.status) {\n\t\t\tif (this.filter.status.hasOwnProperty(moduleName)) {\n\t\t\t\tconst visibleLabels = this.filter.status[moduleName].map((status) => status.label);\n\t\t\t\ttasks = tasks.filter((task) => {\n\t\t\t\t\treturn task.module !== moduleName || visibleLabels.indexOf(task.status_label) >= 0;\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\treturn tasks;\n\t}\n\n\t/**\n\t * Add icons to tasks\n\t * @param {array} tasks\n\t * @returns {array}\n\t */\n\taddIcons(tasks) {\n\t\treturn tasks.map((task) => {\n\t\t\tlet icon = 'briefcase';\n\t\t\tif (task.type === 'milestone') {\n\t\t\t\ticon = 'folder';\n\t\t\t} else if (task.type === 'task') {\n\t\t\t\ticon = 'file';\n\t\t\t}\n\t\t\tconst iconClass = 'fas fa-' + icon;\n\t\t\ttask.label = ` ${task.label}`;\n\t\t\treturn task;\n\t\t});\n\t}\n\n\t/**\n\t * Resize gantt chart\n\t */\n\tresize() {\n\t\tlet offsetTop = this.container.offset().top;\n\t\tlet contentHeight = $('body').eq(0).height() - $('.js-footer').eq(0).height();\n\t\tlet height = contentHeight - offsetTop - 100;\n\t\tif (height < 300) {\n\t\t\theight = 300;\n\t\t}\n\t\tthis.options.maxHeight = height;\n\t\tif (typeof this.ganttState !== 'undefined' && this.ganttState) {\n\t\t\tthis.ganttState.maxHeight = height;\n\t\t}\n\t}\n\n\t/**\n\t * Register gantt header actions\n\t */\n\tregisterHeaderActions() {\n\t\tthis.headerContainer.find('.js-gantt-header__btn-filter').on('click', (e) => {\n\t\t\te.preventDefault();\n\t\t\tthis.showFiltersModal();\n\t\t});\n\t\tthis.headerContainer.find('.js-gantt-header__btn-center').on('click', (e) => {\n\t\t\tthis.ganttElastic.$emit('recenterPosition');\n\t\t});\n\t\tthis.headerContainer.find('.js-gantt-header__range-slider--x').on('input', (e) => {\n\t\t\tthis.ganttElastic.$emit('times-timeZoom-change', Number(e.target.value));\n\t\t});\n\t\tthis.headerContainer.find('.js-gantt-header__range-slider--y').on('input', (e) => {\n\t\t\tthis.ganttElastic.$emit('row-height-change', Number(e.target.value));\n\t\t});\n\t\tthis.headerContainer.find('.js-gantt-header__range-slider--task-list-width').on('input', (e) => {\n\t\t\tthis.ganttElastic.$emit('taskList-width-change', Number(e.target.value));\n\t\t});\n\t\tthis.headerContainer.find('.js-gantt-header__range-slider--scope').on('input', (e) => {\n\t\t\tthis.ganttElastic.$emit('scope-change', Number(e.target.value));\n\t\t});\n\t\tthis.headerContainer.find('.js-gantt-header__range-slider--task-list-visible').on('change', (e) => {\n\t\t\tthis.ganttState.options.taskList.display = $(e.target).is(':checked');\n\t\t});\n\t\tthis.ganttElastic.$watch('state.taskList.display', (value) => {\n\t\t\tthis.headerContainer.find('.js-gantt-header__range-slider--task-list-visible').prop('checked', value);\n\t\t});\n\t\tthis.headerContainer\n\t\t\t.find('.js-gantt-header__range-slider--task-list-visible')\n\t\t\t.prop('checked', this.ganttState.options.taskList.display ? 'checked' : false);\n\t}\n\n\t/**\n\t * Load project\n\t */\n\tloadProject(projectData) {\n\t\tthis.projectData = projectData;\n\t\tif (typeof this.projectData.tasks === 'undefined' || this.projectData.tasks.length === 0) {\n\t\t\t$('.js-hide-filter').addClass('d-none');\n\t\t\t$('.js-show-add-record').removeClass('d-none');\n\t\t\treturn;\n\t\t} else {\n\t\t\tthis.allTasks = this.addIcons(this.projectData.tasks);\n\t\t}\n\t\tthis.statuses = this.projectData.statuses;\n\t\tthis.filter = { status: this.projectData.activeStatuses };\n\t\tthis.container.closest('form').on('submit', (ev) => {\n\t\t\tev.preventDefault();\n\t\t\tev.stopPropagation();\n\t\t\treturn false;\n\t\t});\n\t\tthis.resize();\n\t\tconst self = this;\n\t\tif (typeof self.ganttElastic === 'undefined') {\n\t\t\tthis.ganttApp = GanttElastic.mount({\n\t\t\t\tel: '#' + this.container.attr('id'),\n\t\t\t\tdata: {\n\t\t\t\t\ttasks: this.allTasks,\n\t\t\t\t\toptions: this.options,\n\t\t\t\t\tdynamicStyle: this.dynamicStyle\n\t\t\t\t},\n\t\t\t\tready(ganttElasticInstance) {\n\t\t\t\t\tself.ganttElastic = ganttElasticInstance;\n\t\t\t\t\tself.ganttState = ganttElasticInstance.state;\n\t\t\t\t\tself.registerHeaderActions();\n\t\t\t\t}\n\t\t\t});\n\t\t\tthis.container = this.containerParent.find('.gantt-elastic').eq(0);\n\t\t} else {\n\t\t\tself.ganttApp.tasks = this.allTasks;\n\t\t}\n\t}\n\n\t/**\n\t * Load project from ajax request\n\t * @param {object} params - request params such as module/action and projectId\n\t */\n\tloadProjectFromAjax(params) {\n\t\tconst self = this,\n\t\t\tprogressInstance = jQuery.progressIndicator({\n\t\t\t\tblockInfo: {\n\t\t\t\t\tenabled: true,\n\t\t\t\t\tonBlock: () => {\n\t\t\t\t\t\tAppConnector.request(params).done((response) => {\n\t\t\t\t\t\t\tself.loadProject(response.result);\n\t\t\t\t\t\t\tprogressInstance.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t}\n\n\t/**\n\t * Load new data to gantt\n\t *\n\t * @param {Object} data\n\t */\n\treloadData(data) {\n\t\tthis.loadProject(data);\n\t}\n\n\t/**\n\t * Save filter and reload data.\n\t *\n\t * @param {Object} filterOptions\n\t */\n\tsaveFilter(filterOptions) {\n\t\tthis.filter = filterOptions;\n\t\tthis.ganttApp.tasks = this.filterProjectData(this.projectData);\n\t}\n\n\t/**\n\t * Get status from value (object with other props)\n\t * @param {String} value\n\t * @param {String} moduleName\n\t * @returns {Object}\n\t */\n\tgetStatusFromValue(value, moduleName) {\n\t\tfor (let status of this.statuses[moduleName]) {\n\t\t\tif (status.value === value) {\n\t\t\t\treturn Object.assign({}, status);\n\t\t\t}\n\t\t}\n\t\tapp.errorLog(`Status not found [${value}]`);\n\t}\n\n\t/**\n\t * Open modal with status filters\n\t */\n\tshowFiltersModal() {\n\t\tconst self = this;\n\t\tapp.showModalHtml({\n\t\t\theaderIcon: 'fas fa-filter',\n\t\t\theader: app.vtranslate('JS_FILTER_BY_STATUSES'),\n\t\t\tbody: `
    \n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t
    `,\n\t\t\tfooterButtons: [\n\t\t\t\t{ text: app.vtranslate('JS_UPDATE_GANTT'), icon: 'fas fa-check', class: 'btn-success js-success' },\n\t\t\t\t{ text: app.vtranslate('JS_CANCEL'), icon: 'fas fa-times', class: 'btn-danger', data: { dismiss: 'modal' } }\n\t\t\t],\n\t\t\tcb: function (modal) {\n\t\t\t\tmodal.on('click', '.js-success', function (e) {\n\t\t\t\t\tself.saveFilter({\n\t\t\t\t\t\tstatus: {\n\t\t\t\t\t\t\tProject: modal\n\t\t\t\t\t\t\t\t.find('.js-gantt__filter-project')\n\t\t\t\t\t\t\t\t.val()\n\t\t\t\t\t\t\t\t.map((status) => {\n\t\t\t\t\t\t\t\t\treturn self.getStatusFromValue(status, 'Project');\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tProjectMilestone: modal\n\t\t\t\t\t\t\t\t.find('.js-gantt__filter-milestone')\n\t\t\t\t\t\t\t\t.val()\n\t\t\t\t\t\t\t\t.map((status) => {\n\t\t\t\t\t\t\t\t\treturn self.getStatusFromValue(status, 'ProjectMilestone');\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tProjectTask: modal\n\t\t\t\t\t\t\t\t.find('.js-gantt__filter-task')\n\t\t\t\t\t\t\t\t.val()\n\t\t\t\t\t\t\t\t.map((status) => {\n\t\t\t\t\t\t\t\t\treturn self.getStatusFromValue(status, 'ProjectTask');\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tapp.hideModalWindow();\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Register events for gantt actions in current container\n\t */\n\tregisterEvents() {\n\t\tconst container = this.container;\n\t\tcontainer.find('[data-toggle=\"tooltip\"]').tooltip();\n\t\twindow.addEventListener('resize', () => {\n\t\t\tthis.resize();\n\t\t});\n\t}\n}\n"],"names":["_typeof","o","Symbol","iterator","constructor","prototype","_createForOfIteratorHelper","allowArrayLike","it","Array","isArray","_unsupportedIterableToArray","length","i","F","s","n","done","value","e","_e","f","TypeError","err","normalCompletion","didErr","call","step","next","_e2","return","minLen","_arrayLikeToArray","Object","toString","slice","name","from","test","arr","len","arr2","_classCallCheck","instance","Constructor","_defineProperties","target","props","descriptor","enumerable","configurable","writable","defineProperty","_toPropertyKey","key","_createClass","protoProps","staticProps","arg","_toPrimitive","String","input","hint","prim","toPrimitive","res","Number","Gantt","container","projectData","$","containerParent","parent","headerContainer","find","eq","weekStart","CONFIG","firstDayOfWeekNos","options","slots","header","beforeOptions","concat","LANG","JS_GANTT_FILTER","maxRows","times","timeZoom","calendar","workingDays","title","label","JS_GANTT_TITLE","html","taskList","expander","straight","columns","id","app","vtranslate","width","task","duration","style","\"task-list-header-label\"","\"text-align\"","\"task-list-item-value-container\"","planned_duration","dynamicStyle","\"chart-expander-wrapper\"","\"line-height\"","\"chart-row-bar-polygon\"","stroke","\"stroke-width\"","fill","\"chart-row-progress-bar-outline\"","\"chart-days-highlight-rect\"","\"header-title\"","float","display","overflow","\"header-options\"","\"header-title--html\"","\"white-space\"","\"text-overflow\"","\"padding-left\"","\"letter-spacing\"","\"slot-header-beforeOptions\"","height","\"vertical-align\"","registerLanguage","loadProject","registerEvents","locale","langKey","weekdays","JS_SUNDAY","JS_MONDAY","JS_TUESDAY","JS_WEDNESDAY","JS_THURSDAY","JS_FRIDAY","JS_SATURDAY","weekdaysShort","JS_SUN","JS_MON","JS_TUE","JS_WED","JS_THU","JS_FRI","JS_SAT","weekdaysMin","months","JS_JANUARY","JS_FEBRUARY","JS_MARCH","JS_APRIL","JS_MAY","JS_JUNE","JS_JULY","JS_AUGUST","JS_SEPTEMBER","JS_OCTOBER","JS_NOVEMBER","JS_DECEMBER","monthsShort","JS_JAN","JS_FEB","JS_MAR","JS_APR","JS_JUN","JS_JUL","JS_AUG","JS_SEP","JS_OCT","JS_NOV","JS_DEC","ordinal","Now","JS_GANTT_NOW","\"X-Scale\"","JS_GANTT_ZOOM_X","\"Y-Scale\"","JS_GANTT_ZOOM_Y","\"Task list width\"","JS_GANTT_TASKLIST","\"Before/After\"","JS_GANTT_EXPAND","\"Display task list\"","JS_GANTT_TASKLIST_VISIBLE","filterProjectData","_this","tasks","allTasks","map","assign","_loop","moduleName","filter","status","hasOwnProperty","visibleLabels","module","indexOf","status_label","addIcons","icon","type","iconClass","resize","offsetTop","offset","top","contentHeight","maxHeight","ganttState","registerHeaderActions","_this2","on","preventDefault","showFiltersModal","ganttElastic","$emit","is","$watch","prop","addClass","removeClass","statuses","activeStatuses","closest","ev","stopPropagation","self","ganttApp","GanttElastic","mount","el","attr","data","ready","ganttElasticInstance","state","loadProjectFromAjax","params","progressInstance","jQuery","progressIndicator","blockInfo","enabled","onBlock","AppConnector","request","response","result","mode","reloadData","saveFilter","filterOptions","getStatusFromValue","_step","_iterator","errorLog","_this3","showModalHtml","headerIcon","body","Project","ProjectMilestone","ProjectTask","footerButtons","text","class","dismiss","cb","modal","val","hideModalWindow","_this4","tooltip","window","addEventListener"],"mappings":";;AAAA,kKACA,YAAY,CAAC,SAAAA,OAAAC,CAAAA,CAAA,mCAAAD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BAAgB,CAAC,QAAQ,CAAE,UAAM,CACvCH,MAAI,CAACrE,MAAM,GACZ,CAAC,EACF,CAAC,CAAA,CAAA,CAAA,CAAAhJ,KAAA,CAAA,EAAA;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/Project/resources/GanttController.min.js b/public_html/layouts/basic/modules/Project/resources/GanttController.min.js index 8f65d942e343..42e181b8c019 100644 --- a/public_html/layouts/basic/modules/Project/resources/GanttController.min.js +++ b/public_html/layouts/basic/modules/Project/resources/GanttController.min.js @@ -1,11 +1,11 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */"use strict";$.Class("Project_Gantt_Js",{},{filterSelectElement:!1,getFilterSelectElement:function getFilterSelectElement(){return !1==this.filterSelectElement&&(this.filterSelectElement=jQuery("#customFilter")),this.filterSelectElement},getDefaultParams:function getDefaultParams(){var params={module:app.getModuleName(),action:"GanttData"};return app.getParentModuleName()&&(params.parent=app.getParentModuleName()),params},getCurrentCvId:function getCurrentCvId(){return jQuery("#customFilter").find("option:selected").data("id")},getGanttData:function getGanttData(urlParams){var aDeferred=$.Deferred();"undefined"==typeof urlParams&&(urlParams={});var defaultParams=this.getDefaultParams();urlParams=$.extend(defaultParams,urlParams);var progressInstance=jQuery.progressIndicator({blockInfo:{enabled:!0,onBlock:function onBlock(){AppConnector.request(urlParams).done(function(data){progressInstance.progressIndicator({mode:"hide"}),aDeferred.resolve(data),app.notifyPostAjaxReady();}).fail(function(textStatus,errorThrown){aDeferred.reject(textStatus,errorThrown);});}}});return aDeferred.promise()},/** +/* {[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]} */"use strict";$.Class("Project_Gantt_Js",{},{filterSelectElement:!1,getFilterSelectElement:function getFilterSelectElement(){return !1==this.filterSelectElement&&(this.filterSelectElement=jQuery("#customFilter")),this.filterSelectElement},getDefaultParams:function getDefaultParams(){var params={module:app.getModuleName(),action:"GanttData"};return app.getParentModuleName()&&(params.parent=app.getParentModuleName()),params},getCurrentCvId:function getCurrentCvId(){return jQuery("#customFilter").find("option:selected").data("id")},getGanttData:function getGanttData(urlParams){var aDeferred=$.Deferred();"undefined"==typeof urlParams&&(urlParams={});var defaultParams=this.getDefaultParams();urlParams=$.extend(defaultParams,urlParams);var progressInstance=jQuery.progressIndicator({blockInfo:{enabled:!0,onBlock:function onBlock(){AppConnector.request(urlParams).done(function(data){progressInstance.progressIndicator({mode:"hide"}),aDeferred.resolve(data),app.notifyPostAjaxReady();}).fail(function(textStatus,errorThrown){aDeferred.reject(textStatus,errorThrown);});}}});return aDeferred.promise()},/** * load gantt */loadGantt:function loadGantt(){var container=0");return resultContainer.append(jQuery(jQuery(".filterImage").clone().get(0)).show()),resultContainer.append(data.text),resultContainer},customSortOptGroup:!0,closeOnSelect:!0});var select2Instance=filterSelectElement.data("select2");jQuery(".filterActionsDiv").appendTo(select2Instance.$dropdown.find(".select2-dropdown:last")).removeClass("d-none").on("click",function(e){thisInstance.registerCreateFilterClickEvent(e);});}},registerEvents:function registerEvents(){this.changeCustomFilterElementView(),this.registerChangeCustomFilterEvent(),Vtiger_Helper_Js.showHorizontalTopScrollBar(),this.loadGantt();}}); + */registerChangeCustomFilterEvent:function registerChangeCustomFilterEvent(){var thisInstance=this;this.getFilterSelectElement().on("change",function(event){$(".nav-item[data-cvid='".concat(thisInstance.getCurrentCvId(),"'] .nav-link")).tab("show");var currentTarget=jQuery(event.currentTarget),selectOption=currentTarget.find(":selected");app.setMainParams("pageNumber","1"),app.setMainParams("pageToJump","1"),app.setMainParams("orderBy",selectOption.data("orderby")),app.setMainParams("sortOrder",selectOption.data("sortorder")),thisInstance.getGanttData({viewname:jQuery(this).val()}).done(function(data){thisInstance.reloadData(data.result);}),event.stopPropagation();});},getSelectOptionFromChosenOption:function getSelectOptionFromChosenOption(liElement){var id=liElement.attr("id"),idArr=id.split("-"),currentOptionId="";if(0 {\n\t\t\t\t\t\tAppConnector.request(urlParams)\n\t\t\t\t\t\t\t.done(function (data) {\n\t\t\t\t\t\t\t\tprogressInstance.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\t\t\taDeferred.resolve(data);\n\t\t\t\t\t\t\t\tapp.notifyPostAjaxReady();\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t.fail(function (textStatus, errorThrown) {\n\t\t\t\t\t\t\t\taDeferred.reject(textStatus, errorThrown);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn aDeferred.promise();\n\t\t},\n\t\t/**\n\t\t * load gantt\n\t\t */\n\t\tloadGantt(container = '.js-gantt__container', ganttData = false) {\n\t\t\tcontainer = $(container);\n\t\t\tthis.gantt = new Gantt(container);\n\t\t\tconst projectId = container.parent().find('input[name=\"projectId\"]').val();\n\t\t\tif (!ganttData) {\n\t\t\t\tthis.gantt.loadProjectFromAjax({\n\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\taction: 'GanttData',\n\t\t\t\t\tprojectId: projectId\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * reload gantt with new data\n\t\t * @param data\n\t\t */\n\t\treloadData(data) {\n\t\t\tthis.gantt.reloadData(data);\n\t\t},\n\t\t/*\n\t\t * Function to register the event for changing the custom Filter\n\t\t */\n\t\tregisterChangeCustomFilterEvent: function () {\n\t\t\tvar thisInstance = this;\n\t\t\tthis.getFilterSelectElement().on('change', function (event) {\n\t\t\t\t$(`.nav-item[data-cvid='${thisInstance.getCurrentCvId()}'] .nav-link`).tab('show');\n\t\t\t\tvar currentTarget = jQuery(event.currentTarget);\n\t\t\t\tvar selectOption = currentTarget.find(':selected');\n\t\t\t\tapp.setMainParams('pageNumber', '1');\n\t\t\t\tapp.setMainParams('pageToJump', '1');\n\t\t\t\tapp.setMainParams('orderBy', selectOption.data('orderby'));\n\t\t\t\tapp.setMainParams('sortOrder', selectOption.data('sortorder'));\n\t\t\t\tthisInstance\n\t\t\t\t\t.getGanttData({\n\t\t\t\t\t\tviewname: jQuery(this).val()\n\t\t\t\t\t})\n\t\t\t\t\t.done(function (data) {\n\t\t\t\t\t\tthisInstance.reloadData(data.result);\n\t\t\t\t\t});\n\t\t\t\tevent.stopPropagation();\n\t\t\t});\n\t\t},\n\t\tgetSelectOptionFromChosenOption: function (liElement) {\n\t\t\tvar id = liElement.attr('id');\n\t\t\tvar idArr = id.split('-');\n\t\t\tvar currentOptionId = '';\n\t\t\tif (idArr.length > 0) {\n\t\t\t\tcurrentOptionId = idArr[idArr.length - 1];\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn jQuery('#filterOptionId_' + currentOptionId);\n\t\t},\n\t\tchangeCustomFilterElementView: function () {\n\t\t\tvar thisInstance = this;\n\t\t\tvar filterSelectElement = this.getFilterSelectElement();\n\t\t\tif (filterSelectElement.length > 0 && filterSelectElement.is('select')) {\n\t\t\t\tApp.Fields.Picklist.showSelect2ElementView(filterSelectElement, {\n\t\t\t\t\ttemplateSelection: function (data) {\n\t\t\t\t\t\tvar resultContainer = jQuery('');\n\t\t\t\t\t\tresultContainer.append(jQuery(jQuery('.filterImage').clone().get(0)).show());\n\t\t\t\t\t\tresultContainer.append(data.text);\n\t\t\t\t\t\treturn resultContainer;\n\t\t\t\t\t},\n\t\t\t\t\tcustomSortOptGroup: true,\n\t\t\t\t\tcloseOnSelect: true\n\t\t\t\t});\n\n\t\t\t\tvar select2Instance = filterSelectElement.data('select2');\n\t\t\t\tjQuery('.filterActionsDiv')\n\t\t\t\t\t.appendTo(select2Instance.$dropdown.find('.select2-dropdown:last'))\n\t\t\t\t\t.removeClass('d-none')\n\t\t\t\t\t.on('click', function (e) {\n\t\t\t\t\t\tthisInstance.registerCreateFilterClickEvent(e);\n\t\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tregisterEvents: function () {\n\t\t\tthis.changeCustomFilterElementView();\n\t\t\tthis.registerChangeCustomFilterEvent();\n\t\t\tVtiger_Helper_Js.showHorizontalTopScrollBar();\n\t\t\tthis.loadGantt();\n\t\t}\n\t}\n);\n"],"names":["$","Class","filterSelectElement","getFilterSelectElement","jQuery","getDefaultParams","module","app","getModuleName","action","getParentModuleName","params","parent","getCurrentCvId","find","data","getGanttData","urlParams","Deferred","extend","defaultParams","progressIndicator","blockInfo","enabled","onBlock","AppConnector","request","done","progressInstance","mode","aDeferred","resolve","notifyPostAjaxReady","fail","textStatus","errorThrown","reject","promise","loadGantt","container","ganttData","gantt","Gantt","projectId","val","loadProjectFromAjax","reloadData","registerChangeCustomFilterEvent","thisInstance","on","event","tab","currentTarget","selectOption","setMainParams","viewname","result","stopPropagation","getSelectOptionFromChosenOption","liElement","attr","idArr","id","split","currentOptionId","length","changeCustomFilterElementView","is","App","Fields","Picklist","showSelect2ElementView","templateSelection","resultContainer","append","clone","get","show","text","customSortOptGroup","closeOnSelect","appendTo","select2Instance","$dropdown","removeClass","e","registerCreateFilterClickEvent","registerEvents","Vtiger_Helper_Js","showHorizontalTopScrollBar"],"mappings":";;AAAA,kKACA,YAAA,CAEAA,CAAC,CAACC,KAAF,CACC,kBADD,CAEC,EAFD,CAGC,CACCC,mBAAmB,GADpB,CAECC,sBAAsB,CAAE,SAAA,sBAAA,EAAY,CAInC,OAHI,SAAKD,mBAGT,GAFC,IAAKA,CAAAA,mBAAL,CAA2BE,MAAM,CAAC,eAAD,CAElC,EAAO,IAAKF,CAAAA,mBACZ,CAPF,CAQCG,gBAAgB,CAAE,SAAA,gBAAA,EAAY,CAC7B,UAAU,CAAG,CACZC,MAAM,CAAEC,GAAG,CAACC,aAAJ,EADI,CAEZC,MAAM,CAAE,WAFI,CAAb,CAOA,OAHIF,GAAG,CAACG,mBAAJ,EAGJ,GAFCC,MAAM,CAACC,MAAP,CAAgBL,GAAG,CAACG,mBAAJ,EAEjB,CAAA,CAAOC,MACP,CAjBF,CAkBCE,cAAc,CAAE,SAAY,cAAA,EAAA,CAC3B,OAAO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AV,CAAgB,CAClC,mBAAmB,CAAGX,MAAM,CAAC,eAAD,CAA5B,CAGA,OAFAqE,eAAe,CAACC,MAAhB,CAAuBtE,MAAM,CAACA,MAAM,CAAC,cAAD,CAAN,CAAuBuE,KAAvB,GAA+BC,GAA/B,CAAmC,CAAnC,CAAD,CAAN,CAA8CC,IAA9C,EAAvB,CAEA,CADAJ,eAAe,CAACC,MAAhB,CAAuB3D,IAAI,CAAC+D,IAA5B,CACA,CAAOL,eACP,CAN8D,CAO/DM,kBAAkB,CAP6C,CAAA,CAAA,CAQ/DC,aAAa,CARkD,CAAA,CAAA,CAAhE,CADuE,CAYvE,mBAAmB,CAAG9E,mBAAmB,CAACa,IAApB,CAAyB,SAAzB,CAAtB,CACAX,MAAM,CAAC,mBAAD,CAAN,CACE6E,QADF,CACWC,eAAe,CAACC,SAAhB,CAA0BrE,IAA1B,CAA+B,wBAA/B,CADX,CAEEsE,CAAAA,WAFF,CAEc,QAFd,EAGEnC,EAHF,CAGK,OAHL,CAGc,SAAUoC,CAAV,CAAa,CACzBrC,YAAY,CAACsC,8BAAb,CAA4CD,CAA5C,EACA,CALF,EAMA,CACD,CA7HF,CA8HCE,cAAc,CAAE,SAAA,cAAA,EAAY,CAC3B,IAAKrB,CAAAA,6BAAL,EAD2B,CAE3B,IAAA,CAAKnB,+BAAL,EAF2B,CAG3ByC,gBAAgB,CAACC,0BAAjB,EAH2B,CAI3B,IAAA,CAAKnD,SAAL,GACA,CAnIF,CAHD;;"} \ No newline at end of file +{"version":3,"file":"GanttController.min.js","sources":["GanttController.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'Project_Gantt_Js',\n\t{},\n\t{\n\t\tfilterSelectElement: false,\n\t\tgetFilterSelectElement: function () {\n\t\t\tif (this.filterSelectElement == false) {\n\t\t\t\tthis.filterSelectElement = jQuery('#customFilter');\n\t\t\t}\n\t\t\treturn this.filterSelectElement;\n\t\t},\n\t\tgetDefaultParams: function () {\n\t\t\tvar params = {\n\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\taction: 'GanttData'\n\t\t\t};\n\t\t\tif (app.getParentModuleName()) {\n\t\t\t\tparams.parent = app.getParentModuleName();\n\t\t\t}\n\t\t\treturn params;\n\t\t},\n\t\tgetCurrentCvId: function () {\n\t\t\treturn jQuery('#customFilter').find('option:selected').data('id');\n\t\t},\n\t\tgetGanttData(urlParams) {\n\t\t\tlet aDeferred = $.Deferred();\n\t\t\tif (typeof urlParams === 'undefined') {\n\t\t\t\turlParams = {};\n\t\t\t}\n\t\t\tlet defaultParams = this.getDefaultParams();\n\t\t\turlParams = $.extend(defaultParams, urlParams);\n\t\t\tconst progressInstance = jQuery.progressIndicator({\n\t\t\t\tblockInfo: {\n\t\t\t\t\tenabled: true,\n\t\t\t\t\tonBlock: () => {\n\t\t\t\t\t\tAppConnector.request(urlParams)\n\t\t\t\t\t\t\t.done(function (data) {\n\t\t\t\t\t\t\t\tprogressInstance.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\t\t\taDeferred.resolve(data);\n\t\t\t\t\t\t\t\tapp.notifyPostAjaxReady();\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t.fail(function (textStatus, errorThrown) {\n\t\t\t\t\t\t\t\taDeferred.reject(textStatus, errorThrown);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn aDeferred.promise();\n\t\t},\n\t\t/**\n\t\t * load gantt\n\t\t */\n\t\tloadGantt(container = '.js-gantt__container', ganttData = false) {\n\t\t\tcontainer = $(container);\n\t\t\tthis.gantt = new Gantt(container);\n\t\t\tconst projectId = container.parent().find('input[name=\"projectId\"]').val();\n\t\t\tif (!ganttData) {\n\t\t\t\tthis.gantt.loadProjectFromAjax({\n\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\taction: 'GanttData',\n\t\t\t\t\tprojectId: projectId\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * reload gantt with new data\n\t\t * @param data\n\t\t */\n\t\treloadData(data) {\n\t\t\tthis.gantt.reloadData(data);\n\t\t},\n\t\t/*\n\t\t * Function to register the event for changing the custom Filter\n\t\t */\n\t\tregisterChangeCustomFilterEvent: function () {\n\t\t\tvar thisInstance = this;\n\t\t\tthis.getFilterSelectElement().on('change', function (event) {\n\t\t\t\t$(`.nav-item[data-cvid='${thisInstance.getCurrentCvId()}'] .nav-link`).tab('show');\n\t\t\t\tvar currentTarget = jQuery(event.currentTarget);\n\t\t\t\tvar selectOption = currentTarget.find(':selected');\n\t\t\t\tapp.setMainParams('pageNumber', '1');\n\t\t\t\tapp.setMainParams('pageToJump', '1');\n\t\t\t\tapp.setMainParams('orderBy', selectOption.data('orderby'));\n\t\t\t\tapp.setMainParams('sortOrder', selectOption.data('sortorder'));\n\t\t\t\tthisInstance\n\t\t\t\t\t.getGanttData({\n\t\t\t\t\t\tviewname: jQuery(this).val()\n\t\t\t\t\t})\n\t\t\t\t\t.done(function (data) {\n\t\t\t\t\t\tthisInstance.reloadData(data.result);\n\t\t\t\t\t});\n\t\t\t\tevent.stopPropagation();\n\t\t\t});\n\t\t},\n\t\tgetSelectOptionFromChosenOption: function (liElement) {\n\t\t\tvar id = liElement.attr('id');\n\t\t\tvar idArr = id.split('-');\n\t\t\tvar currentOptionId = '';\n\t\t\tif (idArr.length > 0) {\n\t\t\t\tcurrentOptionId = idArr[idArr.length - 1];\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn jQuery('#filterOptionId_' + currentOptionId);\n\t\t},\n\t\tchangeCustomFilterElementView: function () {\n\t\t\tconst self = this,\n\t\t\t\tfilterSelectElement = this.getFilterSelectElement();\n\t\t\tif (filterSelectElement.length > 0 && filterSelectElement.is('select')) {\n\t\t\t\tApp.Fields.Picklist.showSelect2ElementView(filterSelectElement, {\n\t\t\t\t\ttemplateSelection: function (data) {\n\t\t\t\t\t\tconst resultContainer = document.createElement('span'),\n\t\t\t\t\t\t\tspan = document.createElement('span'),\n\t\t\t\t\t\t\timage = $('.filterImage').clone();\n\t\t\t\t\t\timage.removeAttr('style');\n\t\t\t\t\t\tspan.innerText = data.text;\n\t\t\t\t\t\tresultContainer.appendChild(image.get(0));\n\t\t\t\t\t\tresultContainer.appendChild(span);\n\t\t\t\t\t\treturn resultContainer;\n\t\t\t\t\t},\n\t\t\t\t\tcustomSortOptGroup: true,\n\t\t\t\t\tcloseOnSelect: true\n\t\t\t\t});\n\t\t\t\tconst select2Instance = filterSelectElement.data('select2');\n\t\t\t\tjQuery('.filterActionsDiv')\n\t\t\t\t\t.appendTo(select2Instance.$dropdown.find('.select2-dropdown:last'))\n\t\t\t\t\t.removeClass('d-none')\n\t\t\t\t\t.on('click', function (e) {\n\t\t\t\t\t\tself.registerCreateFilterClickEvent(e);\n\t\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tregisterEvents: function () {\n\t\t\tthis.changeCustomFilterElementView();\n\t\t\tthis.registerChangeCustomFilterEvent();\n\t\t\tVtiger_Helper_Js.showHorizontalTopScrollBar();\n\t\t\tthis.loadGantt();\n\t\t}\n\t}\n);\n"],"names":["$","Class","filterSelectElement","getFilterSelectElement","jQuery","getDefaultParams","params","module","app","getModuleName","action","getParentModuleName","parent","getCurrentCvId","find","data","getGanttData","urlParams","aDeferred","Deferred","defaultParams","extend","progressInstance","progressIndicator","blockInfo","enabled","onBlock","AppConnector","request","done","mode","resolve","notifyPostAjaxReady","fail","textStatus","errorThrown","reject","promise","loadGantt","container","arguments","length","ganttData","gantt","Gantt","projectId","val","loadProjectFromAjax","reloadData","registerChangeCustomFilterEvent","thisInstance","on","event","concat","tab","currentTarget","selectOption","setMainParams","viewname","result","stopPropagation","getSelectOptionFromChosenOption","liElement","id","attr","idArr","split","currentOptionId","changeCustomFilterElementView","self","is","App","Fields","Picklist","showSelect2ElementView","templateSelection","resultContainer","document","createElement","span","image","clone","removeAttr","innerText","text","appendChild","get","customSortOptGroup","closeOnSelect","select2Instance","appendTo","$dropdown","removeClass","e","registerCreateFilterClickEvent","registerEvents","Vtiger_Helper_Js","showHorizontalTopScrollBar"],"mappings":";;AAAA,kKACA,YAAY,CAEZA,CAAC,CAACC,KAAK,CACN,kBAAkB,CAClB,EAAE,CACF,CACCC,mBAAmB,CAAO,CAAA,CAAA,CAC1BC,sBAAsB,CAAE,SAAAA,sBAAAA,EAAY,CAInC,OAHI,CAAA,CAAA,EAAA,IAAI,CAACD,mBAA4B,GACpC,IAAI,CAACA,mBAAmB,CAAGE,MAAM,CAAC,eAAe,CAAC,CAAA,CAE5C,IAAI,CAACF,mBACb,CAAC,CACDG,gBAAgB,CAAE,SAAAA,gBAAA,EAAY,CAC7B,IAAIC,MAAM,CAAG,CACZC,MAAM,CAAEC,GAAG,CAACC,aAAa,EAAE,CAC3BC,MAAM,CAAE,WACT,CAAC,CAID,OAHIF,GAAG,CAACG,mBAAmB,EAAE,GAC5BL,MAAM,CAACM,MAAM,CAAGJ,GAAG,CAACG,mBAAmB,EAAE,CAAA,CAEnCL,MACR,CAAC,CACDO,cAAc,CAAE,SAAAA,cAAA,EAAY,CAC3B,OAAOT,MAAM,CAAC,eAAe,CAAC,CAACU,IAAI,CAAC,iBAAiB,CAAC,CAACC,IAAI,CAAC,IAAI,CACjE,CAAC,CACDC,YAAY,CAAAA,SAAAA,YAAAA,CAACC,SAAS,CAAE,CACvB,IAAIC,SAAS,CAAGlB,CAAC,CAACmB,QAAQ,EAAE,CACH,WAAW,EAAhC,OAAOF,SAAyB,GACnCA,SAAS,CAAG,EAAE,CAEf,CAAA,IAAIG,aAAa,CAAG,IAAI,CAACf,gBAAgB,EAAE,CAC3CY,SAAS,CAAGjB,CAAC,CAACqB,MAAM,CAACD,aAAa,CAAEH,SAAS,CAAC,CAC9C,IAAMK,gBAAgB,CAAGlB,MAAM,CAACmB,iBAAiB,CAAC,CACjDC,SAAS,CAAE,CACVC,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AAC,QAAQ,CAAC,CACrBzC,EAAE,CAAC,OAAO,CAAE,SAAU0C,CAAC,CAAE,CACzBxB,IAAI,CAACyB,8BAA8B,CAACD,CAAC,EACtC,CAAC,EACH,CACD,CAAC,CACDE,cAAc,CAAE,SAAAA,cAAAA,EAAY,CAC3B,IAAI,CAAC3B,6BAA6B,EAAE,CACpC,IAAI,CAACnB,+BAA+B,EAAE,CACtC+C,gBAAgB,CAACC,0BAA0B,EAAE,CAC7C,IAAI,CAAC3D,SAAS,GACf,CACD,CACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/ProjectTask/resources/Edit.min.js b/public_html/layouts/basic/modules/ProjectTask/resources/Edit.min.js index 49d631825426..6b9ba941b8cd 100644 --- a/public_html/layouts/basic/modules/ProjectTask/resources/Edit.min.js +++ b/public_html/layouts/basic/modules/ProjectTask/resources/Edit.min.js @@ -1,6 +1,6 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */"use strict";Vtiger_Edit_Js("ProjectTask_Edit_Js",{},{/** +/* {[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]} */"use strict";Vtiger_Edit_Js("ProjectTask_Edit_Js",{},{/** * Function to get popup params */getRecordsListParams:function getRecordsListParams(container){var form,parentIdElement,closestContainer,params=this._super(container),sourceFieldElement=jQuery("input[class=\"sourceField\"]",container);return "projectmilestoneid"==sourceFieldElement.attr("name")&&(form=this.getForm(),parentIdElement=form.find("[name=\"projectid\"]"),0 0 && parentIdElement.val().length > 0 && parentIdElement.val() != 0) {\n\t\t\t\t\tclosestContainer = parentIdElement.closest('.fieldValue');\n\t\t\t\t\tparams['related_parent_id'] = parentIdElement.val();\n\t\t\t\t\tparams['related_parent_module'] = closestContainer.find('[name=\"popupReferenceModule\"]').val();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (sourceFieldElement.attr('name') == 'parentid') {\n\t\t\t\tform = this.getForm();\n\t\t\t\tparentIdElement = form.find('[name=\"projectmilestoneid\"]');\n\t\t\t\tif (parentIdElement.length > 0 && parentIdElement.val().length > 0 && parentIdElement.val() != 0) {\n\t\t\t\t\tclosestContainer = parentIdElement.closest('.fieldValue');\n\t\t\t\t\tparams['related_parent_id'] = parentIdElement.val();\n\t\t\t\t\tparams['related_parent_module'] = closestContainer.find('[name=\"popupReferenceModule\"]').val();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn params;\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Edit_Js","getRecordsListParams","container","parentIdElement","closestContainer","params","_super","sourceFieldElement","jQuery","attr","form","getForm","find","length","val","closest"],"mappings":";;AAAA,kKACA,aAEAA,cAAc,CACb,qBADa,CAEb,EAFa,CAGb;AAED;AACA,KACEC,oBAAoB,CAAE,SAAA,oBAAA,CAAUC,SAAV,CAAqB,CAAA,QAAA,CAGhCC,eAHgC,CAGfC,gBAHe,CACtCC,MAAM,CAAG,IAAA,CAAKC,MAAL,CAAYJ,SAAZ,CAD6B,CAEtCK,kBAAkB,CAAGC,MAAM,CAAC,8BAAD,CAA+BN,SAA/B,CAFW,CAsB1C,OAlBuC,oBAAnC,EAAAK,kBAAkB,CAACE,IAAnB,CAAwB,MAAxB,CAkBJ,GAjBCC,IAAI,CAAG,KAAKC,OAAL,EAiBR,CAhBCR,eAAe,CAAGO,IAAI,CAACE,IAAL,CAAU,sBAAV,CAgBnB,CAf8B,CAAzB,CAAAT,eAAe,CAACU,MAAhB,EAA6D,CAA/B,CAAAV,eAAe,CAACW,GAAhB,EAAsBD,CAAAA,MAApD,EAA2F,CAAzB,EAAAV,eAAe,CAACW,GAAhB,EAevE,GAdEV,gBAAgB,CAAGD,eAAe,CAACY,OAAhB,CAAwB,aAAxB,CAcrB,CAbEV,MAAM,CAAN,iBAAA,CAA8BF,eAAe,CAACW,GAAhB,EAahC,CAZET,MAAM,CAAN,qBAAA,CAAkCD,gBAAgB,CAACQ,IAAjB,CAAsB,iCAAtB,CAAA,CAAuDE,GAAvD,EAYpC,CAAA,CAAA,CATuC,UAAnC,EAAAP,kBAAkB,CAACE,IAAnB,CAAwB,MAAxB,CASJ,GARCC,IAAI,CAAG,KAAKC,OAAL,EAQR,CAPCR,eAAe,CAAGO,IAAI,CAACE,IAAL,CAAU,+BAAV,CAOnB,CAN8B,CAAzB,CAAAT,eAAe,CAACU,MAAhB,EAA6D,CAA/B,CAAAV,eAAe,CAACW,GAAhB,EAAsBD,CAAAA,MAApD,EAA2F,CAAzB,EAAAV,eAAe,CAACW,GAAhB,EAMvE,GALEV,gBAAgB,CAAGD,eAAe,CAACY,OAAhB,CAAwB,aAAxB,CAKrB,CAJEV,MAAM,kBAAN,CAA8BF,eAAe,CAACW,GAAhB,EAIhC,CAHET,MAAM,CAAA,qBAAN,CAAkCD,gBAAgB,CAACQ,IAAjB,CAAsB,iCAAtB,EAAuDE,GAAvD,EAGpC,GAAOT,MACP,CA3BF,CAHa;;"} \ No newline at end of file +{"version":3,"file":"Edit.min.js","sources":["Edit.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\nVtiger_Edit_Js(\n\t'ProjectTask_Edit_Js',\n\t{},\n\t{\n\t\t/**\n\t\t * Function to get popup params\n\t\t */\n\t\tgetRecordsListParams: function (container) {\n\t\t\tlet params = this._super(container);\n\t\t\tlet sourceFieldElement = jQuery('input[class=\"sourceField\"]', container);\n\t\t\tlet form, parentIdElement, closestContainer;\n\t\t\tif (sourceFieldElement.attr('name') == 'projectmilestoneid') {\n\t\t\t\tform = this.getForm();\n\t\t\t\tparentIdElement = form.find('[name=\"projectid\"]');\n\t\t\t\tif (parentIdElement.length > 0 && parentIdElement.val().length > 0 && parentIdElement.val() != 0) {\n\t\t\t\t\tclosestContainer = parentIdElement.closest('.fieldValue');\n\t\t\t\t\tparams['related_parent_id'] = parentIdElement.val();\n\t\t\t\t\tparams['related_parent_module'] = closestContainer.find('[name=\"popupReferenceModule\"]').val();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (sourceFieldElement.attr('name') == 'parentid') {\n\t\t\t\tform = this.getForm();\n\t\t\t\tparentIdElement = form.find('[name=\"projectmilestoneid\"]');\n\t\t\t\tif (parentIdElement.length > 0 && parentIdElement.val().length > 0 && parentIdElement.val() != 0) {\n\t\t\t\t\tclosestContainer = parentIdElement.closest('.fieldValue');\n\t\t\t\t\tparams['related_parent_id'] = parentIdElement.val();\n\t\t\t\t\tparams['related_parent_module'] = closestContainer.find('[name=\"popupReferenceModule\"]').val();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn params;\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Edit_Js","getRecordsListParams","container","form","parentIdElement","closestContainer","params","_super","sourceFieldElement","jQuery","attr","getForm","find","length","val","closest","related_parent_id","related_parent_module"],"mappings":";;AAAA,kKACA,YAAY,CAEZA,cAAc,CACb,qBAAqB,CACrB,EAAE,CACF;AAED;AACA,KACEC,oBAAoB,CAAE,SAAAA,oBAAAA,CAAUC,SAAS,CAAE,CAAA,IAGtCC,IAAI,CAAEC,eAAe,CAAEC,gBAAgB,CAFvCC,MAAM,CAAG,IAAI,CAACC,MAAM,CAACL,SAAS,CAAC,CAC/BM,kBAAkB,CAAGC,MAAM,CAAC,8BAA4B,CAAEP,SAAS,CAAC,CAoBxE,OAlBuC,oBAAoB,EAAvDM,kBAAkB,CAACE,IAAI,CAAC,MAAM,CAAyB,GAC1DP,IAAI,CAAG,IAAI,CAACQ,OAAO,EAAE,CACrBP,eAAe,CAAGD,IAAI,CAACS,IAAI,CAAC,sBAAoB,CAAC,CACpB,CAAC,CAA1BR,eAAe,CAACS,MAAU,EAAmC,CAAC,CAAhCT,eAAe,CAACU,GAAG,EAAE,CAACD,MAAU,EAA6B,CAAC,EAA1BT,eAAe,CAACU,GAAG,EAAO,GAC/FT,gBAAgB,CAAGD,eAAe,CAACW,OAAO,CAAC,aAAa,CAAC,CACzDT,MAAM,CAAAU,iBAAqB,CAAGZ,eAAe,CAACU,GAAG,EAAE,CACnDR,MAAM,CAAAW,qBAAyB,CAAGZ,gBAAgB,CAACO,IAAI,CAAC,iCAA+B,CAAC,CAACE,GAAG,EAAE,CAGzD,CAAA,CAAA,UAAU,EAA7CN,kBAAkB,CAACE,IAAI,CAAC,MAAM,CAAe,GAChDP,IAAI,CAAG,IAAI,CAACQ,OAAO,EAAE,CACrBP,eAAe,CAAGD,IAAI,CAACS,IAAI,CAAC,+BAA6B,CAAC,CAC7B,CAAC,CAA1BR,eAAe,CAACS,MAAU,EAAmC,CAAC,CAAhCT,eAAe,CAACU,GAAG,EAAE,CAACD,MAAU,EAA6B,CAAC,EAA1BT,eAAe,CAACU,GAAG,EAAO,GAC/FT,gBAAgB,CAAGD,eAAe,CAACW,OAAO,CAAC,aAAa,CAAC,CACzDT,MAAM,CAAAU,iBAAqB,CAAGZ,eAAe,CAACU,GAAG,EAAE,CACnDR,MAAM,CAAAW,qBAAyB,CAAGZ,gBAAgB,CAACO,IAAI,CAAC,iCAA+B,CAAC,CAACE,GAAG,EAAE,CAGzFR,CAAAA,CAAAA,MACR,CACD,CACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/RecycleBin/resources/List.min.js b/public_html/layouts/basic/modules/RecycleBin/resources/List.min.js index 002e6f1c62e1..0cf2428d1495 100644 --- a/public_html/layouts/basic/modules/RecycleBin/resources/List.min.js +++ b/public_html/layouts/basic/modules/RecycleBin/resources/List.min.js @@ -1,6 +1,6 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */"use strict";Vtiger_List_Js("RecycleBin_List_Js",{/** +/* {[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]} */"use strict";Vtiger_List_Js("RecycleBin_List_Js",{/** * Mass activation trigerred on the list */massActivation:function massActivation(){var self=this;app.showConfirmModal({title:app.vtranslate("JS_MASS_ACTIVATE"),text:app.vtranslate("JS_ACTIVATE_RECORD_DESC"),confirmedCallback:function confirmedCallback(){var params=self.getSelectedRecordsParams(),listInstance=Vtiger_List_Js.getInstance(),container=listInstance.getListViewContainer();params.module=container.find(".js-source-module").val(),params.state="Active",params.entityState="Trash",params.action="MassState",AppConnector.request(params).done(function(data){data&&data.result&&data.result.notify&&Vtiger_Helper_Js.showMessage(data.result.notify),listInstance.getListViewRecords({module:app.getModuleName(),view:"List",sourceModule:container.find(".js-source-module").val()});});}});},/** * Mass delete trigerred on the list diff --git a/public_html/layouts/basic/modules/RecycleBin/resources/List.min.js.map b/public_html/layouts/basic/modules/RecycleBin/resources/List.min.js.map index d6ac3b891435..d20ee354bb8d 100644 --- a/public_html/layouts/basic/modules/RecycleBin/resources/List.min.js.map +++ b/public_html/layouts/basic/modules/RecycleBin/resources/List.min.js.map @@ -1 +1 @@ -{"version":3,"file":"List.min.js","sources":["List.js"],"sourcesContent":["/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */\n'use strict';\n\nVtiger_List_Js(\n\t'RecycleBin_List_Js',\n\t{\n\t\t/**\n\t\t * Mass activation trigerred on the list\n\t\t */\n\t\tmassActivation: function () {\n\t\t\tconst self = this;\n\t\t\tapp.showConfirmModal({\n\t\t\t\ttitle: app.vtranslate('JS_MASS_ACTIVATE'),\n\t\t\t\ttext: app.vtranslate('JS_ACTIVATE_RECORD_DESC'),\n\t\t\t\tconfirmedCallback: () => {\n\t\t\t\t\tlet params = self.getSelectedRecordsParams(),\n\t\t\t\t\t\tlistInstance = Vtiger_List_Js.getInstance(),\n\t\t\t\t\t\tcontainer = listInstance.getListViewContainer();\n\t\t\t\t\tparams.module = container.find('.js-source-module').val();\n\t\t\t\t\tparams.state = 'Active';\n\t\t\t\t\tparams.entityState = 'Trash';\n\t\t\t\t\tparams.action = 'MassState';\n\t\t\t\t\tAppConnector.request(params).done(function (data) {\n\t\t\t\t\t\tif (data && data.result && data.result.notify) {\n\t\t\t\t\t\t\tVtiger_Helper_Js.showMessage(data.result.notify);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlistInstance.getListViewRecords({\n\t\t\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\t\t\tview: 'List',\n\t\t\t\t\t\t\tsourceModule: container.find('.js-source-module').val()\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Mass delete trigerred on the list\n\t\t */\n\t\tmassDelete: function () {\n\t\t\tconst self = this;\n\t\t\tapp.showConfirmModal({\n\t\t\t\ttitle: app.vtranslate('JS_MASS_DELETE'),\n\t\t\t\ttext: app.vtranslate('JS_DELETE_ALL_RECYCLE_RECORD_DESC'),\n\t\t\t\tconfirmedCallback: () => {\n\t\t\t\t\tlet params = self.getSelectedRecordsParams(),\n\t\t\t\t\t\tlistInstance = Vtiger_List_Js.getInstance(),\n\t\t\t\t\t\tcontainer = listInstance.getListViewContainer();\n\t\t\t\t\tparams.module = container.find('.js-source-module').val();\n\t\t\t\t\tparams.sourceModule = container.find('.js-source-module').val();\n\t\t\t\t\tparams.action = 'MassDelete';\n\t\t\t\t\tparams.entityState = 'Trash';\n\t\t\t\t\tparams.viewname = 'undefined';\n\t\t\t\t\tAppConnector.request(params).done(function (data) {\n\t\t\t\t\t\tif (data && data.result && data.result.notify) {\n\t\t\t\t\t\t\tVtiger_Helper_Js.showMessage(data.result.notify);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlistInstance.getListViewRecords({\n\t\t\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\t\t\tview: 'List',\n\t\t\t\t\t\t\tsourceModule: container.find('.js-source-module').val()\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t},\n\t{\n\t\t/**\n\t\t * Register module select\n\t\t */\n\t\tregisterModuleFilter: function () {\n\t\t\tconst self = this,\n\t\t\t\tcontainer = this.getListViewContainer();\n\t\t\tlet filterSelectElement = container.find('.js-source-module');\n\t\t\tfilterSelectElement.on('select2:selecting', function (e) {\n\t\t\t\tself\n\t\t\t\t\t.getListViewRecords({\n\t\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\t\tview: 'List',\n\t\t\t\t\t\tsourceModule: e.params.args.data.id\n\t\t\t\t\t})\n\t\t\t\t\t.done(function () {\n\t\t\t\t\t\tself.calculatePages().done(function () {\n\t\t\t\t\t\t\tcontainer.find('.js-pagination-list').data('totalCount', 0);\n\t\t\t\t\t\t\tself.updatePagination();\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Function to update pagination page numer\n\t\t * @param {boolean} force\n\t\t */\n\t\tupdatePaginationAjax(force = false) {\n\t\t\tconst self = this,\n\t\t\t\tlistViewPageDiv = this.getListViewContainer();\n\t\t\tlet params = self.getDefaultParams(),\n\t\t\t\tcontainer = listViewPageDiv.find('.paginationDiv');\n\t\t\tVtiger_Helper_Js.showMessage({\n\t\t\t\ttitle: app.vtranslate('JS_LBL_PERMISSION'),\n\t\t\t\ttext: app.vtranslate('JS_GET_PAGINATION_INFO'),\n\t\t\t\ttype: 'info'\n\t\t\t});\n\t\t\tif (container.find('.js-pagination-list').data('total-count') > 0 || force) {\n\t\t\t\tparams.totalCount = '-1';\n\t\t\t\tparams.view = 'Pagination';\n\t\t\t\tparams.mode = 'getPagination';\n\t\t\t\tparams.entityState = 'Trash';\n\t\t\t\tparams.module = listViewPageDiv.find('.js-source-module').val();\n\t\t\t\tAppConnector.request(params).done(function (data) {\n\t\t\t\t\tcontainer.html(data);\n\t\t\t\t\tself.registerPageNavigationEvents();\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Register empty recycle button\n\t\t */\n\t\tregisterEmptyRecycle: function () {\n\t\t\tconst self = this,\n\t\t\t\tcontainer = this.getListViewContainer();\n\t\t\tcontainer.find('.js-recycle-empty').on('click', function () {\n\t\t\t\tapp.showConfirmModal({\n\t\t\t\t\ttitle: app.vtranslate('JS_DELETE_ALL_RECYCLE_RECORD'),\n\t\t\t\t\ttext: app.vtranslate('JS_DELETE_ALL_RECYCLE_RECORD_DESC'),\n\t\t\t\t\tconfirmedCallback: () => {\n\t\t\t\t\t\tlet progressIndicatorElement = $.progressIndicator();\n\t\t\t\t\t\tAppConnector.request({\n\t\t\t\t\t\t\tmodule: 'RecycleBin',\n\t\t\t\t\t\t\tsourceModule: container.find('.js-source-module').val(),\n\t\t\t\t\t\t\taction: 'MassDeleteAll',\n\t\t\t\t\t\t\tsourceView: 'List'\n\t\t\t\t\t\t})\n\t\t\t\t\t\t\t.done(function (data) {\n\t\t\t\t\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\t\t\tlet result = {\n\t\t\t\t\t\t\t\t\ttext: app.vtranslate('JS_FAILED_TO_SAVE')\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\tif (data && data.result) {\n\t\t\t\t\t\t\t\t\tresult = {\n\t\t\t\t\t\t\t\t\t\ttext: app.vtranslate('JS_ADDED_TO_QUEUE'),\n\t\t\t\t\t\t\t\t\t\ttype: 'success'\n\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tVtiger_Helper_Js.showMessage(result);\n\t\t\t\t\t\t\t\tself.getListViewRecords();\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t.fail(function (error, err) {\n\t\t\t\t\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Get record list of actual selected module\n\t\t * @param {string} urlParams\n\t\t * @returns {*|jQuery}\n\t\t */\n\t\tgetListViewRecords: function (urlParams) {\n\t\t\tlet overrideUrlParams = {},\n\t\t\t\taDeferred = $.Deferred();\n\t\t\toverrideUrlParams.sourceModule = $('.js-source-module').val();\n\t\t\turlParams = $.extend(overrideUrlParams, urlParams);\n\t\t\tthis._super(urlParams)\n\t\t\t\t.done(function () {\n\t\t\t\t\taDeferred.resolve();\n\t\t\t\t})\n\t\t\t\t.fail(function (textStatus, errorThrown) {\n\t\t\t\t\taDeferred.reject(textStatus, errorThrown);\n\t\t\t\t});\n\t\t\treturn aDeferred.promise();\n\t\t},\n\t\tgetDefaultParams: function () {\n\t\t\tlet params = this._super();\n\t\t\tparams.module = $('.js-source-module').val();\n\t\t\tparams.entityState = 'Trash';\n\t\t\treturn params;\n\t\t},\n\t\tregisterEvents: function () {\n\t\t\tthis._super();\n\t\t\tthis.registerModuleFilter();\n\t\t\tthis.registerEmptyRecycle();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_List_Js","massActivation","app","showConfirmModal","title","vtranslate","text","confirmedCallback","params","self","getSelectedRecordsParams","listInstance","getInstance","container","getListViewContainer","module","find","val","state","entityState","action","AppConnector","request","done","data","result","notify","Vtiger_Helper_Js","showMessage","getListViewRecords","getModuleName","view","sourceModule","massDelete","viewname","registerModuleFilter","filterSelectElement","on","e","args","id","calculatePages","updatePagination","updatePaginationAjax","force","listViewPageDiv","getDefaultParams","type","totalCount","mode","html","registerPageNavigationEvents","registerEmptyRecycle","$","progressIndicator","sourceView","progressIndicatorElement","fail","urlParams","overrideUrlParams","aDeferred","Deferred","extend","_super","resolve","textStatus","errorThrown","reject","promise","registerEvents"],"mappings":";;AAAA,kKACA,YAEAA,CAAAA,cAAc,CACb,oBADa,CAEb;AAED;AACA,KACEC,cAAc,CAAE,SAAA,cAAA,EAAY,CAC3B,QAAU,CAAG,IAAb,CACAC,GAAG,CAACC,gBAAJ,CAAqB,CACpBC,KAAK,CAAEF,GAAG,CAACG,UAAJ,CAAe,kBAAf,CADa,CAEpBC,IAAI,CAAEJ,GAAG,CAACG,UAAJ,CAA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,CAAOX,MACP,CAhHF,CAiHC6D,cAAc,CAAE,SAAY,cAAA,EAAA,CAC3B,IAAKN,CAAAA,MAAL,EAD2B,CAE3B,IAAK5B,CAAAA,oBAAL,EAF2B,CAG3B,IAAKiB,CAAAA,oBAAL,GACA,CArHF,CA/Da;;"} \ No newline at end of file +{"version":3,"file":"List.min.js","sources":["List.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\nVtiger_List_Js(\n\t'RecycleBin_List_Js',\n\t{\n\t\t/**\n\t\t * Mass activation trigerred on the list\n\t\t */\n\t\tmassActivation: function () {\n\t\t\tconst self = this;\n\t\t\tapp.showConfirmModal({\n\t\t\t\ttitle: app.vtranslate('JS_MASS_ACTIVATE'),\n\t\t\t\ttext: app.vtranslate('JS_ACTIVATE_RECORD_DESC'),\n\t\t\t\tconfirmedCallback: () => {\n\t\t\t\t\tlet params = self.getSelectedRecordsParams(),\n\t\t\t\t\t\tlistInstance = Vtiger_List_Js.getInstance(),\n\t\t\t\t\t\tcontainer = listInstance.getListViewContainer();\n\t\t\t\t\tparams.module = container.find('.js-source-module').val();\n\t\t\t\t\tparams.state = 'Active';\n\t\t\t\t\tparams.entityState = 'Trash';\n\t\t\t\t\tparams.action = 'MassState';\n\t\t\t\t\tAppConnector.request(params).done(function (data) {\n\t\t\t\t\t\tif (data && data.result && data.result.notify) {\n\t\t\t\t\t\t\tVtiger_Helper_Js.showMessage(data.result.notify);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlistInstance.getListViewRecords({\n\t\t\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\t\t\tview: 'List',\n\t\t\t\t\t\t\tsourceModule: container.find('.js-source-module').val()\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Mass delete trigerred on the list\n\t\t */\n\t\tmassDelete: function () {\n\t\t\tconst self = this;\n\t\t\tapp.showConfirmModal({\n\t\t\t\ttitle: app.vtranslate('JS_MASS_DELETE'),\n\t\t\t\ttext: app.vtranslate('JS_DELETE_ALL_RECYCLE_RECORD_DESC'),\n\t\t\t\tconfirmedCallback: () => {\n\t\t\t\t\tlet params = self.getSelectedRecordsParams(),\n\t\t\t\t\t\tlistInstance = Vtiger_List_Js.getInstance(),\n\t\t\t\t\t\tcontainer = listInstance.getListViewContainer();\n\t\t\t\t\tparams.module = container.find('.js-source-module').val();\n\t\t\t\t\tparams.sourceModule = container.find('.js-source-module').val();\n\t\t\t\t\tparams.action = 'MassDelete';\n\t\t\t\t\tparams.entityState = 'Trash';\n\t\t\t\t\tparams.viewname = 'undefined';\n\t\t\t\t\tAppConnector.request(params).done(function (data) {\n\t\t\t\t\t\tif (data && data.result && data.result.notify) {\n\t\t\t\t\t\t\tVtiger_Helper_Js.showMessage(data.result.notify);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlistInstance.getListViewRecords({\n\t\t\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\t\t\tview: 'List',\n\t\t\t\t\t\t\tsourceModule: container.find('.js-source-module').val()\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t},\n\t{\n\t\t/**\n\t\t * Register module select\n\t\t */\n\t\tregisterModuleFilter: function () {\n\t\t\tconst self = this,\n\t\t\t\tcontainer = this.getListViewContainer();\n\t\t\tlet filterSelectElement = container.find('.js-source-module');\n\t\t\tfilterSelectElement.on('select2:selecting', function (e) {\n\t\t\t\tself\n\t\t\t\t\t.getListViewRecords({\n\t\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\t\tview: 'List',\n\t\t\t\t\t\tsourceModule: e.params.args.data.id\n\t\t\t\t\t})\n\t\t\t\t\t.done(function () {\n\t\t\t\t\t\tself.calculatePages().done(function () {\n\t\t\t\t\t\t\tcontainer.find('.js-pagination-list').data('totalCount', 0);\n\t\t\t\t\t\t\tself.updatePagination();\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Function to update pagination page numer\n\t\t * @param {boolean} force\n\t\t */\n\t\tupdatePaginationAjax(force = false) {\n\t\t\tconst self = this,\n\t\t\t\tlistViewPageDiv = this.getListViewContainer();\n\t\t\tlet params = self.getDefaultParams(),\n\t\t\t\tcontainer = listViewPageDiv.find('.paginationDiv');\n\t\t\tVtiger_Helper_Js.showMessage({\n\t\t\t\ttitle: app.vtranslate('JS_LBL_PERMISSION'),\n\t\t\t\ttext: app.vtranslate('JS_GET_PAGINATION_INFO'),\n\t\t\t\ttype: 'info'\n\t\t\t});\n\t\t\tif (container.find('.js-pagination-list').data('total-count') > 0 || force) {\n\t\t\t\tparams.totalCount = '-1';\n\t\t\t\tparams.view = 'Pagination';\n\t\t\t\tparams.mode = 'getPagination';\n\t\t\t\tparams.entityState = 'Trash';\n\t\t\t\tparams.module = listViewPageDiv.find('.js-source-module').val();\n\t\t\t\tAppConnector.request(params).done(function (data) {\n\t\t\t\t\tcontainer.html(data);\n\t\t\t\t\tself.registerPageNavigationEvents();\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Register empty recycle button\n\t\t */\n\t\tregisterEmptyRecycle: function () {\n\t\t\tconst self = this,\n\t\t\t\tcontainer = this.getListViewContainer();\n\t\t\tcontainer.find('.js-recycle-empty').on('click', function () {\n\t\t\t\tapp.showConfirmModal({\n\t\t\t\t\ttitle: app.vtranslate('JS_DELETE_ALL_RECYCLE_RECORD'),\n\t\t\t\t\ttext: app.vtranslate('JS_DELETE_ALL_RECYCLE_RECORD_DESC'),\n\t\t\t\t\tconfirmedCallback: () => {\n\t\t\t\t\t\tlet progressIndicatorElement = $.progressIndicator();\n\t\t\t\t\t\tAppConnector.request({\n\t\t\t\t\t\t\tmodule: 'RecycleBin',\n\t\t\t\t\t\t\tsourceModule: container.find('.js-source-module').val(),\n\t\t\t\t\t\t\taction: 'MassDeleteAll',\n\t\t\t\t\t\t\tsourceView: 'List'\n\t\t\t\t\t\t})\n\t\t\t\t\t\t\t.done(function (data) {\n\t\t\t\t\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\t\t\tlet result = {\n\t\t\t\t\t\t\t\t\ttext: app.vtranslate('JS_FAILED_TO_SAVE')\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\tif (data && data.result) {\n\t\t\t\t\t\t\t\t\tresult = {\n\t\t\t\t\t\t\t\t\t\ttext: app.vtranslate('JS_ADDED_TO_QUEUE'),\n\t\t\t\t\t\t\t\t\t\ttype: 'success'\n\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tVtiger_Helper_Js.showMessage(result);\n\t\t\t\t\t\t\t\tself.getListViewRecords();\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t.fail(function (error, err) {\n\t\t\t\t\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Get record list of actual selected module\n\t\t * @param {string} urlParams\n\t\t * @returns {*|jQuery}\n\t\t */\n\t\tgetListViewRecords: function (urlParams) {\n\t\t\tlet overrideUrlParams = {},\n\t\t\t\taDeferred = $.Deferred();\n\t\t\toverrideUrlParams.sourceModule = $('.js-source-module').val();\n\t\t\turlParams = $.extend(overrideUrlParams, urlParams);\n\t\t\tthis._super(urlParams)\n\t\t\t\t.done(function () {\n\t\t\t\t\taDeferred.resolve();\n\t\t\t\t})\n\t\t\t\t.fail(function (textStatus, errorThrown) {\n\t\t\t\t\taDeferred.reject(textStatus, errorThrown);\n\t\t\t\t});\n\t\t\treturn aDeferred.promise();\n\t\t},\n\t\tgetDefaultParams: function () {\n\t\t\tlet params = this._super();\n\t\t\tparams.module = $('.js-source-module').val();\n\t\t\tparams.entityState = 'Trash';\n\t\t\treturn params;\n\t\t},\n\t\tregisterEvents: function () {\n\t\t\tthis._super();\n\t\t\tthis.registerModuleFilter();\n\t\t\tthis.registerEmptyRecycle();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_List_Js","massActivation","self","app","showConfirmModal","title","vtranslate","text","confirmedCallback","params","getSelectedRecordsParams","listInstance","getInstance","container","getListViewContainer","module","find","val","state","entityState","action","AppConnector","request","done","data","result","notify","Vtiger_Helper_Js","showMessage","getListViewRecords","getModuleName","view","sourceModule","massDelete","viewname","registerModuleFilter","filterSelectElement","on","e","args","id","calculatePages","updatePagination","updatePaginationAjax","force","arguments","length","listViewPageDiv","getDefaultParams","type","totalCount","mode","html","registerPageNavigationEvents","registerEmptyRecycle","progressIndicatorElement","$","progressIndicator","sourceView","fail","urlParams","overrideUrlParams","aDeferred","Deferred","extend","_super","resolve","textStatus","errorThrown","reject","promise","registerEvents"],"mappings":";;AAAA,kKACA,YAAY,CAEZA,cAAc,CACb,oBAAoB,CACpB;AAED;AACA,KACEC,cAAc,CAAE,SAAAA,gBAAY,CAC3B,IAAMC,IAAI,CAAG,IAAI,CACjBC,GAAG,CAACC,gBAAgB,CAAC,CACpBC,KAAK,CAAEF,GAAG,CAACG,UAAU,CAAC,kBAAkB,CAAC,CACzCC,IAAI,CAAEJ,GAAG,CAACG,UAAU,CAAC,yBAAyB,CAAC,CAC/CE,iBAAiB,CAAE,SAAAA,iBAAAA,EAAM,CACxB,IAAIC,MAAM,CAAGP,IAAI,CAACQ,wBAAwB,EAAE,CAC3CC,YAAY,CAAGX,cAAc,CAACY,WAAW,EAAE,CAC3CC,SAAS,CAAGF,YAAY,CAACG,oBAAoB,EAAE,CAChDL,MAAM,CAACM,MAAM,CAAGF,SAAS,CAACG,IAAI,CAAC,mBAAmB,CAAC,CAACC,GAAG,EAAE,CACzDR,MAAM,CAACS,KAAK,CAAG,QAAQ,CACvBT,MAAM,CAACU,WAAW,CAAG,OAAO,CAC5BV,MAAM,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zBC,SAAS,CAAGN,CAAC,CAACO,QAAQ,EAAE,CAUzB,OATAF,iBAAiB,CAAC7B,YAAY,CAAGwB,CAAC,CAAC,mBAAmB,CAAC,CAACvC,GAAG,EAAE,CAC7D2C,SAAS,CAAGJ,CAAC,CAACQ,MAAM,CAACH,iBAAiB,CAAED,SAAS,CAAC,CAClD,IAAI,CAACK,MAAM,CAACL,SAAS,CAAC,CACpBrC,IAAI,CAAC,UAAY,CACjBuC,SAAS,CAACI,OAAO,GAClB,CAAC,CAAC,CACDP,IAAI,CAAC,SAAUQ,UAAU,CAAEC,WAAW,CAAE,CACxCN,SAAS,CAACO,MAAM,CAACF,UAAU,CAAEC,WAAW,EACzC,CAAC,CAAC,CACIN,SAAS,CAACQ,OAAO,EACzB,CAAC,CACDtB,gBAAgB,CAAE,SAAAA,kBAAY,CAC7B,IAAIvC,MAAM,CAAG,IAAI,CAACwD,MAAM,EAAE,CAG1B,OAFAxD,MAAM,CAACM,MAAM,CAAGyC,CAAC,CAAC,mBAAmB,CAAC,CAACvC,GAAG,EAAE,CAC5CR,MAAM,CAACU,WAAW,CAAG,OAAO,CACrBV,MACR,CAAC,CACD8D,cAAc,CAAE,SAAAA,gBAAY,CAC3B,IAAI,CAACN,MAAM,EAAE,CACb,IAAI,CAAC9B,oBAAoB,EAAE,CAC3B,IAAI,CAACmB,oBAAoB,GAC1B,CACD,CACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/Reservations/resources/QuickCreate.min.js b/public_html/layouts/basic/modules/Reservations/resources/QuickCreate.min.js index 35f5ad1eca32..5e8fbe29b23b 100644 --- a/public_html/layouts/basic/modules/Reservations/resources/QuickCreate.min.js +++ b/public_html/layouts/basic/modules/Reservations/resources/QuickCreate.min.js @@ -1,9 +1,9 @@ 'use strict'; -/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */"use strict";/** +/* {[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]} */"use strict";/** * Class representing a modal calendar. * @extends Vtiger_Calendar_Js - */function _typeof(obj){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var descriptor,i=0;iarguments.length?target:receiver):desc.value}},_get.apply(this,arguments)}function _superPropBase(object,property){for(;!Object.prototype.hasOwnProperty.call(object,property)&&(object=_getPrototypeOf(object),null!==object););return object}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return !1;if(Reflect.construct.sham)return !1;if("function"==typeof Proxy)return !0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return !1}}function _getPrototypeOf(o){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(o){return o.__proto__||Object.getPrototypeOf(o)},_getPrototypeOf(o)}window.Reservations_CalendarModal_Js=/*#__PURE__*/function(_Vtiger_Calendar_Js){function Reservations_CalendarModal_Js(container,readonly){var _this;return _classCallCheck(this,Reservations_CalendarModal_Js),_this=_super.call(this,container,readonly),_this.isSwitchAllDays=!1,_this.sidebarName="add",_this.eventCreate=!1,_this.module=container.find("[name=\"module\"]").val(),_this.renderCalendar(),_this.registerEvents(),_this}/** + */function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var descriptor,i=0;iarguments.length?target:receiver):desc.value}},_get.apply(this,arguments)}function _superPropBase(object,property){for(;!Object.prototype.hasOwnProperty.call(object,property)&&(object=_getPrototypeOf(object),null!==object););return object}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return !1;if(Reflect.construct.sham)return !1;if("function"==typeof Proxy)return !0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return !1}}function _getPrototypeOf(o){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(o){return o.__proto__||Object.getPrototypeOf(o)},_getPrototypeOf(o)}window.Reservations_CalendarModal_Js=/*#__PURE__*/function(_Vtiger_Calendar_Js){function Reservations_CalendarModal_Js(container,readonly){var _this;return _classCallCheck(this,Reservations_CalendarModal_Js),_this=_super.call(this,container,readonly),_this.isSwitchAllDays=!1,_this.sidebarName="add",_this.eventCreate=!1,_this.module=container.find("[name=\"module\"]").val(),_this.renderCalendar(),_this.registerEvents(),_this}/** * Function sets calendar module's options * @returns {{eventClick: function, headerToolbar: object, selectable: boolean}} */_inherits(Reservations_CalendarModal_Js,_Vtiger_Calendar_Js);var _super=_createSuper(Reservations_CalendarModal_Js);return _createClass(Reservations_CalendarModal_Js,[{key:"setCalendarModuleOptions",value:function setCalendarModuleOptions(){var options=_get(_getPrototypeOf(Reservations_CalendarModal_Js.prototype),"setCalendarModuleOptions",this).call(this);options.selectable=!0,options.eventClick=function(info){info.jsEvent.preventDefault();};var date=this.container.find(".js-selected-date").val();return date&&(options.initialDate=date),options}/** diff --git a/public_html/layouts/basic/modules/Reservations/resources/QuickCreate.min.js.map b/public_html/layouts/basic/modules/Reservations/resources/QuickCreate.min.js.map index 9bc93a5d5f95..bfb4c70daa90 100644 --- a/public_html/layouts/basic/modules/Reservations/resources/QuickCreate.min.js.map +++ b/public_html/layouts/basic/modules/Reservations/resources/QuickCreate.min.js.map @@ -1 +1 @@ -{"version":3,"file":"QuickCreate.min.js","sources":["QuickCreate.js"],"sourcesContent":["/* {[The file is published on the basis of YetiForce Public License 5.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */\n'use strict';\n\n/**\n * Class representing a modal calendar.\n * @extends Vtiger_Calendar_Js\n */\nwindow.Reservations_CalendarModal_Js = class Reservations_CalendarModal_Js extends Vtiger_Calendar_Js {\n\tconstructor(container, readonly) {\n\t\tsuper(container, readonly);\n\t\tthis.isSwitchAllDays = false;\n\t\tthis.sidebarName = 'add'; //available: add, status, edit\n\t\tthis.eventCreate = false;\n\t\tthis.module = container.find('[name=\"module\"]').val();\n\t\tthis.renderCalendar();\n\t\tthis.registerEvents();\n\t}\n\t/**\n\t * Function sets calendar module's options\n\t * @returns {{eventClick: function, headerToolbar: object, selectable: boolean}}\n\t */\n\tsetCalendarModuleOptions() {\n\t\tlet options = super.setCalendarModuleOptions();\n\t\toptions.selectable = true;\n\t\toptions.eventClick = function (info) {\n\t\t\tinfo.jsEvent.preventDefault();\n\t\t};\n\t\tlet date = this.container.find('.js-selected-date').val();\n\t\tif (date) {\n\t\t\toptions.initialDate = date;\n\t\t}\n\t\treturn options;\n\t}\n\t/**\n\t * Function registers calendar events\n\t */\n\tregisterEvents() {\n\t\tconst calendarView = this.getCalendarView();\n\t\tthis.switchContainer = $(`
    `).insertAfter(\n\t\t\tcalendarView.find('.fc-center')\n\t\t);\n\t\tthis.registerSwitchEvents();\n\t\tthis.registerUsersChange();\n\t}\n\t/**\n\t * Function registers calendar switch event\n\t */\n\tregisterSwitchEvents() {\n\t\tif (app.getMainParams('hiddenDays', true) !== false) {\n\t\t\tthis.switchContainer.html(this.createSwitch());\n\t\t\tthis.switchContainer.find('input').on('change', (e) => {\n\t\t\t\tconst currentTarget = $(e.currentTarget);\n\t\t\t\tlet hiddenDays = [];\n\t\t\t\tif (typeof currentTarget.data('on-text') !== 'undefined') {\n\t\t\t\t\thiddenDays = app.getMainParams('hiddenDays', true);\n\t\t\t\t\tthis.isSwitchAllDays = false;\n\t\t\t\t} else {\n\t\t\t\t\tthis.isSwitchAllDays = true;\n\t\t\t\t}\n\t\t\t\tthis.fullCalendar.setOption('hiddenDays', hiddenDays);\n\t\t\t\tthis.registerSwitchEvents();\n\t\t\t});\n\t\t}\n\t}\n\t/**\n\t * Generate filter buttons\n\t * @returns {string}\n\t */\n\tcreateSwitch() {\n\t\tlet on = app.vtranslate('JS_WORK_DAYS'),\n\t\t\toff = app.vtranslate('JS_ALL'),\n\t\t\tstate = this.isSwitchAllDays;\n\t\treturn `
    \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
    `;\n\t}\n\t/**\n\t * Function registers select's user change event\n\t */\n\tregisterUsersChange() {\n\t\tthis.container.find('.assigned_user_id').on('change', () => {\n\t\t\tthis.reloadCalendarData();\n\t\t});\n\t}\n\t/**\n\t * Get selected users\n\t * @returns {{ selectedIds: array, excludedIds: array }}\n\t */\n\tgetSelectedUsersCalendar() {\n\t\treturn { selectedIds: [this.container.find('.assigned_user_id').val()], excludedIds: [] };\n\t}\n\t/**\n\t * Function invokes by FullCalendar, sets selected days in form\n\t * @param {Object} info\n\t */\n\tselectDays(info) {\n\t\tif (this.sidebarName === 'status') {\n\t\t\tthis.sidebarName = 'add';\n\t\t\tthis.getCalendarCreateView().done(() => {\n\t\t\t\tthis.selectDays(info);\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tlet startDate = info.start,\n\t\t\tendDate = info.end;\n\t\tif (info['allDay']) {\n\t\t\tendDate.setDate(endDate.getDate() - 1);\n\t\t\tconst d = new Date();\n\t\t\tstartDate.setHours(d.getHours(), d.getMinutes());\n\t\t\tendDate.setHours(d.getHours(), d.getMinutes() + 30);\n\t\t}\n\t\tthis.container.find('[name=\"date_start\"]').val(App.Fields.Date.dateToUserFormat(startDate));\n\t\tthis.container.find('[name=\"due_date\"]').val(App.Fields.Date.dateToUserFormat(endDate));\n\t\tthis.container.find('[name=\"time_start\"]').val(App.Fields.Time.dateToUserFormat(startDate));\n\t\tthis.container.find('[name=\"time_end\"]').val(App.Fields.Time.dateToUserFormat(endDate));\n\t}\n};\n\n$.Class(\n\t'Reservations_QuickCreate_Js',\n\t{},\n\t{\n\t\tregisterEvents: function (container) {\n\t\t\tlet className = container.find('[name=\"module\"]').val() + '_CalendarModal_Js';\n\t\t\tthis.calendarView = new window[className](container.closest('.js-modal-container'), true);\n\t\t}\n\t}\n);\n"],"names":["window","Reservations_CalendarModal_Js","container","readonly","isSwitchAllDays","sidebarName","eventCreate","module","find","val","renderCalendar","registerEvents","options","selectable","eventClick","info","jsEvent","preventDefault","date","initialDate","getCalendarView","switchContainer","$","insertAfter","calendarView","registerSwitchEvents","registerUsersChange","app","getMainParams","html","createSwitch","on","e","currentTarget","hiddenDays","data","fullCalendar","setOption","vtranslate","off","state","reloadCalendarData","selectedIds","excludedIds","getCalendarCreateView","done","selectDays","startDate","start","endDate","end","setDate","getDate","setHours","d","getHours","getMinutes","App","Fields","Date","dateToUserFormat","Time","Vtiger_Calendar_Js","Class","className","closest"],"mappings":";;AAAA,kKACA,YAEA,CAAA;AACA;AACA;AACA,0sGACAA,MAAM,CAACC,6BAAP,4CACC,SAAYC,6BAAAA,CAAAA,SAAZ,CAAuBC,QAAvB,CAAiC,CAAA,IAAA,KAAA,CAAA,OAAA,eAAA,CAAA,IAAA,CAAA,6BAAA,CAAA,CAAA,KAAA,CAAA,MAAA,CAAA,IAAA,CAAA,IAAA,CAC1BD,SAD0B,CACfC,QADe,EAEhC,KAAKC,CAAAA,eAAL,GAFgC,CAGhC,KAAA,CAAKC,WAAL,CAAmB,KAHa,CAIhC,MAAKC,WAAL,CAAA,CAAA,CAJgC,CAKhC,KAAKC,CAAAA,MAAL,CAAcL,SAAS,CAACM,IAAV,CAAe,mBAAf,CAAA,CAAkCC,GAAlC,EALkB,CAMhC,MAAKC,cAAL,EANgC,CAOhC,KAAKC,CAAAA,cAAL,EAPgC,CAAA,KAQh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HD;;"} \ No newline at end of file +{"version":3,"file":"QuickCreate.min.js","sources":["QuickCreate.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/**\n * Class representing a modal calendar.\n * @extends Vtiger_Calendar_Js\n */\nwindow.Reservations_CalendarModal_Js = class Reservations_CalendarModal_Js extends Vtiger_Calendar_Js {\n\tconstructor(container, readonly) {\n\t\tsuper(container, readonly);\n\t\tthis.isSwitchAllDays = false;\n\t\tthis.sidebarName = 'add'; //available: add, status, edit\n\t\tthis.eventCreate = false;\n\t\tthis.module = container.find('[name=\"module\"]').val();\n\t\tthis.renderCalendar();\n\t\tthis.registerEvents();\n\t}\n\t/**\n\t * Function sets calendar module's options\n\t * @returns {{eventClick: function, headerToolbar: object, selectable: boolean}}\n\t */\n\tsetCalendarModuleOptions() {\n\t\tlet options = super.setCalendarModuleOptions();\n\t\toptions.selectable = true;\n\t\toptions.eventClick = function (info) {\n\t\t\tinfo.jsEvent.preventDefault();\n\t\t};\n\t\tlet date = this.container.find('.js-selected-date').val();\n\t\tif (date) {\n\t\t\toptions.initialDate = date;\n\t\t}\n\t\treturn options;\n\t}\n\t/**\n\t * Function registers calendar events\n\t */\n\tregisterEvents() {\n\t\tconst calendarView = this.getCalendarView();\n\t\tthis.switchContainer = $(`
    `).insertAfter(\n\t\t\tcalendarView.find('.fc-center')\n\t\t);\n\t\tthis.registerSwitchEvents();\n\t\tthis.registerUsersChange();\n\t}\n\t/**\n\t * Function registers calendar switch event\n\t */\n\tregisterSwitchEvents() {\n\t\tif (app.getMainParams('hiddenDays', true) !== false) {\n\t\t\tthis.switchContainer.html(this.createSwitch());\n\t\t\tthis.switchContainer.find('input').on('change', (e) => {\n\t\t\t\tconst currentTarget = $(e.currentTarget);\n\t\t\t\tlet hiddenDays = [];\n\t\t\t\tif (typeof currentTarget.data('on-text') !== 'undefined') {\n\t\t\t\t\thiddenDays = app.getMainParams('hiddenDays', true);\n\t\t\t\t\tthis.isSwitchAllDays = false;\n\t\t\t\t} else {\n\t\t\t\t\tthis.isSwitchAllDays = true;\n\t\t\t\t}\n\t\t\t\tthis.fullCalendar.setOption('hiddenDays', hiddenDays);\n\t\t\t\tthis.registerSwitchEvents();\n\t\t\t});\n\t\t}\n\t}\n\t/**\n\t * Generate filter buttons\n\t * @returns {string}\n\t */\n\tcreateSwitch() {\n\t\tlet on = app.vtranslate('JS_WORK_DAYS'),\n\t\t\toff = app.vtranslate('JS_ALL'),\n\t\t\tstate = this.isSwitchAllDays;\n\t\treturn `
    \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
    `;\n\t}\n\t/**\n\t * Function registers select's user change event\n\t */\n\tregisterUsersChange() {\n\t\tthis.container.find('.assigned_user_id').on('change', () => {\n\t\t\tthis.reloadCalendarData();\n\t\t});\n\t}\n\t/**\n\t * Get selected users\n\t * @returns {{ selectedIds: array, excludedIds: array }}\n\t */\n\tgetSelectedUsersCalendar() {\n\t\treturn { selectedIds: [this.container.find('.assigned_user_id').val()], excludedIds: [] };\n\t}\n\t/**\n\t * Function invokes by FullCalendar, sets selected days in form\n\t * @param {Object} info\n\t */\n\tselectDays(info) {\n\t\tif (this.sidebarName === 'status') {\n\t\t\tthis.sidebarName = 'add';\n\t\t\tthis.getCalendarCreateView().done(() => {\n\t\t\t\tthis.selectDays(info);\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tlet startDate = info.start,\n\t\t\tendDate = info.end;\n\t\tif (info['allDay']) {\n\t\t\tendDate.setDate(endDate.getDate() - 1);\n\t\t\tconst d = new Date();\n\t\t\tstartDate.setHours(d.getHours(), d.getMinutes());\n\t\t\tendDate.setHours(d.getHours(), d.getMinutes() + 30);\n\t\t}\n\t\tthis.container.find('[name=\"date_start\"]').val(App.Fields.Date.dateToUserFormat(startDate));\n\t\tthis.container.find('[name=\"due_date\"]').val(App.Fields.Date.dateToUserFormat(endDate));\n\t\tthis.container.find('[name=\"time_start\"]').val(App.Fields.Time.dateToUserFormat(startDate));\n\t\tthis.container.find('[name=\"time_end\"]').val(App.Fields.Time.dateToUserFormat(endDate));\n\t}\n};\n\n$.Class(\n\t'Reservations_QuickCreate_Js',\n\t{},\n\t{\n\t\tregisterEvents: function (container) {\n\t\t\tlet className = container.find('[name=\"module\"]').val() + '_CalendarModal_Js';\n\t\t\tthis.calendarView = new window[className](container.closest('.js-modal-container'), true);\n\t\t}\n\t}\n);\n"],"names":["_typeof","o","Symbol","iterator","constructor","prototype","_classCallCheck","instance","Constructor","TypeError","_defineProperties","target","props","descriptor","i","length","enumerable","configurable","writable","Object","defineProperty","_toPropertyKey","key","_createClass","protoProps","staticProps","arg","_toPrimitive","String","input","hint","prim","toPrimitive","res","call","Number","_get","Reflect","get","bind","property","receiver","base","_superPropBase","desc","getOwnPropertyDescriptor","arguments","value","apply","object","hasOwnProperty","_getPrototypeOf","_inherits","subClass","superClass","create","_setPrototypeOf","p","setPrototypeOf","__proto__","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","result","Super","NewTarget","construct","_possibleConstructorReturn","self","_assertThisInitialized","ReferenceError","sham","Proxy","Boolean","valueOf","e","getPrototypeOf","window","Reservations_CalendarModal_Js","_Vtiger_Calendar_Js","container","readonly","_this","_super","isSwitchAllDays","sidebarName","eventCreate","module","find","val","renderCalendar","registerEvents","setCalendarModuleOptions","options","selectable","eventClick","info","jsEvent","preventDefault","date","initialDate","calendarView","getCalendarView","switchContainer","$","insertAfter","registerSwitchEvents","registerUsersChange","_this2","app","getMainParams","html","createSwitch","on","currentTarget","hiddenDays","data","fullCalendar","setOption","vtranslate","off","state","concat","_this3","reloadCalendarData","getSelectedUsersCalendar","selectedIds","excludedIds","selectDays","_this4","getCalendarCreateView","done","startDate","start","endDate","end","allDay","setDate","getDate","d","Date","setHours","getHours","getMinutes","App","Fields","dateToUserFormat","Time","Vtiger_Calendar_Js","Class","className","closest"],"mappings":";;AAAA,kKACA,YAAY,CAEZ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CAAC,CAACI,UAAU,EAAE,CAAG,EAAE,EACnD,CACA,IAAI,CAAC/D,SAAS,CAACQ,IAAI,CAAC,uBAAqB,CAAC,CAACC,GAAG,CAACuD,GAAG,CAACC,MAAM,CAACL,IAAI,CAACM,gBAAgB,CAACd,SAAS,CAAC,CAAC,CAC3F,IAAI,CAACpD,SAAS,CAACQ,IAAI,CAAC,qBAAmB,CAAC,CAACC,GAAG,CAACuD,GAAG,CAACC,MAAM,CAACL,IAAI,CAACM,gBAAgB,CAACZ,OAAO,CAAC,CAAC,CACvF,IAAI,CAACtD,SAAS,CAACQ,IAAI,CAAC,uBAAqB,CAAC,CAACC,GAAG,CAACuD,GAAG,CAACC,MAAM,CAACE,IAAI,CAACD,gBAAgB,CAACd,SAAS,CAAC,CAAC,CAC3F,IAAI,CAACpD,SAAS,CAACQ,IAAI,CAAC,qBAAmB,CAAC,CAACC,GAAG,CAACuD,GAAG,CAACC,MAAM,CAACE,IAAI,CAACD,gBAAgB,CAACZ,OAAO,CAAC,EACvF,CAAC,CAAA,CAAA,CAAA,CAAAxD,6BAAA,CAAA,CAjHiFsE,kBAAkB,CAkHpG,CAED5C,CAAC,CAAC6C,KAAK,CACN,6BAA6B,CAC7B,EAAE,CACF,CACC1D,cAAc,CAAE,SAAAA,cAAUX,CAAAA,SAAS,CAAE,CACpC,IAAIsE,SAAS,CAAGtE,SAAS,CAACQ,IAAI,CAAC,mBAAiB,CAAC,CAACC,GAAG,EAAE,CAAG,mBAAmB,CAC7E,IAAI,CAACY,YAAY,CAAG,IAAIxB,MAAM,CAACyE,SAAS,CAAC,CAACtE,SAAS,CAACuE,OAAO,CAAC,qBAAqB,CAAC,CAAA,CAAA,CAAM,EACzF,CACD,CACD,CAAC;;"} \ No newline at end of file diff --git a/public_html/layouts/basic/modules/Rss/resources/List.min.js.map b/public_html/layouts/basic/modules/Rss/resources/List.min.js.map index d43d6fb68dbb..880efcd8327a 100644 --- a/public_html/layouts/basic/modules/Rss/resources/List.min.js.map +++ b/public_html/layouts/basic/modules/Rss/resources/List.min.js.map @@ -1 +1 @@ -{"version":3,"file":"List.min.js","sources":["List.js"],"sourcesContent":["/*+***********************************************************************************\n * The contents of this file are subject to the vtiger CRM Public License Version 1.0\n * (\"License\"); You may not use this file except in compliance with the License\n * The Original Code is: vtiger CRM Open Source\n * The Initial Developer of the Original Code is vtiger.\n * Portions created by vtiger are Copyright (C) vtiger.\n * All Rights Reserved.\n * Contributor(s): YetiForce S.A.\n *************************************************************************************/\n'use strict';\n\nVtiger_List_Js(\n\t'Rss_List_Js',\n\t{},\n\t{\n\t\t/**\n\t\t * Function get the height of the document\n\t\t * @return height\n\t\t */\n\t\tgetDocumentHeight: function () {\n\t\t\treturn jQuery(document).height();\n\t\t},\n\n\t\tregisterRssButtonClickEvent: function (container) {\n\t\t\tvar thisInstance = this;\n\t\t\tcontainer.on('click', '.rssAddButton', function (e) {\n\t\t\t\tthisInstance.showRssModal('getRssAddForm').done(function (data) {\n\t\t\t\t\tvar callBackFunction = function (data) {\n\t\t\t\t\t\tvar params = app.validationEngineOptions;\n\t\t\t\t\t\tvar form = data.find('#rssAddForm');\n\t\t\t\t\t\tparams.onValidationComplete = function (form, valid) {\n\t\t\t\t\t\t\tif (valid) {\n\t\t\t\t\t\t\t\tthisInstance.rssFeedSave(form);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t};\n\t\t\t\t\t\tform.validationEngine(params);\n\t\t\t\t\t};\n\t\t\t\t\tapp.showModalWindow(data, callBackFunction);\n\t\t\t\t});\n\t\t\t});\n\t\t\tcontainer.on('click', '.changeFeedSource', function (e) {\n\t\t\t\tthisInstance.showRssModal('getRssWidget').done(function (data) {\n\t\t\t\t\tvar callBackFunction = function (data) {\n\t\t\t\t\t\tdata.on('click', '.rssLink', function (e) {\n\t\t\t\t\t\t\tvar element = jQuery(e.currentTarget);\n\t\t\t\t\t\t\tvar id = element.data('id');\n\t\t\t\t\t\t\tthisInstance.getRssFeeds(id).done(function () {\n\t\t\t\t\t\t\t\tapp.hideModalWindow();\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t};\n\t\t\t\t\tapp.showModalWindow(data, callBackFunction);\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\tbreadCrumbsFilter: function (text) {\n\t\t\treturn;\n\t\t},\n\n\t\t/**\n\t\t * Function show rssAddForm model\n\t\t */\n\t\tshowRssModal: function (mode) {\n\t\t\tvar aDeferred = jQuery.Deferred();\n\t\t\tvar progressInstance = jQuery.progressIndicator({});\n\t\t\tvar actionParams = {\n\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\tview: 'ViewTypes',\n\t\t\t\tmode: mode\n\t\t\t};\n\t\t\tAppConnector.request(actionParams).done(\n\t\t\t\tfunction (data) {\n\t\t\t\t\tprogressInstance.progressIndicator({ mode: 'hide' });\n\t\t\t\t\taDeferred.resolve(data);\n\t\t\t\t},\n\t\t\t\tfunction (textStatus, errorThrown) {}\n\t\t\t);\n\t\t\treturn aDeferred.promise();\n\t\t},\n\n\t\t/**\n\t\t * Function to save rss feed\n\t\t * @parm form\n\t\t */\n\t\trssFeedSave: function (form) {\n\t\t\tvar thisInstance = this;\n\t\t\tvar data = form.serializeFormData();\n\t\t\tvar progressIndicatorElement = jQuery.progressIndicator({\n\t\t\t\tposition: 'html',\n\t\t\t\tblockInfo: {\n\t\t\t\t\tenabled: true\n\t\t\t\t}\n\t\t\t});\n\t\t\tvar params = {\n\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\taction: 'Save',\n\t\t\t\tfeedurl: data.feedurl\n\t\t\t};\n\t\t\tAppConnector.request(params).done(function (result) {\n\t\t\t\tprogressIndicatorElement.progressIndicator({\n\t\t\t\t\tmode: 'hide'\n\t\t\t\t});\n\t\t\t\tif (result.result.success) {\n\t\t\t\t\tapp.hideModalWindow();\n\t\t\t\t\tthisInstance.getRssFeeds(result.result.id);\n\t\t\t\t} else {\n\t\t\t\t\tvar params = {\n\t\t\t\t\t\ttitle: app.vtranslate('JS_MESSAGE'),\n\t\t\t\t\t\ttext: app.vtranslate(result.result.message),\n\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t};\n\t\t\t\t\tapp.showNotify(params);\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Function to get the feeds for specific id\n\t\t * @param id\n\t\t */\n\t\tgetRssFeeds: function (id) {\n\t\t\tvar thisInstance = this;\n\t\t\tvar aDeferred = jQuery.Deferred();\n\t\t\tvar container = thisInstance.getListViewContainer();\n\t\t\tvar progressIndicatorElement = jQuery.progressIndicator({\n\t\t\t\tposition: 'html',\n\t\t\t\tblockInfo: {\n\t\t\t\t\tenabled: true\n\t\t\t\t}\n\t\t\t});\n\t\t\tvar params = {\n\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\tview: 'List',\n\t\t\t\tid: id\n\t\t\t};\n\t\t\tAppConnector.requestPjax(params).done(function (data) {\n\t\t\t\taDeferred.resolve(data);\n\t\t\t\tcontainer.find('#listViewContents').html(data);\n\t\t\t\tthisInstance.setFeedContainerHeight(container);\n\t\t\t\tprogressIndicatorElement.progressIndicator({\n\t\t\t\t\tmode: 'hide'\n\t\t\t\t});\n\t\t\t});\n\n\t\t\treturn aDeferred.promise();\n\t\t},\n\n\t\t/**\n\t\t * Function to get the height of the Feed Container\n\t\t * @param container\n\t\t */\n\t\tsetFeedContainerHeight: function (container) {\n\t\t\tvar height = this.getDocumentHeight() / 1.5;\n\t\t\tcontainer.find('.feedListContainer').height(height);\n\t\t},\n\n\t\t/**\n\t\t * Function to register the click of feeds\n\t\t * @param container\n\t\t */\n\t\tregisterFeedClickEvent: function (container) {\n\t\t\tvar thisInstance = this;\n\t\t\tcontainer.on('click', '.feedLink', function (e) {\n\t\t\t\tvar element = jQuery(e.currentTarget);\n\t\t\t\tvar url = element.data('url');\n\t\t\t\tvar frameElement = thisInstance.getFrameElement(url);\n\t\t\t\tcontainer.find('.feedFrame').html(frameElement);\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Function to get the iframe element\n\t\t * @param url\n\t\t * @retrun frameElement\n\t\t */\n\t\tgetFrameElement: function (url) {\n\t\t\tvar progressIndicatorElement = jQuery.progressIndicator({\n\t\t\t\tposition: 'html',\n\t\t\t\tblockInfo: {\n\t\t\t\t\tenabled: true\n\t\t\t\t}\n\t\t\t});\n\t\t\tvar frameElement = jQuery('