mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-30 17:24:08 +00:00
onJsActiveArticleChanged was remove unintentionaly
This commit is contained in:
parent
f292e0c251
commit
d90c528819
|
@ -213,6 +213,7 @@ std::string ArticleMaker::makeHtmlHeader( QString const & word,
|
|||
"el=document.getElementById( gdCurrentArticle ); el.className = el.className.replace(' gdactivearticle','');"
|
||||
"el=document.getElementById( 'gdfrom-' + newId ); el.className = el.className + ' gdactivearticle';"
|
||||
"gdCurrentArticle = 'gdfrom-' + newId; gdAudioLinks.current = newId;"
|
||||
"articleview.onJsActiveArticleChanged(gdCurrentArticle); } }"
|
||||
" } }"
|
||||
"var overIframeId = null;"
|
||||
"function gdSelectArticle( id ) {"
|
||||
|
@ -657,6 +658,11 @@ void ArticleRequest::bodyFinished()
|
|||
if ( closePrevSpan )
|
||||
{
|
||||
head += "</div></div><div style=\"clear:both;\"></div><span class=\"gdarticleseparator\"></span>";
|
||||
} else {
|
||||
// This is the first article
|
||||
head += "<script type=\"text/javascript\">"
|
||||
"var gdCurrentArticle=\"" + gdFrom + "\"; "
|
||||
"articleview.onJsActiveArticleChanged(gdCurrentArticle)</script>";
|
||||
}
|
||||
|
||||
bool collapse = false;
|
||||
|
|
|
@ -689,11 +689,7 @@ void ArticleView::setCurrentArticle( QString const & id, bool moveToIt )
|
|||
|
||||
if(moveToIt){
|
||||
QString script=QString(" var elem=document.getElementById('%1'); if(elem!=undefined){elem.scrollIntoView(true);}").arg(id);
|
||||
|
||||
ui.definition->page()->runJavaScript(script);
|
||||
|
||||
onJsActiveArticleChanged(id);
|
||||
|
||||
ui.definition->setProperty("currentArticle",id);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue