Use read-only custom field widgets for history log

This commit is contained in:
Nathan Gray 2012-06-19 20:27:27 +00:00
parent cd6ff18379
commit e41e681354

View File

@ -182,14 +182,10 @@ var et2_historylog = et2_valueWidget.extend([et2_IDataProvider],{
// Per-field widgets - new value & old value // Per-field widgets - new value & old value
this.fields = {}; this.fields = {};
// Custom fields - try to use an existing one // Custom fields - Need to create one that's all read-only for proper display
var cf_widget = null
var labels = {}; var labels = {};
this.getRoot().iterateOver(function(widget) { cf_widget = widget;}, this, et2_customfields_list); var cf_widget = et2_createWidget('customfields', {'readonly':true}, this);
if(cf_widget == null) cf_widget.loadFields();
{
cf_widget = et2_createWidget('customfields', {}, this);
}
for(var key in cf_widget.widgets) for(var key in cf_widget.widgets)
{ {
// Add label // Add label