YetiForceCompany/YetiForceCRM

View on GitHub
public_html/layouts/basic/modules/Calendar/resources/ActivityStateModal.min.js.map

Summary

Maintainability
Test Coverage
{"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: $('<div></div>');\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","registerEvents","document","ready","instance","Calendar_ActivityStateModal_Js"],"mappings":";;AAAA,kKACA,YAAY,CAEZA,MAAM,CAACC,KAAK,CACX,gCAAgC,CAChC,EAAE,CACF,CACCC,qBAAqB,UAAAA,qBAAA,EAAG,CACvB,IAAMC,IAAI,CAAG,IAAI,CACjBC,CAAC,CAAC,yCAAyC,CAAC,CAACC,EAAE,CAAC,OAAO,CAAE,SAAUC,CAAC,CAAE,CACrE,IAAIC,aAAa,CAAGH,CAAC,CAACE,CAAC,CAACC,aAAa,CAAC,CACrCC,QAAQ,CAAGC,GAAG,CAACC,WAAW,EAAE,CAE7B,GADAD,GAAG,CAACE,eAAe,EAAE,CACjB,CAAC,GAAKJ,aAAa,CAACK,IAAI,CAAC,MAAM,CAAC,CACnCT,IAAI,CAACU,mBAAmB,CAACN,aAAa,CAAC,CAAA,KACjC,CACN,IAAIO,UAAU,CAAGP,aAAa,CAACQ,OAAO,CAAC,0BAA0B,CAAC,CAACC,MAAM,CACzE,GAAIT,aAAa,CAACU,QAAQ,CAAC,iBAAiB,CAAC,EAAIH,UAAU,CAAE,CAC5D,IAAII,wBAAwB,CAAGd,CAAC,CAACe,iBAAiB,CAAC,CACjDC,QAAQ,CAAE,MAAM,CAChBC,SAAS,CAAE,CACVC,OAAO,CACR,CAAA,CAAA,CACD,CAAC,CAAC,CACFC,GAAG,CACF,qGAAqG,CACrGhB,aAAa,CAACK,IAAI,CAAC,IAAI,CAAC,CACxB,iBAAiB,CAClBY,MAAM,CAAG,EAAE,CACZA,MAAM,CAACC,OAAO,CAAA,CAAA,CAAO,CACrBC,GAAG,CAACC,UAAU,CAACC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