uawdijnntqw1x1x1
IP : 3.149.250.24
Hostname : axolotl
Kernel : Linux axolotl 4.9.0-13-amd64 #1 SMP Debian 4.9.228-1 (2020-07-05) x86_64
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,
OS : Linux
PATH:
/
var
/
www
/
axolotl
/
data
/
www
/
axolotl.ru
/
www
/
bitrix
/
js
/
main
/
popup
/
src
/
..
/
src
/
menu
/
menu-manager.js
/
/
import Menu from './menu'; import { Type } from 'main.core'; import { MenuOptions } from './menu-types'; export default class MenuManager { /** * @private */ static Data: { [id: string]: Menu } = {}; /** * @private */ static currentItem: ? Menu = null; constructor() { throw new Error('You cannot make an instance of MenuManager.'); } static show(...args) { if (this.currentItem !== null) { this.currentItem.popupWindow.close(); } this.currentItem = this.create.apply(this, args); this.currentItem.popupWindow.show(); } static create(options: MenuOptions) { let menuId = null; //Compatibility const bindElement = arguments[1]; const menuItems = arguments[2]; const params = arguments[3]; if (Type.isPlainObject(options) && !bindElement && !menuItems && !params) { menuId = options.id; if (!Type.isStringFilled(menuId)) { throw new Error('BX.Main.Menu.create: "id" parameter is required.'); } } else { menuId = options; } if (!this.Data[menuId]) { const menu = new Menu(options, bindElement, menuItems, params); menu.getPopupWindow().subscribe('onDestroy', () => { MenuManager.destroy(menuId); }); this.Data[menuId] = menu; } return this.Data[menuId]; } static getCurrentMenu(): Menu | null { return this.currentItem; } static getMenuById(id): Menu | null { return this.Data[id] ? this.Data[id] : null; } /** * compatibility * @private */ static onPopupDestroy(popupMenuWindow: Menu) { this.destroy(popupMenuWindow.id); } static destroy(id) { const menu = this.getMenuById(id); if (menu) { if (this.currentItem === menu) { this.currentItem = null; } delete this.Data[id]; menu.getPopupWindow().destroy(); } } }
/var/www/axolotl/data/www/axolotl.ru/www/bitrix/js/main/popup/src/../src/menu/menu-manager.js