global helper functions need to have grep-able names, i.e. a little bit longer
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Mon, 16 Sep 2013 13:07:18 +0000 (15:07 +0200)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Mon, 16 Sep 2013 13:07:18 +0000 (15:07 +0200)
manifold/js/plugin.js
plugins/active_filters/static/js/active_filters.js
plugins/googlemaps/static/js/googlemaps.js
plugins/hazelnut/static/js/hazelnut.js
plugins/myplugin/static/js/myplugin.js
plugins/query_editor/static/js/query_editor.js

index b9f74ac..5b8eff6 100644 (file)
@@ -142,7 +142,7 @@ var Plugin = Class.extend({
         }
     },
 
-    els: function(cls) {
+    elts: function(cls) {
         return $('.' + cls, this.el());
     },
 
index 89ebef2..81b1459 100644 (file)
@@ -13,7 +13,7 @@
         init: function(options, element) {
             this._super(options, element);
 
-            this.els('closeButton').click(function() {
+            this.elts('closeButton').click(function() {
                 manifold.raise_event(options.query_uuid, FILTER_REMOVED, filter);
             });
 
@@ -60,7 +60,7 @@
         check_and_hide_clear_button: function()
         {
             // Count the number of filter _inside_ the current plugin
-            var count = this.els('filterButton').length;
+            var count = this.elts('filterButton').length;
             if (count == 1) { // Including the template
                 this.el('clearFilters').hide();
             }
@@ -85,7 +85,7 @@
 
             // Add an event on click on the close button, call function removeFilter
             var self = this;
-            this.els('closeButton').last().click(function() {
+            this.elts('closeButton').last().click(function() {
                 manifold.raise_event(self.options.query_uuid, FILTER_REMOVED, filter);
             });
 
index 2add961..2a4df3d 100644 (file)
@@ -121,7 +121,7 @@ googlemaps_debug_detailed=false;
            //            this.infowindow.close();
            //            this.infowindow.open(this.map, dict_info.marker);
            //            this.infowindow.setContent(dict_info.marker.content);
-           //            this.els('map-button').unbind('click').click(this, this._button_click);
+           //            this.elts('map-button').unbind('click').click(this, this._button_click);
            // END turning off temporarily
             //var button = this.checkbox(record, checked);
             //this.el('checkbox', this.id_from_record(method, record)).html(button);
@@ -214,7 +214,7 @@ googlemaps_debug_detailed=false;
                 self.infowindow.open(map, marker);
                 // onload of the infowindow on the map, bind a click on a button
                 google.maps.event.addListener(self.infowindow, 'domready', function() {
-                    self.els('map-button').unbind('click').click(self, self._button_click);
+                    self.elts('map-button').unbind('click').click(self, self._button_click);
                    //                    jQuery(".map-button").click({instance: instance_, infoWindow: object.infowindow}, button_click);                     
                 });
             });
index ca63e1e..13bc5d8 100644 (file)
              * Handle clicks on checkboxes: reassociate checkbox click every time
              * the table is redrawn 
              */
-            this.els('hazelnut-checkbox').unbind('click').click(this, this._check_click);
+            this.elts('hazelnut-checkbox').unbind('click').click(this, this._check_click);
 
             if (!this.table)
                 return;
index 1801115..da65c43 100644 (file)
@@ -61,7 +61,7 @@
 
         show_hide_button: function() 
         {
-            // this.id, this.el, this.cl, this.els
+            // this.id, this.el, this.cl, this.elts
             // same output as a jquery selector with some guarantees
         },
 
index e065a65..3fb1e4e 100644 (file)
 
             this.listen_query(options.query_uuid);
 
-            this.els('queryeditor-auto-filter').change(this.event_filter_added('='));
-            this.els('queryeditor-filter').change(this.event_filter_added('='));
-            this.els('queryeditor-filter-min').change(this.event_filter_added('>'));
-            this.els('queryeditor-filter-max').change(this.event_filter_added('<'));
+            this.elts('queryeditor-auto-filter').change(this.event_filter_added('='));
+            this.elts('queryeditor-filter').change(this.event_filter_added('='));
+            this.elts('queryeditor-filter-min').change(this.event_filter_added('>'));
+            this.elts('queryeditor-filter-max').change(this.event_filter_added('<'));
 
             var self = this;
-            this.els('queryeditor-check').click(function() { 
+            this.elts('queryeditor-check').click(function() { 
                 manifold.raise_event(self.options.query_uuid, this.checked?FIELD_ADDED:FIELD_REMOVED, this.value);
             });