uawdijnntqw1x1x1
IP : 18.218.75.143
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
/
tasks
/
scheduler
/
..
/
itemsetpicker.min.js
/
/
BX.namespace("BX.Tasks");BX.Tasks.UserItemSet=BX.Tasks.Util.ItemSet.extend({sys:{code:"user-item-set"},options:{nameTemplate:false,useSearch:false,useAdd:false,mode:"user",prefixId:false,popupOffsetTop:0,popupOffsetLeft:0},methods:{construct:function(){if(typeof this.instances=="undefined"){this.instances={}}this.instances.selector=new BX.Tasks.Integration.Socialnetwork.NetworkSelector({scope:this.scope(),id:"selector-"+this.getRandomHash(),mode:this.getNSMode(),useSearch:this.option("useSearch"),useAdd:this.option("useAdd"),forceTop:this.option("forceTop"),controlBind:this.option("controlBind"),parent:this,popupOffsetTop:this.option("popupOffsetTop"),popupOffsetLeft:this.option("popupOffsetLeft")});this.callConstruct(BX.Tasks.Util.ItemSet);this.vars.intendOpen=false;this.vars.initialized=false;this.vars.changed=false;this.showLoader=BX.Tasks.Util.delay(this.showLoader,false,500,this)},bindEvents:function(){this.callMethod(BX.Tasks.Util.ItemSet,"bindEvents",[]);this.instances.selector.bindEvent("close",BX.delegate(this.onClose,this));this.instances.selector.bindEvent("initialized",BX.delegate(this.onSelectorInitialized,this));this.instances.selector.bindEvent("item-selected",BX.delegate(this.onSelectorItemSelected,this));this.instances.selector.bindEvent("item-deselected",BX.delegate(this.onSelectorItemDeselected,this));BX.Tasks.Util.filterFocusBlur(this.control("search"),false,BX.delegate(this.onSearchBlurred,this),200)},onClose:function(){this.vars.changed=false},getNSMode:function(){return this.option("mode")},showLoader:function(){this.setCSSFlag("loading")},hideLoader:function(){this.showLoader.cancel();this.dropCSSFlag("loading")},openAddForm:function(){this.setCSSFlag("search");this.showLoader();this.searchPopupOpen()},onSelectorItemSelected:function(e){this.vars.changed=true;var t=this.extractItemValue(e);if(!this.hasItem(t)){if(!this.checkCanAddItems()){var i=this.getItemLast();if(i!=null){this.replaceItem(i.value(),e)}}else{this.addItem(e,{})}if(!this.checkCanAddItems()){this.instances.selector.close();this.onSearchBlurred()}}this.resetInput()},onSelectorItemDeselected:function(e){this.vars.changed=true;var t=this.extractItemValue(e);if(!this.hasItem(t)){return false}this.deleteItem(t);this.resetInput()},deleteItem:function(e){if(this.callMethod(BX.Tasks.Util.ItemSet,"deleteItem",arguments)){if(typeof e=="object"){e=e.value()}this.instances.selector.deselectItem(e);return true}return false},onSearchBlurred:function(){if(this.instances.selector.checkIsOpened()){return false}this.toggleSearchOff();this.vars.intendOpen=false;return true},toggleSearchOff:function(){this.dropCSSFlag("search")},searchPopupOpen:function(){this.vars.intendOpen=true;this.initializeSelector()},resetInput:function(){var e=this.control("search");if(e){e.value="";e.focus()}},initializeSelector:function(){this.instances.selector.initialize()},onSelectorInitialized:function(){if(this.vars.intendOpen){this.hideLoader();this.setCSSFlag("ready");var e=this.control("search");if(BX.type.isElementNode(e)){e.focus()}this.instances.selector.open()}},extractItemDisplay:function(e){if(typeof e.DISPLAY!="undefined"){return e.DISPLAY}if(typeof e.nameFormatted!="undefined"){return BX.util.htmlspecialcharsback(e.nameFormatted)}if(!("entityType"in e)){e.entityType="U"}if(e.entityType=="U"){var t=this.option("nameTemplate");if(t){var i=BX.formatName(e,t,"Y");if(i=="Noname"){i=e.LOGIN||e.login}return i}return e.LOGIN}else{if(e.NAME){return e.NAME}if(e.TITLE){return e.TITLE}return e.ID}},extractItemValue:function(e){var t=typeof e.ID=="undefined"?e.id:e.ID;if(t){}else if(e.email){t="n"+BX.util.hashCode(e.email)}else if(e.networkId){t=e.networkId}else{t="n"+false}if(this.option("prefixId")){if(!("entityType"in e)){e.entityType="U"}var i=typeof e.ENTITY_TYPE=="undefined"?e.entityType:e.ENTITY_TYPE;if(!i){i="?"}t=i+t}return t},prepareData:function(e){if(!("WORK_POSITION"in e)){if("description"in e){e.WORK_POSITION=BX.util.htmlspecialcharsback(e.description);if(e.WORK_POSITION==" "){e.WORK_POSITION=""}}else{e.WORK_POSITION=""}}if(!("AVATAR"in e)){e.AVATAR=e.avatar||""}if(!("NAME"in e)){e.NAME=e.name||""}if(!("LAST_NAME"in e)){e.LAST_NAME=e.lastName||""}if(!("EMAIL"in e)){e.EMAIL=e.email||""}if(e.type&&"crmemail"in e.type){e.IS_CRM_EMAIL_USER=e.type.crmemail}if(e.type&&"email"in e.type){e.IS_EMAIL_USER=e.type.email}if(e.type&&"extranet"in e.type){e.IS_EXTRANET_USER=e.type.extranet}if(e.type&&"network"in e.type){e.IS_NETWORK_USER=e.type.network}if(!("entityType"in e)){e.entityType="U"}var t=[];if(e.entityType=="P"){e.USER_TYPE="employee";if(e.IS_NETWORK_USER){e.USER_TYPE="network";t.push("network")}e.ENTITY_TYPE_CODE="USER"}if(e.entityType=="U"){e.USER_TYPE="employee";if(e.IS_CRM_EMAIL_USER){e.USER_TYPE="crmemail";t.push("crmemail")}else if(e.IS_EMAIL_USER){e.USER_TYPE="mail";t.push("mail")}else if(e.IS_EXTRANET_USER){e.USER_TYPE="extranet";t.push("extranet")}e.ENTITY_TYPE_CODE="USER"}if(e.entityType=="SG"){e.ENTITY_TYPE_CODE="GROUP";t.push("group")}if(e.entityType=="DR"){e.ENTITY_TYPE_CODE="DEPARTMENT";t.push("department")}e.TYPE_SET=t.join(" ");if(!("URL"in e)){e.URL="javascript:void(0);";var i=this.option("path");if(i&&i[e.entityType]){e.URL=i[e.entityType].toString().replace("{{ID}}",parseInt(e.id||e.ID))}}return e}}});BX.Tasks.GroupItemSet=BX.Tasks.UserItemSet.extend({sys:{code:"group-item-set"},methods:{extractItemDisplay:function(e){if(typeof e.DISPLAY!="undefined"){return e.DISPLAY}if(typeof e.NAME!="undefined"){return e.NAME}if(typeof e.nameFormatted!="undefined"){return BX.util.htmlspecialcharsback(e.nameFormatted)}},getNSMode:function(){return"group"}}});BX.Tasks.PopupItemSet=BX.Tasks.Util.ItemSet.extend({methods:{construct:function(){this.callConstruct(BX.Tasks.Util.ItemSet);this.vars.formShownBefore=false;this.vars.blockSelectorEvent=false;this.vars.temporalItems=false;this.instances.window=false},openAddForm:function(){this.getSelector().then(function(e){this.instances.window=BX.PopupWindowManager.create(this.getFullBxId("popup")+this.option("selectorCode"),this.getPopupAttachTo(),{autoHide:true,closeByEsc:true,content:this.getPickerContainer(),buttons:this.getPopupButtons()});this.instances.window.show();if(!this.vars.formShownBefore){this.bindFormEvents();this.vars.formShownBefore=true}if(e&&"setFocus"in e){e.setFocus()}}.bind(this),(function(){BX.debug("unable to get selector")}))},getPickerContainer:function(){return this.control("picker-content")},getSelector:function(){var e=new BX.Promise;e.resolve();return e},getPopupAttachTo:function(){return this.scope()},bindFormEvents:function(){},getPopupButtons:function(){var e=this.getPopupButtonsDescription();var t=[];for(var i in e){var s=e[i].type=="select"?BX.PopupWindowButton:BX.PopupWindowButtonLink;t.push(new s({text:e[i].text,className:e[i].type=="select"?"popup-window-button-accept":"popup-window-button-link-cancel",events:{click:BX.delegate(e[i].action,this)}}))}return t},getPopupButtonsDescription:function(){return[{text:BX.message("TASKS_COMMON_SELECT"),type:"select",action:this.applySelectionChange},{text:BX.message("TASKS_COMMON_CANCEL"),type:"cancel",action:this.discardSelectionChange}]},itemsChanged:function(e){if(this.vars.blockSelectorEvent){return}this.vars.temporalItems=e},getSelectionDelta:function(){var e=[];var t=[];for(var i in this.vars.items){if(typeof this.vars.temporalItems[i]=="undefined"){t.push(i)}}for(var i in this.vars.temporalItems){if(typeof this.vars.items[i]=="undefined"){e.push(i)}}return{added:e,deleted:t}},applySelectionChange:function(){if(this.vars.temporalItems!=false){var e=this.getSelectionDelta();for(var t in e.deleted){this.deleteItem(e.deleted[t])}for(var t in e.added){var i=this.vars.temporalItems[e.added[t]];this.addItem(i,{})}this.redraw();this.vars.temporalItems=false}this.instances.window.close()},discardSelectionChange:function(){this.vars.temporalItems=false;this.instances.window.close()}}}); //# sourceMappingURL=itemsetpicker.map.js
/var/www/axolotl/data/www/axolotl.ru/www/bitrix/js/tasks/scheduler/../itemsetpicker.min.js