reset self.in_set_buffer once consumed
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Mon, 16 Sep 2013 12:27:14 +0000 (14:27 +0200)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Mon, 16 Sep 2013 12:27:14 +0000 (14:27 +0200)
plugins/googlemaps/static/js/googlemaps.js

index 4cfb3d3..2add961 100644 (file)
@@ -23,7 +23,7 @@ googlemaps_debug_detailed=false;
             // query status
             this.received_all = false;
             this.received_set = false;
             // query status
             this.received_all = false;
             this.received_set = false;
-            this.in_set_buffer = Array();
+            this.in_set_buffer = [];
 
             // key -> { marker, checked }
             this.map_markers = {}
 
             // key -> { marker, checked }
             this.map_markers = {}
@@ -318,6 +318,8 @@ googlemaps_debug_detailed=false;
                 $.each(this.in_set_buffer, function(i, record) {
                     self.set_checkbox(record, true);
                 });
                 $.each(this.in_set_buffer, function(i, record) {
                     self.set_checkbox(record, true);
                 });
+               // reset 
+               self.in_set_buffer = [];
 
                 this.unspin();
             }
 
                 this.unspin();
             }