[desktop] support for external help files

This commit is contained in:
Maxim Kadushkin 2022-06-02 13:57:20 +03:00
parent bdd98d2dbc
commit b9ba820887
3 changed files with 35 additions and 2 deletions

View file

@ -341,6 +341,9 @@ define([
return native[name].apply(this, args);
}
},
helpUrl: function () {
return 'https://download.onlyoffice.com/install/desktop/editors/help/v7.2.0-1/apps/documenteditor/main/resources/help';
}
};
};

View file

@ -0,0 +1,19 @@
<html>
<head>
<style>
.centered {
text-align: center;
display: flex;
flex-direction: column;
justify-content: center;
height: 100%;
}
</style>
</head>
<body>
<div class="centered">
<h1>There is no help installed</h1>
<h2>please, download it from <a href='#'>www.onlyoffice.com</a></h1>
</div>
</body>
</html>

View file

@ -2087,8 +2087,19 @@ define([
store.url = 'resources/help/{{DEFAULT_LANG}}/Contents.json';
store.fetch(config);
} else {
me.urlPref = 'resources/help/{{DEFAULT_LANG}}/';
store.reset(me.en_data);
if ( Common.Controllers.Desktop.isActive() ) {
if ( store.contentLang === '{{DEFAULT_LANG}}' )
me.iFrame.src = '../../common/main/resources/help/download.html';
else {
store.contentLang = store.contentLang === lang ? '{{DEFAULT_LANG}}' : lang;
me.urlPref = `${Common.Controllers.Desktop.helpUrl()}/${lang}/`;
store.url = `${me.urlPref}/Contents.json`;
store.fetch(config);
}
} else {
me.urlPref = 'resources/help/{{DEFAULT_LANG}}/';
store.reset(me.en_data);
}
}
},
success: function () {