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/rospirotorg.ru/bitrix/js/catalog/document-card/src/feedback/ |
Upload File : |
import {Type, Uri} from "main.core"; export default class Slider { static openFeedbackForm() { BX.UI.Feedback.Form.open(Slider.getFeedbackParams()); } static openIntegrationRequestForm(event, params={}) { if (event && Type.isFunction(event.preventDefault)) { event.preventDefault(); } if(!Type.isPlainObject(params)) { params = {}; } let url = (new Uri('/bitrix/components/bitrix/catalog.feedback/slider.php')); url.setQueryParams({feedback_type: 'integration_request'}); url.setQueryParams(params); return Slider.open(url.toString(), {width: 735}); } static open(url, options) { if(!Type.isPlainObject(options)) { options = {}; } options = {...{cacheable: false, allowChangeHistory: false, events: {}}, ...options}; return new Promise((resolve) => { if(Type.isString(url) && url.length > 1) { options.events.onClose = function(event) { resolve(event.getSlider()); }; BX.SidePanel.Instance.open(url, options); } else { resolve(); } }); } static getFeedbackParams(): Object { return { id: `catalog-feedback-${parseInt(Math.random() * 1000, 10)}`, forms: [ { id: 384, lang: 'ru', sec: '0pskpd', zones: ['ru', 'by', 'kz'] }, { id: 392, lang: 'en', sec: 'siqjqa', zones: ['en', 'ua'] }, { id: 388, lang: 'es', sec: '53t2bu', zones: ['es'] }, { id: 390, lang: 'de', sec: 'mhglfc', zones: ['de'] }, { id: 386, lang: 'com.br', sec: 't6tdpy', zones: ['com.br'] }, ], }; } }