- return {marker:marker, ul:ul};
- },
-
- // add an entry in the marker <ul> tag for that record
- // returns { checkbox : <input DOM> }
- create_record_checkbox: function (record,ul,checked) {
- var checkbox = $("<input>", {type:'checkbox', checked:checked, class:'geo'});
- var hrn=this.record_hrn(record);
- ul.append($("<li>").addClass("geo").append(checkbox).
- append($("<span>").addClass("geo").append(hrn)));
- var googlemap=this;
- // the callback for when a user clicks
- // NOTE: this will *not* be called for changes done by program
- checkbox.change( function (e) {
- if (googlemap_debug) messages.debug("googlemap click handler checked= " + this.checked + " hrn=" + hrn);
- manifold.raise_event (googlemap.options.query_uuid,
- this.checked ? SET_ADD : SET_REMOVED, hrn);
- });
- return checkbox;
- },
-
- // retrieve DOM checkbox and make sure it is checked/unchecked
+ return {marker:marker, ul:ul};
+ },
+
+ // given an input <ul> element, this method inserts a <li> with embedded checkbox
+ // for displaying/selecting the resource corresponding to the input record
+ // returns the created <input> element for further checkbox manipulation
+ create_record_checkbox: function (record,ul,checked) {
+ var checkbox = $("<input>", {type:'checkbox', checked:checked, class:'geo'});
+ var id=this.record_id(record);
+ // use hrn as far as possible for displaying
+ var label= ('hrn' in record) ? record.hrn : id;
+ ul.append($("<li>").addClass("geo").append(checkbox).
+ append($("<span>").addClass("geo").append(label)));
+ var googlemap=this;
+ // the callback for when a user clicks
+ // NOTE: this will *not* be called for changes done by program
+ checkbox.change( function (e) {
+ manifold.raise_event (googlemap.options.query_uuid, this.checked ? SET_ADD : SET_REMOVED, id);
+ });
+ return checkbox;
+ },
+
+ warning: function (record,message) {
+ try {messages.warning (message+" -- hostname="+record.hostname); }
+ catch (err) {messages.warning (message); }
+ },
+
+ // retrieve DOM checkbox and make sure it is checked/unchecked