Commit e1b87b77 authored by Oleg Korshul's avatar Oleg Korshul

work with content controls

parent 144b4437
......@@ -593,7 +593,7 @@
if (_iframe)
_iframe.contentWindow.postMessage(pluginData.serialize(), "*");
}
this.methodReturnAsync = false;
window.g_asc_plugins.methodReturnAsync = false;
return;
}
}
......
......@@ -549,15 +549,17 @@
this.delete = function()
{
var LogicDocument = this.WordControl.m_oLogicDocument;
var LogicDocument = this.api.WordControl.m_oLogicDocument;
LogicDocument.Create_NewHistoryPoint(AscDFH.historydescription_Document_InsertDocumentsByUrls);
if (false === LogicDocument.Document_Is_SelectionLocked(AscCommon.changestype_Document_Content_Add))
{
for (var i = 0; i < this.documents.length; i++)
{
LogicDocument.RemoveContentControl(this.documents[i].Props.InternalId);
LogicDocument.RemoveContentControl(this.documents[i].InternalId);
}
}
this.api.asc_Recalculate();
delete this.api.__content_control_worker;
};
}
......@@ -7669,6 +7671,16 @@ background-repeat: no-repeat;\
var _worker = new CContentControlPluginWorker(this, arrDocuments);
return _worker.delete();
};
window["asc_docs_api"].prototype["pluginMethod_GetAllContentControls"] = function()
{
var _blocks = this.WordControl.m_oLogicDocument.GetAllContentControls();
var _ret = [];
for (var i = 0; i < _blocks.length; i++)
{
_ret.push(_blocks[i].GetContentControlPr());
}
return _ret;
};
/********************************************************************/
asc_docs_api.prototype.asc_OnHideContextMenu = 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