/** * jPList - jQuery Data Grid Controls 5.2.0.282 - http://jplist.com * Copyright 2016 Miriam Zusin */ (function(){var d=function(a,e){var b,c;if(a&&a.controller&&a.controller.collection){b=a.controller.collection.dataitems.length;jQuery.isNumeric(e.index)&&0<=e.index&&e.index<=a.controller.collection.dataitems.length&&(b=Number(e.index));e.$item&&a.controller.collection.addDataItem(e.$item,a.controller.collection.paths,b);if(e.$items)if(c=e.$items,jQuery.isArray(c))for(var d=c.length-1;0<=d;d--)a.controller.collection.addDataItem(c[d],a.controller.collection.paths,b);else c=c.find(a.options.itemPath).addBack(a.options.itemPath), jQuery(c.get().reverse()).each(function(){a.controller.collection.addDataItem(jQuery(this),a.controller.collection.paths,b)});a.observer.trigger(a.observer.events.unknownStatusesChanged,[!1])}},b=function(a,e){var c;a&&a.controller&&a.controller.collection&&(e.$item&&(a.controller.collection.delDataitem(e.$item),e.$item.remove()),e.$items&&(c=e.$items,jQuery.isArray(e.$items)&&(c=jQuery(e.$items).map(function(){return this.toArray()})),a.controller.collection.delDataitems(c),c.remove()),a.observer.trigger(a.observer.events.unknownStatusesChanged, [!1]))},c=function(a,e,c){switch(e){case "add":d(a,c);break;case "del":b(a,c);break;case "empty":a&&a.controller&&a.controller.collection&&(a.controller.collection.empty(),a.observer.trigger(a.observer.events.unknownStatusesChanged,[!1]));break;case "getDataItems":e=null;if(a.options&&a.options.dataSource)switch(a.options.dataSource.type){case "html":a.controller&&a.controller.collection&&(e=a.controller.collection.dataitems);break;case "server":a.controller&&a.controller.model&&a.controller.model.dataItem&& (e=a.controller.model.dataItem)}return e;case "addControl":a&&a.panel&&a.controller&&(a.panel.addControl(c.$control),a.controller.addPaths(a.panel.paths))}},a=function(a){a.observer.on(a.observer.events.knownStatusesChanged,function(e,c){var b;if(c&&(b=a.panel.mergeStatuses(c))&&0this.options.historyLength&&this.statusesQueue.shift()};jQuery.fn.jplist.History.prototype.getLastStatus=function(){var d=null;0this.options.historyLength&&this.listStatusesQueue.shift()};jQuery.fn.jplist.History.prototype.popList=function(){var d=null;0b-1&&(d=0);this.currentPage=d;this.start=this.currentPage*this.itemsOnPage;d=this.itemsNumber;b=this.start+this.itemsOnPage;b>d&&(b=d);this.end=b;d=this.currentPage;this.prevPage=0>=d?0:d-1;d=this.currentPage;b= this.pagesNumber;this.nextPage=0===b?0:d>=b-1?b-1:d+1}})();(function(){jQuery.fn.jplist.PaginationGoogleService=function(d,b,c){c=Number(c);isNaN(c)&&(c=0);c=this.itemsNumber=c;jQuery.isNumeric(b)?(b=Number(b),isNaN(b)&&(b=c)):b=c;this.itemsOnPage=b;b=(b=this.itemsOnPage)?Math.ceil(this.itemsNumber/b):0;b=this.pagesNumber=b;d=Number(d);isNaN(d)&&(d=0);d>b-1&&(d=0);this.currentPage=d;this.start=this.currentPage*this.itemsOnPage;d=this.itemsNumber;b=this.start+this.itemsOnPage;b>d&&(b=d);this.end=b;d=this.currentPage;this.prevPage=0>=d?0:d-1;d=this.currentPage; b=this.pagesNumber;this.nextPage=0===b?0:d>=b-1?b-1:d+1}})();(function(){jQuery.fn.jplist.FiltersService.dateFilter=function(d,b,c,a,e,h){for(var g,f,k=[],l=0;l=n&&q<=p&&l.push(m)); return l}})();(function(){jQuery.fn.jplist.FiltersService.pagerFilter=function(d,b){return b.slice(d.start,d.end)}})();(function(){jQuery.fn.jplist.FiltersService.pathFilter=function(d,b){for(var c,a,e=[],h=0;h=d.length)return b;for(e=0;ec&&(l=!1),jQuery.isNumeric(h)&&a>h&&(l=!1),l&&g.push(f)));return g}})();(function(){var d=function(b,a,e,h){var g;if(e=d.length)return e;k=new jQuery.fn.jplist.PathModel(c,null);for(var n=0;n=a.length)return c;for(e=0;ee?1:-1:ad?1:-1:e"),{});d=new jQuery.fn.jplist.Dataitems(c,d,a);d.sort([b]);return"html"===g?d.dataviewToString():d.dataviewToJqueryObject()}})();(function(){var d=function(b,a){var e=null;if("{month}"==b){a=a.toLowerCase();if("january"===a||"jan"===a||"jan."===a)e=0;if("february"===a||"feb"===a||"feb."===a)e=1;if("march"===a||"mar"===a||"mar."===a)e=2;if("april"==a||"apr"===a||"apr."===a)e=3;"may"===a&&(e=4);if("july"==a||"jun"===a||"jun."===a)e=5;if("april"===a||"jul"===a||"jul."===a)e=6;if("august"===a||"aug"===a||"aug."===a)e=7;if("september"===a||"sep"===a||"sep."===a)e=8;if("october"===a||"oct"===a||"oct."===a)e=9;if("november"===a|| "nov"===a||"nov."===a)e=10;if("december"===a||"dec"===a||"dec."===a)e=11;null===e&&(e=parseInt(a,10),isNaN(e)||e--)}else e=parseInt(a,10);return e},b=function(b,a){var e,d=null;e=b.replace(/{year}|{month}|{day}|{hour}|{min}|{sec}/g,".*");(e=(new RegExp(e,"g")).exec(a))&&1"+d;a+=""}return a};jQuery.fn.jplist.HelperService.removeCharacters=function(b,a){return b?b.replace(new RegExp(a,"ig"),"").toLowerCase():""};jQuery.fn.jplist.HelperService.formatDateTime=function(c,a){var e,h,g,f,k,l;a=a.replace(/\./g,"\\.");a=a.replace(/\(/g,"\\(");a=a.replace(/\)/g,"\\)");a=a.replace(/\[/g,"\\[");a=a.replace(/\]/g,"\\]");e=a.replace("{year}","(.*)");(h=b(e,c))&&(h=d("{year}", h));e=a.replace("{day}","(.*)");(f=b(e,c))&&(f=d("{day}",f));e=a.replace("{month}","(.*)");(g=b(e,c))&&(g=d("{month}",g));e=a.replace("{hour}","(.*)");(k=b(e,c))&&(k=d("{hour}",k));e=a.replace("{min}","(.*)");(l=b(e,c))&&(l=d("{min}",l));e=a.replace("{sec}","(.*)");(e=b(e,c))&&(e=d("{sec}",e));if(!h||isNaN(h))h=1900;if(!g||isNaN(g))g=0;if(!f||isNaN(f))f=1;if(!k||isNaN(k))k=0;if(!l||isNaN(l))l=0;if(!e||isNaN(e))e=0;return new Date(h,g,f,k,l,e)}})();(function(){jQuery.fn.jplist.DeepLinksService={};jQuery.fn.jplist.DeepLinksService.getUrlParams=function(d){var b=[],c,a=[],e,b=window.decodeURIComponent(jQuery.trim(window.location.hash.replace(d.hashStart,"")));if(d.deepLinking&&""!==jQuery.trim(b))for(var b=b.split(d.delimiter1),h=0;h=d.length||0>=g.length?(b.$noResults.removeClass("jplist-hidden"),b.$itemsBox.addClass("jplist-hidden"),jQuery.isFunction(b.redrawCallback)&&b.redrawCallback(c,g,a)):(b.$noResults.addClass("jplist-hidden"),b.$itemsBox.removeClass("jplist-hidden"),b.effect&&jQuery.fn.jplist.animation?(e&&!e.inAnimation&&(f=!0),e=f?k:b.options,jQuery.fn.jplist.animation.drawItems(e, b.$itemsBox,d,g,b.effect,function(){jQuery.isFunction(b.redrawCallback)&&b.redrawCallback(c,g,a)},b.observer)):(d.detach(),b.$itemsBox.append(g),jQuery.isFunction(b.redrawCallback)&&b.redrawCallback(c,g,a)));return g};jQuery.fn.jplist.DOMView=function(b,c,a,e,d,g,f){this.options=c;this.$root=b;this.observer=a;this.redrawCallback=g;this.effect=f;this.$itemsBox=b.find(e).eq(0);this.$noResults=b.find(d)};jQuery.fn.jplist.DOMView.prototype.render=function(b,c,a){return d(this,b,c,a)}})();(function(){jQuery.fn.jplist.DOMController=function(d,b,c,a){this.observer=c;this.$root=d;this.listView=new jQuery.fn.jplist.DOMView(d,b,c,b.itemsBox,b.noResults,b.redrawCallback,b.effect);d=b.itemPath;b=this.$root.find(b.itemsBox).eq(0).find(d);this.collection=new jQuery.fn.jplist.Dataitems(this.observer,b,a)};jQuery.fn.jplist.DOMController.prototype.renderStatuses=function(d,b){var c;this.collection&&(this.collection.applyStatuses(d),c=this.listView.render(this.collection,d,b));return c};jQuery.fn.jplist.DOMController.prototype.addPaths= function(d){this.collection.addPaths(d)}})();(function(){jQuery.fn.jplist.ItemControlFactory=function(d,b,c,a){this.options=d;this.observer=b;this.history=c;this.$root=a};jQuery.fn.jplist.ItemControlFactory.prototype.create=function(d){var b=null,c,a,e=null,h=null;c=d.attr("data-control-type");a={};jQuery.fn.jplist.itemControlTypes[c]&&(a=jQuery.extend(!0,{},a,jQuery.fn.jplist.itemControlTypes[c]));this.options.itemControlTypes&&this.options.itemControlTypes[c]&&(a=jQuery.extend(!0,{},a,this.options.itemControlTypes[c]));a&&(a.className&&(e= jQuery.fn.jplist.itemControls[a.className]),a.options&&(h=a.options));c={type:c,itemControlType:a,controlTypeClass:e,controlOptions:h};c=jQuery.extend(!0,c,{$control:d,history:this.history,observer:this.observer,options:this.options,$root:this.$root});c.controlTypeClass&&jQuery.isFunction(c.controlTypeClass)&&(b=new c.controlTypeClass(c));return b}})();(function(){var d=function(b,c){c&&0c?a.addClass("jplist-sticky"):a.removeClass("jplist-sticky"))},b=function(a,b){b.each(function(){var a=jQuery(this),b=a.offset().top;a.data("top",b);d(a)});jQuery(window).scroll(function(){b.each(function(){d(jQuery(this))})})},c=function(b){var c=[];if("cookies"===b.options.storage||"localstorage"===b.options.storage&&jQuery.fn.jplist.LocalStorageService.supported())if("cookies"===b.options.storage&& (c=jQuery.fn.jplist.CookiesService.restoreCookies(b.options.storageName)),"localstorage"===b.options.storage&&jQuery.fn.jplist.LocalStorageService.supported()&&(c=jQuery.fn.jplist.LocalStorageService.restore(b.options.storageName)),0=a.length?c(this):this.controls.setDeepLinks(a,this.observer)};jQuery.fn.jplist.PanelController.prototype.setStatusesFromStorage=function(){c(this)};jQuery.fn.jplist.PanelController.prototype.setStatuses=function(a){this.history.addStatuses(a); this.controls.setStatuses(a,!1);this.history.addList(a)};jQuery.fn.jplist.PanelController.prototype.getStatuses=function(a){return this.controls.getStatuses(a)};jQuery.fn.jplist.PanelController.prototype.mergeStatuses=function(a){return this.controls.merge(!1,a)};jQuery.fn.jplist.PanelController.prototype.statusesChangedByDeepLinks=function(a,b){this.controls&&this.controls.statusesChangedByDeepLinks(b)};jQuery.fn.jplist.PanelController.prototype.getDeepLinksURLPerControls=function(){return this.controls.getDeepLinksUrl(this.options.delimiter1)}})();(function(){jQuery.fn.jplist.ControlFactory=function(d,b,c,a){this.options=d;this.observer=b;this.history=c;this.$root=a};jQuery.fn.jplist.ControlFactory.prototype.create=function(d,b){var c=null,a,e,h,g,f,k,l,m;a=d.attr("data-control-type");f=g=h=!0;k=!1;m=l=null;(e=d.attr("data-control-deep-link"))&&"false"===e.toString()&&(h=!1);(e=d.attr("data-control-storage"))&&"false"===e.toString()&&(g=!1);(e=d.attr("data-control-animation"))&&"false"===e.toString()&&(f=!1);(e=d.attr("data-control-animate-to-top"))&& "true"===e.toString()&&(k=!0);e={};jQuery.fn.jplist.controlTypes[a]&&(e=jQuery.extend(!0,{},e,jQuery.fn.jplist.controlTypes[a]));this.options.controlTypes&&this.options.controlTypes[a]&&(e=jQuery.extend(!0,{},e,this.options.controlTypes[a]));e&&(e.className&&(l=jQuery.fn.jplist.controls[e.className]),e.options&&(m=e.options));a={type:a,action:d.attr("data-control-action"),name:d.attr("data-control-name"),inDeepLinking:h,inStorage:g,inAnimation:f,isAnimateToTop:k,controlType:e,controlTypeClass:l,controlOptions:m, paths:[]};a=jQuery.extend(!0,a,{$control:d,history:this.history,observer:this.observer,options:this.options,$root:this.$root,controlsCollection:b});a.controlTypeClass&&jQuery.isFunction(a.controlTypeClass)&&(c=new a.controlTypeClass(a));return c};jQuery.fn.jplist.ControlFactory.prototype.getStatus=function(d){return null};jQuery.fn.jplist.ControlFactory.prototype.setStatus=function(d,b){};jQuery.fn.jplist.ControlFactory.prototype.getDeepLink=function(){return""};jQuery.fn.jplist.ControlFactory.prototype.getStatusByDeepLink= function(d,b){return null};jQuery.fn.jplist.ControlFactory.prototype.getPaths=function(d){return[]};jQuery.fn.jplist.ControlFactory.prototype.setByDeepLink=function(d){};jQuery.fn.jplist.ControlFactory.getProp=function(d,b){var c=[],a=new RegExp("^"+b+"[0-9]*$");$.each(d.data(),function(b,d){a.test(b)&&c.push(d)});return 0==c.length?"":1==c.length?c[0]:c};jQuery.fn.jplist.ControlFactory.getPropPath=function(d,b){var c="";if(jQuery.isArray(d))for(var a=0;a=a.$control.find(".jplist-dd-panel").length&&a.$control.prepend('
'+ c.text()+"
");b(a);return jQuery.extend(this,a)};jQuery.fn.jplist.DropdownControl=function(a,b,d,g){return new c(a,b,d,g)}})();(function(){jQuery.fn.jplist.Storage=function(d,b,c){this.storageType=d;this.storageName=b;this.cookiesExpiration=c;this.isStorageEnabled="cookies"===d||"localstorage"===d&&jQuery.fn.jplist.LocalStorageService.supported()};jQuery.fn.jplist.Storage.prototype.save=function(d){var b=[],c;if(d&&this.isStorageEnabled){for(var a=0;a