mirror of
https://github.com/ONLYOFFICE/onlyoffice.github.io.git
synced 2026-02-10 18:05:06 +08:00
[marketplace] Change "Help Center" link to plugin "Readme".
This commit is contained in:
@ -149,10 +149,10 @@
|
||||
<span id="span_langs"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="div_selected_info">
|
||||
<div id="div_readme_link" class="div_selected_info">
|
||||
<span id="span_lern" class="font_bold">Learn how to use </span>
|
||||
<span id="span_lern_plugin">the plugin in </span>
|
||||
<a class="aboutlink link_info" target="blank" href="https://api.onlyoffice.com/plugin/basic">Help Center.</a>
|
||||
<a id="link_readme" class="aboutlink link_info" target="blank" href="">README.</a>
|
||||
</div>
|
||||
<div id="div_github_link" class="div_selected_info">
|
||||
<span id="span_contribute" class="font_bold">Contribute </span>
|
||||
|
||||
@ -517,6 +517,9 @@ function initElemnts() {
|
||||
elements.divVotes = document.getElementById('div_votes');
|
||||
elements.arrowPrev = document.getElementById('prev_arrow');
|
||||
elements.arrowNext = document.getElementById('next_arrow');
|
||||
elements.linkReadme = document.getElementById('link_readme');
|
||||
elements.divReadme = document.getElementById('div_readme_link');
|
||||
elements.linkReadme = document.getElementById('link_readme');
|
||||
};
|
||||
|
||||
function toogleLoader(show, text) {
|
||||
@ -1003,14 +1006,15 @@ function onClickItem() {
|
||||
elements.divRatingLink.setAttribute('title', getTranslated('No disscussion page for this plugin.'));
|
||||
}
|
||||
|
||||
if ( !plugin || ( isLocal && installed ) ) {
|
||||
if ( !plugin || ( isLocal && installed && plugin.baseUrl.includes('file:') ) ) {
|
||||
elements.divGitLink.classList.add('hidden');
|
||||
plugin = installed.obj;
|
||||
} else {
|
||||
elements.divGitLink.classList.remove('hidden');
|
||||
}
|
||||
|
||||
let bCorrectUrl = isLocal || ( !plugin.baseUrl.includes('http://') && !plugin.baseUrl.includes('file:') && !plugin.baseUrl.includes('../'));
|
||||
let bWebUrl = !plugin.baseUrl.includes('http://') && !plugin.baseUrl.includes('file:') && !plugin.baseUrl.includes('../');
|
||||
let bCorrectUrl = isLocal || bWebUrl;
|
||||
|
||||
if (bCorrectUrl && plugin.variations[0].store && plugin.variations[0].store.screenshots && plugin.variations[0].store.screenshots.length) {
|
||||
let arrScreens = plugin.variations[0].store.screenshots;
|
||||
@ -1088,7 +1092,16 @@ function onClickItem() {
|
||||
elements.spanName.innerHTML = this.children[1].children[0].innerText;
|
||||
elements.spanOffered.innerHTML = plugin.offered || offered;
|
||||
elements.spanSelectedDescr.innerHTML = this.children[1].children[1].innerText;
|
||||
elements.linkPlugin.setAttribute('href', pluginUrl);
|
||||
if (bWebUrl) {
|
||||
elements.linkPlugin.setAttribute('href', pluginUrl);
|
||||
elements.linkReadme.setAttribute('href', pluginUrl + 'README.md');
|
||||
elements.divReadme.classList.remove('hidden');
|
||||
} else {
|
||||
elements.linkPlugin.setAttribute('href', '');
|
||||
elements.linkReadme.setAttribute('href', '');
|
||||
elements.divReadme.classList.add('hidden');
|
||||
}
|
||||
|
||||
if (discussionUrl)
|
||||
elements.discussionLink.setAttribute('href', discussionUrl);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user