Commit d875c65e authored by Ilya.Kirillov's avatar Ilya.Kirillov Committed by Alexander.Trofimov

Сделано, чтобы поля, не учавствующие в рассылке, заменялись на пустое (баг 30392).

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@64892 954022d7-b5bf-4e40-9824-e11837661b57
parent 0dfe9277
......@@ -573,29 +573,23 @@ CDocumentFieldsManager.prototype.Register_Field = function(oField)
};
CDocumentFieldsManager.prototype.Update_MailMergeFields = function(Map)
{
for (var FieldName in Map)
for (var FieldName in this.m_oMailMergeFields)
{
if (undefined !== this.m_oMailMergeFields[FieldName])
for (var Index = 0, Count = this.m_oMailMergeFields[FieldName].length; Index < Count; Index++)
{
for (var Index = 0, Count = this.m_oMailMergeFields[FieldName].length; Index < Count; Index++)
{
var oField = this.m_oMailMergeFields[FieldName][Index];
oField.Map_MailMerge(Map[FieldName]);
}
var oField = this.m_oMailMergeFields[FieldName][Index];
oField.Map_MailMerge(Map[FieldName]);
}
}
};
CDocumentFieldsManager.prototype.Replace_MailMergeFields = function(Map)
{
for (var FieldName in Map)
for (var FieldName in this.m_oMailMergeFields)
{
if (undefined !== this.m_oMailMergeFields[FieldName])
for (var Index = 0, Count = this.m_oMailMergeFields[FieldName].length; Index < Count; Index++)
{
for (var Index = 0, Count = this.m_oMailMergeFields[FieldName].length; Index < Count; Index++)
{
var oField = this.m_oMailMergeFields[FieldName][Index];
oField.Replace_MailMerge(Map[FieldName]);
}
var oField = this.m_oMailMergeFields[FieldName][Index];
oField.Replace_MailMerge(Map[FieldName]);
}
}
};
......
......@@ -275,8 +275,13 @@ ParaField.prototype.Is_NeedRestoreTemplate = function()
return false;
};
ParaField.prototype.Replace_MailMerge = function(Value)
ParaField.prototype.Replace_MailMerge = function(_Value)
{
// Пока у нас в Value может быть только текст, в будущем планируется, чтобы могли быть картинки.
var Value = _Value;
if (undefined === Value || null === Value)
Value = "";
var Paragraph = this.Paragraph;
if (!Paragraph)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment