diff --git a/article-style.css b/article-style.css index 3f9536d2..acad5bb2 100644 --- a/article-style.css +++ b/article-style.css @@ -369,6 +369,7 @@ div.xdxf { color: blue; cursor: pointer; + vertical-align: center; } /************* Spelling suggestions *****************/ diff --git a/article_maker.cc b/article_maker.cc index 1f61d773..ca52faa9 100644 --- a/article_maker.cc +++ b/article_maker.cc @@ -109,9 +109,9 @@ std::string ArticleMaker::makeHtmlHeader( QString const & word, "function processIframeClick() { if( overIframeId != null ) { overIframeId = overIframeId.replace( 'gdexpandframe-', '' ); gdMakeArticleActive( overIframeId ) } }" "function init() { window.addEventListener('blur', processIframeClick, false); }" "window.addEventListener('load', init, false);" - "function gdExpandOptPart( expanderId, optionalId ) { var d1=document.getElementById(expanderId); var i = 0; if( d1.innerHTML == '[+]' ) {" - "d1.innerHTML = '[-]'; for( i = 0; i < 1000; i++ ) { var d2=document.getElementById( optionalId + i ); if( !d2 ) break; d2.style.display='inline'; } }" - "else { d1.innerHTML = '[+]'; for( i = 0; i < 1000; i++ ) { var d2=document.getElementById( optionalId + i ); if( !d2 ) break; d2.style.display='none'; } } }" + "function gdExpandOptPart( expanderId, optionalId ) { var d1=document.getElementById(expanderId); var i = 0; if( d1.alt == '[+]' ) {" + "d1.alt = '[-]'; d1.src = 'qrcx://localhost/icons/collapse_opt.png'; for( i = 0; i < 1000; i++ ) { var d2=document.getElementById( optionalId + i ); if( !d2 ) break; d2.style.display='inline'; } }" + "else { d1.alt = '[+]'; d1.src = 'qrcx://localhost/icons/expand_opt.png'; for( i = 0; i < 1000; i++ ) { var d2=document.getElementById( optionalId + i ); if( !d2 ) break; d2.style.display='none'; } } }" ""; result += ""; diff --git a/dsl.cc b/dsl.cc index 11da8bce..0a30e541 100644 --- a/dsl.cc +++ b/dsl.cc @@ -1157,8 +1157,8 @@ void DslArticleRequest::run() string prefix = "O" + dict.getId().substr( 0, 7 ) + "_" + QString::number( dict.articleNom ).toStdString(); string id1 = prefix + "_expand"; string id2 = prefix + "_opt_"; - string button = "[+]"; + string button = "\"[+]\"/"; if( articleText.compare( articleText.size() - 4, 4, "

" ) == 0 ) articleText.insert( articleText.size() - 4, " " + button ); else diff --git a/icons/collapse_opt.png b/icons/collapse_opt.png new file mode 100644 index 00000000..fe50c033 Binary files /dev/null and b/icons/collapse_opt.png differ diff --git a/icons/expand_opt.png b/icons/expand_opt.png new file mode 100644 index 00000000..0adbbeff Binary files /dev/null and b/icons/expand_opt.png differ diff --git a/resources.qrc b/resources.qrc index 1c003569..1c95ed92 100644 --- a/resources.qrc +++ b/resources.qrc @@ -49,6 +49,8 @@ icons/macicon.png icons/icon32_sdict.png icons/icon32_aard.png + icons/expand_opt.png + icons/collapse_opt.png article-style-st-babylon.css qt-style-st-babylon.css