uawdijnntqw1x1x1
IP : 18.117.241.170
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
/
imopenlines
/
create-line
/
.
/
src
/
create-line.js
/
/
// @flow import { Cache, Loc, Tag, ajax} from 'main.core'; import { PopupManager } from 'main.popup'; type CreateLineOptions = { path: string; sliderWidth: number; }; export class CreateLine { path: string; isLocked: boolean = false; cache = new Cache.MemoryCache(); constructor(options: CreateLineOptions) { this.path = options.path; this.sliderWidth = options.sliderWidth ; if (this.path) { this.init(); } } init() { if (this.isLocked) { return; } this.isLocked = true; ajax({ url: '/bitrix/components/bitrix/imopenlines.lines/ajax.php', method: 'POST', data: { 'action': 'create', 'sessid': BX.bitrix_sessid() }, timeout: 30, dataType: 'json', processData: true, onsuccess: data => { data = data || {}; if(data.error) { this.onFail(data); } else { this.onSuccess(data); } }, onfailure: data => this.onFail(data), }); } onSuccess(data: {}) { BX.SidePanel.Instance.open( this.path.replace('#LINE#', data.config_id), { width: this.sliderWidth, cacheable: false } ); } onFail(responseData: {}) { responseData = responseData || {'error': true, 'text': ''}; this.isLocked = false; if (responseData.limited) //see \Bitrix\ImOpenLines\Config::canActivateLine() { if (!B24 || !B24['licenseInfoPopup']) { return; } BX.UI.InfoHelper.show('limit_contact_center_ol_number'); } else { responseData = responseData || {}; const errorMessage = responseData.text || Loc.getMessage('IMOPENLINES_CREATE_LINE_ERROR_ACTION') this.showErrorPopup(errorMessage); } } showErrorPopup(errorMessage: string) { const popup = PopupManager.create({ id: 'crm_webform_list_error', content: this.getPopupContent(errorMessage), buttons: [ new BX.UI.Button({ text: Loc.getMessage('IMOPENLINES_CREATE_LINE_CLOSE_BUTTON'), onclick: () => popup.close() }) ], autoHide: true, lightShadow: true, closeByEsc: true, overlay: { backgroundColor: 'black', opacity: 500 } }); popup.show(); } getPopupContent(message: string) { return this.cache.remember('popupContent', () => { return Tag.render` <span class="crm-webform-edit-warning-popup-alert">${message}</span> `; }); } }
/var/www/axolotl/data/www/axolotl.ru/www/bitrix/js/imopenlines/create-line/./src/create-line.js