mirror of
https://github.com/ONLYOFFICE/onlyoffice.github.io.git
synced 2026-04-07 14:04:30 +08:00
Fix bug #62125
This commit is contained in:
@ -361,7 +361,7 @@ window.addEventListener('message', function(message) {
|
||||
};
|
||||
}, false);
|
||||
|
||||
function fetchAllPlugins(bFirstRender, bConnectionRestored) {
|
||||
function fetchAllPlugins(bFirstRender, bshowMarketplace) {
|
||||
// function for fetching all plugins from config
|
||||
clearInterval(interval);
|
||||
interval = null;
|
||||
@ -370,7 +370,7 @@ function fetchAllPlugins(bFirstRender, bConnectionRestored) {
|
||||
function(response) {
|
||||
allPlugins = JSON.parse(response);
|
||||
if (installedPlugins)
|
||||
getAllPluginsData(bFirstRender, bConnectionRestored);
|
||||
getAllPluginsData(bFirstRender, bshowMarketplace);
|
||||
},
|
||||
function(err) {
|
||||
createError( new Error( getTranslated( 'Problem with loading markeplace config.' ) ) );
|
||||
@ -483,7 +483,7 @@ function toogleLoader(show, text) {
|
||||
}
|
||||
};
|
||||
|
||||
function getAllPluginsData(bFirstRender, bConnectionRestored) {
|
||||
function getAllPluginsData(bFirstRender, bshowMarketplace) {
|
||||
// get config file for each item in config.json
|
||||
isPluginLoading = true;
|
||||
let count = 0;
|
||||
@ -507,7 +507,7 @@ function getAllPluginsData(bFirstRender, bConnectionRestored) {
|
||||
isPluginLoading = false;
|
||||
if (bFirstRender)
|
||||
showMarketplace();
|
||||
else if (bConnectionRestored)
|
||||
else if (bshowMarketplace)
|
||||
toogleView(elements.btnMarketplace, elements.btnMyPlugins, messages.linkPR, true, true);
|
||||
}
|
||||
makeRequest(pluginUrl + 'translations/langs.json').then(
|
||||
@ -540,7 +540,7 @@ function getAllPluginsData(bFirstRender, bConnectionRestored) {
|
||||
isPluginLoading = false;
|
||||
if (bFirstRender)
|
||||
showMarketplace();
|
||||
else if (bConnectionRestored)
|
||||
else if (bshowMarketplace)
|
||||
toogleView(elements.btnMarketplace, elements.btnMyPlugins, messages.linkPR, true, true);
|
||||
}
|
||||
}
|
||||
@ -1488,7 +1488,8 @@ function checkInternet() {
|
||||
if (this.readyState == 4) {
|
||||
if (this.status >= 200 && this.status < 300) {
|
||||
isOnline = true;
|
||||
fetchAllPlugins(interval === null, elements.btnMarketplace.classList.contains('btn_toolbar_active'));
|
||||
let bshowMarketplace = ( elements.btnMarketplace && elements.btnMarketplace.classList.contains('btn_toolbar_active') ) ? true : false;
|
||||
fetchAllPlugins(interval === null, bshowMarketplace);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user