Browse Source

retour a win_png.htc statique car ca l'affichage ramait vraiment trop dans IE

Cela oblige a avoir le duo win_png.htc/rien.gif a la racine et dans ecrire
spip-1.9
Cerdic 15 years ago
parent
commit
7d4cbdcdf1
  1. 5
      .gitattributes
  2. 2
      dist/calendrier.css
  3. 4
      dist/style_prive.html
  4. 0
      ecrire/rien.gif
  5. 47
      ecrire/win_png.htc
  6. BIN
      rien.gif
  7. 47
      win_png.htc

5
.gitattributes

@ -10,7 +10,6 @@ dist/inc-pied.html -text
dist/inc-rubriques.html -text
dist/puce.gif -text
dist/puce_rtl.gif -text
dist/rien.gif -text
dist/style_prive.html -text
dist/win_png.html -text
dist/win_width.htc -text
@ -383,6 +382,7 @@ ecrire/lang/spip_ru.php -text
ecrire/polices/dustismo-license.txt -text svneol=unset#application/octet-stream
ecrire/polices/dustismo.ttf -text
ecrire/polices/dustismo_bold.ttf -text
ecrire/rien.gif -text
ecrire/safehtml/classes/HTMLSax3.php -text
ecrire/safehtml/classes/HTMLSax3/Decorators.php -text
ecrire/safehtml/classes/HTMLSax3/States.php -text
@ -392,7 +392,10 @@ ecrire/safehtml/readme-SPIP.txt -text
ecrire/safehtml/readme.txt -text
ecrire/urls/page.php -text
ecrire/urls/propres-qs.php -text
ecrire/win_png.htc -text
formulaires/choix_mots.html -text
/inc-public.php3 -text
/index.php -text
/rien.gif -text
/spip.php -text
/win_png.htc -text

2
dist/calendrier.css

@ -220,7 +220,7 @@ a.calendrier-annee:hover {
width: 12px;
height: 12px;
/* URL a revoir */
behavior: url(spip.php?page=win_png);
behavior: url(win_png.htc);
}
.calendrier-icone {

4
dist/style_prive.html

@ -229,7 +229,7 @@ a.icone26:hover {
}
a.icone26 img {
vertical-align: middle;
behavior: url(#URL_PAGE{win_png});
behavior: url([(#CHEMIN{win_png.htc}|url_absolue)]);
background-color: ##ENV{couleur_foncee,3874b0};
}
a.icone26:hover img {
@ -335,7 +335,7 @@ a.icone26:hover img {
.cellule48 a img {
behavior: url(#URL_PAGE{win_png});
behavior: url([(#CHEMIN{win_png.htc}|url_absolue)]);
display: inline;
margin: 4px;
padding: 0;

0
dist/rien.gif → ecrire/rien.gif

Before

Width: 24  |  Height: 24  |  Size: 63 B

After

Width: 24  |  Height: 24  |  Size: 63 B

47
ecrire/win_png.htc

@ -0,0 +1,47 @@
<public:component>
<public:attach event="onpropertychange" onevent="propertyChanged()" />
<script>
var supported = /MSIE (5\.5)|[6789]/.test(navigator.userAgent) && navigator.platform == "Win32";
var realSrc;
var blankSrc = "rien.gif";
if (supported) fixImage();
function propertyChanged() {
if (!supported) return;
var pName = event.propertyName;
if (pName != "src") return;
// if not set to blank
if ( ! new RegExp(blankSrc).test(src))
fixImage();
};
function fixImage() {
// get src
var src = element.src;
// check for real change
if (src == realSrc) {
element.src = blankSrc;
return;
}
if ( ! new RegExp(blankSrc).test(src)) {
// backup old src
realSrc = src;
}
// test for png
if ( /\.png$/.test( realSrc.toLowerCase() ) ) {
// set blank image
element.src = blankSrc;
// set filter
element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" +
src + "',sizingMethod='image')";
}
}
</script>
</public:component>

BIN
rien.gif

After

Width: 24  |  Height: 24  |  Size: 63 B

47
win_png.htc

@ -0,0 +1,47 @@
<public:component>
<public:attach event="onpropertychange" onevent="propertyChanged()" />
<script>
var supported = /MSIE (5\.5)|[6789]/.test(navigator.userAgent) && navigator.platform == "Win32";
var realSrc;
var blankSrc = "rien.gif";
if (supported) fixImage();
function propertyChanged() {
if (!supported) return;
var pName = event.propertyName;
if (pName != "src") return;
// if not set to blank
if ( ! new RegExp(blankSrc).test(src))
fixImage();
};
function fixImage() {
// get src
var src = element.src;
// check for real change
if (src == realSrc) {
element.src = blankSrc;
return;
}
if ( ! new RegExp(blankSrc).test(src)) {
// backup old src
realSrc = src;
}
// test for png
if ( /\.png$/.test( realSrc.toLowerCase() ) ) {
// set blank image
element.src = blankSrc;
// set filter
element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" +
src + "',sizingMethod='image')";
}
}
</script>
</public:component>
Loading…
Cancel
Save