mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-12-05 00:24:06 +00:00
Merge pull request #2005 from xiaoyifang/opt/ui-interaction
Some checks failed
SonarCloud / Build and analyze (push) Has been cancelled
Some checks failed
SonarCloud / Build and analyze (push) Has been cancelled
opt: remove the tooltip ,too simple to display
This commit is contained in:
commit
ec364f0638
|
@ -133,19 +133,6 @@ std::string ArticleMaker::makeHtmlHeader( QString const & word, QString const &
|
|||
R"(<link rel="icon" type="image/png" href="qrc:///flags/)" + Html::escape( icon.toUtf8().data() ) + "\" >\n";
|
||||
}
|
||||
|
||||
result += QString::fromUtf8( R"(
|
||||
<script>
|
||||
function tr(key) {
|
||||
var tr_map = {
|
||||
"Expand article": "%1", "Collapse article": "%2"
|
||||
};
|
||||
return tr_map[key] || '';
|
||||
}
|
||||
</script>
|
||||
)" )
|
||||
.arg( tr( "Expand article" ), tr( "Collapse article" ) )
|
||||
.toStdString();
|
||||
|
||||
result += R"(<script src="qrc:///scripts/gd-builtin.js"></script>)";
|
||||
result += R"(<script src="qrc:///scripts/mark.min.js"></script>)";
|
||||
|
||||
|
@ -676,11 +663,11 @@ void ArticleRequest::bodyFinished()
|
|||
</div>)" ),
|
||||
dictId,
|
||||
collapse ? R"(style="cursor:pointer;")" : "",
|
||||
collapse ? tr( "Expand article" ).toStdString() : "",
|
||||
"",
|
||||
Html::escape( tr( "From " ).toStdString() ),
|
||||
Html::escape( activeDict->getName() ),
|
||||
collapse ? "gdexpandicon" : "gdcollapseicon",
|
||||
collapse ? "" : tr( "Collapse article" ).toStdString() );
|
||||
"" );
|
||||
|
||||
head += R"(<div class="gddictnamebodyseparator"></div>)";
|
||||
|
||||
|
|
|
@ -98,7 +98,6 @@ function gdExpandArticle(id) {
|
|||
nm = document.getElementById("gddictname-" + id);
|
||||
nm.style.cursor = "pointer";
|
||||
if (ev) ev.stopPropagation();
|
||||
ico.title = tr("Expand article");
|
||||
nm.title = "";
|
||||
articleview.collapseInHtml(id, true);
|
||||
} else if (elem.style.display == "none") {
|
||||
|
@ -108,7 +107,6 @@ function gdExpandArticle(id) {
|
|||
nm = document.getElementById("gddictname-" + id);
|
||||
nm.style.cursor = "default";
|
||||
nm.title = "";
|
||||
ico.title = tr("Collapse article");
|
||||
articleview.collapseInHtml(id, false);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue