luis-almeida / filtrify

Beautiful advanced tag filtering with HTML5 and jQuery
Other
644 stars 113 forks source link

Support for Exclusive panel #10

Closed AvnerCohen closed 12 years ago

AvnerCohen commented 12 years ago

First thing, apologies if I've done anything in appropriate, this is my first ever pull request in github :)

In our application, we required the behavior where only a single "panel" can be visible at any given point, more than that is a bit confusing to the user.

I wasn't exactly sure ho to implement this in the existing code, I was expecting to use this._menu[], but the "list" Function there prevented me from iterating on that Array, so I used this._order[] instead. Not sure if this is the correct way to do so.

Hopefully this will help someone out there..

-Avner

luis-almeida commented 12 years ago

Hi,

First of all, thanks! :) Yeah, If you have a lot of categories and you open all the panels it gets a bit confusing. I think it's a really good idea to add this option and I should have though of this first :)

this_order is just a helper array to get the right category order, I'm not really confortable using it for anything else. This can be done with the menu object. Also, I have completely rewritten and extended the plugin's API, made a lot of code refactoring and also added some new features. I have no idea when I will find the time to document all this changes, probably not so soon, but this upgrade will be version 1.0 of Filtrify. That's also why I won't accept this pull request now but I will include this feature in the next release!

AvnerCohen commented 12 years ago

Thanks Luis.

Indeed, my main target was to illustrate the feature rather than a 1:1 merge, which I'm glad was helpful.

Thumbs up for a really nice library.