Skip to content
Extraits de code Groupes Projets
Valider 82eb9486 rédigé par Fil's avatar Fil
Parcourir les fichiers

et voila le travail, ca marche sur jquery.info

parent afe84d48
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -49,11 +49,14 @@
* @cat Plugins/pngfix
*/
$.fn.pngfix = hack.ltie7 ? function() {
if (pixelspip) hack.pixel = pixelspip; // indiquer la valeur de l'exterieur du script
return this.each(function() {
var $$ = $(this);
var base = $('base').attr('href'); // need to use this in case you are using rewriting urls
if ($$.is('img') || $$.is('input')) { // hack image tags present in dom
if ($$.attr('src').match(/.*\.png$/i)) { // make sure it is png image
if ($$.attr('src').match(/.*\.png([?].*)?$/i)) { // make sure it is png image
// use source tag value if set
var source = (base && $$.attr('src').substring(0,1)!='/') ? base + $$.attr('src') : $$.attr('src');
// apply filter
......@@ -63,7 +66,7 @@
}
} else { // hack png css properties present inside css
var image = $$.css('backgroundImage');
if (image.match(/^url\(["']?(.*\.png)["']?\)$/i)) {
if (image.match(/^url\(["']?(.*\.png([?].*)?)["']?\)$/i)) {
image = RegExp.$1;
$$.css({backgroundImage:'none', filter:hack.filter(image)})
.positionFix();
......@@ -88,7 +91,7 @@
return this.each(function() {
var $$ = $(this);
var src = $$.css('filter');
if (src.match(/src=["']?(.*\.png)["']?/i)) { // get img source from filter
if (src.match(/src=["']?(.*\.png([?].*)?)["']?/i)) { // get img source from filter
src = RegExp.$1;
if ($$.is('img') || $$.is('input')) {
$$.attr({src:src}).css({filter:''});
......
......@@ -1259,14 +1259,14 @@ function fin_page()
// cf. public/assembler, fonction f_msie()
// test si MSIE et sinon quitte
$msie = strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'MSIE')
$msie = strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'msie')
AND preg_match('/MSIE /i', $_SERVER['HTTP_USER_AGENT']);
$fix_png = $msie
? "<script type='text/javascript'><!--
try { document.execCommand('BackgroundImageCache', false, true); } catch(err) {};
if (window.jQuery && jQuery.browser.msie) jQuery.getScript( '"
.find_in_path('jquery.iepnghack.1.5.js')
."' , function() { jQuery('img').pngfix(); } );
.find_in_path('javascript/jquery.iepnghack.1.5.js')
."' , function() { pixelspip = '".(_DIR_RACINE.'rien.gif')."'; jQuery('img').pngfix(); } );
// --></script>"
: '';
......
......@@ -399,7 +399,7 @@ function f_msie ($texte) {
if (!$GLOBALS['html']) return $texte;
// test si MSIE et sinon quitte
$msie = strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'MSIE')
$msie = strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'msie')
AND preg_match('/MSIE /i', $_SERVER['HTTP_USER_AGENT']);
if (!$msie) return $texte;
......@@ -417,7 +417,7 @@ function f_msie ($texte) {
AND true /* ... autres tests si on veut affiner ... */) {
$texte .=
"<script type='text/javascript'><!--
if (window.jQuery && jQuery.browser.msie) jQuery.getScript( '".find_in_path('jquery.iepnghack.1.5.js')."' , function() { jQuery('img').pngfix(); } );
if (window.jQuery && jQuery.browser.msie) jQuery.getScript( '".find_in_path('javascript/jquery.iepnghack.1.5.js')."' , function() { pixelspip = '".(_DIR_RACINE.'rien.gif')."'; jQuery('img').pngfix(); } );
// --></script>\n";
}
......
......@@ -87,9 +87,6 @@ RewriteRule ^[^/\.]+(\.html)?$ spip.php?page=type_urls [QSA,E=url_propre:$0,L]
###
# Divers
# Permettre a IE de reconnaitre le win_png.htc de retraitement des png transparents
AddType text/x-component .htc
# bloquer les acces aux repertoires .svn/ (SPIP, plugins, squelettes...)
RewriteRule ^(.*/)?\.svn/ - [F]
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter