manifold: fix in plugin.js
[myslice.git] / plugins / active_filters / active_filters.js
index 2adfd0e..89ebef2 100644 (file)
@@ -4,6 +4,8 @@
  * 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() 
         {
@@ -90,7 +92,7 @@
             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();