window.pageGrids=window.pageGrids||{},$.fn.extend({gridmvc:function(){var n=[];return($(this).each(function(){if($(this).data("gridmvc"))n.push($(this).data("gridmvc"));else{var i={lang:$(this).attr("data-lang"),selectable:$(this).attr("data-selectable")=="true",multiplefilters:$(this).attr("data-multiplefilters")=="true"},t=new GridMvc(this,i),r=$(this).attr("data-gridname");r.length>0&&(window.pageGrids[$(this).attr("data-gridname")]=t),n.push(t),$(this).data("gridmvc",t)}}),n.length==1)?n[0]:n}}),GridMvc=function(n){function t(t,i){this.jqContainer=n(t),i=i||{},this.options=n.extend({},this.defaults(),i),this.init()}return t.prototype.init=function(){this.lang=GridMvc.lang[this.options.lang],typeof this.lang=="undefined"&&(this.lang=GridMvc.lang.en),this.events=[],this.options.selectable&&this.initGridRowsEvents(),this.filterWidgets=[],this.addFilterWidget(new TextFilterWidget),this.addFilterWidget(new NumberFilterWidget),this.addFilterWidget(new DateTimeFilterWidget),this.addFilterWidget(new BooleanFilterWidget),this.openedMenuBtn=null,this.initFilters()},t.prototype.initGridRowsEvents=function(){var n=this;this.jqContainer.on("click",".grid-row",function(){n.rowClicked.call(this,n)})},t.prototype.rowClicked=function(t){var i,r,u;t.options.selectable&&((i=n(this).closest(".grid-row"),i.length<=0)||(r={},i.find(".grid-cell").each(function(){var t=n(this).attr("data-name");t.length>0&&(r[t]=n(this).text())}),u=n.Event("RowClicked"),t.notifyOnRowSelect(r,u),u.isDefaultPrevented()||t.markRowSelected(i)))},t.prototype.markRowSelected=function(n){this.jqContainer.find(".grid-row.grid-row-selected").removeClass("grid-row-selected"),n.addClass("grid-row-selected")},t.prototype.defaults=function(){return{selectable:!0,multiplefilters:!1,lang:"en"}},t.prototype.onRowSelect=function(n){this.events.push({name:"onRowSelect",callback:n})},t.prototype.notifyOnRowSelect=function(n,t){t.row=n,this.notifyEvent("onRowSelect",t)},t.prototype.notifyEvent=function(n,t){for(var i=0;i