* License: GPLv3
*/
+// NOTE: We are not making use of element, but this.el() instead...
+
(function($){
var ActiveFilters = Plugin.extend({
show_clear_button: function()
{
this.el('clearFilters').show();
- }
+ },
hide_clear_button: function()
{
this.el('clearFilters').hide();
- }
+ },
check_and_hide_clear_button: function()
{
// Count the number of filter _inside_ the current plugin
var count = this.els('filterButton').length;
if (count == 1) { // Including the template
- jQuery("#clearFilters").hide();
+ this.el('clearFilters').hide();
}
- }
+ },
clear_filters: function()
{
this.show_clear_button();
},
- remove_filter = function(filter)
+ remove_filter: function(filter)
{
this.el(this.id_from_filter(filter, false)).remove();
this.check_and_hide_clear_button();