JS Checkbox Filter with multiple Categorys
<p>First, i'm realy new in programming, so i didn't have so many knowhow. Second, my english is not the best, but i hope you can understand my problem. Last but not Least, please help me, to find a issues to my Problem. Thanks a Lot! Sorry for a maybe duplicate thread, i didn't find one that help me.</p>

<p>The Problem:
I had a html File with a Checkbox Filter. Any Checkbox is staying for one category. For Example A, B, C, D,...</p>

<p>So when i click a checkbox, the filter is working and shows only the Entrys from the Category. </p>

<p>But when i click two checkboxes, maybe A and B there comes nothing. But there should Come all entrys from A and B. </p>

<p>I buyed this script, and i had tryed to contact the Developer but i get no answer from him in the last few weeks, so i had to find a solution at my owne.</p>

<p>Here is my html:</p>

<pre><code>&lt;div class="box"&gt;

                                &lt;!-- checkbox filters --&gt;
        &lt;div 
           class="cb-group-filter left"
           data-control-type="checkbox-group-filter"
           data-control-action="filter"
           data-control-name="themes-aa"&gt;

           &lt;div class="cb"&gt;
              &lt;input            
                 data-path=".aa"                                    
                 id="aa" 
                 type="checkbox"                                    
              /&gt;
              &lt;label for="aa"&gt;A+&lt;/label&gt;
           &lt;/div&gt;                                       
        &lt;/div&gt;

        &lt;!-- checkbox filters --&gt;
        &lt;div 
           class="cb-group-filter left"
           data-control-type="checkbox-group-filter"
           data-control-action="filter"
           data-control-name="themes-a"&gt;

           &lt;div class="cb"&gt;
              &lt;input 
                 data-path=".a"                                 
                 id="a" 
                 type="checkbox" /&gt;
              &lt;label for="a"&gt;A&lt;/label&gt;
           &lt;/div&gt;                                   
        &lt;/div&gt;
</code></pre>

<p>And here is my JS Script:</p>

<pre><code>    jQuery.fn.jplist.controls.Textbox.getStatus(!1,c);c.$jplistBox.trigger(c.options.force_ask_event,[!1])})}})(jQuery);(function(e){jQuery.fn.jplist.controls.Views={};jQuery.fn.jplist.controls.Views.statusRelatedData=function(c){return{isGrid:c}};jQuery.fn.jplist.controls.Views.render=function(c){var a,b,d="list-view";c.$jplistBox.hasClass("grid")&amp;&amp;(d="grid-view");a=c.$control.find(".list-view");b=c.$control.find(".grid-view");c.$control.data("list-view-btn",a);c.$control.data("grid-view-btn",b);c.$control.data("default-grid",d)};jQuery.fn.jplist.controls.Views.getDeepLink=function(c){var a="",b;b=jQuery.fn.jplist.controls.Views.getStatus(!1,
c);b.data&amp;&amp;b.data.isGrid&amp;&amp;(a=c.name+"--isGrid=true");return a};jQuery.fn.jplist.controls.Views.getStatusByDeepLink=function(c,a,b){c=jQuery.fn.jplist.controls.Views.getStatus(!0,c);c.data&amp;&amp;"isGrid"===a&amp;&amp;(c.data.isGrid=!0);return c};jQuery.fn.jplist.controls.Views.getStatus=function(c,a){var b,d=!1;c?(b=a.$control.data("default-grid"))&amp;&amp;"grid-view"===b&amp;&amp;(d=!0):d=a.$jplistBox.hasClass("grid");b=new jQuery.fn.jplist.controls.Views.statusRelatedData(d);return new jQuery.fn.jplist.models.Status(a.name,
a.action,a.type,b,a.cookies,a.category)};jQuery.fn.jplist.controls.Views.setStatus=function(c,a,b){c.data&amp;&amp;(!a.cookies&amp;&amp;b?(a.$jplistBox.removeClass("grid"),c.data.isGrid=!1,a.$jplistBox.trigger(a.options.status_event,[c])):(c=c.data.isGrid)?a.$jplistBox.addClass("grid"):a.$jplistBox.removeClass("grid"))};jQuery.fn.jplist.controls.Views.initEvents=function(c){var a,b;a=c.$control.data("list-view-btn");b=c.$control.data("grid-view-btn");if(0&lt;a.length)a.off("click").on("click",function(){c.$jplistBox.removeClass("grid");
c.events.lastStatus=jQuery.fn.jplist.controls.Views.getStatus(!1,c);c.$jplistBox.trigger(c.options.force_ask_event,[!1])});if(0&lt;b.length)b.off("click").on("click",function(){c.$jplistBox.addClass("grid");c.events.lastStatus=jQuery.fn.jplist.controls.Views.getStatus(!1,c);c.$jplistBox.trigger(c.options.force_ask_event,[!1])})}})(jQuery);(function(e){e.fn.jplist.controls.CheckboxFilter={};e.fn.jplist.controls.CheckboxFilter.render=function(c){var a=c.$control.get(0).checked;!0!==a&amp;&amp;(a=!1);c.$control.data("default-checked",a)};e.fn.jplist.controls.CheckboxFilter.getDeepLink=function(c){var a="",b;b=e.fn.jplist.controls.CheckboxFilter.getStatus(!1,c);b.data&amp;&amp;b.data.isChecked&amp;&amp;(a=c.name+"--isChecked=true");return a};e.fn.jplist.controls.CheckboxFilter.getStatusByDeepLink=function(c,a,b){c=e.fn.jplist.controls.CheckboxFilter.getStatus(!0,
c);c.data&amp;&amp;"isChecked"===a&amp;&amp;(c.data.isChecked=!0);return c};e.fn.jplist.controls.CheckboxFilter.getPaths=function(c,a){var b;if(b=c.$control.attr("data-path"))b=new e.fn.jplist.models.Path(b,"text"),e.fn.jplist.services.Path.isPathInList(b,a)||a.push(b);b=c.$jplistBox.find('[data-control-type="'+c.type+'"][data-control-action="'+c.action+'"][data-logic="or"]');c.$jplistBox.data("jplist-all-cb-or",b)};e.fn.jplist.controls.CheckboxFilter.getStatus=function(c,a){var b=null,d,f,b="and";(f=a.$control.attr("data-logic"))&amp;&amp;
"or"===f.toString()&amp;&amp;(b="or");c?(f=a.$control.data("default-checked"),!0!==f&amp;&amp;(f=!1)):f=a.$control.get(0).checked;"and"===b?d={path:a.$control.attr("data-path"),type:"text",filterType:"path",isChecked:f}:(d=a.$jplistBox.data("jplist-all-cb-or"),d={path:a.$control.attr("data-path"),type:"text",filterType:"inverted_path",checked_checkboxes:d.filter(":checked"),isChecked:f});"and"===b?f||(d.filterType=""):f&amp;&amp;(d.filterType="");return b=new e.fn.jplist.models.Status(a.name,a.action,a.type,d,a.cookies,
a.category)};e.fn.jplist.controls.CheckboxFilter.setStatus=function(c,a,b){a.$control.attr("data-logic");a.$control.attr("data-path");!0!==c.data.isChecked?a.$control.get(0).checked=!1:a.$control.get(0).checked=!0};e.fn.jplist.controls.CheckboxFilter.initEvents=function(c){c.$control.off().change(function(){c.events.lastStatus=e.fn.jplist.controls.CheckboxFilter.getStatus(!1,c);c.$jplistBox.trigger(c.options.force_ask_event,[!1])})}})(jQuery);(function(e){e.fn.jplist.controls.CheckboxGroupFilter={};e.fn.jplist.controls.CheckboxGroupFilter.statusRelatedData=function(c){return{pathGroup:c,filterType:"pathGroup"}};e.fn.jplist.controls.CheckboxGroupFilter.render=function(c){c=c.$control;var a=c.find("[data-path]");a.each(function(){var a=$(this);a.data("checked",a.get(0).checked)});c.data("checkboxes",a)};e.fn.jplist.controls.CheckboxGroupFilter.getDeepLink=function(c){var a="",b,d="";b=e.fn.jplist.controls.CheckboxGroupFilter.getStatus(!1,
c);if(b.data&amp;&amp;$.isArray(b.data.pathGroup)&amp;&amp;0&lt;b.data.pathGroup.length){for(a=0;a&lt;b.data.pathGroup.length;a++)""!==d&amp;&amp;(d+="~"),d+=b.data.pathGroup[a];a=c.name+"--pathGroup="+d}return a};e.fn.jplist.controls.CheckboxGroupFilter.getStatusByDeepLink=function(c,a,b){c=e.fn.jplist.controls.CheckboxGroupFilter.getStatus(!0,c);c.data&amp;&amp;"pathGroup"===a&amp;&amp;(a=b.split("~"),0&lt;a.length&amp;&amp;(c.data.pathGroup=a));return c};e.fn.jplist.controls.CheckboxGroupFilter.getPaths=function(c,a){var b=c.$control.data("checkboxes"),
d;if(b)for(var f=0;f&lt;b.length;f++)if(d=b.eq(f),d=d.attr("data-path"))d=new e.fn.jplist.models.Path(d,"text"),e.fn.jplist.services.Path.isPathInList(d,a)||a.push(d)};e.fn.jplist.controls.CheckboxGroupFilter.getStatus=function(c,a){var b=a.$control.data("checkboxes"),d=[],f,h,k;if(c)for(k=0;k&lt;b.length;k++){if(f=b.eq(k),h=f.data("checked"))(h=f.attr("data-path"))&amp;&amp;d.push(h)}else for(k=0;k&lt;b.length;k++)f=b.eq(k),(h=f.attr("data-path"))&amp;&amp;f.get(0).checked&amp;&amp;d.push(h);b=new e.fn.jplist.controls.CheckboxGroupFilter.statusRelatedData(d);
return new e.fn.jplist.models.Status(a.name,a.action,a.type,b,a.cookies,a.category)};e.fn.jplist.controls.CheckboxGroupFilter.setStatus=function(c,a,b){var d;if(a=a.$control.data("checkboxes"))if(a.each(function(){$(this).get(0).checked=!1}),c.data&amp;&amp;c.data.pathGroup&amp;&amp;$.isArray(c.data.pathGroup)&amp;&amp;0&lt;c.data.pathGroup.length)for(b=0;b&lt;c.data.pathGroup.length;b++)d=c.data.pathGroup[b],d=a.filter('[data-path="'+d+'"]'),0&lt;d.length&amp;&amp;(d.get(0).checked=!0)};e.fn.jplist.controls.CheckboxGroupFilter.initEvents=
function(c){c.$control.data("checkboxes").off("change").change(function(){c.events.lastStatus=e.fn.jplist.controls.CheckboxGroupFilter.getStatus(!1,c);c.$jplistBox.trigger(c.options.force_ask_event,[!1])})}})(jQuery);(function(e){e.fn.jplist.controls.CheckboxTextFilter={};e.fn.jplist.controls.CheckboxTextFilter.statusRelatedData=function(c,a,b,d){return{textGroup:c,logic:a,path:b,ignoreRegex:d,filterType:"textGroup"}};e.fn.jplist.controls.CheckboxTextFilter.render=function(c){c=c.$control;var a=c.find('input[type="checkbox"]');a.each(function(){var a=$(this);a.data("checked",a.get(0).checked)});c.data("checkboxes",a)};e.fn.jplist.controls.CheckboxTextFilter.getDeepLink=function(c){var a="",b,d="";b=e.fn.jplist.controls.CheckboxTextFilter.getStatus(!1,
c);if(b.data&amp;&amp;$.isArray(b.data.textGroup)&amp;&amp;0&lt;b.data.textGroup.length){for(a=0;a&lt;b.data.textGroup.length;a++)""!==d&amp;&amp;(d+="~"),d+=b.data.textGroup[a];a=c.name+"--textGroup="+d}return a};e.fn.jplist.controls.CheckboxTextFilter.getStatusByDeepLink=function(c,a,b){var d=null,d=e.fn.jplist.controls.CheckboxTextFilter.getStatus(!0,c);d.data&amp;&amp;"textGroup"===a&amp;&amp;(c=b.split("~"),0&lt;c.length&amp;&amp;(d.data.textGroup=c));return d};e.fn.jplist.controls.CheckboxTextFilter.getPaths=function(c,a){var b;if(b=c.$control.attr("data-path"))b=
new e.fn.jplist.models.Path(b,"text"),e.fn.jplist.services.Path.isPathInList(b,a)||a.push(b)};e.fn.jplist.controls.CheckboxTextFilter.getStatus=function(c,a){var b=a.$control,d=b.data("checkboxes"),f;f=[];var h,k,g="",l;if(c)for(l=0;l&lt;d.length;l++){if(k=d.eq(l),h=k.data("checked"))(h=k.val())&amp;&amp;f.push(h)}else for(l=0;l&lt;d.length;l++)k=d.eq(l),(h=k.val())&amp;&amp;k.get(0).checked&amp;&amp;f.push(h);d=b.attr("data-path");(b=b.attr("data-logic"))||(b="or");a.controlTypeOptions&amp;&amp;a.controlTypeOptions.ignore&amp;&amp;(g=a.controlTypeOptions.ignore);
f=new e.fn.jplist.controls.CheckboxTextFilter.statusRelatedData(f,b,d,g);return new e.fn.jplist.models.Status(a.name,a.action,a.type,f,a.cookies,a.category)};e.fn.jplist.controls.CheckboxTextFilter.setStatus=function(c,a,b){var d;if(a=a.$control.data("checkboxes"))if(a.each(function(){$(this).get(0).checked=!1}),c.data&amp;&amp;c.data.textGroup&amp;&amp;$.isArray(c.data.textGroup)&amp;&amp;0&lt;c.data.textGroup.length)for(b=0;b&lt;c.data.textGroup.length;b++)d=c.data.textGroup[b],d=a.filter('[value="'+d+'"]'),0&lt;d.length&amp;&amp;(d.get(0).checked=
!0)};e.fn.jplist.controls.CheckboxTextFilter.initEvents=function(c){c.$control.data("checkboxes").off("change").change(function(){c.events.lastStatus=e.fn.jplist.controls.CheckboxTextFilter.getStatus(!1,c);c.$jplistBox.trigger(c.options.force_ask_event,[!1])})}})(jQuery);(function(e){jQuery.fn.jplist.controls.ButtonFilter={};jQuery.fn.jplist.controls.ButtonFilter.render=function(c){c.$control.data("selected",!1)};jQuery.fn.jplist.controls.ButtonFilter.getDeepLink=function(c){var a="",b;b=jQuery.fn.jplist.controls.ButtonFilter.getStatus(!1,c);b.data&amp;&amp;b.data.selected&amp;&amp;(a=c.name+"--selected=true");return a};jQuery.fn.jplist.controls.ButtonFilter.getStatusByDeepLink=function(c,a,b){c=jQuery.fn.jplist.controls.ButtonFilter.getStatus(!0,c);c.data&amp;&amp;"selected"===a&amp;&amp;(c.data.selected=
!0);return c};jQuery.fn.jplist.controls.ButtonFilter.getPaths=function(c,a){var b;if((b=c.$control.attr("data-path"))&amp;&amp;""!==e.trim(b))b=new jQuery.fn.jplist.models.Path(b,"text"),jQuery.fn.jplist.services.Path.isPathInList(b,a)||a.push(b)};jQuery.fn.jplist.controls.ButtonFilter.getStatus=function(c,a){var b;b=(b=c?!1:a.$control.data("selected"))?{path:a.$control.attr("data-path"),type:"text",filterType:"path",selected:b}:{path:a.$control.attr("data-path"),type:"text",filterType:"",selected:b};return new jQuery.fn.jplist.models.Status(a.name,
a.action,a.type,b,a.cookies,a.category)};jQuery.fn.jplist.controls.ButtonFilter.setStatus=function(c,a,b){a.$control.data("selected",c.data.selected);c.data.selected?a.$control.addClass("selected"):a.$control.removeClass("selected")};jQuery.fn.jplist.controls.ButtonFilter.initEvents=function(c){var a;c.$control.off().click(function(){a=c.$control.data("selected");c.$control.data("selected",!a);a?c.$control.removeClass("selected"):c.$control.addClass("selected");c.$jplistBox.trigger(c.options.force_ask_event,
[!1])})}})(jQuery);(function(e){jQuery.fn.jplist.controls.ButtonFilterGroup={};jQuery.fn.jplist.controls.ButtonFilterGroup.render=function(c){var a=c.$control.find("[data-button]");a.each(function(){e(this).data("selected",!1)});c.$control.data("$buttons",a)};jQuery.fn.jplist.controls.ButtonFilterGroup.getDeepLink=function(c){return""};jQuery.fn.jplist.controls.ButtonFilterGroup.getStatusByDeepLink=function(c,a,b){return null};jQuery.fn.jplist.controls.ButtonFilterGroup.getPaths=function(c,a){var b=c.$control.data("$buttons"),
d;if(b)for(var f=0;f&lt;b.length;f++)if(d=b.eq(f),d=d.attr("data-path"))d=new jQuery.fn.jplist.models.Path(d,"text"),jQuery.fn.jplist.services.Path.isPathInList(d,a)||a.push(d)};jQuery.fn.jplist.controls.ButtonFilterGroup.getStatus=function(c,a){var b=a.$control.data("$buttons"),d=[],f,e,k;for(e=0;e&lt;b.length;e++)if(f=b.eq(e),k=f.data("selected"))(f=f.attr("data-path"))&amp;&amp;d.push(f);return new jQuery.fn.jplist.models.Status(a.name,a.action,a.type,{pathGroup:d,filterType:"pathGroup"},a.cookies,a.category)};
jQuery.fn.jplist.controls.ButtonFilterGroup.setStatus=function(c,a,b){var d;if(a=a.$control.data("$buttons"))if(a.each(function(){e(this).removeClass("selected")}),c.data&amp;&amp;c.data.pathGroup&amp;&amp;e.isArray(c.data.pathGroup)&amp;&amp;0&lt;c.data.pathGroup.length)for(b=0;b&lt;c.data.pathGroup.length;b++)d=c.data.pathGroup[b],d=a.filter('[data-path="'+d+'"]'),0&lt;d.length&amp;&amp;d.addClass("selected")};jQuery.fn.jplist.controls.ButtonFilterGroup.initEvents=function(c){var a,b=c.$control.data("$buttons");if(b)b.off("click").on("click",
function(){var b;b=e(this);a=b.data("selected");b.data("selected",!a);c.events.lastStatus=jQuery.fn.jplist.controls.ButtonFilterGroup.getStatus(!1,c);c.$jplistBox.trigger(c.options.force_ask_event,[!1])})}})(jQuery);(function(e){jQuery.fn.jplist.controls.ButtonTextFilter={};jQuery.fn.jplist.controls.ButtonTextFilter.render=function(c){c.$control.data("selected",!1);c.$control.data("dataPath",c.$control.attr("data-path"));c.$control.data("dataText",c.$control.attr("data-text"))};jQuery.fn.jplist.controls.ButtonTextFilter.statusRelatedData=function(c,a,b,d){return{path:c,ignore:b,value:a,selected:d,filterType:"text"}};jQuery.fn.jplist.controls.ButtonTextFilter.getDeepLink=function(c){var a="",b;b=jQuery.fn.jplist.controls.ButtonTextFilter.getStatus(!1,
</code></pre>

<p>Can anyone help me?</p>

<p>thanks a lot Mario</p>