Browse Source

IE7 en version 2.0, pas 2.1 (pour transparence), desactiver IE9.js et renommer fichier de langue pour Salvatore.

svn/root/tags/spip-2.1/plugins/msie_compat
arno@rezo.net 13 years ago
parent
commit
368391e20c
  1. 3
      .gitattributes
  2. 10
      configuration/ie6config.php
  3. 8
      javascript/IE7.js
  4. 8
      javascript/IE8.js
  5. 2882
      javascript/IE9.js
  6. 2
      javascript/ie7-recalc.js
  7. 81
      javascript/ie7-squish.js
  8. 3
      lang/msiecompat_fr.php
  9. 4
      msie_compat.php
  10. 4
      plugin.xml

3
.gitattributes vendored

@ -7,8 +7,9 @@ javascript/IE7.js -text
javascript/IE8.js -text
javascript/IE9.js -text
javascript/blank.gif -text
javascript/ie7-recalc.js -text
javascript/ie7-squish.js -text
javascript/jquery.ifixpng.js -text
lang/msie_compat_fr.php -text
lang/msiecompat_fr.php -text
/msie_compat.php -text
/plugin.xml -text

10
configuration/ie6config.php

@ -22,22 +22,24 @@ function configuration_ie6config()
$iecompat = $GLOBALS['meta']["iecompat"];
if (!$iecompat) $iecompat = "non";
$res = _T("msie_compat:choix_explication");
$res = _T("msiecompat:choix_explication");
$res .= afficher_choix('iecompat', $iecompat,
array('non' => _T("msie_compat:choix_non"),
array('non' => _T("msiecompat:choix_non"),
'ifixpng' => _L('iFixPng'),
'IE7' => _L("IE7.js"),
'IE7squish' => _L("IE7.js + ie7-squish.js"),
'IE8' => _L('IE8.js'),
'IE8squish' => _L('IE8.js + ie7-squish.js'),
'IE8squish' => _L('IE8.js + ie7-squish.js')
/*,
'IE9' => _L('IE9.js'),
'IE9squish' => _L('IE9.js + ie7-squish.js')
*/
),
" <br /> ");
$res = debut_cadre_trait_couleur(find_in_path("imgs/ie6-logo24.png"), true, "", _T("msie_compat:choix_titre"))
$res = debut_cadre_trait_couleur(find_in_path("imgs/ie6-logo24.png"), true, "", _T("msiecompat:choix_titre"))
. ajax_action_post('configurer', 'ie6config', 'configuration','',$res)
. fin_cadre_trait_couleur(true);

8
javascript/IE7.js

File diff suppressed because one or more lines are too long

8
javascript/IE8.js

File diff suppressed because one or more lines are too long

2882
javascript/IE9.js

File diff suppressed because one or more lines are too long

2
javascript/ie7-recalc.js

@ -0,0 +1,2 @@
/* IE7/IE8.js - copyright 2004-2008, Dean Edwards */
(function(){if(!IE7.loaded)return;CLASSES=/\sie7_class\d+/g;IE7.CSS.extend({elements:{},handlers:[],reset:function(){this.removeEventHandlers();var a=this.elements;for(var b in a)a[b].runtimeStyle.cssText="";this.elements={};var a=IE7.Rule.elements;for(var b in a){with(a[b])className=className.replace(CLASSES,"")}IE7.Rule.elements={}},reload:function(){this.rules=[];this.getInlineStyles();this.screen.load();if(this.print)this.print.load();this.refresh();this.trash()},addRecalc:function(b,c,d,e){this.base(b,c,function(a){d(a);IE7.CSS.elements[a.uniqueID]=a},e)},recalc:function(){this.reset();this.base()},addEventHandler:function(a,b,c){a.attachEvent(b,c);this.handlers.push(arguments)},removeEventHandlers:function(){var a;while(a=this.handlers.pop()){a[0].detachEvent(a[1],a[2])}},getInlineStyles:function(){var a=document.getElementsByTagName("style"),b;for(var c=a.length-1;(b=a[c]);c--){if(!b.disabled&&!b.ie7){var d=b.cssText||b.innerHTML;this.styles.push(d);b.cssText=d}}},trash:function(){var a=document.styleSheets,b,c;for(c=0;c<a.length;c++){b=a[c];if(!b.ie7&&!b.cssText){b.cssText=b.cssText}}this.base()},getText:function(a){return a.cssText||this.base(a)}});IE7.CSS.addEventHandler(window,"onunload",function(){IE7.CSS.removeEventHandlers()});IE7.Rule.elements={};IE7.Rule.prototype.extend({add:function(a){this.base(a);IE7.Rule.elements[a.uniqueID]=a}});if(IE7.PseudoElement){IE7.PseudoElement.hash={};IE7.PseudoElement.prototype.extend({create:function(a){var b=this.selector+":"+a.uniqueID;if(!IE7.PseudoElement.hash[b]){IE7.PseudoElement.hash[b]=true;this.base(a)}}})}IE7.HTML.extend({elements:{},addRecalc:function(b,c){this.base(b,function(a){if(!this.elements[a.uniqueID]){c(a);this.elements[a.uniqueID]=a}})}});document.recalc=function(a){if(IE7.CSS.screen){if(a)IE7.CSS.reload();IE7.recalc()}}})();

81
javascript/ie7-squish.js

@ -1,45 +1,36 @@
/*
IE7, version 0.9 (alpha) (2005-08-19)
Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
License: http://creativecommons.org/licenses/LGPL/2.1/
*/
IE7.addModule("ie7-squish", function() {
/* ---------------------------------------------------------------------
Squish some IE bugs!
Some of these bug fixes may have adverse effects so they are
not included in the standard library. Add your own if you want.
-dean
--------------------------------------------------------------------- */
// @NOTE: ie7Layout.boxSizing is the same as the "Holly Hack"
// "doubled margin" bug
// http://www.positioniseverything.net/explorer/doubled-margin.html
ie7CSS.addFix(/float\s*:\s*(left|right)/, "display:inline;$1");
if (ie7Layout) {
// "peekaboo" bug
// http://www.positioniseverything.net/explorer/peekaboo.html
if (appVersion >= 6) ie7CSS.addRecalc("float", "left|right", function($element) {
ie7Layout.boxSizing($element.parentElement);
// "doubled margin" bug
$element.runtimeStyle.display = "inline";
});
// "unscrollable content" bug
// http://www.positioniseverything.net/explorer/unscrollable.html
ie7CSS.addRecalc("position", "absolute|fixed", function($element) {
if ($element.offsetParent && $element.offsetParent.currentStyle.position == "relative")
ie7Layout.boxSizing($element.offsetParent);
});
}
//# // get rid of Microsoft's pesky image toolbar
//# if (!complete) document.write('<meta http-equiv="imagetoolbar" content="no">');
});
/* ---------------------------------------------------------------------
Squish some IE bugs!
Some of these bug fixes may have adverse effects so they are
not included in the standard library. Add your own if you want.
--------------------------------------------------------------------- */
// @NOTE: ie7Layout.boxSizing is the same as the "Holly Hack"
if (IE7.loaded && IE7.appVersion < 7) {
// "doubled margin" bug
// http://www.positioniseverything.net/explorer/doubled-margin.html
IE7.CSS.addFix(/(float\s*:\s*(left|right))/, "display:inline;$1");
// "peekaboo" bug
// http://www.positioniseverything.net/explorer/peekaboo.html
if (IE7.appVersion >= 6) IE7.CSS.addRecalc("float", "(left|right)", function(element) {
IE7.Layout.boxSizing(element.parentElement);
// "doubled margin" bug
element.style.display = "inline";
});
// "unscrollable content" bug
// http://www.positioniseverything.net/explorer/unscrollable.html
IE7.CSS.addRecalc("position", "absolute|fixed", function(element) {
if (element.offsetParent && element.offsetParent.currentStyle.position === "relative")
IE7.Layout.boxSizing(element.offsetParent);
});
}
//# // get rid of Microsoft's pesky image toolbar
//# document.write('<meta http-equiv="imagetoolbar" content="no">');

3
lang/msie_compat_fr.php → lang/msiecompat_fr.php

@ -8,9 +8,8 @@ $GLOBALS[$GLOBALS['idx_lang']] = array(
'choix_explication' => "<p>Cette configuration vous permet d&rsquo;am&eacute;liorer la compatibilit&eacute; du site public avec le navigateur Internet Explorer.</p>
<ul>
<li><a href='http://jquery.khurshid.com/ifixpng.php'>iFixPng</a> (<b>par défaut</b>) rétablit la semi-transparence les images au format PNG sous MSIE&nbsp;5&nbsp;et&nbsp;6.</li>
<li><a href='http://code.google.com/p/ie7-js/'>IE7.js</a> corrige les images PNG et ajoute des s&eacute;lecteurs CSS2 pour MSIE&nbsp;5&nbsp;et&nbsp;6 (<a href='http://ie7-js.googlecode.com/svn/test/index.html'>vous pouvez consulter la liste des sélecteurs compatibles introduits par IE7.js, IE8.js et IE9.js</a>).</li>
<li><a href='http://code.google.com/p/ie7-js/'>IE7.js</a> corrige les images PNG et ajoute des s&eacute;lecteurs CSS2 pour MSIE&nbsp;5&nbsp;et&nbsp;6 (<a href='http://ie7-js.googlecode.com/svn/test/index.html'>vous pouvez consulter la liste des sélecteurs compatibles introduits par IE7.js et IE8.js</a>).</li>
<li>IE8.js complète IE7.js en enrichissant les comportements des CSS de MSIE 5 à&nbsp;7. </li>
<li>IE9.js complète les précédents en enrichissant MSIE&nbsp;5 à&nbsp;8.</li>
<li>IE7-squish corrige trois bugs de MSIE&nbsp;6 (notamment la double marge des éléments flottants), mais des effets indésirables peuvent apparaître (le webmestre doit vérifier la compatibilité).</li>
</ul>",
'choix_non' => "Ne pas activer&nbsp;: ne rien ajouter à mes squelettes",

4
msie_compat.php

@ -58,7 +58,7 @@ function msie_compat_insert_head($flux) {
<![endif]-->
";
} else if ($iecompat == "IE9") {
} /* else if ($iecompat == "IE9") {
$flux .= "<!--[if lt IE 9]>
<script type='text/javascript'><!--
var IE7_PNG_SUFFIX = '.png';
@ -77,7 +77,7 @@ function msie_compat_insert_head($flux) {
<![endif]-->
";
}
} */
return $flux;
}

4
plugin.xml

@ -15,11 +15,11 @@
<multi>
Permet de s&eacute;lectionner diff&eacute;rentes m&eacute;thodes
-* pour assurer l'affichage des fichiers PNG transparents sous MSIE~6
-* et/ou activer certains s&eacute;lecteurs CSS dans MSIE~6, 7 et~8.
-* et/ou activer certains s&eacute;lecteurs CSS dans MSIE~6 et~7.
[en]
Offers different javascript methods to add support for:
-* transparent PNG files to MSIE~6
-* and/or various CSS selectors to MSIE~6, 7 and~8.
-* and/or various CSS selectors to MSIE~6 and~7.
</multi>
</description>

Loading…
Cancel
Save