mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-09 16:35:02 +02:00
* All apps/customfields:
Fix customfields options with multiple negated fields and single custom field Specify css class on customfield's row with named as field's id, in order to be able to customize its style
This commit is contained in:
@ -53,7 +53,7 @@ var et2_customfields_list = et2_valueWidget.extend([et2_IDetachedDOM, et2_IInput
|
||||
}
|
||||
},
|
||||
|
||||
legacyOptions: ["type_filter","private"], // Field restriction & private done server-side
|
||||
legacyOptions: ["type_filter","private", "fields"], // Field restriction & private done server-side
|
||||
|
||||
prefix: '#',
|
||||
|
||||
@ -189,7 +189,8 @@ var et2_customfields_list = et2_valueWidget.extend([et2_IDetachedDOM, et2_IInput
|
||||
{
|
||||
|
||||
var row = jQuery(document.createElement("tr"))
|
||||
.appendTo(this.tbody);
|
||||
.appendTo(this.tbody)
|
||||
.addClass(this.id+'_'+id);
|
||||
var cf = jQuery(document.createElement("td"))
|
||||
.appendTo(row);
|
||||
if(!field.type) field.type = 'text";'
|
||||
@ -286,15 +287,22 @@ var et2_customfields_list = et2_valueWidget.extend([et2_IDetachedDOM, et2_IInput
|
||||
// Set the value for this element
|
||||
var contentMgr = this.getArrayMgr("content");
|
||||
if (contentMgr != null) {
|
||||
var val = contentMgr.getEntry(this.id);
|
||||
var val = contentMgr.getEntry(this.id);
|
||||
_attrs["value"] = {};
|
||||
if (val !== null)
|
||||
{
|
||||
// Only set the values that match desired custom fields
|
||||
for(var key in val)
|
||||
if(this.id.indexOf(this.prefix) === 0 && data.fields[this.id.replace(this.prefix,'')] === true)
|
||||
{
|
||||
if(key.indexOf(this.prefix) == 0) {
|
||||
_attrs["value"][key] = val[key];
|
||||
_attrs['value'][this.id] = val;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Only set the values that match desired custom fields
|
||||
for(var key in val)
|
||||
{
|
||||
if(key.indexOf(this.prefix) == 0) {
|
||||
_attrs["value"][key] = val[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
//_attrs["value"] = val;
|
||||
|
Reference in New Issue
Block a user