1rosehip / jplist

jPList jQuery Data Grid Controls is a flexible jQuery plugin for sorting, pagination and filtering of any HTML structure (DIVs, UL/LI, tables, etc).
http://jplist.com
Other
437 stars 177 forks source link

View All on drop down #191

Closed ptoassi closed 8 years ago

ptoassi commented 8 years ago

jplist.pagination-bundle.min.js

Dont stay selected view All on drop down b.prototype.setStatus = function(a, b) { var c, d; if (jQuery.isArray(a)) for (d = 0; d < a.length; d++) a[d].data && a[d].data.number && (c = a[d].data.number); else a.data && (c = a.data.number); jQuery.isNumeric(c) && (d = this.$control.find("li"), d.removeClass("active"), c = this.$control.find('li:has([data-number="' + c + '"])'), 0 === c.length && (c = this.$control.find('li:has([data-number="all"])')), 0 >= c.length && (c = d.eq(0)), c.addClass("active"), this.$control.find(".jplist-dd-panel").text(c.eq(0).text())) }; Correct: b.prototype.setStatus = function(a, b) { var c, d; if (jQuery.isArray(a)) for (d = 0; d < a.length; d++) a[d].data && a[d].data.number && (c = a[d].data.number); else a.data && (c = a.data.number); (jQuery.isNumeric(c) || "all" === c) && (d = this.$control.find("li"), d.removeClass("active"), c = this.$control.find('li:has([data-number="' + c + '"])'), 0 === c.length && (c = this.$control.find('li:has([data-number="all"])')), 0 >= c.length && (c = d.eq(0)), c.addClass("active"), this.$control.find(".jplist-dd-panel").text(c.eq(0).text())) };

1rosehip commented 8 years ago

Thank you for the feedback. I'll appreciate if you provide a pull request using the source files.