return key_field + manifold.separator + unfold.escape_id(value).replace(/\\/g, '');
},
+ // we do not need to carry around all the nonsense about backslashing dots in hrns
+ // likewise, DOM ids do not like to have dots in them
+ // because "#foo.bar" matches an elem named foo with class bar - not an id that is foo.bar
+ // so this method gives you a valid DOMID but that cannot be 'reversed' back to retrieve an hrn or the like
+ // e.g.
+ // input=input="ple.aluiple.host147-82-static\\.93-94-b\\.business\\.telecomitalia\\.it"
+ // > "ple.aluiple.host147-82-static\.93-94-b\.business\.telecomitalia\.it"
+ // flat_id(input)
+ // "ple-aluiple-host147-82-static-93-94-b-business-telecomitalia-it"
+ flat_id : function (id_in) {
+ return id_in.replace(/\\\./g,"-").replace(/\\/g,"-").replace(/\./g,"-");
+ },
+
id_from_record: function(method, record) {
var keys = manifold.metadata.get_key(method);
if (!keys)
// Prefix id with plugin_uuid
result += "<input";
result += " class='hazelnut-checkbox'";
- result += " id='" + this.id('checkbox', this.id_from_key(key, value)) + "'";
+ result += " id='" + this.flat_id(this.id('checkbox', value)) + "'";
result += " name='" + key + "'";
result += " type='checkbox'";
result += " autocomplete='off'";
}
- var checkbox_id = this.id('checkbox', this.id_from_key(this.key, key_value));
- checkbox_id = '#' + checkbox_id.replace(/\./g, '\\.');
-
+ var checkbox_id = this.flat_id(this.id('checkbox', key_value));
+ checkbox_id = '#' + checkbox_id;
var element = $(checkbox_id, this.table.fnGetNodes());
-
+// messages.debug("set_checkbox checked=" + checked + " id=" + checkbox_id + " matches=" + element.length);
element.attr('checked', checked);
},