Commit a3670c62 authored by Ilya Kirillov's avatar Ilya Kirillov

Test variant of filling form mode.

parent 07b3fcec
......@@ -39,7 +39,7 @@ if(typeof CDocument !== "undefined")
{
CDocument.prototype.Document_Is_SelectionLocked = function(CheckType, AdditionalData, DontLockInFastMode)
{
if (true === AscCommon.CollaborativeEditing.Get_GlobalLock())
if (true === AscCommon.CollaborativeEditing.Get_GlobalLock() && (false === this.IsFillingFormMode() || false === this.IsInFormField()))
return true;
AscCommon.CollaborativeEditing.OnStart_CheckLock();
......
......@@ -16028,6 +16028,24 @@ CDocument.prototype.GetAllFormTextFields = function()
{
return this.FieldsManager.GetAllFieldsByType(fieldtype_FORMTEXT);
};
CDocument.prototype.IsFillingFormMode = function()
{
return this.FillingFormMode;
};
CDocument.prototype.SetFillingFormMode = function(isFillingForm)
{
this.FillingFormMode = isFillingForm;
};
CDocument.prototype.IsInFormField = function()
{
var oSelectedInfo = this.Get_SelectedElementsInfo();
var oField = oSelectedInfo.Get_Field();
if (oSelectedInfo.Is_MixedSelection() || !oField || fieldtype_FORMTEXT !== oField.Get_FieldType())
return false;
return true;
};
function CDocumentSelectionState()
......
......@@ -7422,6 +7422,10 @@ background-repeat: no-repeat;\
{
this.asc_CloseFile();
this.OpenDocument2(this.DocumentUrl, binaryFile);
var oLogicDocument = this.WordControl.m_oLogicDocument;
if (oLogicDocument)
oLogicDocument.SetFillingFormMode(true);
};
window["asc_docs_api"].prototype["pluginMethod_GetFields"] = function()
{
......
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