Commit 6dd66d5f authored by Ilya.Kirillov's avatar Ilya.Kirillov

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

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@64892 954022d7-b5bf-4e40-9824-e11837661b57
parent 937616b5
......@@ -573,9 +573,7 @@ CDocumentFieldsManager.prototype.Register_Field = function(oField)
};
CDocumentFieldsManager.prototype.Update_MailMergeFields = function(Map)
{
for (var FieldName in Map)
{
if (undefined !== this.m_oMailMergeFields[FieldName])
for (var FieldName in this.m_oMailMergeFields)
{
for (var Index = 0, Count = this.m_oMailMergeFields[FieldName].length; Index < Count; Index++)
{
......@@ -583,13 +581,10 @@ CDocumentFieldsManager.prototype.Update_MailMergeFields = function(Map)
oField.Map_MailMerge(Map[FieldName]);
}
}
}
};
CDocumentFieldsManager.prototype.Replace_MailMergeFields = function(Map)
{
for (var FieldName in Map)
{
if (undefined !== this.m_oMailMergeFields[FieldName])
for (var FieldName in this.m_oMailMergeFields)
{
for (var Index = 0, Count = this.m_oMailMergeFields[FieldName].length; Index < Count; Index++)
{
......@@ -597,7 +592,6 @@ CDocumentFieldsManager.prototype.Replace_MailMergeFields = function(Map)
oField.Replace_MailMerge(Map[FieldName]);
}
}
}
};
CDocumentFieldsManager.prototype.Restore_MailMergeTemplate = function()
{
......
......@@ -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