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/templates/landing24/assets/js/helpers/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/templates/landing24/assets/js/helpers/header-sidebar.js
;(function ()
{
	"use strict";

	BX.namespace("BX.Landing");

	var onCustomEvent = BX.Landing.Utils.onCustomEvent;

	BX.Landing.BlockHeaderSidebar = function ()
	{

	};

	/**
	 * Create entity by node and add in collection
	 * @param {HTMLElement} node
	 */
	BX.Landing.BlockHeaderSidebar.init = function (node) {
		var wrapper = BX.findParent(node, {className: 'block-wrapper'});

		wrapper.style.position = 'sticky';
		wrapper.style.top = '-1px';
		wrapper.style.transitionProperty = 'top';
		wrapper.style.transitionDuration = '.2s';

		onCustomEvent("BX.Landing.BlockAssets.Header:onSetOnTop", function (event)
		{
			wrapper.style.top = event.data.height + 'px';
		});

		onCustomEvent("BX.Landing.BlockAssets.Header:onUnsetOnTop", function (event)
		{
			wrapper.style.top = event.data.height + 'px';
		});

		onCustomEvent("BX.Landing.BlockAssets.Header:onSetInFlow", function (event)
		{
			wrapper.style.top = '0';
		});
	};

	onCustomEvent("BX.Landing.Block:init", function (event)
	{
		var headerSelector = event.makeRelativeSelector('.landing-block-node-navbar');
		// in edit mode menu must be like a usual block
		if (
			(BX.Landing.getMode() === "view" || BX.Landing.getMode() === "preview")
			&& event.block.querySelectorAll(headerSelector).length > 0
		)
		{
			BX.Landing.BlockHeaderSidebar.init(event.block.querySelector(headerSelector));
		}
		// todo: scroll-nav (scrollspy)
		// todo: scroll to top (with animate)
	});
})();

Youez - 2016 - github.com/yon3zu
LinuXploit