/** * Kendo UI v2019.2.619 (http://www.telerik.com/kendo-ui) * Copyright 2019 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved. * * Kendo UI commercial licenses may be obtained at * http://www.telerik.com/purchase/license-agreement/kendo-ui-complete * If you do not own a commercial license, this file shall be governed by the trial license terms. */ !function(e,define){define("kendo.gantt.list.min",["kendo.dom.min","kendo.touch.min","kendo.draganddrop.min","kendo.columnsorter.min","kendo.datetimepicker.min","kendo.editable.min"],e)}(function(){return function(e){function t(e){var t,i,n=[],r=e.className;for(t=0,i=e.level;t span."+i.icon+":not(."+i.iconHidden+")",function(i){var n=e(this),r=t._modelFromElement(n);r.set("expanded",!r.get("expanded")),i.stopPropagation()})},_domTrees:function(){this.headerTree=new r.Tree(this.header[0]),this.contentTree=new r.Tree(this.content[0])},_columns:function(){var e=this.options.columns,t=function(){this.field="",this.title="",this.editable=!1,this.sortable=!1};this.columns=f(e,function(e){return e=typeof e===k?{field:e,title:b[e]}:e,c(new t,e)})},_layout:function(){var t=this,i=this.options,r=this.element,o=x.styles,a=function(){var r,o=typeof i.rowHeight===k?i.rowHeight:i.rowHeight+"px",a=e(n.format(w,o));return t.content.append(a),r=p(a.find("tr")),a.remove(),r};r.addClass(o.wrapper).append("
").append("
"),this.header=r.find(C+o.gridHeaderWrap),this.content=r.find(C+o.gridContent),i.rowHeight&&(this._rowHeight=a())},_header:function(){var e=this.headerTree,t=o("colgroup",null,this._cols()),i=o("thead",{role:"rowgroup"},[o("tr",{role:"row"},this._ths())]),n=o("table",{style:{minWidth:this.options.listWidth+"px"},role:"grid"},[t,i]);e.render([n])},_render:function(e){var t,i,n,r={style:{minWidth:this.options.listWidth+"px"},tabIndex:0,role:"treegrid"};this._rowHeight&&(r.style.height=e.length*this._rowHeight+"px"),this.levels=[{field:null,value:0}],t=o("colgroup",null,this._cols()),i=o("tbody",{role:"rowgroup"},this._trs(e)),n=o("table",r,[t,i]),this.contentTree.render([n]),this.trigger("render")},_ths:function(){var e,t,i,n,r=this.columns,d=[];for(i=0,n=r.length;i').attr(v).appendTo(t).kendoDateTimePicker({format:i.format})}),this.editable=a.addClass(o.editCell).kendoEditable({fields:{field:d.field,format:d.format,editor:d.editor||i},model:l,clearContainer:!1}).data("kendoEditable"),c&&c.dateCompare&&m(c.dateCompare)&&c.message&&(e("').hide().appendTo(a),a.find("[name="+d.field+"]").attr(n.attr("dateCompare-msg"),c.message)),this.editable.bind("validate",function(e){var t=this.element.find(":kendoFocusable:first").focus();g&&t.focus(),e.preventDefault()}),void(this.trigger("edit",{model:s,cell:a})&&this._closeCell(!0)))},_closeCell:function(e){var t=x.styles,i=this._editableContainer,n=this._modelFromElement(i),r=this._columnFromElement(i),o=r.field,a=i.data("modelCopy"),d={};d[o]=a.get(o),i.empty().removeData("modelCopy").removeClass(t.editCell).append(this._editableContent),this.editable.unbind(),this.editable.destroy(),this.editable=null,this._editableContainer=null,this._editableContent=null,e||("start"===o&&(d.end=new Date(d.start.getTime()+n.duration())),this.trigger("update",{task:n,updateInfo:d}))},_draggable:function(){var t,i=this,r=null,o=!0,a=x.styles,d=n.support.isRtl(this.element),l="tr["+n.attr("level")+" = 0]:last",h={},u=this.options.editable,p=function(){r=null,t=null,o=!0,h={}},f=function(e){for(var t=e;t;){if(r.get("id")===t.get("id")){o=!1;break}t=i.dataSource.taskParent(t)}},m=function(){var i=e(t).height(),r=n.getOffset(t).top;c(t,{beforeLimit:r+.25*i,afterLimit:r+.75*i})},g=function(e){var i,r,o,d,s;t&&(i=e.location,r=a.dropAdd,o="add",d=parseInt(t.attr(n.attr("level")),10),i<=t.beforeLimit?(s=t.prev(),r=a.dropTop,o="insert-before"):i>=t.afterLimit&&(s=t.next(),r=a.dropBottom,o="insert-after"),s&&parseInt(s.attr(n.attr("level")),10)===d&&(r=a.dropMiddle),h.className=r,h.command=o)},v=function(){return i._reorderDraggable.hint.children(C+a.dragStatus).removeClass(a.dropPositions)};u&&u.reorder!==!1&&u.update!==!1&&(this._reorderDraggable=this.content.kendoDraggable({distance:10,holdToDrag:s,group:"listGroup",filter:"tr[data-uid]",ignore:C+a.input,hint:function(t){return e('
').css({width:300,paddingLeft:t.css("paddingLeft"),paddingRight:t.css("paddingRight"),lineHeight:t.height()+"px",paddingTop:t.css("paddingTop"),paddingBottom:t.css("paddingBottom")}).append('')},cursorOffset:{top:-20,left:0},container:this.content,dragstart:function(e){var t=i.editable;return t&&t.reorder!==!1&&t.trigger("validate")?void e.preventDefault():(r=i._modelFromElement(e.currentTarget),this.hint.children(C+a.dragClueText).text(r.get("title")),void(d&&this.hint.addClass(a.rtl)))},drag:function(e){o&&(g(e.y),v().addClass(h.className))},dragend:function(){p()},dragcancel:function(){p()}}).data("kendoDraggable"),this._tableDropArea=this.content.kendoDropTargetArea({distance:0,group:"listGroup",filter:"tr[data-uid]",dragenter:function(e){t=e.dropTarget,f(i._modelFromElement(t)),m(),v().toggleClass(a.dropDenied,!o)},dragleave:function(){o=!0,v()},drop:function(){var e=i._modelFromElement(t),n=e.orderId,a={parentId:e.parentId};if(o){switch(h.command){case"add":a.parentId=e.id;break;case"insert-before":a.orderId=e.parentId===r.parentId&&e.orderId>r.orderId?n-1:n;break;case"insert-after":a.orderId=e.parentId===r.parentId&&e.orderId>r.orderId?n:n+1}i.trigger("update",{task:r,updateInfo:a})}}}).data("kendoDropTargetArea"),this._contentDropArea=this.element.kendoDropTargetArea({distance:0,group:"listGroup",filter:C+a.gridContent,drop:function(){var e=i._modelFromElement(i.content.find(l)),t=e.orderId,n={parentId:null,orderId:null!==r.parentId?t+1:t};i.trigger("update",{task:r,updateInfo:n})}}).data("kendoDropTargetArea"))},_resizable:function(){var t=this,i=x.styles,n=function(n){var r,o,a=e(n.currentTarget),d=t.resizeHandle,s=a.position(),l=s.left,h=u(a),c=a.closest("div"),f=n.clientX+e(window).scrollLeft(),m=t.options.columnResizeHandleWidth;return l+=c.scrollLeft(),d||(d=t.resizeHandle=e('
')),r=a.offset().left+h,(o=f>r-m&&f