Only loop through existing widgets, not the whole list

This commit is contained in:
Nathan Gray 2012-06-13 15:18:34 +00:00
parent 19264649a6
commit fb3672f950

View File

@ -315,7 +315,7 @@ var et2_customfields_list = et2_valueWidget.extend([et2_IDetachedDOM, et2_IInput
return null; return null;
} }
var value = {}; var value = {};
for(var field_name in this.options.customfields) for(var field_name in this.widgets)
{ {
if(this.widgets[field_name].getValue) if(this.widgets[field_name].getValue)
{ {
@ -327,7 +327,7 @@ var et2_customfields_list = et2_valueWidget.extend([et2_IDetachedDOM, et2_IInput
isDirty: function() { isDirty: function() {
var dirty = true; var dirty = true;
for(var field_name in this.options.customfields) for(var field_name in this.widgets)
{ {
if(this.widgets[field_name].isDirty) if(this.widgets[field_name].isDirty)
{ {
@ -338,7 +338,7 @@ var et2_customfields_list = et2_valueWidget.extend([et2_IDetachedDOM, et2_IInput
}, },
resetDirty: function() { resetDirty: function() {
for(var field_name in this.options.customfields) for(var field_name in this.widgets)
{ {
if(this.widgets[field_name].resetDirty) if(this.widgets[field_name].resetDirty)
{ {