From: Yasin Date: Thu, 12 Dec 2013 15:25:29 +0000 (+0100) Subject: Merge branch 'master' of ssh://git.onelab.eu/git/myslice X-Git-Tag: myslice-0.3-0~89^2~3 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=deffa7356a6d6fc974b7f152f0b6d0fe13573347;hp=dbb84185fece941e419c1d1df6a7b84203537ce0;p=unfold.git Merge branch 'master' of ssh://git.onelab.eu/git/myslice --- diff --git a/plugins/googlemap/__init__.py b/plugins/googlemap/__init__.py index 8ceaec63..583b8dd5 100644 --- a/plugins/googlemap/__init__.py +++ b/plugins/googlemap/__init__.py @@ -44,4 +44,8 @@ class GoogleMap (Plugin): return reqs # the list of things passed to the js plugin - def json_settings_list (self): return ['plugin_uuid','query_uuid', 'query_all_uuid', 'latitude', 'longitude', 'zoom', ] + def json_settings_list (self): + return [ 'plugin_uuid', 'query_uuid', 'query_all_uuid', + 'init_key', + 'latitude', 'longitude', 'zoom', + ] diff --git a/plugins/googlemap/static/js/googlemap.js b/plugins/googlemap/static/js/googlemap.js index 7346f733..2feb424c 100644 --- a/plugins/googlemap/static/js/googlemap.js +++ b/plugins/googlemap/static/js/googlemap.js @@ -151,14 +151,16 @@ // retrieve DOM checkbox and make sure it is checked/unchecked set_checkbox_from_record: function(record, checked) { var init_id=record[this.init_key]; - var checkbox = this.by_id [ init_id ]; - checkbox.prop('checked',checked); + var checkbox = this.by_init_id [ init_id ]; + if (checkbox) checkbox.prop('checked',checked); + else this.warning(record, "googlemap.set_checkbox_from_record - not found "+init_id); }, set_checkbox_from_data: function(id, checked) { - var id=record[this.canonical_key]; + var id=record [this.canonical_key]; var checkbox = this.by_id [ id ]; - checkbox.prop('checked',checked); + if (checkbox) checkbox.prop('checked',checked); + else this.warning(record, "googlemap.set_checkbox_from_data - not found "+init_id); }, // this record is *in* the slice