pyrocms/pyrocms — pull request #1820 by ryun (2012-09-06 23:56:53+00:00)
Title: new "Developer friendly" filter plugin (jquery)

I will submit the docs in due time.

Until then:

Here is a new jquery plugin for filtering which takes the place of pyro.filter
It is a lot more friendly for third-party development, here are some examples/usages:

```javascript

//setup new defaults for the filter plugin
$.fn.pyroFilter.filterDefaults = {
filter_onload: true,
content: '#filter-stage',
module: '',
module_query: 'input[name="f_module"]'
};

//override global defaults
$.fn.pyroFilter.filterDefaults.filter_onload = true;

//init plugin
$('#filters form').pyroFilter({filter_onload:false});

//refresh filter results (trigger change)
$('#filters form').pyroFilter('refresh');

// fire custom filter
var form_data = {};
$('#filters form').pyroFilter('do_filter', form_data, url);

// Get and instance
var instance = $('#filters form').pyroFilter('getInstance');

//instance now holds all the methods from our plugin
instance.refresh();
instance.do_filter(form_data, url);
```