From: Thierry Parmentelat Date: Mon, 18 Nov 2013 06:32:16 +0000 (+0100) Subject: googlemap: print out hostname for resources record that don’t have hrn set X-Git-Tag: myslice-0.3-0~113^2~7^2~7^2 X-Git-Url: http://git.onelab.eu/?p=myslice.git;a=commitdiff_plain;h=8c91ccb7597198a1abc5a47bdf53934b8be4c2c2 googlemap: print out hostname for resources record that don’t have hrn set --- diff --git a/plugins/googlemap/static/js/googlemap.js b/plugins/googlemap/static/js/googlemap.js index 39e80cc0..8501c741 100644 --- a/plugins/googlemap/static/js/googlemap.js +++ b/plugins/googlemap/static/js/googlemap.js @@ -146,7 +146,11 @@ googlemap_debug_detailed=false; // retrieve DOM checkbox and make sure it is checked/unchecked set_checkbox: function(record, checked) { var hrn=this.record_hrn (record); - if (! hrn) { messages.warning ("googlemap.set_checkbox: record has no hrn"); return; } + if (! hrn) { + try {messages.warning ("googlemap.set_checkbox: record has no hrn -- hostname="+record.hostname); } + catch (err) {messages.warning ("googlemap.set_checkbox: record has no hrn"); } + return; + } var checkbox_s = this.by_hrn [ hrn ]; if (! checkbox_s ) { messages.warning ("googlemap.set_checkbox: could not spot checkbox for hrn "+hrn); return; } checkbox_s.checkbox.prop('checked',checked);