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/calendar/sync/interface/src/controls/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/js/calendar/sync/interface/src/controls/aftersynctour.js
// @flow
'use strict';
import {Type, Tag, Loc, Runtime, Dom} from 'main.core';
import {Util} from "calendar.util";
import {Popup} from 'main.popup';

export default class AfterSyncTour
{
	constructor(options = {})
	{
		this.options = options;
	}

	static createInstance(options)
	{
		return new this(options);
	}

	loadExtension()
	{
		return new Promise((resolve) => {
			Runtime.loadExtension('ui.tour').then((exports) => {
				if (exports && exports['Guide'] && exports['Manager'])
				{
					resolve();
				}
				else
				{
					console.error(`Extension "ui.tour" not found`);
				}
			});
		});
	}

	show()
	{
		this.loadExtension()
			.then(() => {
				this.guide = new BX.UI.Tour.Guide({
					steps: [
						{
							target: this.getTarget(),
							title: Loc.getMessage('CAL_AFTER_SYNC_AHA_TITLE'),
							text: Loc.getMessage('CAL_AFTER_SYNC_AHA_TEXT'),
						}
					],
					onEvents: true
				});

				this.guide.start();
			});
	}

	getTarget()
	{
		let target;
		const view = this.options.view;
		const viewWrap = view.getContainer();

		if (view.getName() === 'month')
		{
			target = viewWrap.querySelectorAll(".calendar-grid-today")[0];
		}
		else if (view.getName() === 'day'
		|| view.getName() === 'week')
		{
			const dayCode = Util.getDayCode(new Date());
			target = viewWrap.querySelector('div[data-bx-calendar-timeline-day="' + dayCode + '"] .calendar-grid-cell-inner');
		}
		else
		{
			target = document.querySelector('span[data-role="addButton"]');
		}

		return target;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit