uawdijnntqw1x1x1
IP : 18.221.69.38
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
/
printer.min.js
/
/
(function(){"use strict";BX.namespace("BX.Scheduler");BX.Scheduler.Printer=function(t){this.timeline=t;this.paperSizes={A5:{width:5.8,height:8.3},A4:{width:8.3,height:11.7},Letter:{width:8.5,height:11},Legal:{width:8.5,height:14},A3:{width:11.7,height:16.5}};this.format="A4";this.orientation="portrait";this.border=0;this.dpi=72;this.dateFrom=this.getViewportDateFrom();this.dateTo=this.getViewportDateTo();this.maxPagesToPrint=100;this.printWindow=null;this.fitToPage=false};BX.Scheduler.Printer.prototype={print:function(){var t=this.getTimeline();var e=this.getDateFrom();var i=this.getDateTo();if(e>i){throw new Error(BX.message("SCHEDULER_PRINT_WRONG_DATE_RANGE"))}else if(e<t.getStart()){throw new Error(BX.message("SCHEDULER_PRINT_WRONG_DATE_FROM"))}else if(i>t.getEnd()){throw new Error(BX.message("SCHEDULER_PRINT_WRONG_DATE_TO"))}var r=t.getColumnWidth();var n=t.getTimespanWidth(e,i);var o=n+r;var s=this.getPageWidth();var a=this.getPageHeight();var h=this.getFitToPage()?1:Math.ceil(o/s);var l=this.getFitToPage()?1:Math.ceil(r/s);var g=this.getFitToPage()?1:Math.ceil(t.getScrollHeight()/a);var d=this.getFitToPage()?Math.ceil(o/s):h*g;if(d>this.maxPagesToPrint){var c=BX.message("SCHEDULER_PRINT_TOO_MANY_PAGES");c=BX.type.isNotEmptyString(c)?c.replace("#NUMBER#",d):c;throw new Error(c)}var u=t.getPixelsFromDate(e);var p=this.createPrintWindow();var f=t.getScrollLeft();t.setHeaderViewportWidth(this.getFitToPage()?o:s);for(var m=1;m<=h;m++){t.scrollTo(u);for(var w=1;w<=g;w++){var P=document.createElement("div");P.style.overflow="hidden";P.style.width=s+"px";P.style.height=a+"px";if(this.getBorder()){P.style.border="1px dashed #333";P.style.marginBottom="20px"}var T=document.createElement("div");T.style.cssText="page-break-after:always";var v=t.getRootContainer().cloneNode(true);P.appendChild(v);var y=v.querySelector(".task-gantt-timeline-inner");var D=v.querySelector(".task-gantt-list");v.style.position="relative";v.style.top=-(w-1)*a+"px";v.style.width=s+"px";y.style.left=-u+"px";y.style.position="relative";if(m>l){D.style.display="none"}else{D.style.left=-(m-1)*s+"px";y.parentNode.style.left=-(m-1)*s+"px";v.style.width=s*m+"px"}if(this.getFitToPage()){v.style.width=o+"px";var S=Math.min(s/o,a/t.getScrollHeight());v.style.transform="scale("+S+")";v.style.transformOrigin="0 0"}p.document.body.appendChild(P);p.document.body.appendChild(T)}if(m===l){u+=l*s-r}else if(m>l){u+=s}}t.setHeaderViewportWidth(null);t.setScrollLeft(f);setTimeout(function(){p.print()},1e3)},createPrintWindow:function(){this.printWindow=window.open("","scheduler-print-"+BX.util.getRandomString());var t="";var e=document.head.querySelectorAll("link, style");for(var i=0;i<e.length;i++){var r=e[i];t+=r.outerHTML}t+="<style>"+"html, body { "+"background: #fff !important; "+"height: 100%; "+"-webkit-print-color-adjust: exact; "+"color-adjust: exact;"+"}\n"+"</style>";this.printWindow.document.write("<!DOCTYPE html><html><head>");this.printWindow.document.write(t);this.printWindow.document.write("<title>Print</title>");this.printWindow.document.write("</head><body class='scheduler-print-mode'>");this.printWindow.document.write("</body></html>");this.printWindow.document.close();return this.printWindow},closePrintWindow:function(){if(this.printWindow){this.printWindow.close();this.printWindow=null}},getPrintWindow:function(){return this.printWindow},getViewportDateFrom:function(){var t=this.getTimeline().getScrollLeft();return this.getTimeline().getDateFromPixels(t)},getDateFrom:function(){return this.dateFrom},setDateFrom:function(t){if(BX.type.isDate(t)){this.dateFrom=t}},getViewportDateTo:function(){var t=this.getTimeline().getViewportWidth();var e=this.getTimeline().getScrollLeft();return this.getTimeline().getDateFromPixels(e+t)},getDateTo:function(){return this.dateTo},setDateTo:function(t){if(BX.type.isDate(t)){this.dateTo=t}},getTimeline:function(){return this.timeline},getPaperSizes:function(){return this.paperSizes},getPageSize:function(){return this.getPaperSizes()[this.getFormat()]},getPageWidth:function(){var t=this.getPageSize();return this.getOrientation()==="landscape"?t.height*this.getDPI():t.width*this.getDPI()},getPageHeight:function(){var t=this.getPageSize();return this.getOrientation()==="landscape"?t.width*this.getDPI():t.height*this.getDPI()},getDPI:function(){return this.dpi},setFormat:function(t){if(this.getPaperSizes()[t]){this.format=t}},getFormat:function(){return this.format},getOrientation:function(){return this.orientation},setOrientation:function(t){this.orientation=t},getBorder:function(){return this.border},setBorder:function(t){if(BX.type.isBoolean(t)){this.border=t}},setFitToPage:function(t){if(BX.type.isBoolean(t)){this.fitToPage=t}},getFitToPage:function(){return this.fitToPage}}})(); //# sourceMappingURL=printer.map.js
/var/www/axolotl/data/www/axolotl.ru/www/bitrix/js/tasks/scheduler/printer.min.js