Commit 73eb2191 authored by Alexey Golubev's avatar Alexey Golubev Committed by GitHub

Merge pull request #191 from ONLYOFFICE/feature/onlypass3

minimize bug
parents e905c90d 485a176b
......@@ -201,9 +201,28 @@ window["UpdateInstallPlugins"] = function()
var _plugins = JSON.parse(window["AscDesktopEditor"]["GetInstallPlugins"]());
_plugins["url"] = _plugins["url"].replace(" ", "%20");
var _len = _plugins["pluginsData"].length;
for (var i = 0; i < _len; i++)
_plugins["pluginsData"][i]["baseUrl"] = _plugins["url"] + _plugins["pluginsData"][i]["guid"].substring(4) + "/";
for (var i = 0; i < _plugins["pluginsData"].length; i++)
{
var _plugin = _plugins["pluginsData"][i];
_plugin["baseUrl"] = _plugins["url"] + _plugin["guid"].substring(4) + "/";
var isSystem = false;
for (var j = 0; j < _plugin["variations"].length; j++)
{
var _variation = _plugin["variations"][j];
if (_variation["initDataType"] == "desktop")
{
isSystem = true;
break;
}
}
if (isSystem)
{
_plugins["pluginsData"].splice(i, 1);
--i;
}
}
var _editor = window["Asc"]["editor"] ? window["Asc"]["editor"] : window.editor;
_editor.sendEvent("asc_onPluginsInit", _plugins);
......@@ -239,7 +258,7 @@ window["UpdateSystemPlugins"] = function()
for (var i = 0; i < _array.length; i++)
{
var plugin = new Asc.CPlugin();
plugin.deserialize(_array[i]);
plugin["deserialize"](_array[i]);
_arraySystem.push(plugin);
}
......
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