/** * jPList - jQuery Data Grid Controls 5.2.0.7 - http://jplist.com * Copyright 2016 Miriam Zusin */ (function() { var e = function(a, b) { var d = null; b ? (d = a.$control.find('li:has(span[data-default="true"])').eq(0), 0 >= d.length && (d = a.$control.find("li:eq(0)"))) : d = a.$control.find(".active"); d = d.find("span"); d = new jQuery.fn.jplist.controls.DropdownFilterDTO(d.attr("data-path"),d.attr("data-type")); return d = new jQuery.fn.jplist.StatusDTO(a.name,a.action,a.type,d,a.inStorage,a.inAnimation,a.isAnimateToTop,a.inDeepLinking) } , g = function(a, b) { var d, c, e; a.$control.find("span").each(function() { d = jQuery(this).attr("data-path"); c = jQuery(this).attr("data-type"); d && "" !== jQuery.trim(d) && (e = new jQuery.fn.jplist.PathModel(d,c), b.push(e)) }) } , h = function(a, b) { var d; d = a.$control.find("li"); d.removeClass("active"); if (!b || 0 >= b.length) b = d.eq(0); 0 < b.length && (b.addClass("active"), a.$control.find(".jplist-dd-panel").text(b.eq(0).text())) } , f = function(a) { a.$control.find("li").off("click").on("click", function() { var b; b = jQuery(this); h(a, b); b = e(a, !1); a.observer.trigger(a.observer.events.knownStatusesChanged, [[b]]) }) } , c = function(a) { new jQuery.fn.jplist.DropdownControl(a.options,a.observer,a.history,a.$control); f(a); return jQuery.extend(this, a) }; c.prototype.getStatus = function(a) { return e(this, a) } ; c.prototype.getDeepLink = function() { var a = "", b; this.inDeepLinking && (b = e(this, !1), b.data && b.data.path && (a = this.name + this.options.delimiter0 + "path=" + b.data.path)); return a } ; c.prototype.getStatusByDeepLink = function(a, b) { var d; a: if (d = null, this.inDeepLinking) { if ("number" !== a && a !== "path" + this.options.delimiter2 + "type" + this.options.delimiter2 + "order" && "path" !== a) { d = null; break a } d = e(this, !0); d.data && "path" === a && d.data.path && (d.data.path = b) } return d } ; c.prototype.getPaths = function(a) { g(this, a) } ; c.prototype.setStatus = function(a, b) { var d; a && a.data && (d = this.$control.find('[data-path="' + a.data.path + '"]')) && 0 < d.length && h(this, d.parent("li")) } ; c.prototype.setByDeepLink = function(a) { var b; if (a) for (var d = 0; d < a.length; d++) b = a[d], b.controlName === this.name && "path" === b.propName && b.propValue && this.$control.find('[data-path="' + b.propValue + '"]').trigger("click") } ; jQuery.fn.jplist.controls.FilterDropdown = function(a) { return new c(a) } ; jQuery.fn.jplist.controlTypes["filter-drop-down"] = { className: "FilterDropdown", options: {}, dropdown: !0 } } )(); (function() { var e = function(c, a) { var b; b = null; a ? (b = c.$control.find('option[data-default="true"]').eq(0), 0 >= b.length && (b = c.$control.find("option").eq(0))) : b = c.$control.find("option:selected"); b = new jQuery.fn.jplist.controls.DropdownFilterDTO(b.attr("data-path"),b.attr("data-type")); return b = new jQuery.fn.jplist.StatusDTO(c.name,c.action,c.type,b,c.inStorage,c.inAnimation,c.isAnimateToTop,c.inDeepLinking) } , g = function(c, a) { var b, d, e; c.$control.find("option").each(function() { b = jQuery(this).attr("data-path"); d = jQuery(this).attr("data-type"); b && (e = new jQuery.fn.jplist.PathModel(b,d), a.push(e)) }) } , h = function(c) { c.$control.change(function() { var a, b, d; a = e(c, !1); b = jQuery(this).find("option:selected"); d = b.attr("data-path"); b = b.attr("data-number"); // d ? (a.data.path = d, // a.data.type = jQuery(this).attr("data-type"), // a.data.order = jQuery(this).attr("data-order")) : b && (a.data.number = b); // c.observer.trigger(c.observer.events.knownStatusesChanged, [[a]]) }) } , f = function(c) { h(c); return jQuery.extend(this, c) }; f.prototype.getStatus = function(c) { return e(this, c) } ; f.prototype.getDeepLink = function() { var c = "", a; this.inDeepLinking && (a = e(this, !1), a.data && a.data.path && (c = this.name + this.options.delimiter0 + "path=" + a.data.path)); return c } ; f.prototype.getStatusByDeepLink = function(c, a) { var b = null; this.inDeepLinking && (b = e(this, !0), b.data && "path" === c && b.data.path && (b.data.path = a)); return b } ; f.prototype.getPaths = function(c) { g(this, c) } ; f.prototype.setStatus = function(c, a) { var b; (b = this.$control.find('option[data-path="' + c.data.path + '"]')) && 0 < b.length && (b.get(0).selected = !0) } ; jQuery.fn.jplist.controls.FilterSelect = function(c) { return new f(c) } ; jQuery.fn.jplist.controlTypes["filter-select"] = { className: "FilterSelect", options: {} } } )(); (function() { var e = function(a, b) { var d; d = b.find("option[checked]"); 0 >= d.length && (d = b.find("option").eq(0)); return d } , g = function(a) { a.params.$dropdowns.each(function() { var b = jQuery(this) , b = e(a, b); 0 <= b.length && b.prop("selected", !0) }) } , h = function(a, b) { var d = [], c; c = null; a.params.$dropdowns.each(function() { var c = jQuery(this) , f = ""; b ? (c = e(a, c), 0 < c.length && (f = c.attr("value"))) : f = c.val(); f && d.push(f) }); c = new jQuery.fn.jplist.controls.TextFilterDropdownGroupDTO(d,a.params.mode,a.params.dataPath,a.params.ignoreRegex); return c = new jQuery.fn.jplist.StatusDTO(a.name,a.action,a.type,c,a.inStorage,a.inAnimation,a.isAnimateToTop,a.inDeepLinking) } , f = function(a) { a.params.$dropdowns.on("change", function() { a.observer.trigger(a.observer.events.unknownStatusesChanged, [!1]) }) } , c = function(a) { a.params = { $dropdowns: a.$control.find("select"), mode: a.$control.attr("data-mode") || "and", dataPath: a.$control.attr("data-path") || "", ignoreRegex: a.$control.attr("data-ignore-regex") || "" }; g(a); f(a); return jQuery.extend(this, a) }; c.prototype.getPaths = function(a) { var b; this.params.dataPath && (b = new jQuery.fn.jplist.PathModel(this.params.dataPath,"text"), a.push(b)) } ; c.prototype.getStatus = function(a) { return h(this, a) } ; c.prototype.setStatus = function(a, b) { var d; g(this); if (a.data && a.data.textGroup && jQuery.isArray(a.data.textGroup) && 0 < a.data.textGroup.length) for (var c = 0; c < a.data.textGroup.length; c++) d = a.data.textGroup[c], d = this.params.$dropdowns.find('option[value="' + d + '"]'), 0 < d.length && d.prop("selected", !0) } ; c.prototype.getDeepLink = function() { var a = "", b, d = ""; if (this.inDeepLinking && (b = h(this, !1), b.data && jQuery.isArray(b.data.textGroup) && 0 < b.data.textGroup.length)) { for (a = 0; a < b.data.textGroup.length; a++) "" !== d && (d += this.options.delimiter2), d += b.data.textGroup[a]; a = this.name + this.options.delimiter0 + "textGroup=" + d } return a } ; c.prototype.getStatusByDeepLink = function(a, b) { var d = null, c; this.inDeepLinking && (d = h(this, !0), d.data && "textGroup" === a && (c = b.split(this.options.delimiter2), 0 < c.length && (d.data.textGroup = c))); return d } ; jQuery.fn.jplist.controls.FilterDropdownGroupSelectText = function(a) { return new c(a) } ; jQuery.fn.jplist.controlTypes["dropdown-select-group-text-fitler"] = { className: "FilterDropdownGroupSelectText", options: {}, dropdown: !0 } } )(); (function() { jQuery.fn.jplist.controls.DropdownFilterDTO = function(e, g) { return { path: e, type: g, filterType: "path" } } } )(); (function() { jQuery.fn.jplist.controls.TextFilterDropdownGroupDTO = function(e, g, h, f) { return { textGroup: e, logic: g, path: h, ignoreRegex: f, filterType: "textGroup" } } } )();