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/yandex.market/lib/ |
Upload File : |
(function(BX, window) { var YandexMarket = BX.namespace('YandexMarket'); // constructor YandexMarket.Dialog = function(arParams) { YandexMarket.Dialog.superclass.constructor.apply(this, arguments); }; BX.extend(YandexMarket.Dialog, BX.CAdminDialog); YandexMarket.Dialog.prototype.SetContent = function(html) { var contents; var callback; var _this = this; YandexMarket.Dialog.superclass.SetContent.call(this, html); if (html != null) { contents = this.PARTS.CONTENT_DATA; callback = function() { _this.adjustSizeEx(); BX.removeCustomEvent('onAjaxSuccessFinish', callback); BX.onCustomEvent(BX(contents), 'onYaMarketContentUpdate', [ { target: contents } ]); BX.adminPanel && BX.adminPanel.modifyFormElements(contents); }; BX.addCustomEvent('onAjaxSuccessFinish', callback); } }; YandexMarket.Dialog.prototype.adjustSizeEx = function() { BX.defer(this.__adjustSizeEx, this)(); }; YandexMarket.Dialog.prototype.__adjustSizeEx = function() { var contentElement = this.PARTS.CONTENT_DATA; var contentHeight = contentElement.scrollHeight || contentElement.clientHeight; var contentWidth = contentElement.scrollWidth || contentElement.clientWidth; var windowWidth = (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) * 0.9; var windowHeight = (window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight) * 0.7; if (contentWidth > windowWidth) { contentWidth = windowWidth; } if (this.PARAMS.min_width > 0 && contentWidth < this.PARAMS.min_width) { contentWidth = this.PARAMS.min_width; } else if (this.PARAMS.max_width > 0 && contentWidth > this.PARAMS.max_width) { contentWidth = this.PARAMS.max_width; } if (contentHeight > windowHeight) { contentHeight = windowHeight; } if (this.PARAMS.min_height > 0 && contentHeight < this.PARAMS.min_height) { contentHeight = this.PARAMS.min_height; } else if (this.PARAMS.max_height > 0 && contentHeight > this.PARAMS.max_height) { contentHeight = this.PARAMS.max_height; } this.PARTS.CONTENT_DATA.style.width = contentWidth + 'px'; this.PARTS.CONTENT_DATA.style.height = contentHeight + 'px'; this.adjustPos(); }; })(BX, window);