uawdijnntqw1x1x1
IP : 18.119.1.164
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
/
yar.axolotls.ru
/
bitrix
/
js
/
..
/
js
/
calendar
/
controls
/
src
/
addbutton.js
/
/
import {Dom, Event, Loc, Type} from 'main.core'; export class AddButton extends Event.EventEmitter { showTasks = false; DOM = {}; constructor(params = {}) { super(); this.setEventNamespace('BX.Calendar.Controls.AddButton'); this.zIndex = params.zIndex || 3200; this.popupId = params.id || 'add-button-' + Math.round(Math.random() * 10000); this.showTasks = params.showTasks; this.addEntryHandler = Type.isFunction(params.addEntry) ? params.addEntry : null; this.addTaskHandler = Type.isFunction(params.addTask) ? params.addTask : null; this.create(); } create() { this.menuItems = [ { text: Loc.getMessage('EC_ADD_EVENT'), onclick: this.addEntry.bind(this) } ]; if (this.addTaskHandler) { this.menuItems.push({ text: Loc.getMessage('EC_ADD_TASK'), onclick: this.addTask.bind(this) }); } if (this.menuItems.length > 1) { this.DOM.wrap = Dom.create("span", { props: {className: "ui-btn-split ui-btn-primary"}, children: [ Dom.create("button", { props: {className: "ui-btn-main", type: "button"}, html: Loc.getMessage('EC_ADD'), events: {click: this.addEntry.bind(this)} }) ] }); this.DOM.addButtonExtra = Dom.create("span", { props: {className: "ui-btn-extra"}, events: {click: this.showPopup.bind(this)} }); this.DOM.wrap.appendChild(this.DOM.addButtonExtra) } else { this.DOM.wrap = Dom.create("button", { props: {className: "ui-btn ui-btn-primary", type: "button"}, html: Loc.getMessage('EC_ADD'), events: {click: this.addEntry.bind(this)} }); } } getWrap() { return this.DOM.wrap; } showPopup() { if (this.menuPopup && this.menuPopup.popupWindow && this.menuPopup.popupWindow.isShown()) { return this.menuPopup.close(); } this.menuPopup = BX.PopupMenu.create( this.popupId, this.DOM.addButtonExtra, this.menuItems, { closeByEsc : true, autoHide : true, zIndex: this.zIndex, offsetTop: 0, offsetLeft: 15, angle: true } ); this.menuPopup.show(); BX.addCustomEvent(this.menuPopup.popupWindow, 'onPopupClose', function() { BX.PopupMenu.destroy(this.popupId); this.menuPopup = null; this.addBtnMenu = null; }.bind(this)); } addEntry() { if (this.addEntryHandler) { this.addEntryHandler(); } if (this.menuPopup && this.menuPopup.popupWindow && this.menuPopup.popupWindow.isShown()) { this.menuPopup.close(); } } addTask() { if (this.addTaskHandler) { this.addTaskHandler(); } if (this.menuPopup && this.menuPopup.popupWindow && this.menuPopup.popupWindow.isShown()) { this.menuPopup.close(); } } }
/var/www/axolotl/data/www/yar.axolotls.ru/bitrix/js/../js/calendar/controls/src/addbutton.js