[dev] alphaImageLoader patch

Vilius Šumskas vilius at lnk.lt
Wed Nov 10 08:04:45 PST 2004


Hello,

i experimented a bit with new alphaImageLoader and it seems, that IE don't like
/horde/services/javascript.php?file=alpha......... in css. I changed it to
/horde/templates/javascript/alphaImageLoader.htc and now it works as expected.
The patch attached should fix http://bugs.horde.org/ticket/?id=800 .
I don't know, if I did it the right way, so at least you'll see what I'm talking
about.

By the way this new component is a LOT faster thank previous one. I've got
30-80% speedup on different machines.

-- 
  Best Regards,

  Vilius
-------------- next part --------------
Index: framework/Horde/Horde.php
===================================================================
RCS file: /repository/framework/Horde/Horde.php,v
retrieving revision 1.474
diff -u -r1.474 Horde.php
--- framework/Horde/Horde.php	9 Nov 2004 22:41:06 -0000	1.474
+++ framework/Horde/Horde.php	10 Nov 2004 15:50:12 -0000
@@ -1024,8 +1024,7 @@
 
         if ($GLOBALS['browser']->hasQuirk('png_transparency') &&
             !$GLOBALS['prefs']->getValue('no_alpha')) {
-            $url = Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/javascript.php', true);
-            $url = Util::addParameter($url, array('file' => 'alphaImageLoader.htc', 'app' => 'horde'), null, false);
+            $url = Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/templates/javascript/alphaImageLoader.htc', false);
             $html .= '<style type="text/css"> img { behavior: url("' . $url . '"); } </style>';
         }
 
Index: templates/javascript/alphaImageLoader.htc
===================================================================
RCS file: /repository/horde/templates/javascript/alphaImageLoader.htc,v
retrieving revision 1.1
diff -u -r1.1 alphaImageLoader.htc
--- templates/javascript/alphaImageLoader.htc	9 Nov 2004 22:41:06 -0000	1.1
+++ templates/javascript/alphaImageLoader.htc	10 Nov 2004 15:50:18 -0000
@@ -1,10 +1,9 @@
-<?php header('Content-Type: text/x-component') ?>
 <public:component>
 <public:attach event="onpropertychange" for="element" onEvent="propertyChanged()" />
 <script language="JavaScript">
 
 var needHack = needHack();
-var transparentImage = "<?php echo $GLOBALS['registry']->getImageDir('horde') ?>/blank.gif";
+var transparentImage = "/horde/themes/horde/graphics/blank.gif";
 
 pngHack();
 


More information about the dev mailing list