Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/cvetdv.ru/bitrix/js/bitrixcloud/ |
Upload File : |
BX.namespace('BX.BitrixCloud'); BX.BitrixCloud.MobileMonitor = function(app, params) { this.app = app; this.ajaxUrl = ''; if (BX.Type.isObject(params)) { this.ajaxUrl = params.ajaxUrl || ''; } this.deleteSite = function(domain) { const postData = { domain, action: 'delete', sessid: BX.bitrix_sessid(), }; this.app.showPopupLoader({ text: `${BX.Loc.getMessage('BCL_MOBILE_MONITORING_SITE_DELETING')}...` }); BX.ajax({ timeout: 30, method: 'POST', dataType: 'json', url: this.ajaxUrl, data: postData, onsuccess: BX.delegate((result) => { this.app.hidePopupLoader(); if (result && !result.ERROR) { this.app.onCustomEvent('onAfterBCMMSiteDelete', { domain }); BX.onCustomEvent('onAfterBCMMSiteDelete', [{ domain }]); } else if (result.ERROR) { this.app.alert({ text: result.ERROR }); } else { this.app.alert({ text: BX.Loc.getMessage('BCL_MOBILE_MONITORING_SITE_DEL_ERROR') }); } }, this), onfailure: BX.delegate(() => { this.app.alert({ text: BX.Loc.getMessage('BCL_MOBILE_MONITORING_SITE_DEL_ERROR') }); }, this), }); }; this.updateSite = function(domain, data) { const postData = data; postData.domain = domain; postData.action = 'update'; postData.sessid = BX.bitrix_sessid(); this.app.showPopupLoader({ text: `${BX.Loc.getMessage('BCL_MOBILE_MONITORING_SITE_SAVING')}...` }); BX.ajax({ timeout: 30, method: 'POST', dataType: 'json', url: this.ajaxUrl, data: postData, onsuccess: (result) => { this.app.hidePopupLoader(); if (result && !result.ERROR) { this.app.onCustomEvent('onAfterBCMMSiteUpdate', { domain }); BX.onCustomEvent('onAfterBCMMSiteUpdate', [{ domain }]); } else if (result.ERROR) { this.app.alert({ text: result.ERROR }); } else { this.app.alert({ text: BX.Loc.getMessage('BCL_MOBILE_MONITORING_SITE_SAVE_ERROR') }); } }, onfailure: () => { this.app.alert({ text: BX.Loc.getMessage('BCL_MOBILE_MONITORING_SITE_SAVE_ERROR') }); }, }); }; this.showRefreshing = function() { this.app.showPopupLoader({ text: `${BX.Loc.getMessage('BCL_MOBILE_MONITORING_SITE_REFRESHING')}...` }); }; };