- set_checkbox: function(record, checked) {
- var hrn=this.record_hrn (record);
- if (! hrn) { 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);
- }, // set_checkbox
+ set_checkbox_from_record: function(record, checked) {
+ var init_id=record[this.init_key];
+ 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 checkbox = this.by_id [ id ];
+ if (checkbox) checkbox.prop('checked',checked);
+ else this.warning(record, "googlemap.set_checkbox_from_data - not found "+init_id);
+ },