Merge branch 'master' of ssh://git.onelab.eu/git/myslice
[myslice.git] / plugins / googlemap / static / js / googlemap.js
index 9a56d37..8501c74 100644 (file)
@@ -104,7 +104,7 @@ googlemap_debug_detailed=false;
            // XXX BACKSLASHES original code was reading like this
            //return this.escape_id(key_value).replace(/\\/g, '');
            //  however this sequence removes backslashes from hrn's and as a result
-           // resources_selected was getting all mixed up
+           // queryupdater was getting all mixed up
            // querytable does publish hrn's with backslashes and that seems like the thing to do
            return key_value;
        },          
@@ -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);