Compare commits

..

1 Commits

Author SHA1 Message Date
4678111e19 For bug #78163
Check symbols before specifying the default form value
2025-11-18 12:16:31 +03:00
6 changed files with 16 additions and 6 deletions

12
api.js
View File

@ -493,7 +493,17 @@ window["AscOForm"] = window.AscOForm = AscOForm;
if (!form || !form.IsForm())
return;
return this.private_SetFormValue(form.GetId(), value);
if (typeof(value) === "string")
{
let _t = this;
AscFonts.FontPickerByCharacter.checkText(value, this, function() {
_t.private_SetFormValue(form.GetId(), value);
});
}
else
{
this.private_SetFormValue(form.GetId(), value);
}
};
window['Asc']['asc_docs_api'].prototype['asc_GetFormValue'] = window['Asc']['asc_docs_api'].prototype.asc_GetFormValue = function(formId)
{

View File

@ -65,7 +65,7 @@
this.UserMasters = [];
this.FieldMasters = [];
}
AscCommon.InitClass(CDocument, AscOForm.CBaseFormatObject, AscDFH.historyitem_type_OForm_Document);
AscFormat.InitClass(CDocument, AscOForm.CBaseFormatObject, AscDFH.historyitem_type_OForm_Document);
CDocument.prototype.clear = function()
{
// TODO: fields?

View File

@ -50,7 +50,7 @@
this.Parent = null;
}
AscCommon.InitClass(CFieldGroup, AscOForm.CBaseFormatObject, AscDFH.historyitem_type_OForm_FieldGroup);
AscFormat.InitClass(CFieldGroup, AscOForm.CBaseFormatObject, AscDFH.historyitem_type_OForm_FieldGroup);
CFieldGroup.prototype.setParent = function(parent)
{
if (this.Parent === parent)

View File

@ -51,7 +51,7 @@
if (true === generateId)
this.setFieldId(AscCommon.CreateGUID());
}
AscCommon.InitClass(CFieldMaster, AscOForm.CBaseFormatObject, AscDFH.historyitem_type_OForm_FieldMaster);
AscFormat.InitClass(CFieldMaster, AscOForm.CBaseFormatObject, AscDFH.historyitem_type_OForm_FieldMaster);
CFieldMaster.prototype.setLogicField = function(logicField)
{
this.Field = logicField;

View File

@ -50,7 +50,7 @@
if (userMaster)
this.setUserMaster(userMaster);
}
AscCommon.InitClass(CUser, AscOForm.CBaseFormatObject, AscDFH.historyitem_type_OForm_User);
AscFormat.InitClass(CUser, AscOForm.CBaseFormatObject, AscDFH.historyitem_type_OForm_User);
CUser.prototype.setUserMaster = function(userMaster)
{
if (this.UserMaster === userMaster)

View File

@ -71,7 +71,7 @@
this.Parent = null;
}
AscCommon.InitClass(CUserMaster, AscOForm.CBaseFormatObject, AscDFH.historyitem_type_OForm_UserMaster);
AscFormat.InitClass(CUserMaster, AscOForm.CBaseFormatObject, AscDFH.historyitem_type_OForm_UserMaster);
CUserMaster.prototype.setParent = function(parent)
{
if (this.Parent === parent)