YetiForceCompany/YetiForceCRM

View on GitHub
public_html/layouts/basic/modules/Notification/resources/NotificationConfig.min.js.map

Summary

Maintainability
Test Coverage
{"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,0BAA0B,CAAE,SAAUC,CAAC,CAAEC,KAAK,CAAE,CACxFA,KAAK,CACRT,SAAS,CAACK,IAAI,CAAC,WAAW,CAAC,CAACK,WAAW,CAAC,QAAQ,CAAC,CAEjDV,SAAS,CAACK,IAAI,CAAC,WAAW,CAAC,CAACM,QAAQ,CAAC,QAAQ,EAE/C,CAAC,CAAC,CACFX,SAAS,CAACK,IAAI,CAAC,uBAAqB,CAAC,CAACE,EAAE,CAAC,OAAO,CAAE,UAAY,CACzD,IAAAK,eAAe,CAAG,EAAE,CACpBC,iBAAiB,CAAG,EAAE,CAC1BX,KAAK,CAACY,CAAC,CAAC,qBAAmB,CAAC,CAACC,IAAI,CAAC,UAAY,CAC7C,IAAIC,aAAa,C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