uawdijnntqw1x1x1
IP : 3.17.176.160
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
/
graph
/
..
/
task-iframe-popup.min.js
/
/
(function(t){var e,i;var a=0;BX.TasksIFramePopup={create:function(e){if(!t.top.BX.TasksIFrameInst)t.top.BX.TasksIFrameInst=new s(e);if(e.events){for(var i in e.events){BX.removeCustomEvent(t.top.BX.TasksIFrameInst,i,e.events[i]);BX.addCustomEvent(t.top.BX.TasksIFrameInst,i,e.events[i])}}return t.top.BX.TasksIFrameInst}};var s=function(e){this.inited=false;this.pathToEdit="";this.pathToView="";this.iframeWidth=900;this.iframeHeight=400;this.topBottomMargin=15;this.leftRightMargin=50;this.tasksList=[];this.currentURL=t.location.href;this.currentTaskId=0;this.lastAction=null;this.loading=false;this.isEditMode=false;this.prevIframeSrc="";this.descriptionBuffered=null;if(e){if(e.pathToEdit){this.pathToEdit=e.pathToEdit+(e.pathToEdit.indexOf("?")==-1?"?":"&")+"IFRAME=Y"}if(e.pathToView){this.pathToView=e.pathToView+(e.pathToView.indexOf("?")==-1?"?":"&")+"IFRAME=Y"}if(e.tasksList){for(var i=0,a=e.tasksList.length;i<a;i++){this.tasksList[i]=parseInt(e.tasksList[i])}}}};s.prototype.init=function(){if(this.inited)return;this.inited=true;this.header=BX.create("div",{props:{className:"popup-window-titlebar"},html:'<table width="877" border="0" cellspacing="0" cellpadding="0"><tbody><tr><td align="left"> </td><td width="13" style="padding-top: 2px;"><div class="tasks-iframe-close-icon"> </div></td></tr></tbody></table>',style:{background:"#e8e8e8",height:"20px",padding:"5px 0px 5px 15px",borderRadius:"4px 4px 0px 0px"}});this.title=this.header.firstChild.tBodies[0].rows[0].cells[0];this.closeIcon=this.header.firstChild.tBodies[0].rows[0].cells[1].firstChild;this.closeIcon.onclick=BX.proxy(this.close,this);this.iframe=BX.create("iframe",{props:{scrolling:"no",frameBorder:"0"},style:{width:this.iframeWidth+"px",height:this.iframeHeight+"px",overflow:"hidden",border:"1px solid #fff",borderTop:"0px",borderRadius:"4px"}});this.prevTaskLink=BX.create("a",{props:{href:"javascript: void(0)",className:"tasks-popup-prev-slide"},html:"<span></span>"});this.closeLink=BX.create("a",{props:{href:"javascript: void(0)",className:"tasks-popup-close"},html:"<span></span>"});this.nextTaskLink=BX.create("a",{props:{href:"javascript: void(0)",className:"tasks-popup-next-slide"},html:"<span></span>"});this.prevTaskLink.onclick=BX.proxy(this.previous,this);this.nextTaskLink.onclick=BX.proxy(this.next,this);this.closeLink.onclick=BX.proxy(this.close,this);this.table=BX.create("table",{props:{className:"tasks-popup-main-table"},style:{top:this.topBottomMargin+"px"},children:[BX.create("tbody",{children:[BX.create("tr",{children:[this.prevTaskArea=BX.create("td",{props:{className:"tasks-popup-prev-slide-wrap"},children:[this.prevTaskLink]}),BX.create("td",{props:{id:"tasks-crazy-heavy-cpu-usage-item",className:"tasks-popup-main-block-wrap tasks-popup-main-block-wrap-bg"},children:[BX.create("div",{props:{className:"tasks-popup-main-block-inner"},children:[this.header,this.iframe]})]}),this.nextTaskArea=BX.create("td",{props:{className:"tasks-popup-next-slide-wrap"},children:[this.closeLink,this.nextTaskLink]})]})]})]});this.overlay=document.body.appendChild(BX.create("div",{props:{className:"tasks-fixed-overlay"},children:[BX.create("div",{props:{className:"bx-task-dialog-overlay"}}),this.table]}));this.__adjustControls();BX.bind(t.top,"resize",BX.proxy(this.__onWindowResize,this))};s.prototype.view=function(t,e){this.init();if(e){this.currentList=[];for(var i=0,a=e.length;i<a;i++){this.currentList[i]=parseInt(e[i])}}else{this.currentList=null}BX.adjust(this.title,{text:BX.message("TASKS_TASK_NUM").replace("#TASK_NUM#",t)});this.currentTaskId=t;this.lastAction="view";var s=true;this.load(this.pathToView.replace("#task_id#",t),s);this.show()};s.prototype.edit=function(t){this.init();BX.adjust(this.title,{text:BX.message("TASKS_TITLE_EDIT_TASK").replace("#TASK_ID#",t)});this.currentTaskId=t;this.lastAction="edit";this.load(this.pathToEdit.replace("#task_id#",t));this.show()};s.prototype.add=function(t){this.init();BX.adjust(this.title,{text:BX.message("TASKS_TITLE_CREATE_TASK")});this.currentTaskId=0;this.lastAction="add";var e=this.pathToEdit.replace("#task_id#",0)+"&UTF8encoded=1";this.descriptionBuffered=null;for(var i in t){if(i==="DESCRIPTION"&&t[i].length>1e3)this.descriptionBuffered=t[i];else e+="&"+i+"="+encodeURIComponent(t[i])}this.load(e);this.show()};s.prototype.show=function(){BX.onCustomEvent(this,"onBeforeShow",[]);this.overlay.style.display="block";BX.addClass(document.body,"tasks-body-overlay");this.closeLink.style.display="none";this.__onWindowResize();this.closeLink.style.display="block";BX.bind(this.iframe.contentDocument?this.iframe.contentDocument:this.iframe.contentWindow.document,"keypress",BX.proxy(this.__onKeyPress,this));BX.onCustomEvent(this,"onAfterShow",[])};s.prototype.close=function(){BX.onCustomEvent(this,"onBeforeHide",[]);this.overlay.style.display="none";BX.removeClass(document.body,"tasks-body-overlay");BX.unbind(this.iframe.contentDocument?this.iframe.contentDocument:this.iframe.contentWindow.document,"keypress",BX.proxy(this.__onKeyPress,this));BX("tasks-crazy-heavy-cpu-usage-item").className="tasks-popup-main-block-wrap tasks-popup-main-block-wrap-bg";BX.onCustomEvent(this,"onAfterHide",[])};s.prototype.previous=function(){var t=this.currentList?this.currentList:this.tasksList;if(this.currentTaskId&&t.length>1){var e=this.__indexOf(this.currentTaskId,t);if(e!=-1){if(e==0){var i=t.length-1}else{var i=e-1}this.view(t[i],t)}}};s.prototype.next=function(){var t=this.currentList?this.currentList:this.tasksList;if(this.currentTaskId&&t.length>1){var e=this.__indexOf(this.currentTaskId,t);if(e!=-1){if(e==t.length-1){var i=0}else{var i=e+1}this.view(t[i],t)}}};s.prototype.load=function(t,e){this.isEditMode=true;if(e===true)this.isEditMode=false;var i=this.iframe.contentWindow?this.iframe.contentWindow.location:"";this.__onUnload();this.iframe.src=t};s.prototype.isOpened=function(){this.init();return this.overlay.style.display=="block"};s.prototype.isEmpty=function(){this.init();return this.iframe.contentWindow.location=="about:blank"};s.prototype.isLeftClick=function(t){if(!t.which&&t.button!==undefined){if(t.button&1)t.which=1;else if(t.button&4)t.which=2;else if(t.button&2)t.which=3;else t.which=0}return t.which==1||t.which==0&&BX.browser.IsIE()};s.prototype.onTaskLoaded=function(){this.__onLoad()};s.prototype.onTaskAdded=function(t,e,i,a,s){this.tasksList.push(t.id);BX.onCustomEvent(this,"onTaskAdded",[t,e,i,a,s])};s.prototype.onTaskChanged=function(t,e,i,a,s){BX.onCustomEvent(this,"onTaskChanged",[t,e,i,a,s])};s.prototype.onTaskDeleted=function(t){BX.onCustomEvent(this,"onTaskDeleted",[t])};s.prototype.__onKeyPress=function(e){if(!e)e=t.event;if(e.keyCode==27){if(this.lastAction==="view"||confirm(BX.message("TASKS_CONFIRM_CLOSE_CREATE_DIALOG"))){this.close()}}};s.prototype.__indexOf=function(t,e){for(var i=0,a=e.length;i<a;i++){if(t==e[i]){return i}}return-1};s.prototype.__onMouseMove=function(t){if(!t)t=this.iframe.contentWindow.event;var e=this.iframe.contentDocument?this.iframe.contentDocument:this.iframe.contentWindow.document;if(e&&e.body){e.body.onbeforeunload=BX.proxy(this.__onUnload,this);if(this.iframe.contentDocument)this.iframe.contentDocument.body.onbeforeunload=BX.proxy(this.__onBeforeUnload,this);e.body.onunload=BX.proxy(this.__onUnload,this);var i=t.target||t.srcElement;if(i){eTargetA=false;if(i&&i.tagName=="SPAN"){var a=BX.findParent(i);if(a!==null&&a.tagName=="A")eTargetA=a}else eTargetA=i;if(eTargetA.tagName=="A"&&eTargetA.href){if(eTargetA.href.substr(0,11)=="javascript:"){e.body.onbeforeunload=null;e.body.onunload=null}else if(eTargetA.href.indexOf("IFRAME=Y")==-1&&eTargetA.href.indexOf("/show_file.php?fid=")==-1&&eTargetA.target!=="_blank"){eTargetA.target="_top"}}}}};s.prototype.__onLoad=function(){if(!this.isEmpty()){var a=this.iframe.contentDocument?this.iframe.contentDocument:this.iframe.contentWindow.document;if(a&&a.body){if(BX("tasks-crazy-heavy-cpu-usage-item"))BX("tasks-crazy-heavy-cpu-usage-item").className="tasks-popup-main-block-wrap";this.loading=false;a.body.onmousemove=BX.proxy(this.__onMouseMove,this);if(!a.getElementById("task-reminder-link")){t.top.location=a.location.href.replace("?IFRAME=Y","").replace("&IFRAME=Y","").replace("&CALLBACK=CHANGED","").replace("&CALLBACK=ADDED","")}i=this.iframe.contentWindow.location.href;BX.bind(a,"keyup",BX.proxy(this.__onKeyPress,this));this.iframe.style.height=a.getElementById("tasks-content-outer").offsetHeight+"px";this.iframe.style.visibility="visible";this.iframe.contentWindow.focus();this.__onWindowResize()}if(e)clearInterval(e);e=setInterval(BX.proxy(this.__onContentResize,this),300)}};s.prototype.__onBeforeUnload=function(t){};s.prototype.__onUnload=function(i){if(!i)i=t.event;if(!this.loading){this.loading=true;this.iframe.style.visibility="hidden";clearInterval(e)}};s.prototype.__onContentResize=function(){if(this.isOpened()){var t=this.iframe.contentDocument?this.iframe.contentDocument:this.iframe.contentWindow.document;if(t&&t.body){var e=t.getElementById("tasks-content-outer");if(e){var i=this.__getWindowScrollHeight(t);var s=BX.GetWindowInnerSize(t);var n=0;if(i>s.innerHeight)n=i-1;else n=e.offsetHeight;var r=this.iframe.contentWindow?this.iframe.contentWindow.location:"";if(r.toString)r=r.toString();if(n!=a||this.prevIframeSrc!=r){a=n;this.prevIframeSrc=r;this.iframe.style.height=n+"px";this.__onWindowResize()}}}}};s.prototype.__getWindowScrollHeight=function(t){var e;if(!t)t=document;if(t.compatMode&&t.compatMode=="CSS1Compat"&&!BX.browser.IsSafari()){e=t.documentElement.scrollHeight}else{if(t.body.scrollHeight>t.body.offsetHeight)e=t.body.scrollHeight;else e=t.body.offsetHeight}return e};s.prototype.__onWindowResize=function(){var t=BX.GetWindowInnerSize();this.overlay.style.height=t.innerHeight+"px";this.overlay.style.width=t.innerWidth+"px";var e=BX.GetWindowScrollPos();this.overlay.style.top=e.scrollTop+"px";if(BX.browser.IsIE()&&!BX.browser.IsIE9()){this.table.style.width=t.innerWidth-20+"px"}this.overlay.firstChild.style.height=Math.max(this.iframe.offsetHeight+this.topBottomMargin*2+31,this.overlay.clientHeight)+"px";this.overlay.firstChild.style.width=Math.max(1024,this.overlay.clientWidth)+"px";this.prevTaskArea.style.width=Math.max(0,Math.max(1024,this.overlay.clientWidth)/2)+"px";this.nextTaskArea.style.width=this.prevTaskArea.style.width;this.__adjustControls()};s.prototype.__adjustControls=function(){if(this.lastAction!="view"||(!this.currentList||this.currentList.length<=1||this.__indexOf(this.currentTaskId,this.currentList)==-1)&&(this.tasksList.length<=1||this.__indexOf(this.currentTaskId,this.tasksList)==-1)){this.nextTaskLink.style.display=this.prevTaskLink.style.display="none"}else{if(!BX.browser.IsDoctype()&&BX.browser.IsIE()){this.nextTaskLink.style.height=this.prevTaskLink.style.height=document.documentElement.offsetHeight+"px";this.prevTaskLink.style.width=this.prevTaskLink.parentNode.clientWidth-1+"px";this.nextTaskLink.style.width=this.nextTaskLink.parentNode.clientWidth-1+"px"}else{this.nextTaskLink.style.height=this.prevTaskLink.style.height=document.documentElement.clientHeight+"px";this.prevTaskLink.style.width=this.prevTaskLink.parentNode.clientWidth+"px";this.nextTaskLink.style.width=this.nextTaskLink.parentNode.clientWidth+"px"}this.prevTaskLink.firstChild.style.left=this.prevTaskLink.parentNode.clientWidth*4/10+"px";this.nextTaskLink.firstChild.style.right=this.nextTaskLink.parentNode.clientWidth*4/10+"px";this.nextTaskLink.style.display=this.prevTaskLink.style.display=""}this.closeLink.style.width=this.closeLink.parentNode.clientWidth+"px"}})(window);(function(){if(BX.TasksTimerManager)return;BX.TasksTimerManager={popup:null,onTimeManDataRecievedEventDetected:false};BX.TasksTimerManager.reLoadInitTimerDataFromServer=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};BX.TasksTimerManager.start=function(t){BX.CJSTask.batchOperations([{operation:"CTaskTimerManager::getLastTimer()"}],{callbackOnSuccess:function(t){return function(e){if(e.rawReply.data[0].returnValue&&e.rawReply.data[0].returnValue.TASK_ID>0&&e.rawReply.data[0].returnValue.TIMER_STARTED_AT>0&&t!=e.rawReply.data[0].returnValue.TASK_ID){BX.CJSTask.batchOperations([{operation:"CTaskItem::getTaskData()",taskData:{ID:e.rawReply.data[0].returnValue.TASK_ID}}],{callbackOnSuccess:function(t){return function(e){if(e.rawReply.data[0].returnValue.ID&&t!=e.rawReply.data[0].returnValue.ID){BX.TasksTimerManager.__showConfirmPopup(e.rawReply.data[0].returnValue.ID,e.rawReply.data[0].returnValue.TITLE,function(t){return function(e){if(e)BX.TasksTimerManager.__doStart(t)}}(t))}}}(t),callbackOnFailure:function(t){return function(e){BX.TasksTimerManager.__doStart(t)}}(t)},true)}else BX.TasksTimerManager.__doStart(t)}}(t)},true)};BX.TasksTimerManager.stop=function(t){var e=new BX.CJSTask.TimerManager(t);e.stop({callbackOnSuccess:function(t){if(t.status==="success"){BX.onCustomEvent(window,"onTaskTimerChange",[{module:"tasks",action:"stop_timer",taskId:t.rawReply.data[0].requestedTaskId,taskData:t.rawReply.data[1].returnValue,timerData:t.rawReply.data[2].returnValue}])}}})};BX.TasksTimerManager.__doStart=function(t){var e=new BX.CJSTask.TimerManager(t);e.start({callbackOnSuccess:function(t){if(t.status==="success"){BX.onCustomEvent(window,"onTaskTimerChange",[{module:"tasks",action:"start_timer",taskId:t.rawReply.data[0].requestedTaskId,taskData:t.rawReply.data[1].returnValue,timerData:t.rawReply.data[2].returnValue}])}}})};BX.TasksTimerManager.__showConfirmPopup=function(t,e,i){if(this.popup){this.popup.close();this.popup.destroy()}var a=BX.message("TASKS_TASK_CONFIRM_START_TIMER");a=a.replace("{{TITLE}}",BX.util.htmlspecialchars(e));var s=BX.create("span",{html:BX.message("TASKS_TASK_CONFIRM_START_TIMER_TITLE")});BX.Tasks.confirm(a,BX.delegate(function(t){i(t)},this),{title:s})};BX.TasksTimerManager.refreshDaemon=new function(){this.data=null;this.onTick=function(){if(this.data!==null){var t=Math.round((new Date).getTime()/1e3);this.data.TIMER.RUN_TIME=t-this.data.TIMER.TIMER_STARTED_AT-this.data.UNIX_TIMESTAMP_DELTA;BX.onCustomEvent(window,"onTaskTimerChange",[{action:"refresh_daemon_event",taskId:this.data.TIMER.TASK_ID,data:this.data}])}};BX.ready(function(t){return function(){BX.CJSTask.setTimerCallback("tasks_timer_refresh_daemon_event",function(t){return function(){t.onTick()}}(t),1024)}}(this));this.catchTimerChange=function(t){if(t.module!=="tasks")return;if(t.action==="refresh_daemon_event"){return}else if(t.action==="stop_timer"){this.data=null;BX.TasksTimerManager.reLoadInitTimerDataFromServer()}else if(t.action==="start_timer"){if(!(t.timerData&&t.timerData.USER_ID)||t.timerData.TASK_ID!=t.taskData.ID){this.data=null;return}if(t.timerData.TIMER_STARTED_AT==0){this.data=null;return}var e=0;var i=Math.round((new Date).getTime()/1e3);var a=parseInt(t.timerData.RUN_TIME);var s=parseInt(t.taskData.TIME_SPENT_IN_LOGS);var n=parseInt(t.timerData.TIMER_STARTED_AT);if(isNaN(a))a=0;if(isNaN(s))s=0;if(n>0)e=i-n-a;this.data={TIMER:{TASK_ID:parseInt(t.timerData.TASK_ID),USER_ID:parseInt(t.timerData.USER_ID),TIMER_STARTED_AT:n,RUN_TIME:a},TASK:{ID:t.taskData.ID,TITLE:t.taskData.TITLE,TIME_SPENT_IN_LOGS:s,TIME_ESTIMATE:parseInt(t.taskData.TIME_ESTIMATE),ALLOW_TIME_TRACKING:t.taskData.ALLOW_TIME_TRACKING},UNIX_TIMESTAMP_DELTA:e};BX.TasksTimerManager.reLoadInitTimerDataFromServer()}else if(t.action==="init_timer_data"){if(!(t.data.TIMER&&t.data.TIMER.USER_ID)||t.data.TIMER.TASK_ID!=t.data.TASK.ID){this.data=null;return}if(t.data.TIMER.TIMER_STARTED_AT==0){this.data=null;return}var e=0;var i=Math.round((new Date).getTime()/1e3);var a=parseInt(t.data.TIMER.RUN_TIME);var s=parseInt(t.data.TASK.TIME_SPENT_IN_LOGS);var n=parseInt(t.data.TIMER.TIMER_STARTED_AT);if(isNaN(a))a=0;if(isNaN(s))s=0;if(n>0)e=i-n-a;this.data={TIMER:{TASK_ID:parseInt(t.data.TIMER.TASK_ID),USER_ID:parseInt(t.data.TIMER.USER_ID),TIMER_STARTED_AT:n,RUN_TIME:a},TASK:{ID:t.data.TASK.ID,TITLE:t.data.TASK.TITLE,TIME_SPENT_IN_LOGS:s,TIME_ESTIMATE:parseInt(t.data.TASK.TIME_ESTIMATE),ALLOW_TIME_TRACKING:t.data.TASK.ALLOW_TIME_TRACKING},UNIX_TIMESTAMP_DELTA:e}}};BX.addCustomEvent(window,"onTaskTimerChange",function(t){return function(e){t.catchTimerChange(e)}}(this))};BX.TasksTimerManager.onDataRecieved=function(t){var e=0;var i={TIMER:false,TASK:false};if(!t)return;if(t.TASKS_TIMER){if(parseInt(t.TASKS_TIMER.TIMER_STARTED_AT)>0)e=Math.round((new Date).getTime()/1e3)-parseInt(t.TASKS_TIMER.TIMER_STARTED_AT);if(e<0)e=0;i.TIMER={TASK_ID:t.TASKS_TIMER.TASK_ID,USER_ID:t.TASKS_TIMER.USER_ID,TIMER_STARTED_AT:t.TASKS_TIMER.TIMER_STARTED_AT,RUN_TIME:e}}if(t.TASK_ON_TIMER){i.TASK={ID:t.TASK_ON_TIMER.ID,TITLE:t.TASK_ON_TIMER.TITLE,STATUS:t.TASK_ON_TIMER.STATUS,TIME_SPENT_IN_LOGS:t.TASK_ON_TIMER.TIME_SPENT_IN_LOGS,TIME_ESTIMATE:t.TASK_ON_TIMER.TIME_ESTIMATE,ALLOW_TIME_TRACKING:t.TASK_ON_TIMER.ALLOW_TIME_TRACKING}}BX.onCustomEvent(window,"onTaskTimerChange",[{action:"init_timer_data",module:"tasks",data:i}])};BX.addCustomEvent(window,"onTimeManDataRecieved",function(t){BX.TasksTimerManager.onTimeManDataRecievedEventDetected=true;if(t.PLANNER)BX.TasksTimerManager.onDataRecieved(t.PLANNER)});BX.addCustomEvent(window,"onPlannerDataRecieved",function(t,e){if(BX.TasksTimerManager.onTimeManDataRecievedEventDetected===false)BX.TasksTimerManager.onDataRecieved(e)})})(); //# sourceMappingURL=task-iframe-popup.map.js
/var/www/axolotl/data/www/axolotl.ru/www/bitrix/js/tasks/graph/../task-iframe-popup.min.js