From bc7a8b39c8548b271c75a077e4f12cc93ea4c31c Mon Sep 17 00:00:00 2001
From: Abs62
Date: Sun, 16 Sep 2012 19:54:00 +0400
Subject: [PATCH] Icons instead of text markers to show/hide articles optional
parts
---
article-style.css | 1 +
article_maker.cc | 6 +++---
dsl.cc | 4 ++--
icons/collapse_opt.png | Bin 0 -> 3587 bytes
icons/expand_opt.png | Bin 0 -> 3587 bytes
resources.qrc | 2 ++
6 files changed, 8 insertions(+), 5 deletions(-)
create mode 100644 icons/collapse_opt.png
create mode 100644 icons/expand_opt.png
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 0000000000000000000000000000000000000000..fe50c033341d7e54c6f7b937b62a30a8c3710685
GIT binary patch
literal 3587
zcmbW32T)Vn*2gy&q&JZwB3zIv0-+-v5_%N~62w9eiWpFoCYaFM1rg~6gGetbXfOgw
z6A&Z_NDW1r2wd>H6hSHHah!Q~p7Y+kZ{}s@pM7Sn-+yQAwbz+R!WkP=4%TC=000hi
zGb8(hl@k^-MSYg2#vsShT|;zwXxL2GTMff8P>k&&Mokk4(bzrb)?)v2a_&ixrIW*)<>TlfoZ2Lnen{9AT$M83=B-@@WgB>2S8!~uH7E)v*3(8aFxFE
zc>v&v+c{x$z~#Oe9~~(Th#v8ZHv&G|ptARDqA|cI0$y*+Hcc=h4;0Ovyv@MVI?zPr
zW~%|r>_E{jKISA~2m`L2;^M&|ItTEYtU2lYb*h?sLH3|iIW;;I2~A^y3$uIxlarHz
zhz!+S;1sXA+iz~U1_~`9IfBXrRjyC#?*SmC@g1CYeJ_~GSxu#?r;s@>$uGTOgig4-
z&+gCnR`?qLFdZ1tw=ajNJ%-n2#QW_(l3Zo*xyVMkxs~Ky!)5RSkQT?B*8Sn$7#G~7
zjE>IF&5c;JAzj?Mo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RK!UgvV*aPW49vosA0qLHP)H>Z
z59!{Fg!F==A-#~8zuG|z&cO`K!eRjLq8b_j=@SwmWPB=wN=}CiQ!@Tya174D49vnB
z0G9^`3{%n}<7^^il1GA!i1*=gRAGaCI0oln24-Q+4jYfXvEDAU#s{Pa*8X
zF*pY^F#A&omjdq!1Llt_AZ=3CPa*8XF*pY^F#A&o_w=9T{aNPUSD1m>zX)~G@BaLi
zzYG3+hnfE>l#Gso_-@2OM{uz}H-UXP2Iu~(5H15g2)HLi+HXIFun))J+&@bFzYYh!
z%u|U;|F{mgG}!)r9WeW20O0YFNFYEODak*?e+~fL4{UIGe+~f5!0eBaJ80(r8gd$N
a@O}76t_n2d=I|VRWx&kH+OP`g67g^DWE+eC
literal 0
HcmV?d00001
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