googlemap: print out hostname for resources record that don’t have hrn set
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Mon, 18 Nov 2013 06:32:16 +0000 (07:32 +0100)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Mon, 18 Nov 2013 06:32:16 +0000 (07:32 +0100)
plugins/googlemap/static/js/googlemap.js

index 39e80cc..8501c74 100644 (file)
@@ -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);