[desktop] support for external help files
This commit is contained in:
parent
bdd98d2dbc
commit
b9ba820887
|
@ -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';
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
|
19
apps/common/main/resources/help/download.html
Normal file
19
apps/common/main/resources/help/download.html
Normal 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>
|
|
@ -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 () {
|
||||
|
|
Loading…
Reference in a new issue