uawdijnntqw1x1x1
IP : 3.21.106.4
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
/
shared
/
..
/
integration
/
timemanager.min.js
/
/
BX.namespace("BX.Tasks.Integration");BX.Tasks.Integration.TimeManager=BX.Tasks.Base.extend({options:{query:false},methods:{construct:function(){if(typeof this.vars=="undefined"){this.vars={}}this.vars.state={};this.onPlannerUpdate=BX.debounce(this.onPlannerUpdate,100,this);this.bindWidgetEvents(window!=window.top?window.top:window)},bindWidgetEvents:function(t){t.BX.addCustomEvent(t,"onTimeManDataRecieved",BX.delegate(function(t){this.onPlannerUpdate(t.PLANNER)},this));t.BX.addCustomEvent(t,"onPlannerDataRecieved",BX.delegate(function(t,e){this.onPlannerUpdate(e)},this));t.BX.addCustomEvent(t,"onTaskTimerChange",BX.delegate(function(t){this.onTimerUpdate(t)},this))},onPlannerUpdate:function(t){t=t||{};t.TASKS=t.TASKS||[];t.TASK_ON_TIMER=t.TASK_ON_TIMER||{};var e;var a;var i={};for(a=0;a<t.TASKS.length;a++){e=parseInt(t.TASKS[a].ID);if(isNaN(e)){continue}i[e]=true;if(typeof this.vars.state[e]=="undefined"){this.vars.state[e]={timer:false,plan:false}}this.vars.state[e].plan=true}for(a in this.vars.state){if(typeof i[a]=="undefined"){this.fireEvent("task-plan-toggle",[a,false]);this.vars.state[a].plan=false}}e=parseInt(t.TASK_ON_TIMER.ID);if(!isNaN(e)){if(typeof this.vars.state[e]=="undefined"){this.vars.state[e]={timer:false,plan:false}}for(a in this.vars.state){if(this.vars.state[a].timer&&a!=e){this.fireEvent("task-timer-toggle",[false,a])}this.vars.state[a].timer=false}this.vars.state[e].timer=true}},updatePlanner:function(){var t=true;if(window.BXTIMEMAN)window.BXTIMEMAN.Update(true);else if(window.BXPLANNER&&window.BXPLANNER.update)window.BXPLANNER.update();else t=false;if(window.top!==window){if(window.top.BXTIMEMAN)window.top.BXTIMEMAN.Update(true);else if(window.top.BXPLANNER&&window.top.BXPLANNER.update)window.top.BXPLANNER.update()}return t},hasPlanner:function(){return!!(window.top.BXPLANNER||window.top.BXTIMEMAN)},onTimerUpdate:function(t){t=t||{};t.taskData=t.taskData||{};if(t.action=="refresh_daemon_event"){var e=parseInt(t.data.TASK.TIME_SPENT_IN_LOGS);if(isNaN(e)){e=0}var a=parseInt(t.data.TIMER.RUN_TIME);if(isNaN(a)){a=0}this.fireEvent("task-timer-tick",[t.taskId,e+a,t.data.TASK])}else if(t.action=="stop_timer"){t.taskData.TIMER_IS_RUNNING_FOR_CURRENT_USER=false;this.fireEvent("task-timer-toggle",[t.taskId,false,t.taskData])}else if(t.action=="start_timer"){t.taskData.TIMER_IS_RUNNING_FOR_CURRENT_USER=true;this.fireEvent("task-timer-toggle",[t.taskId,true,t.taskData])}},addToPlan:function(t){if(BX.addTaskToPlanner){BX.addTaskToPlanner(t);return true}else if(window.top.BX.addTaskToPlanner){window.top.BX.addTaskToPlanner(t);return true}return false},start:function(t,e,a){if(!t){return}if(e){this.getQuery().add("integration.timemanager.task.start",{taskId:t,stopPrevious:a||false},{},BX.delegate(function(e){var a=e.getByCode("OTHER_TASK_ON_TIMER");if(a){var i=a.data();var n=[t,[]];if(i.TASK&&i.TASK.TITLE&&i.TASK.ID){n[1]={id:i.TASK.ID,title:i.TASK.TITLE}}this.fireEvent("other-task-on-timer",n);e.deleteByCodeAll("OTHER_TASK_ON_TIMER")}else{this.fireEvent("task-timer-toggle",[t,true]);this.updatePlanner()}},this))}else{this.fireEvent("task-timer-toggle",[t,true]);this.updatePlanner()}},stop:function(t,e){if(!t){return}if(e){this.getQuery().add("integration.timemanager.task.stop",{taskId:t},{},BX.delegate(function(){this.fireEvent("task-timer-toggle",[t,false]);this.updatePlanner()},this))}else{this.fireEvent("task-timer-toggle",[t,false]);this.updatePlanner()}},getQuery:function(){if(typeof this.query=="undefined"){if(this.option("query")){this.query=this.option("query")}else{this.query=new BX.Tasks.Util.Query({autoExec:true})}}return this.query}}}); //# sourceMappingURL=timemanager.map.js
/var/www/axolotl/data/www/axolotl.ru/www/bitrix/js/tasks/shared/../integration/timemanager.min.js