Don't overwrite current option (set from explicit attribute or content) with a legacy option

This commit is contained in:
Nathan Gray 2012-03-15 21:56:19 +00:00
parent 23fcaf904e
commit ffe2f1677b

View File

@ -480,10 +480,14 @@ var et2_widget = Class.extend({
var splitted = et2_csvSplit(attrValue); var splitted = et2_csvSplit(attrValue);
for (var j = 0; j < splitted.length && j < _proto.legacyOptions.length; j++) for (var j = 0; j < splitted.length && j < _proto.legacyOptions.length; j++)
{
// Check to make sure we don't overwrite a current option with a legacy option
if(typeof _target[_proto.legacyOptions[j]] === "undefined")
{ {
_target[_proto.legacyOptions[j]] = splitted[j]; _target[_proto.legacyOptions[j]] = splitted[j];
} }
} }
}
else else
{ {
var mgr = this.getArrayMgr("content"); var mgr = this.getArrayMgr("content");