YetiForceCompany/YetiForceCRM

View on GitHub
public_html/layouts/basic/modules/Vtiger/resources/Kanban.min.js.map

Summary

Maintainability
Test Coverage
{"version":3,"file":"Kanban.min.js","sources":["Kanban.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'Vtiger_Kanban_Js',\n\t{},\n\t{\n\t\t/**\n\t\t * Get params\n\t\t */\n\t\tgetParams: function () {\n\t\t\tconst params = [];\n\t\t\tthis.page.find('.js-params').each(function () {\n\t\t\t\tlet element = $(this);\n\t\t\t\tparams[element.attr('name')] = element.val();\n\t\t\t});\n\t\t\treturn $.extend(\n\t\t\t\t{\n\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\tview: 'Kanban',\n\t\t\t\t\tboard: this.page.find('.js-board-tab.active').data('id')\n\t\t\t\t},\n\t\t\t\tparams\n\t\t\t);\n\t\t},\n\t\tloadKanban: function () {\n\t\t\tconst params = this.getParams(),\n\t\t\t\turlParams = Object.assign({}, params);\n\t\t\tdelete urlParams.orderBy;\n\t\t\tapp.changeUrl(urlParams);\n\t\t\tconst progress = $.progressIndicator({ blockInfo: { enabled: true, elementToBlock: this.container } });\n\t\t\tAppConnector.request(params)\n\t\t\t\t.done((responseData) => {\n\t\t\t\t\tthis.container.html(responseData);\n\t\t\t\t\tthis.registerSortable();\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\ttitle: 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\tregisterSortable: function () {\n\t\t\tconst boards = this.container.find('.js-kanban-records');\n\t\t\tboards.sortable({\n\t\t\t\tcontainment: this.container,\n\t\t\t\titems: boards.find('.js-kanban-record'),\n\t\t\t\tcancel: '.js-kanban-disabled',\n\t\t\t\tconnectWith: boards,\n\t\t\t\tplaceholder: 'c-kanban__highlight',\n\t\t\t\trevert: true,\n\t\t\t\ttolerance: 'pointer',\n\t\t\t\tcursor: 'move',\n\t\t\t\tupdate: (e, ui) => {\n\t\t\t\t\tif (ui.sender == null) {\n\t\t\t\t\t\tconst records = ui.item.closest('.js-kanban-records');\n\t\t\t\t\t\tVtiger_Edit_Js.saveAjax({\n\t\t\t\t\t\t\trecord: ui.item.data('id'),\n\t\t\t\t\t\t\tfield: records.data('field'),\n\t\t\t\t\t\t\tvalue: records.data('value')\n\t\t\t\t\t\t})\n\t\t\t\t\t\t\t.done(() => {\n\t\t\t\t\t\t\t\tthis.loadKanban();\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\tapp.errorLog(error, err);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tstart: (e, ui) => {\n\t\t\t\t\tui.placeholder.height(ui.helper.outerHeight());\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Registers mobile devices.\n\t\t */\n\t\tregisterMobileDevices: function () {\n\t\t\tif (app.isTouchDevice()) {\n\t\t\t\tthis.container.find('.js-kanban-record').each(function () {\n\t\t\t\t\tlet element = $(this);\n\t\t\t\t\telement.find('.js-popover-tooltip--record').removeClass('js-popover-tooltip--record');\n\t\t\t\t\tlet btns = element.find('.btns');\n\t\t\t\t\tlet btnQuickEditModal = btns.find('.js-quick-edit-modal');\n\t\t\t\t\telement.addClass('js-quick-edit-modal');\n\t\t\t\t\telement.attr('href', btnQuickEditModal.attr('href'));\n\t\t\t\t\telement.attr('data-record', btnQuickEditModal.data('record'));\n\t\t\t\t\telement.attr('data-module', btnQuickEditModal.data('module'));\n\t\t\t\t\tbtns.remove();\n\t\t\t\t\telement.find('a').on('click', function (e) {\n\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Registers Kanban view events.\n\t\t */\n\t\tregisterEvents: function () {\n\t\t\tthis.page = $('#centerPanel');\n\t\t\tthis.container = $('.js-kanban-container');\n\t\t\tthis.registerSortable();\n\t\t\tapp.showNewScrollbarTopBottom(this.container);\n\t\t\tthis.page.on('click', '.js-board-tab', (e) => {\n\t\t\t\tthis.page.find('.js-board-tab.active').removeClass('active');\n\t\t\t\t$(e.currentTarget).addClass('active');\n\t\t\t\tthis.loadKanban();\n\t\t\t});\n\t\t\tthis.page.on('change', '.js-params', () => {\n\t\t\t\tthis.loadKanban();\n\t\t\t});\n\t\t\tthis.page.on('click', '.js-list-reload', (e, data) => {\n\t\t\t\tthis.page.find('#orderBy').val(JSON.stringify(data.orderby)).trigger('change');\n\t\t\t});\n\t\t\tthis.registerMobileDevices();\n\t\t}\n\t}\n);\n"],"names":["$","Class","getParams","params","page","find","each","element","attr","val","extend","module","app","getModuleName","view","board","data","loadKanban","_this","urlParams","Object","assign","orderBy","changeUrl","progress","progressIndicator","blockInfo","enabled","elementToBlock","container","AppConnector","request","done","responseData","html","registerSortable","mode","fail","showNotify","title","vtranslate","type","_this2","boards","sortable","containment","items","cancel","connectWith","placeholder","revert","tolerance","cursor","update","e","ui","sender","records","item","closest","Vtiger_Edit_Js","saveAjax","record","field","value","error","err","errorLog","start","height","helper","outerHeight","registerMobileDevices","isTouchDevice","removeClass","btns","btnQuickEditModal","addClass","remove","on","stopPropagation","registerEvents","_this3","showNewScrollbarTopBottom","currentTarget","JSON","stringify","orderby","trigger"],"mappings":";;AAAA,kKACA,YAAY,CAEZA,CAAC,CAACC,KAAK,CACN,kBAAkB,CAClB,EAAE,CACF;AAED;AACA,KACEC,SAAS,CAAE,SAAAA,SAAAA,EAAY,CACtB,IAAMC,MAAM,CAAG,EAAE,CAKjB,OAJA,IAAI,CAACC,IAAI,CAACC,IAAI,CAAC,YAAY,CAAC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