[desktop] support for external help in SSE and PE
This commit is contained in:
parent
42e2ae9277
commit
654f14192f
|
@ -346,7 +346,13 @@ define([
|
|||
}
|
||||
},
|
||||
helpUrl: function () {
|
||||
return 'https://download.onlyoffice.com/install/desktop/editors/help/v7.2.0-1/apps/documenteditor/main/resources/help';
|
||||
if ( !!nativevars && nativevars.helpUrl ) {
|
||||
var webapp = window.SSE ? 'spreadsheeteditor' :
|
||||
window.PE ? 'presentationeditor' : 'documenteditor';
|
||||
return nativevars.helpUrl + webapp + '/main/resources/help';
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1598,8 +1598,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}}' || !Common.Controllers.Desktop.helpUrl() )
|
||||
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 () {
|
||||
|
|
|
@ -1953,8 +1953,19 @@ SSE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({
|
|||
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}}' || !Common.Controllers.Desktop.helpUrl() )
|
||||
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