Commit f50b33c8fbb5c97e61cb2a144d5bdfe71c1c9f85
1 parent
3d2166b8b3
Exists in
master
Ajout d'une fonction pour résoudre un pb d'affichage dans chrome lorsque
le logo est absent.
Showing 5 changed files with 60 additions and 15 deletions Side-by-side Diff
templates/html/Wize.html
| ... | ... | @@ -96,8 +96,17 @@ |
| 96 | 96 | |
| 97 | 97 | <script src="[% resource('common-spec/notice.js') %]"></script> |
| 98 | 98 | |
| 99 | + <script> | |
| 100 | + function testLogo() { | |
| 101 | + logo=document.getElementById("logoImgId"); | |
| 102 | + logodiv=document.getElementById("logoDivId"); | |
| 103 | + if (logo.naturalHeight == 0) { | |
| 104 | + logodiv.setAttribute("style","display:none;"); | |
| 105 | + } | |
| 106 | + } | |
| 107 | + </script> | |
| 99 | 108 | </head> |
| 100 | -<body> | |
| 109 | +<body onload="testLogo()"> | |
| 101 | 110 | |
| 102 | 111 | [% options.empty_lines = "default" %] |
| 103 | 112 | |
| ... | ... | @@ -176,8 +185,8 @@ |
| 176 | 185 | <hr /> |
| 177 | 186 | </div> |
| 178 | 187 | |
| 179 | -<div style="float:right"> | |
| 180 | -<img src='[% resource("common-spec/logo.png") %]' alt=' '> | |
| 188 | +<div id="logoDivId" style="float:right"> | |
| 189 | +<img id="logoImgId" src='[% resource("common-spec/logo.png") %]' alt=' '> | |
| 181 | 190 | </div> |
| 182 | 191 | |
| 183 | 192 | <!-- Wiki content --> |
templates/html/Wize_Print.html
| ... | ... | @@ -42,15 +42,24 @@ |
| 42 | 42 | |
| 43 | 43 | <script src="file:////home/daniau/.local/share/zim/templates/html/print-common/notice.js"></script> |
| 44 | 44 | |
| 45 | + <script> | |
| 46 | + function testLogo() { | |
| 47 | + logo=document.getElementById("logoImgId"); | |
| 48 | + logodiv=document.getElementById("logoDivId"); | |
| 49 | + if (logo.naturalHeight == 0) { | |
| 50 | + logodiv.setAttribute("style","display:none;"); | |
| 51 | + } | |
| 52 | + } | |
| 53 | + </script> | |
| 45 | 54 | </head> |
| 46 | -<body> | |
| 55 | +<body onload="testLogo()"> | |
| 47 | 56 | |
| 48 | 57 | [% options.empty_lines = "default" %] |
| 49 | 58 | |
| 50 | 59 | <!-- Wiki content --> |
| 51 | 60 | |
| 52 | -<div style="float:right"> | |
| 53 | -<img src="file:////home/daniau/.local/share/zim/templates/html/print-common/logo.png" alt=' '> | |
| 61 | +<div id="logoDivId" style="float:right"> | |
| 62 | +<img id="logoImgId" src="file:////home/daniau/.local/share/zim/templates/html/print-common/logo.png" alt=' '> | |
| 54 | 63 | </div> |
| 55 | 64 | |
| 56 | 65 |
templates/html/Wize_Print_Template.html
| ... | ... | @@ -42,15 +42,24 @@ |
| 42 | 42 | |
| 43 | 43 | <script src="file:///%%HOME%%/.local/share/zim/templates/html/print-common/notice.js"></script> |
| 44 | 44 | |
| 45 | + <script> | |
| 46 | + function testLogo() { | |
| 47 | + logo=document.getElementById("logoImgId"); | |
| 48 | + logodiv=document.getElementById("logoDivId"); | |
| 49 | + if (logo.naturalHeight == 0) { | |
| 50 | + logodiv.setAttribute("style","display:none;"); | |
| 51 | + } | |
| 52 | + } | |
| 53 | + </script> | |
| 45 | 54 | </head> |
| 46 | -<body> | |
| 55 | +<body onload="testLogo()"> | |
| 47 | 56 | |
| 48 | 57 | [% options.empty_lines = "default" %] |
| 49 | 58 | |
| 50 | 59 | <!-- Wiki content --> |
| 51 | 60 | |
| 52 | -<div style="float:right"> | |
| 53 | -<img src="file:///%%HOME%%/.local/share/zim/templates/html/print-common/logo.png" alt=' '> | |
| 61 | +<div id="logoDivId" style="float:right"> | |
| 62 | +<img id="logoImgId" src="file:///%%HOME%%/.local/share/zim/templates/html/print-common/logo.png" alt=' '> | |
| 54 | 63 | </div> |
| 55 | 64 | |
| 56 | 65 |
templates/html/Wize_with_index.html
| ... | ... | @@ -141,8 +141,17 @@ |
| 141 | 141 | |
| 142 | 142 | <script src="[% resource('common-spec/notice.js') %]"></script> |
| 143 | 143 | |
| 144 | + <script> | |
| 145 | + function testLogo() { | |
| 146 | + logo=document.getElementById("logoImgId"); | |
| 147 | + logodiv=document.getElementById("logoDivId"); | |
| 148 | + if (logo.naturalHeight == 0) { | |
| 149 | + logodiv.setAttribute("style","display:none;"); | |
| 150 | + } | |
| 151 | + } | |
| 152 | + </script> | |
| 144 | 153 | </head> |
| 145 | -<body> | |
| 154 | +<body onload="testLogo()"> | |
| 146 | 155 | |
| 147 | 156 | <!-- Header --> |
| 148 | 157 | <div class='header'> |
| ... | ... | @@ -217,8 +226,8 @@ |
| 217 | 226 | <hr /> |
| 218 | 227 | </div> |
| 219 | 228 | |
| 220 | -<div style="float:right"> | |
| 221 | -<img src='[% resource("common-spec/logo.png") %]' alt=' '> | |
| 229 | +<div id="logoDivId" style="float:right"> | |
| 230 | +<img id="logoImgId" src='[% resource("common-spec/logo.png") %]' alt=' '> | |
| 222 | 231 | </div> |
| 223 | 232 | |
| 224 | 233 | <div id="mySidenav" class="menu menuClosed"> |
templates/html/Wize_with_index_sod.html
| ... | ... | @@ -153,8 +153,17 @@ |
| 153 | 153 | |
| 154 | 154 | <script src="[% resource('common-spec/notice.js') %]"></script> |
| 155 | 155 | |
| 156 | + <script> | |
| 157 | + function testLogo() { | |
| 158 | + logo=document.getElementById("logoImgId"); | |
| 159 | + logodiv=document.getElementById("logoDivId"); | |
| 160 | + if (logo.naturalHeight == 0) { | |
| 161 | + logodiv.setAttribute("style","display:none;"); | |
| 162 | + } | |
| 163 | + } | |
| 164 | + </script> | |
| 156 | 165 | </head> |
| 157 | -<body> | |
| 166 | +<body onload="testLogo()"> | |
| 158 | 167 | |
| 159 | 168 | <!-- Header --> |
| 160 | 169 | <div class='header'> |
| ... | ... | @@ -229,8 +238,8 @@ |
| 229 | 238 | <hr /> |
| 230 | 239 | </div> |
| 231 | 240 | |
| 232 | -<div style="float:right"> | |
| 233 | -<img src='[% resource("common-spec/logo.png") %]' alt=' '> | |
| 241 | +<div id="logoDivId" style="float:right"> | |
| 242 | +<img id="logoImgId" src='[% resource("common-spec/logo.png") %]' alt=' '> | |
| 234 | 243 | </div> |
| 235 | 244 | |
| 236 | 245 | <div class="zemaster"> |