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/shipment.js
(function(BX, $, window) {

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

	var constructor = OrderView.Shipment = Reference.Complex.extend({

		defaults: {
			id: null,
			childElement: '.js-yamarket-shipment__child',
			inputElement: '.js-yamarket-shipment__input'
		},

		validate: function() {
			this.getBoxCollection().validate();
		},

		getCollection: function() {
			return this.getParentField();
		},

		getBoxCollection: function() {
			return this.getChildField('BOX');
		},

		getId: function() {
			return this.options.id;
		},

		getBoxCount: function() {
			return this.getBoxCollection().getActiveItems().length;
		},

		getBoxOffset: function() {
			var collection = this.getCollection();
			var siblingShipments = collection.getActiveItems();
			var siblingShipmentElement;
			var siblingShipment;
			var i;
			var result = 0;

			for (i = 0; i < siblingShipments.length; i++) {
				siblingShipmentElement = siblingShipments[i];

				if (this.el === siblingShipmentElement) {
					break;
				} else {
					siblingShipment = collection.getItemInstance(siblingShipmentElement);
					result += siblingShipment.getBoxCount();
				}
			}

			return result;
		},

		toggleSizes: function(dir) {
			const field = this.getChildField('BOX');

			field.toggleSizes(dir);
		},

	}, {
		dataName: 'orderViewShipment',
		pluginName: 'YandexMarket.OrderView.Shipment',
	});

})(BX, jQuery, window);

Youez - 2016 - github.com/yon3zu
LinuXploit