js-pkg
Version:
Npm package of Syncfusion.JavaScript.
10 lines • 246 kB
JavaScript
/*!
* filename: ej.kanban.min.js
* version : 15.3.0.33
* Copyright Syncfusion Inc. 2001 - 2017. All rights reserved.
* Use of this code is subject to the terms of our license.
* A copy of the current license can be obtained at any time by e-mailing
* licensing@syncfusion.com. Any infringement will be prosecuted under
* applicable laws.
*/
(function(n){typeof define=="function"&&define.amd?define(["./../common/ej.globalize.min","jquery-validation","jsrender","./../common/ej.core.min","./../common/ej.data.min","./../common/ej.touch.min","./../common/ej.draggable.min","./../common/ej.scroller.min","./ej.button.min","./ej.waitingpopup.min","./ej.datepicker.min","./ej.datetimepicker.min","./ej.dropdownlist.min","./ej.dialog.min","./ej.editor.min","./ej.toolbar.min","./ej.rte.min","./ej.menu.min"],n):n()})(function(){var c=function(){function n(n){this.kanbanObj=null;this.kanbanObj=n}return n.prototype._kbnTimeoutSearch=function(n,t){var i=n.data("ejKanban"),r;r=t.currentTarget;i._searchTout&&(i._searchTout=window.clearInterval(i._searchTout));i._searchTout=window.setInterval(function(){$(".e-kanbanwaitingpopup").removeClass("e-kanbanwaitingpopup").addClass("e-kbnsearchwaitingpopup");n.data("ejWaitingPopup").show();$(".e-kbnsearchwaitingpopup").css({top:"1px",left:"1px"});var u=setTimeout(function(){var f=$(r).find("input").val(),e,o;ej.isNullOrUndefined(f)&&(f=$(r).val());e={itemName:r.title,itemId:r.id,target:r,currentTarget:r,itemIndex:$(r).index(),toolbarData:t,itemText:f};i._trigger("toolbarClick",e);i.KanbanFilter.searchCards(f);i.element.find(".e-searchbar .e-search.e-tooltxt").addClass("e-highliht-kbnsearchbar");$(".e-kbnsearchwaitingpopup").addClass("e-kanbanwaitingpopup").removeClass("e-kbnsearchwaitingpopup").css({top:"0px",left:"0px"});ej.isNullOrUndefined(i.model.fields.swimlaneKey)||(o=(new ej.Query).where(ej.Predicate.or(i.keyPredicates)).select(i.model.fields.swimlaneKey),i._kbnAdaptDdlData=new ej.DataManager(i._currentJsonData).executeLocal(o),i._kbnAdaptDdlData=ej.dataUtil.mergeSort(ej.dataUtil.distinct(i._kbnAdaptDdlData)),i.KanbanAdaptive._adaptiveSwimlaneRefresh());n.data("ejWaitingPopup").hide();clearTimeout(u)},300);i._searchTout=window.clearInterval(i._searchTout)},1e3)},n.prototype._kbnRightSwipe=function(){var n=this.kanbanObj,h=n.element.width(),l=n.element.find(".e-rowcell:visible"),o,r=n.element.find(".e-stackedHeaderCell"),f=0,u,e,i,a=n,t,c,s;if(n._kbnSwipeCount>0){for(n._kbnSwipeCount==1?n._kbnSwipeWidth=0:(i=l.eq(n._kbnSwipeCount-1),i.length==0&&(i=n.element.find(".e-headercell:visible").not(".e-stackedHeaderCell").eq(n._kbnSwipeCount-1)),n._kbnSwipeWidth=n._kbnSwipeWidth-i.offset().left,window.matchMedia("(max-width: 600px)").matches||window.matchMedia("(max-device-width: 800px)").matches?o=(h-i.width())/2:(window.matchMedia("(max-width: 801px)").matches||window.matchMedia("(max-device-width: 1200px)").matches)&&(o=(h-i.width())/8),n._kbnSwipeWidth=n._kbnSwipeWidth+o),t=0;t<r.length;t++)if(c=n.headerContent.find("col:eq(0)").width(),u=f,e=n._kbnSwipeCount-1,f=f+parseInt($(r).eq(t).attr("colspan")),e>=u&&e<f)if(u==n._kbnSwipeCount-1){n.element.find(".e-adapt-stheader").removeClass("e-adapt-stheader");$(r).eq(t).find("div").css({position:"",left:""});s=$(r).eq(t).prev(".e-stackedHeaderCell");s.length>0&&s.addClass("e-adapt-stheader");break}else if(u<n._kbnSwipeCount-1){$(r).eq(t).find("div").css({position:"relative",left:c*(n._kbnSwipeCount-1-u)+8*(e-1)});break}n._kbnTransitionEnd=!1;n._kbnSwipeCount>1&&(n._kbnSwipeWidth=n._kbnSwipeWidth+n.element.offset().left);n.headerContent.find("table").css({transform:"translate3d("+n._kbnSwipeWidth+"px, 0px, 0px)","transition-duration":""}).one("webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend",function(){a._kbnTransitionEnd=!0});n.kanbanContent.find("table").eq(0).css({transform:"translate3d("+n._kbnSwipeWidth+"px, 0px, 0px)","transition-duration":""});--n._kbnSwipeCount}},n.prototype._kbnLeftSwipe=function(){var n=this.kanbanObj,e=n.element.width(),l=n.element.find(".e-rowcell:visible"),o,r=n.element.find(".e-stackedHeaderCell"),s=0,f,u,i,a=n,c,t,h;if((window.matchMedia("(max-width: 600px)").matches||window.matchMedia("((max-device-width: 800px)").matches)&&n._kbnSwipeCount<n.model.columns.length-1||(window.matchMedia("(max-width: 801px)").matches||window.matchMedia("(max-device-width: 1200px)").matches)&&n._kbnSwipeCount<n.model.columns.length-2){for(i=l.eq(n._kbnSwipeCount+1),i.length==0&&(i=n.element.find(".e-headercell:visible").not(".e-stackedHeaderCell").eq(n._kbnSwipeCount+1)),n._kbnSwipeWidth=n._kbnSwipeWidth-i.offset().left,window.matchMedia("(max-width: 600px)").matches||window.matchMedia("(max-device-width: 800px)").matches?o=n._kbnSwipeCount==n.model.columns.length-2?e-i.width():(e-i.width())/2:(window.matchMedia("(max-width: 801px)").matches||window.matchMedia("(max-device-width: 1200px)").matches)&&(n._kbnSwipeCount==n.model.columns.length-3?(c=parseInt(n.contentTable.css("border-spacing").split("px")[0]),o=e-(i.width()+c)*2):o=(e-i.width())/8),n._kbnSwipeWidth=n._kbnSwipeWidth+o,t=0;t<r.length;t++)if(h=n.headerContent.find("col:eq(0)").width(),f=s,u=n._kbnSwipeCount+1,s=s+parseInt($(r).eq(t).attr("colspan")),u>f&&u<s)if(t==0){$(r).eq(t).addClass("e-adapt-stheader");$(r).eq(t).find("div").css({position:"relative",left:h*u+8*(u-1)});break}else if(f==n._kbnSwipeCount+1){n.element.find(".e-adapt-stheader").removeClass("e-adapt-stheader");$(r).eq(t-1).find("div").css({position:"",left:""});$(r).eq(t).addClass("e-adapt-stheader");break}else if(f<n._kbnSwipeCount+1){$(r).eq(t).find("div").css({position:"relative",left:h*(n._kbnSwipeCount+1-f)+8*(u-1)});break}n._kbnTransitionEnd=!1;n._kbnSwipeWidth=n._kbnSwipeWidth+n.element.offset().left;n.headerContent.find("table").css({transform:"translate3d("+n._kbnSwipeWidth+"px, 0px, 0px)","transition-duration":""}).one("webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend",function(){a._kbnTransitionEnd=!0});n.kanbanContent.find("table").eq(0).css({transform:"translate3d("+n._kbnSwipeWidth+"px, 0px, 0px)","transition-duration":""});++n._kbnSwipeCount}},n.prototype._clearAdaptSearch=function(n){var u=this.kanbanObj,t,r=u.element,i=r.data("ejKanban");ej.isNullOrUndefined(n)||(t=$(n.target));ej.isNullOrUndefined(t)||t.hide();r.data("ejWaitingPopup").show();setTimeout(function(){var e,f,o;ej.isNullOrUndefined(t)||(f=t.prev(".e-input"));(ej.isNullOrUndefined(f)||f.length==0)&&(f=ej.isNullOrUndefined(t)?r.find(".e-kanbantoolbar .e-searchdiv > .e-input"):t.next(".e-search").find("input"));e=ej.isNullOrUndefined(t)?{itemText:f.val()}:{target:t,currentTarget:t,itemIndex:t.index(),toolbarData:n,itemText:f.val()};i._trigger("toolbarClick",e);u.KanbanFilter.searchCards("");u.element.find(".e-searchbar .e-search.e-tooltxt").removeClass("e-highliht-kbnsearchbar");ej.isNullOrUndefined(i.model.fields.swimlaneKey)||(o=(new ej.Query).where(ej.Predicate.or(i.keyPredicates)).select(i.model.fields.swimlaneKey),i._kbnAdaptDdlData=new ej.DataManager(i._currentJsonData).executeLocal(o),i._kbnAdaptDdlData=ej.dataUtil.mergeSort(ej.dataUtil.distinct(i._kbnAdaptDdlData)),i.KanbanAdaptive._adaptiveSwimlaneRefresh());r.data("ejWaitingPopup").hide()},300)},n.prototype._adaptiveKbnClick=function(n){var t=this.kanbanObj,i=$(n.target),r,s,e=t.element.find(".e-swimlane-window"),y,rt,ut,p,o,w,ft,c,l,h,et,u,g,nt,b,k,tt,a,v,ot,d,it,f;if(t.element.hasClass("e-responsive")){if(r=$(".e-kanbanfilter-window"),s=t.element.find(".e-kanbanfilter-icon"),i.hasClass("e-searchitem")&&(y=i.parents(".e-searchbar"),i.prev().show(),i.prev().children(":first").removeAttr("style"),y.siblings().hide(),y.find(".e-adapt-search").length==0&&(rt=ej.buildTag("div.e-icon e-adapt-search e-searchfind","",{}),ut=ej.buildTag("div.e-icon e-adapt-cancel e-cancel","",{}),i.siblings(".e-searchdiv").append(ut).prepend(rt)),i.parents(".e-search").css({border:""}),i.parents("body").addClass("e-kbnwindow-modal"),i.parents(".e-kanbantoolbar").addClass("e-adaptive-search"),y.find(".e-adapt-cancel").show(),i.hide(),n.type==="tap"&&n.preventDefault()),i.hasClass("e-adapt-cancel")&&(this._clearAdaptSearch(n),i.parents(".e-searchbar").siblings(".e-print,.e-kanbanfilter-icon,.e-customtoolbar").show(),p=i.parents(".e-search"),p.find(".e-searchdiv").hide(),p.find(".e-searchitem").show(),p.css({border:"none"}),i.parents("body").removeClass("e-kbnwindow-modal"),i.parents(".e-kanbantoolbar").removeClass("e-adaptive-search")),(i.hasClass("e-filter-done")||i.hasClass("e-clearfilter"))&&(h=i.text(),r.parents("body").removeClass("e-kbnwindow-modal"),i.hasClass("e-clearfilter")&&(h=i.val()),o={target:i,currentTarget:i,itemIndex:i.index(),toolbarData:n,itemText:h},t._trigger("toolbarClick",o),i.hasClass("e-clearfilter")?(t._kbnFilterCollection=[],t._kbnFilterObject=[],t._filterCollection=[],t._kbnAdaptFilterObject=[],i.hide(),s.removeClass("e-kbnclearfl-icon"),r.find(".e-kbnfilter-check").parents('[aria-checked~="true"]').click()):(s.hasClass("e-kbnclearfl-icon")||s.addClass("e-kbnclearfl-icon"),t._kbnFilterObject.length==0&&s.hasClass("e-kbnclearfl-icon")&&s.removeClass("e-kbnclearfl-icon")),o={},o.requestType=ej.Kanban.Actions.Filtering,o.currentFilterObject=[],o.filterCollection=t._kbnFilterCollection,o.currentFilterObject=t._kbnFilterObject,w=t._dataSource()instanceof ej.DataManager?t._dataSource().dataSource.json:t._dataSource(),w.length==0&&t._currentJsonData.length>0&&(w=t._currentJsonData),t._initialData=w,t.KanbanCommon._processBindings(o),ej.isNullOrUndefined(t.model.fields.swimlaneKey)||(t._currentJsonData.length==0?(t.element.find(".e-swimlane-ddl,.e-swimlane-window").remove(),t.kanbanContent.data("ejScroller").destroy()):(ft=(new ej.Query).where(ej.Predicate.or(t.keyPredicates)).select(t.model.fields.swimlaneKey),t._kbnAdaptDdlData=new ej.DataManager(t._currentJsonData).executeLocal(ft),t._kbnAdaptDdlData=ej.dataUtil.mergeSort(ej.dataUtil.distinct(t._kbnAdaptDdlData)),t.KanbanAdaptive._adaptiveSwimlaneRefresh())),r.hide(),t.kanbanWindowResize(),n.type==="tap"&&n.preventDefault()),i.hasClass("e-filterback-icon")){for(c=[],u=0;u<t.model.filterSettings.length;u++)c.push(t.model.filterSettings[u].text);for(u=0;u<t._kbnAdaptFilterObject.length;u++)h=t._kbnAdaptFilterObject[u].text,et=$.inArray(h,c),c.splice(et,1),l=r.find("label.e-filterlabel:contains("+h+")").prev(),l.attr("aria-checked")=="false"&&l.click();for(u=0;u<c.length;u++)l=r.find("label.e-filterlabel:contains("+c[u]+")").prev(),l.attr("aria-checked")=="true"&&l.click();r.hide();n.type==="tap"&&n.preventDefault()}i.hasClass("e-kanbanfilter-icon")&&(g=r.find(".e-clearfilter"),k=0,tt=r.find(".e-filter-scrollcontent"),e.is(":visible")&&e.hide(),r.show(),i.hasClass("e-kbnclearfl-icon")?g.show():g.hide(),nt=r.find(".e-kbnfilterwindow-head").height(),b=r.find(".e-clearfilter"),b.is(":visible")&&(tt.ejScroller({height:0,buttonSize:0,scrollerSize:9,enableTouchScroll:!0,autoHide:!0}),k=b.outerHeight()+parseInt(b.css("bottom"))),$(window).height()-k<r.find(".e-filter-content").height()+nt&&tt.ejScroller({height:$(window).height()-(nt+k+10),buttonSize:0,scrollerSize:9,enableTouchScroll:!0,autoHide:!0}),r.parents("body").addClass("e-kbnwindow-modal"),n.type==="tap"&&n.preventDefault());(i.attr("id")==this._id+"_Cancel"||i.parent().attr("id")==this._id+"_closebutton")&&t.KanbanEdit.cancelEdit();i.attr("id")==t._id+"_Save"&&t.KanbanEdit.endEdit()}a=t.element.find(".e-slwindow-scrollcontent");(i.hasClass("e-swimlane-item")||i.parents(".e-swimlane-item").length>0)&&(v=i,i.parents(".e-swimlane-item").length>0&&(v=i.parents(".e-swimlane-item")),v.parents(".e-swimlane-ul").find(".e-selected-item").removeClass("e-selected-item"),v.addClass("e-selected-item"),e=$("#"+t._id+"_slWindow"),t._kbnAdaptDdlIndex=t._freezeSlOrder=e.find(".e-swimlane-item").index(v),f=$("#"+t._id+"_toolbarItems"),f.find(".e-kbnhide").removeClass("e-kbnhide"),f.removeClass("e-kbntoolbar-body").prependTo(t.element),e.removeClass("e-kbnslwindow-body").appendTo(t.element).hide(),t.element.find(".e-swimlane-text").text(t._kbnAdaptDdlData[t._kbnAdaptDdlIndex]),ot=t.element[0].getElementsByClassName("e-columnrow"),t.kanbanWindowResize(),d=t.kanbanContent.data("ejScroller"),d.scrollY(0,!0),d.scrollY($(ot[t._kbnAdaptDdlIndex]).offset().top-t.kanbanContent.offset().top,!0),t._freezeScrollTop=d.scrollTop(),a.hasClass("e-scroller")&&a.data("ejScroller").refresh());(i.hasClass("e-swimlane-ddl")||i.parents(".e-swimlane-ddl").length>0)&&(it=36,e.is(":hidden")?(t.element.parents("body").addClass("e-kbnwindow-modal"),f=t.element.find(".e-kanbantoolbar"),f.children().not(".e-swimlane-ddl").addClass("e-kbnhide"),f.addClass("e-kbntoolbar-body").appendTo("body"),t.element.find(".e-swimlane-window").addClass("e-kbnslwindow-body").appendTo("body"),e.show(),$(window).height()<it+a.height()&&a.ejScroller({height:$(window).height()-it,buttonSize:0,scrollerSize:9,enableTouchScroll:!0,autoHide:!0})):(e.hide(),f=$("#"+t._id+"_toolbarItems"),f.find(".e-kbnhide").removeClass("e-kbnhide"),f.removeClass("e-kbntoolbar-body").prependTo(t.element),$("#"+t._id+"_slWindow").removeClass("e-kbnslwindow-body").appendTo(t.element).hide(),t.element.parents("body").removeClass("e-kbnwindow-modal")))},n.prototype._kbnFilterChange=function(n){var t=this,s=$(n.event.target).closest(".e-kanban"),l=s.data("ejKanban"),e=$(n.event.target).parents(".e-chkbox-wrap").next().text(),c,o,u,i,f,r,h;if(!t._kbnAutoFilterCheck){for(e==""&&(e=$(n.event.target).next().text()),c=s.find(".e-kanbanfilter-icon"),o=$(".e-kanbanfilter-window .e-filter-done"),o.is(":hidden")&&o.show(),i=0;i<t.model.filterSettings.length;i++)if(t.model.filterSettings[i].text==e)break;if(u=i==t.model.filterSettings.length?null:t.model.filterSettings[i],n.isChecked)for(t._kbnFilterObject.push(u),r=0;r<t.model.filterSettings.length;r++)t.model.filterSettings[r].text==u.text&&(h=t.model.filterSettings[r].query.queries[0].e,t._kbnFilterCollection.push(h));else f=$.inArray(u,t._kbnFilterObject),f>=0&&(t._kbnFilterObject.splice(f,1),t._kbnFilterCollection.splice(f,1))}},n.prototype._kbnAdaptSwimlaneData=function(){var n=this.kanbanObj,r=n,t,i;n.model.isResponsive&&(ej.isNullOrUndefined(n.model.minWidth)||n.model.minWidth==0)&&!ej.isNullOrUndefined(n.model.fields.swimlaneKey)&&(t=new ej.Query,ej.isNullOrUndefined(n.model.keyField)||n._addColumnFilters(),n.model.query._fromTable!=""&&t.from(n.model.query._fromTable),n._dataSource()instanceof ej.DataManager&&t.queries.length&&!n._dataManager.dataSource.offline?(i=n._dataSource().executeQuery(t),i.done(ej.proxy(function(i){this._kbnAdaptDdlData=new ej.DataManager(i.result);t=(new ej.Query).where(ej.Predicate.or(n.keyPredicates)).select(n.model.fields.swimlaneKey);n._kbnAdaptDdlData=n._kbnAdaptDdlData.executeLocal(t);n._kbnAdaptDdlData=ej.dataUtil.mergeSort(ej.dataUtil.distinct(n._kbnAdaptDdlData))}))):(t=(new ej.Query).where(ej.Predicate.or(n.keyPredicates)).select(n.model.fields.swimlaneKey),n._dataManager.dataSource.offline&&n._dataManager.dataSource.json.length&&(n._kbnAdaptDdlData=n._dataManager.executeLocal(t)),n._kbnAdaptDdlData=ej.dataUtil.mergeSort(ej.dataUtil.distinct(n._kbnAdaptDdlData))))},n.prototype._setResponsiveHeightWidth=function(){var n=this.kanbanObj;if(typeof n.model.scrollSettings.width=="string"?n._originalScrollWidth=n.element.width():n.model.scrollSettings.width>0&&(n._originalScrollWidth=n.model.scrollSettings.width),typeof n.model.scrollSettings.height=="string"?n._originalScrollHeight=n.getContent().height():n.model.scrollSettings.height>0&&(n._originalScrollHeight=n.model.scrollSettings.height),n.model.isResponsive){$(window).on("resize",$.proxy(n.kanbanWindowResize,n));n.kanbanWindowResize()}},n.prototype._renderResponsiveKanban=function(n,t,i,r,u){var f=this.kanbanObj,e;n?(f.model.scrollSettings.width=ej.isNullOrUndefined(f._originalScrollWidth)?Math.min(i,u):Math.min(f._originalScrollWidth,Math.min(i,u)),e=Math.min(r,t),e=ej.isNullOrUndefined(f._originalScrollHeight)?e:Math.min(f._originalScrollHeight,r),f.model.scrollSettings.height=e,f._originalScrollWidth<u&&(f.model.scrollSettings.width=Math.min(i,u)),f.KanbanScroll&&f.KanbanScroll._renderScroller()):(f.model.scrollSettings.width="100%",ej.isNullOrUndefined(f._originalScrollWidth)||(f.model.scrollSettings.width=Math.min(f._originalScrollWidth,i)),e=f.element.outerHeight(),ej.isNullOrUndefined(f._originalScrollHeight)||(e=Math.min(f._originalScrollHeight,r)),f.model.scrollSettings.height=e,f.KanbanScroll&&f.KanbanScroll._renderScroller())},n.prototype._columnTimeoutAdapt=function(){var t=this.kanbanObj,i,e,o,f,n,s,r,u;for(Math.floor(t.element.width())>$(window).width()&&(t.element.width($(window).width()-t.element.offset().left-5),t.headerContent.removeClass("e-scrollcss"),t.headerContent.find(".e-hscrollcss").removeClass("e-hscrollcss")),n=t,window.matchMedia("(max-width: 480px)").matches?i=t.element.width()*(80/100):window.matchMedia("(max-width: 600px)").matches||window.matchMedia("(max-device-width: 800px)").matches?i=t.element.width()*(60/100):(window.matchMedia("(max-width: 801px)").matches||window.matchMedia("(max-device-width: 1200px)").matches)&&(i=t.element.width()*(43/100)),e=t.element.find(".e-headercell"),o=t.element.find(".e-columnrow .e-rowcell"),t.kanbanContent.find("table:eq(0) > colgroup col").width(i),o.width(i),t.headerContent.find("table > colgroup col").width(i),e.not(".e-stackedHeaderCell").width(i),f=t.element.find(".e-stackedHeaderCell"),u=0;u<f.length;u++)$(f).eq(u).width(parseInt($(f).eq(u).attr("colspan"))*i);s=setTimeout(function(){var u,f,h;n._kbnSwipeCount>0&&(r=o.eq(n._kbnSwipeCount),r.length==0&&(r=e.not(".e-stackedHeaderCell").eq(t._kbnSwipeCount)),n._kbnSwipeWidth=n._kbnSwipeWidth-r.offset().left,u=n.element.width(),f=r.width(),window.matchMedia("(max-width: 600px)").matches||window.matchMedia("(max-device-width: 800px)").matches?i=n._kbnSwipeCount==n.model.columns.length-1?n.element.hasClass("e-swimlane-responsive")?u-(f+18):u-f:(u-f)/2:(window.matchMedia("(max-width: 801px)").matches||window.matchMedia("(max-device-width: 1200px)").matches)&&(n._kbnSwipeCount==n.model.columns.length-3?(h=parseInt(n.contentTable.css("border-spacing").split("px")[0]),eqWidth=u-(f+h)*2):i=(u-f)/8),n._kbnSwipeWidth=n._kbnSwipeWidth+i+t.element.offset().left,n.headerContent.find("table").css({transform:"translate3d("+n._kbnSwipeWidth+"px, 0px, 0px)","transition-duration":"0ms"}),n.kanbanContent.find("table").eq(0).css({transform:"translate3d("+n._kbnSwipeWidth+"px, 0px, 0px)","transition-duration":"0ms"}),clearTimeout(s))},2500)},n.prototype._addSwimlaneName=function(){for(var r,i,n,u,f=this.kanbanObj.element.find(".e-columnrow"),t=0;t<f.length;t++)for(r=f.eq(t).find(".e-rowcell"),i=0;i<r.length;i++)n=r.eq(i).find(".e-limits"),n.length==0&&(n=ej.buildTag("div.e-limits","",{},{})),n.find(".e-swimlane-name").length==0?(n.append(ej.buildTag("div.e-swimlane-name",this.kanbanObj._kbnAdaptDdlData[t],{},{})),r.eq(i).prepend(n)):(u=n.find(".e-swimlane-name"),u.text(this.kanbanObj._kbnAdaptDdlData[t]),u.show(),u.parents(".e-limits").show())},n.prototype._kbnAdaptSwimlaneDdl=function(){var n=this.kanbanObj,r=ej.buildTag("div.e-swimlane-ddl","",{}),o=n.model.fields.swimlaneKey,u,t,f,e=n.element.find(".e-kanbantoolbar"),i;for(n.element.addClass("e-swimlane-responsive"),ej.buildTag("div.e-swimlane-text",n._kbnAdaptDdlData[0]).appendTo(r),ej.buildTag("div.e-swimlane-arrow").appendTo(r),u=ej.buildTag("div#"+n._id+"_slWindow.e-swimlane-window","",{}),t=ej.buildTag("ul.e-swimlane-ul ","",{}),i=0;i<n._kbnAdaptDdlData.length;i++)ej.buildTag("li.e-swimlane-item ","<div>"+n._kbnAdaptDdlData[i]+"<\/div>",{}).appendTo(t);t.find(".e-swimlane-item:eq(0)").addClass("e-selected-item");this._addSwimlaneName();f=ej.buildTag("div#"+n._id+"_slScrollContent","<div><\/div>").addClass("e-slwindow-scrollcontent");f.children().append(t);f.appendTo(u);u.appendTo(n.element).hide();e.length==0&&(n._renderToolBar().insertBefore(n.element.find(".e-kanbanheader").first()),e=n.element.find(".e-kanbantoolbar").css("padding","0px").addClass("e-sladapt-bar"));e.prepend(r);n.element.find(".e-swimlanerow").hide()},n.prototype._kbnAdaptFilterWindow=function(){var n=this.kanbanObj,h=n.element.find(".e-kanbantoolbar"),i,e,u,o,c,r,s,t,f;for(h.find(".e-quickfilter").parent().hide(),r=ej.buildTag("div.e-kanbanfilter-window","",{}),i=ej.buildTag("div.e-kbnfilterwindow-head","",{}),ej.buildTag("div.e-filterback-icon","",{}).appendTo(i),ej.buildTag("div.e-text","FILTER",{}).appendTo(i),ej.buildTag("div.e-text e-filter-done","DONE",{}).appendTo(i).hide(),i.appendTo(r),$("body").append(r.hide()),e=ej.buildTag("div.e-kbnfilterwindow-body","",{}),o=ej.buildTag("div.e-filter-content"),t=0;t<n.model.filterSettings.length;t++)f=ej.buildTag("div","",{}),f.append("<input type='checkbox' class='e-kbnfilter-check' id='check"+t+"' /><label for='check"+t+"' class='e-filterlabel'>"+n.model.filterSettings[t].text+"<\/label><\/td>"),o.append(f),f.find("input").ejCheckBox({change:$.proxy(this._kbnFilterChange,n)});e.append(o);s=ej.buildTag("div#"+n._id+"_filterScrollContent","<div><\/div>").addClass("e-filter-scrollcontent");s.children().append(e);s.appendTo(r);u=ej.buildTag("input.e-clearfilter","",{},{type:"button",id:n._id+"_ClearFilter"});u.ejButton({text:"ClearFilter"});r.append(u);u.hide();c=ej.buildTag("div.e-kanbanfilter-icon","",{float:"right"});h.append(c)},n.prototype._setAdaptiveSwimlaneTop=function(){var n=this.kanbanObj,i,r,t;n.element.hasClass("e-responsive")&&!ej.isNullOrUndefined(n.model.fields.swimlaneKey)&&(i=n.kanbanContent.data("ejScroller"),r=n.element[0].getElementsByClassName("e-columnrow"),t=n._freezeScrollTop,i.scrollY(t,!0),n._freezeScrollTop=t)},n.prototype._adaptiveSwimlaneRefresh=function(){var n=this.kanbanObj,r,i,t;for(n.element.find(".e-swimlane-window .e-swimlane-ul").empty(),i=0;i<n._kbnAdaptDdlData.length;i++)ej.buildTag("li.e-swimlane-item ","<div>"+n._kbnAdaptDdlData[i]+"<\/div>",{}).appendTo(n.element.find(".e-swimlane-window .e-swimlane-ul"));if(n.KanbanAdaptive&&n.element.hasClass("e-responsive")&&!ej.isNullOrUndefined(n.model.fields.swimlaneKey)){for(n.KanbanAdaptive._addSwimlaneName(),r=n.kanbanContent.find(".e-columnrow"),t=0;t<r.length;t++)if(r.eq(t).offset().top>=0){n.element.find(".e-swimlane-text").text(n._kbnAdaptDdlData[t]);break}n.kanbanContent.hasClass("e-scroller")&&n.kanbanContent.data("ejScroller").refresh()}},n.prototype._removeKbnAdaptItems=function(){var n=this.kanbanObj,u,nt,l,a,f,v,tt,e,y,p,w,t,b,s,o,k;if(n.element.hasClass("e-responsive")){var i=n.element.find(".e-kanbantoolbar"),d=n.element.find(".e-stackedHeaderCell"),h,g=n.element.find(".e-swimlane-ddl"),c=$(".e-kanbanfilter-window"),r;if(g.length>0&&(g.remove(),n.element.find(".e-swimlane-window").remove()),i.hasClass("e-sladapt-bar")&&i.remove(),c.length>0){for(u=c.find(".e-filter-content").children(),t=0;t<u.length;t++)u.eq(t).find("span.e-chkbox-wrap").attr("aria-checked")=="true"&&(nt=u.index(u.eq(t)),n.element.find(".e-quickfilter").nextAll("li.e-tooltxt").eq(nt).addClass("e-select"));c.remove()}if(d.length>0&&d.width(""),n.element.find(".e-rowcell,.e-headercell").width(""),n.kanbanContent.find("table:eq(0) > colgroup col").width(""),n.headerContent.find("table > colgroup col").width(""),!n.element.hasClass("e-swimlane-responsive"))for(h=n.element.find(".e-rowcell .e-cell-scrollcontent:visible"),t=0;t<h.length;t++)l=$(h[t]).data("ejScroller"),ej.isNullOrUndefined(l)||l.destroy();for(i.length>0&&i.is(":visible")&&(i.css("display","block"),a=i.find(".e-quickfilter"),f=i.find(".e-searchbar"),i.find(".e-adapt-cancel").is(":visible")&&f.find(".e-searchitem").addClass("e-cancel").removeClass("e-searchfind"),i.find(".e-adapt-cancel,.e-adapt-search").hide(),a.length>0&&(i.find(".e-kanbanfilter-icon").remove(),a.parent(".e-ul.e-horizontal").show()),v=f.find(".e-searchdiv"),v.length>0&&(v.show(),f.find(".e-search").css("border",""),f.find(".e-searchitem").show(),i.parents("body").removeClass("e-kbnwindow-modal"),i.removeClass("e-adaptive-search"))),n.headerContent.find("table").css({transform:"","transition-duration":""}),n.kanbanContent.find("table").eq(0).css({transform:"","transition-duration":""}),r=n.element.find(".e-cell-scrollcontent"),t=0;t<r.length;t++)tt=r.eq(t).children(),tt.children().appendTo(r.eq(t).parents(".e-rowcell")),r.eq(t).remove();if(e=n.element.find(".e-kanbandialog"),e.is(":visible")&&(y=e.parents(".e-dialog-scroller"),p=e.parents(".e-dialog"),p.css({top:"",left:""}).removeClass("e-kbnadapt-editdlg"),y.css("height","auto"),y.ejScroller({height:0,buttonSize:0,scrollerSize:9,enableTouchScroll:!0,autoHide:!0}),e.parents("body").removeClass("e-kbnwindow-modal"),p.hide(),n.KanbanEdit._onKbnDialogOpen()),!ej.isNullOrUndefined(n.model.fields.swimlaneKey))for(n.kanbanContent.hasClass("e-scroller")&&n.kanbanContent.ejScroller("scrollX",0,!0),n.element.parents("body").removeClass("e-kbnwindow-modal"),n.element.find(".e-swimlanerow").show(),w=n.element.find(".e-columnrow"),t=0;t<w.length;t++)for(b=w.eq(t).find(".e-rowcell"),s=0;s<b.length;s++)o=b.eq(s).find(".e-swimlane-name"),o.length>0&&(o.siblings().length==0?o.parents(".e-limits").hide():o.hide());k=n.element.find(".e-adapt-stheader");k.length>0&&k.find("div").css({position:"",left:""});n.element.removeClass("e-responsive");n.element.removeClass("e-swimlane-responsive")}},n.prototype._setAdaptEditWindowHeight=function(){var r=this.kanbanObj,n,t,i;n=$("#"+r._id+"_dialogEdit");t=n.parents(".e-dialog-scroller");i;n.parents(".e-dialog").css({top:"0",left:"0"}).addClass("e-kbnadapt-editdlg");n.parents("body").addClass("e-kbnwindow-modal");i=t.prev(".e-titlebar");t.ejScroller({height:$(window).height()-i.outerHeight(),buttonSize:0,scrollerSize:9,enableTouchScroll:!0,autoHide:!0});t.data("ejScroller").refresh();n.css("height",t.height())},n}(),n,t,i,r,u,f,e,o,s,h;window.ej.createObject("ej.KanbanFeatures.Adaptive",c,window);n=function(){function n(n){this.kanbanObj=null;this.kanbanObj=n}return n.prototype._initScrolling=function(){var n=this.kanbanObj;(n.model.width||n.model.height)&&(n.model.allowScrolling=!0,n.model.width&&(n.model.scrollSettings.width=n.model.width),n.model.height&&(n.model.scrollSettings.height=n.model.height));n._originalScrollWidth=n.model.scrollSettings.width},n.prototype._renderScroller=function(){var n=this.kanbanObj,i,r,u,f,t,e;n.model.scrollSettings||(n.model.scrollSettings={});typeof n._originalScrollWidth=="string"&&(n.element.css("width","auto"),i=n.element.width(),(n.model.scrollSettings.width=="auto"||n._originalScrollWidth=="auto")&&(n._originalScrollWidth="100%"),n.model.scrollSettings.width=i*(parseFloat(n._originalScrollWidth)/100));typeof n.model.scrollSettings.height=="string"&&(r=n.element.height(),n.model.scrollSettings.height=="auto"&&(n.model.scrollSettings.height="100%"),n.model.scrollSettings.height=r*(parseFloat(n.model.scrollSettings.height)/100));(n.model.scrollSettings.width||n.model.width)&&n.element.width(n.model.scrollSettings.width||n.model.width);u=n.model.scrollSettings.height!=0?n.model.scrollSettings.height-n.getHeaderTable().height()-(!ej.isNullOrUndefined(n._filterToolBar)&&n._filterToolBar.height()):n.model.scrollSettings.height;f=n.getContent().attr("tabindex","0");n.element.addClass("e-kanbanscroll");f.ejScroller({enableRTL:n.model.enableRTL,height:u,width:n.model.scrollSettings.width,thumbStart:$.proxy(n._kbnThumbStart,n),scroll:$.proxy(n._freezeSwimlane,n)});n.getContent().ejScroller("isVScroll")?(n.element.find(".e-kanbanheader").addClass("e-scrollcss"),n.getHeaderContent().find("div").first().addClass("e-headercontent")):n.element.find(".e-kanbanheader").removeClass("e-scrollcss");(n.model.scrollSettings.width||n.model.width)&&n.element.width(n.model.scrollSettings.width||n.model.width);t=n.getContent().data("ejScroller");e=t&&t.isVScroll()?"addClass":"removeClass";n.getHeaderContent().find(".e-headercontent")[e]("e-hscrollcss")},n.prototype._refreshScroller=function(n){var t=this.kanbanObj,i=t.getContent().first();ej.isNullOrUndefined(i.data("ejScroller"))||(n.requestType=="beginedit"&&t.getScrollObject().scrollY(0,!0),i.ejScroller("refresh"),i.ejScroller({enableRTL:t.model.enableRTL}),i.ejScroller("isVScroll")&&!t.getScrollObject().model.autoHide?(t.getHeaderContent().addClass("e-scrollcss"),t.getHeaderContent().find(".e-headercontent").hasClass("e-hscrollcss")||t.getHeaderContent().find(".e-headercontent").addClass("e-hscrollcss")):t.element.find(".e-kanbanheader").removeClass("e-scrollcss"))},n}();window.ej.createObject("ej.KanbanFeatures.Scroller",n,window);t=function(){function n(n){this.kanbanObj=null;this.kanbanObj=n}return n.prototype._cardSelection=function(n,t,i){var r=this.kanbanObj,l,c,f=null,o=null,w,s,d,v,y,h,p;if(l=t.parent("td.e-rowcell"),r._currentRowCellIndex.length>0&&(r._previousRowCellIndex=[[r._currentRowCellIndex[0][0],[r._currentRowCellIndex[0][1][0]],[r._currentRowCellIndex[0][2][0]]]]),ej.isNullOrUndefined(t.attr("id"))||(w=new ej.DataManager(r._currentJsonData),o=w.executeLocal((new ej.Query).where(r.model.fields.primaryKey,ej.FilterOperators.equal,t.attr("id")))),ej.isNullOrUndefined(r._previousRowCellIndex)||r._previousRowCellIndex.length==0||(f=r.KanbanCommon._getCardbyIndexes(r._previousRowCellIndex)),c={currentCell:l,target:t,cellIndex:n[0][1][0],cardIndex:n[0][2][0],data:o,previousRowCellIndex:r._previousRowCellIndex,previousCard:f,selectedCardsData:r._selectedCardData},!r._trigger("beforeCardSelect",c)){if($(t).hasClass("e-cardselection")||(r.model.selectionType!="multiple"||r._kTouchBar.find(".e-cardtouch").hasClass("e-spanclicked")||r._kTouchBar.hide(),i.pointerType!="touch"||r._kTouchBar.find(".e-cardtouch").hasClass("e-spanclicked")||r.model.selectionType!="multiple"||(s=$(t).offset(),r._kTouchBar.show(),r._kTouchBar.offset({top:s.top,left:s.left}))),i.pointerType=="touch"&&$(t).hasClass("e-cardselection")&&r._kTouchBar.is(":hidden")&&(s=$(t).offset(),r._kTouchBar.show(),r._kTouchBar.offset({top:s.top,left:s.left})),r.model.selectionType=="multiple"&&i.shiftKey){var a,e,u=0,b=0,g=t,k=[];for(ej.isNullOrUndefined(f)?e=t.parents(".e-columnrow").find(".e-kanbancard"):(a=f.parents(".e-columnrow"),a.find(".e-cardselection").not(f).removeClass("e-cardselection"),e=a.find(".e-kanbancard"),u=e.index(f)),r._selectedCards=[],r._selectedCardData=[],r.selectedRowCellIndexes=[];b<=0;)y=[],d=$(e[u]).parents(".e-columnrow"),v=$(e[u]).parents(".e-rowcell"),$(e[u]).addClass("e-cardselection"),k.push(e[u]),r._selectedCardData.push(r.KanbanCommon._getKanbanCardData(r._currentJsonData,e[u].id)[0]),y=[[r.element.find(".e-columnrow").index(d),[v.index()],[v.find($(e[u])).index()]]],e[u].id==g.attr("id")&&(b=1),this._pushIntoSelectedArray(y),ej.isNullOrUndefined(f)?++u:n[0][1][0]<r._previousRowCellIndex[0][1][0]?--u:n[0][1][0]==r._previousRowCellIndex[0][1][0]?n[0][2][0]<r._previousRowCellIndex[0][2][0]?--u:++u:++u;ej.isNullOrUndefined(f)&&(r._previousRowCellIndex=r._currentRowCellIndex=[[0,[0],[0]]],f=r.KanbanCommon._getCardbyIndexes(r._previousRowCellIndex));r._selectedCards=[];r._selectedCards[r._selectedCards.length]=k;!ej.isNullOrUndefined(f)||i.ctrlKey||i.shiftKey||r._enableMultiTouch||($(t).addClass("e-cardselection"),r._selectedCards.push(t[0]),r._selectedCardData.push(r.KanbanCommon._getKanbanCardData(r._currentJsonData,t.id)[0]),this._pushIntoSelectedArray(n))}if(r.model.selectionType=="multiple"&&(i.ctrlKey||r._enableMultiTouch))if($(t).hasClass("e-cardselection")){for($(t).removeClass("e-cardselection"),this._popFromSelectedArray(n[0][0],n[0][1],n[0][2],i),h=0;h<r._selectedCardData.length;h++)if(o[0][r.model.fields.primaryKey]==r._selectedCardData[0][r.model.fields.primaryKey])break;r._selectedCardData.splice(h,1);r._selectedCards.splice(h,1);r._currentRowCellIndex=n}else $(t).addClass("e-cardselection"),r._selectedCards.push(t[0]),this._pushIntoSelectedArray(n),r._selectedCardData.push(o[0]);else r.model.selectionType=="multiple"&&i.shiftKey||(p=n[0][2],r.element.find(".e-cardselection").removeClass("e-cardselection"),r._selectedCards=[],r.selectedRowCellIndexes=[],$(t).addClass("e-cardselection"),r._selectedCardData=[],r._selectedCardData.push(o[0]),r._selectedCards.push(t[0]),r.model.selectionType=="multiple"&&(p=[n[0][2]]),r.selectedRowCellIndexes.push({rowIndex:n[0][0],cellIndex:n[0][1],cardIndex:p}));(c={currentCell:l,target:t,cellIndex:n[0][1][0],cardIndex:n[0][2][0],data:o,selectedRowCellIndex:r.selectedRowCellIndexes,previousRowCellIndex:r._previousRowCellIndex,previousCard:f,selectedCardsData:r._selectedCardData},r.model.selectionType=="multiple"&&i.shiftKey&&$(t).hasClass("e-cardselection")?(r._previousRowCellIndex.length==0&&(r._currentRowCellIndex=[[t.parents(".e-columnrow").index(),[0],[0]]]),r._currentRowCellIndex.length==0&&(r._currentRowCellIndex=n)):$(t).hasClass("e-cardselection")&&(r._currentRowCellIndex=n),r._trigger("cardSelect",c))||r.element.focus()}},n.prototype.clear=function(){var n=this.kanbanObj,t;n.model.allowSelection&&(t=$(n._kanbanRows).not(".e-swimlanerow"),$(t).find(".e-rowcell .e-kanbancard").removeClass("e-cardselection"),n.selectedRowCellIndexes=[],n._selectedCardData=[],n._selectedCards=[],n._previousRowCellIndex=[],n._currentRowCellIndex=[])},n.prototype._pushIntoSelectedArray=function(n){for(var i=this.kanbanObj,r=0,f=!0,e=!0,u,o,t=0;t<i.selectedRowCellIndexes.length;t++)if(u=i.selectedRowCellIndexes[t],u.rowIndex==n[0][0]){for(f=!1,r=0;r<u.cellIndex.length;r++)if(o=u.cellIndex[r],o==n[0][1][0]){e=!1;break}break}f&&i.selectedRowCellIndexes.push({rowIndex:n[0][0],cellIndex:n[0][1],cardIndex:[n[0][2]]});e?f||(i.selectedRowCellIndexes[t].cellIndex.push(n[0][1][0]),i.selectedRowCellIndexes[t].cardIndex.push([n[0][2][0]])):i.selectedRowCellIndexes[t].cardIndex[r].push(n[0][2][0])},n.prototype._popFromSelectedArray=function(n,t,i,r){var e=this.kanbanObj,o,f,s,u,h,c;if(e.model.selectionType=="multiple"&&(r.ctrlKey||r.shiftKey||e._enableMultiTouch))for(o=0;o<e.selectedRowCellIndexes.length;o++)if(u=e.selectedRowCellIndexes[o],u.rowIndex==n)for(f=0;f<u.cellIndex.length;f++)if(h=u.cellIndex[f],h==t[0])if(r.shiftKey){u.cardIndex=[];break}else for(s=0;s<u.cardIndex[f].length;s++)if(c=u.cardIndex[f][s],c==i[0]){u.cardIndex[f].splice(s,1);u.cardIndex[f].length==0&&(u.cardIndex.splice(f,1),u.cellIndex.splice(f,1));u.cellIndex.length==0&&e.selectedRowCellIndexes.splice(o,1);break}},n.prototype._selectionOnRerender=function(){var s,e,t,o=!0,n=this.kanbanObj,r,u,i,f,c,h;if(n.model.allowSelection){if(n.model.selectionType=="single")n._selectedCards.length>0&&(u=$(n._selectedCards[0]),i=n.element.find("#"+u[0].id),i.hasClass("e-kanbancard")?(e=$(i).parents(".e-columnrow"),t=$(i).parents(".e-rowcell"),n._selectedCards=[],n._selectedCards=i.addClass("e-cardselection"),n._currentRowCellIndex=n._previousRowCellIndex=[],n._currentRowCellIndex.push([e.index(),[t.index()],[t.find(".e-kanbancard").index(t.find("#"+u[0].id))]]),n._currentRowCellIndex=n._previousRowCellIndex,n.selectedRowCellIndexes=[],n.selectedRowCellIndexes.push({rowIndex:n._currentRowCellIndex[0][0],cellIndex:n._currentRowCellIndex[0][1][0],cardIndex:n._currentRowCellIndex[0][2][0]})):(n._selectedCards=[],n._selectedCardData=[],n.selectedRowCellIndexes=[],n._currentRowCellIndex=n._previousRowCellIndex=[]));else{for(r=0;r<n._selectedCards.length;r++)if($(n._selectedCards[r]).length>1)for(f=0;f<n._selectedCards[r].length;f++)u=$(n._selectedCards[r][f]),i=n.element.find("#"+u[0].id),e=$(i).parents(".e-columnrow"),t=$(i).parents(".e-rowcell"),i.hasClass("e-kanbancard")?(o=!0,n._selectedCards[r].splice(f,0,i[0]),i.addClass("e-cardselection"),n._selectedCards[r].splice(f+1,1),r==0&&f==0&&(n._currentRowCellIndex=n._previousRowCellIndex=[],n._currentRowCellIndex.push([e.index(),[t.index()],[t.find(".e-kanbancard").index(t.find("#"+u[0].id))]]),n._currentRowCellIndex=n._previousRowCellIndex,n.selectedRowCellIndexes=[]),c=[e.index(),[t.index()],[t.find(".e-kanbancard").index(t.find("#"+u[0].id))]],this._pushIntoSelectedArray([c])):(o=!1,n._selectedCards[r].splice(f,1),h=n._selectedCardData.indexOf(n.KanbanCommon._getKanbanCardData(n._selectedCardData,u[0].id)[0]),n._selectedCardData.splice(h,1),--f);else u=$(n._selectedCards[r]),i=n.element.find("#"+u[0].id),e=$(i).parents(".e-columnrow"),t=$(i).parents(".e-rowcell"),i.hasClass("e-kanbancard")?(o=!0,i.addClass("e-cardselection"),n._selectedCards[r]=i[0],r==0&&(n._currentRowCellIndex=n._previousRowCellIndex=[],n._currentRowCellIndex.push([e.index(),[t.index()],[t.find(".e-kanbancard").index(t.find("#"+u[0].id))]]),n._currentRowCellIndex=n._previousRowCellIndex,n.selectedRowCellIndexes=[]),c=[e.index(),[t.index()],[t.find(".e-kanbancard").index(t.find("#"+u[0].id))]],this._pushIntoSelectedArray([c])):(o=!1,n._selectedCards.splice(r,1),h=n._selectedCardData.indexOf(n.KanbanCommon._getKanbanCardData(n._selectedCardData,u[0].id)[0]),n._selectedCardData.splice(h,1),--r);!o&&n._selectedCards.length<=0&&(n._currentRowCellIndex=n._previousRowCellIndex=n.selectedRowCellIndexes=[])}s=n.element.find(".e-columnrow").index(n.element.find(".e-cardselection").eq(0).parents(".e-columnrow"));s>=0&&(n.selectedRowCellIndexes[0].rowIndex=n._currentRowCellIndex[0][0]=s,n._previousRowCellIndex.length>0&&(n._previousRowCellIndex[0][0]=s))}},n.prototype._renderKanbanTouchBar=function(){var n=this.kanbanObj;n._kTouchBar=ej.buildTag("div.e-kanbantouchbar","",{display:"none"},{});var t=ej.buildTag("div.e-content","",{},{}),i=ej.buildTag("div.e-downtail e-tail","",{},{}),r=ej.buildTag("span.e-cardtouch e-icon","",{},{});t.append(r);n._kTouchBar.append(t);n._kTouchBar.append(i);n.element.append(n._kTouchBar)},n.prototype._updateSelectedCardIndexes=function(n){var e,f,t=this.kanbanObj,i,r,u;if(t.selectedRowCellIndexes.length>0)for($(n).hasClass("e-rowcell")?f=$(n).index():(n=t.element.find("#"+$(n).attr("id")),f=$(n).parents(".e-rowcell").index()),e=$(n).parents(".e-columnrow"),$.inArray(f,t.selectedRowCellIndexes[0].cellIndex)==-1&&t.selectedRowCellIndexes[0].cellIndex.push(f),i=0;i<t.selectedRowCellIndexes[0].cellIndex.length;i++)if(r=e.find(".e-rowcell").eq(t.selectedRowCellIndexes[0].cellIndex[i]).find(".e-cardselection"),r.length>0)for(t.selectedRowCellIndexes[0].cardIndex.splice(i,1),t.element.find(".e-targetclone").remove(),u=0;u<r.length;u++)u>0?t.selectedRowCellIndexes[0].cardIndex[i].push($(r[u]).index()):t.selectedRowCellIndexes[0].cardIndex.splice(i,0,[$(r[0]).index()]);else t.selectedRowCellIndexes[0].cellIndex.splice(i,1),t.selectedRowCellIndexes[0].cardIndex.splice(i,1),--i},n}();window.ej.createObject("ej.KanbanFeatures.Selection",t,window);i=function(){function n(n){this.kanbanObj=null;this.kanbanObj=n}return n.prototype._filterHandler=function(n,t){var i=this.kanbanObj,u={requestType:"filtering",currentFilterObject:[],filterCollection:i._filterCollection},f,o,r,s,e;if(u.currentFilterObject.push(n),i.model.isResponsive){for(f=[],i._kbnFilterObject=i._kbnFilterObject.concat(u.currentFilterObject),r=0;r<i._kbnFilterObject.length;r++)e=$.inArray(i._kbnFilterObject[r],f),e<0&&f.push(i._kbnFilterObject[r]);i._kbnFilterObject=f}for(o=i._dataSource()instanceof ej.DataManager?i._dataSource().dataSource.json:i._dataSource(),o.length==0&&i._currentJsonData.length>0&&(o=i._currentJsonData),i._initialData=o,r=0;r<i.model.filterSettings.length;r++)if(i.model.filterSettings[r].text==u.currentFilterObject[0].text){s=i.model.filterSettings[r].query.queries[0].e;ej.isNullOrUndefined(u.filterCollection[0])?(u.filterCollection.push(s),$(t).addClass("e-select")):$(t).hasClass("e-select")?($(t).removeClass("e-select"),e=$.inArray(s,u.filterCollection),u.filterCollection.splice(e,1)):($(t).addClass("e-select"),u.filterCollection.push(s));break}i.KanbanCommon._processBindings(u)},n.prototype.filterCards=function(n){var t={requestType:"filtering",filterCollection:this.kanbanObj._filterCollection},n=n.queries[0].e;t.filterCollection.push(n);this.kanbanObj.KanbanCommon._processBindings(t)},n.prototype.clearFilter=function(){var n=this.kanbanObj,t;n._filterCollection.length!=0&&(t={requestType:"filtering"},n._filterCollection=[],n.element.find(".e-kanbantoolbar .e-tooltxt").removeClass("e-select"),n.KanbanCommon._processBindings(t))},n.prototype._filterLimitCard=function(n){for(var o,i,e,h,t=this.kanbanObj,r,u,s,f=0;f<t.model.columns.length;f++)o=t.model.columns[f],i=t.getHeaderContent().find("span.e-totalcount"),t.model.enableTotalCount&&(i=$(i[f]),e=$(i).text().indexOf(t.localizedLabels.FilterOfText),!ej.isNullOrUndefined(n)&&(n.requestType=="drop"||n.requestType=="beginedit"||n.requestType=="save"||n.requestType=="cancel"||n.requestType=="refresh"||n.requestType=="add"||(n.requestType=="filtering"?n.filterCollection.length>0?!0:t.model.searchSettings.key==""?!1:!0:n.requestType=="search"?t.model.searchSettings.key!=""?!0:t.model.filterSettings.length>0?t.element.find(".e-kanbantoolbar .e-tooltxt").hasClass("e-select"):!1:!1))?(e!=-1&&t._dataManager instanceof ej.DataManager&&!t._dataManager.dataSource.offline?(s=t.localizedLabels.FilterOfText.length+e+1,r=$(i).text().slice(s),(n.requestType=="drop"||n.requestType=="save")&&(u=t.headerContent.find(".e-headercell").eq(f),u.hasClass("e-card-dragged")&&(r=--r,u.removeClass("e-card-dragged")),u.hasClass("e-card-dropped")&&(r=++r,u.removeClass("e-card-dropped"))),$(i).text(r)):t._dataManager instanceof ej.DataManager&&t._dataManager.dataSource.offline&&(e!=-1||t.model.filterSettings.length!=0||t.model.searchSettings.key.length!=0)&&(r=new ej.DataManager(t.model.dataSource).executeLocal((new ej.Query).where(t.model.keyField,ej.FilterOperators.equal,o.key)).length,$(i).text(r)),h=t.KanbanCommon._multikeySeparation(o.key),$(i).text($($(t.element.find(".e-columnrow")).find('td[data-ej-mappingkey="'+h+'"] > div.e-kanbancard')).length+" "+t.localizedLabels.FilterOfText+" "+$(i).text())):ej.isNullOrUndefined(o.constraints)?$(i).text($(i).text().slice(e+3)):t.KanbanCommon._renderLimit())},n.prototype.searchCards=function(n){var u,t=this.kanbanObj,i=$("#"+t._id+"_toolbarItems_search"),r;i.find("input").val()!=n&&i.find("input").val(n);t.element.hasClass("e-responsive")||(i.parent().addClass("e-highliht-kbnsearchbar"),i.find("input").val()==""&&i.parent().removeClass("e-highliht-kbnsearchbar"));u={requestType:"search",keyValue:n};(n!=""||t.model.searchSettings.key!="")&&(t.model.searchSettings.key=n,t.model.searchSettings.key.length>0&&(r=t._dataSource()instanceof ej.DataManager?t._dataSource().dataSource.json:t._dataSource(),r.length==0&&t._currentJsonData.length>0&&(r=t._currentJsonData),t._initialData=r),t.KanbanCommon._processBindings(u))},n.prototype.clearSearch=function(){var n=this.kanbanObj;n.element.find(".e-kanbantoolbar #"+n._id+"_toolbarItems_search").val("");this.searchCards("");$.extend(n.model.searchSettings,n.defaults.searchSettings)},n.prototype._onToolbarKeypress=function(n){var t=this.KanbanFilter.kanbanObj,i=t.element,r=i.data("ejKanban");t.model.isResponsive&&i.hasClass("e-responsive")&&($(t.itemsContainer).parent().children().not(".e-searchbar").hide(),t.KanbanAdaptive._kbnTimeoutSearch(i,n))},n}();window.ej.createObject("ej.KanbanFeatures.Filter",i,window);r=function(){function n(n){this.kanbanObj=null;this._dragEle=null;this._dropEle=null;this._dropTarget=null;this.kanbanObj=n}return n.prototype._addDragableClass=function(){var n=this.kanbanObj;n._dropped=!1;this._dragEle=n.getContent().find(".e-columnrow td.e-drag .e-kanbancard");this._dropEle=n.getContent().find(".e-columnrow .e-rowcell.e-drop");this._dropEle.addClass("e-droppable");this._dragEle.addClass("e-draggable e-droppable");this._enableDragDrop();n._on(n.element,"mouseup touchstart pointerdown MSPointerDown","",$.proxy(n.element.focus(),this))},n.prototype._enableDragDrop=function(){var n=this.kanbanObj;this._drag();$(n.getContent()).ejDroppable({accept:$(n.getContent()).find("div.e-kanbancard"),drop:function(n,t){$(t.helper).hide()}})},n.prototype._selectedPrevCurrentCards=function(){var t,i,n=this.kanbanObj;n._previousRowCellIndex.length>0&&(t=n.KanbanCommon._getCardbyIndexes(n._previousRowCellIndex),n._pCardId=t.attr("id"));n._previousRowCellIndex=n._currentRowCellIndex;n._pCardId=n._cCardId;n._currentRowCellIndex.length>0&&(i=n.KanbanCommon._getCardbyIndexes(n._currentRowCellIndex),n._cCardId=i.attr("id"))},n.prototype._getPriorityIndex=function(n){for(var i=null,r=this.kanbanObj,t=0;t<r._priorityCollection.length;t++)if(r._priorityCollection[t].primaryKey==n.attr("id")){i=r._priorityCollection[t];break}return ej.isNullOrUndefined(i)?this._getPriorityKey(n.attr("id")):parseInt(i.dropKey)},n.prototype._removeFromPriorirtyCollec=function(n){for(var i=null,r=this.kanbanObj,t=0;t<r._priorityCollection.length;t++)if(r._priorityCollection[t].primaryKey==n){i=t;break}ej.isNullOrUndefined(i)||r._priorityCollection.splice(i,1)},n.prototype._columnDataOndrop=function(n,t){var r=this.kanbanObj,h=new ej.DataManager(r._initialData),u,f,e,o,s,i=new ej.Query;return f=r.model.keyField,e=r.model.fields.swimlaneKey,o=$(n).hasClass("e-rowcell")?$(n).attr("data-ej-mappingkey"):$(n).parents(".e-rowcell").attr("data-ej-mappingkey"),s=$(n).parents(".e-columnrow").prev(".e-swimlanerow").find(".e-slkey").text(),i=ej.isNullOrUndefined(e)?i.where(f,ej.FilterOperators.equal,o):i.where(f,ej.FilterOperators.equal,o).where(e,ej.FilterOperators.equal,s),u=h.executeLocal(i),u.sort(function(n,i){return n[t]-i[t]}),u},n.prototype._dropToColumn=function(n,t){var i=this.kanbanObj,h,u,f=[],c=!1,e=i.model.fields.priority,l,a,w=n.parent().has(t).length,o,v,s,r,y,p;for(ej.isNullOrUndefined(i._filterToolBar)||(l=i._filterToolBar.find(".e-select")),n.hasClass("e-targetclone")&&(n=n.parent()),n.hasClass("e-columnkey")&&(n=n.parent().parent()),this._selectedPrevCurrentCards(),e&&(!ej.isNullOrUndefined(i._filterToolBar)&&l.length>0||i._searchBar!=null&&i._searchBar.find(".e-cancel").length>0)?(f=this._columnDataOndrop(n,e),c=f.length>0):c=$(n).children(".e-kanbancard").length>1,a=this._getSelectedCards(t),i.model.selectionType=="multiple"&&a.length>0&&$(t).hasClass("e-cardselection")&&(t=a),o=0;o<t.length;o++)for(v=t[o],s=0;s<$(v).length;s++)r=$(v)[s],$(r).is(":visible")&&(e&&c&&(h=!ej.isNullOrUndefined(i._filterToolBar)&&l.length>0||i._searchBar!=null&&i._searchBar.find(".e-cancel").length>0?f[f.length-1][e]:this._getPriorityIndex(n.find(".e-kanbancard").last()),u=this._getPriorityIndex($(r)),h>=u&&(u=++h),this._removeFromPriorirtyCollec($(r).attr("id")),i._priorityCollection.push({primaryKey:$(r).attr("id"),dropKey:u}),y=i.KanbanCommon._getKanbanCardData(i._currentJsonData,$(r)[0].id)[0],ej.isNullOrUndefined(u)||(y[e]=u,f.push(y))),$(n).find(".e-customaddbutton").length>0?$(r).insertBefore($(n).find(".e-customaddbutton")):i.element.hasClass("e-responsive")?(p=n.find(".e-cell-scrollcontent"),p.length>0?p.children().append(r):$(n).append(r)):$(n).append(r));this._updateDropAction(n,t);w==0&&!ej.isNullOrUndefined(i.model.fields.swimlaneKey)&&i.model.swimlaneSettings.allowDragAndDrop&&i.refresh(!0)},n.prototype._updateDropAction=function(n,t){var a,i=this.kanbanObj,f,r,e,o,s,c,u,l,h;for(a=$(n).hasClass("e-rowcell")?n:$(n).closest("td.e-rowcell"),i._selectedCardData=[],r=0;r<t.length;r++)if(ej.isNullOrUndefined(t[r].length))($(t[r]).is(":visible")||!ej.isNullOrUndefined(i.model.fields.collapsibleCards)||$(n).hasClass("e-hide")&&i.model.contextMenuSettings.enable)&&(e=$(t[r]).attr("id"),this._updateDropData(n,t[r],e),u=i.element.find("#"+e),f=u.parents(".e-rowcell"),u.parents(".e-rowcell").hasClass("e-shrink")&&u.addClass("e-hide"),s=parseInt(f.find(".e-shrinkcount").html()),f.find(".e-shrinkcount").html(++s));else for(o=0;o<t[r].length;o++)($(t[r][o]).is(":visible")||$(n).hasClass("e-hide")&&i.model.contextMenuSettings.enable)&&(e=t[r][o].id,this._updateDropData(n,t[r][o],e),u=i.element.find("#"+e),f=u.parents(".e-rowcell"),u.parents(".e-rowcell").hasClass("e-shrink")&&u.addClass("e-hide"),s=parseInt(f.find(".e-shrinkcount").html()),f.find(".e-shrinkcount").html(++s));if(i.model.fields.priority&&i._priorityCollection.length>0)while(i._priorityCollection.length>0)c=i._priorityCollection[0].primaryKey,u=i.element.find("#"+c),this._updateDropData(n,u,c);h=i._bulkUpdateData[0][i.model.fields.primaryKey];i._bulkUpdateData.length>1&&(h="bulk");l={data:i._bulkUpdateData,requestType:"drop",primaryKeyValue:h};i._saveArgs=l;i.updateCard(h,i._bulkUpdateData);(i.model.allowSelection&&!ej.isNullOrUndefined(t[0].length)&&t[0].length>1||t.length>1||t.length==1&&$(t).hasClass("e-cardselection"))&&(i._previousRowCellIndex=ej.isNullOrUndefined(i._pCardId)?[]:this._updateRowCellIndexes(i._pCardId,i._previousRowCellIndex),i._currentRowCellIndex=ej.isNullOrUndefined(i._cCardId)?[]:this._updateRowCellIndexes(i._cCardId,i._currentRowCellIndex),i.KanbanSelection._selectionOnRerender(),ej.isNullOrUndefined(i._pCardId)&&(i._previousRowCellIndex=i._currentRowCellIndex),i.model.selectionType=="single"?i.selectedRowCellIndexes=i._currentRowCellIndex:i.KanbanSelection._updateSelectedCardIndexes(n));i._priorityCollection=[]},n.prototype._getPriorityKey=function(n){var t=this.kanbanObj,i=t.KanbanCommon._getKanbanCardData(t._currentJsonData,n);return i[0][t.model.fields.priority]},n.prototype._dropAsSibling=function(n,t,i){var r=this.kanbanObj,s=0,nt=0,ut=0,w,ft,f,k,tt,d,et,u=[],at,c=r.model.fields.priority,b,p,ot,yt=n.parent().has(t).length,st,vt,l,ht,v,o,ct,lt,g,it,y,e,a,h,rt;for(ej.isNullOrUndefined(r._filterToolBar)||(b=r._filterToolBar.find(".e-select")),p=r.model.fields.primaryKey,this._selectedPrevCurrentCards(),c&&(!ej.isNullOrUndefined(r._filterToolBar)&&b.length>0||r._searchBar!=null&&r._searchBar.find(".e-cancel").length>0)&&(u=this._columnDataOndrop(n,c)),$(n).hasClass("e-targetclone")&&(n.next().length==0&&$(n).addClass("e-targetappend"),d=$(n).prevAll(".e-kanbancard")[0],et=$(n).nextAll(".e-kanbancard")[0],!ej.isNullOrUndefined(r.model.fields.collapsibleCards)&&ej.isNullOrUndefined(d)&&(st=$(n).prevAll(".e-toggle-area").find(".e-kanbancard"),vt=$(st).length,d=$(st)[vt-1]),$(n).hasClass("e-targetappend")?(i=!0,n=d,ej.isNullOrUndef