[imp] not displaying / not processing auto_expand on incapable browsers

@ liamr@umich.edu
Wed, 14 Aug 2002 00:56:41 -0400


I've made a patch that will prevent browsers that don't support 
iframes from displaying the "Expanding..." text
(http://www.umich.edu/~liamr/horde/expanding.gif), and from invoking 
the javascript at all.

I decided that the best way to handle this was to make an "iframes" 
browser feature, so I updated horde/lib/Browser.php and made some 
changes to horde/imp/templates/compose/compose.inc:

    http://www.umich.edu/~liamr/horde/iframes.diff

As other browsers are confirmed to have iframes support, it'll be 
easy to tell horde/imp that auto_expansion will work .  In doing some 
research, it looks like IE back to version 3 or 4 /may/ have 
supported iframes in some fashion.

I tried to add a notification to compose.php to warn people that 
they'd enabled auto_expand but their browser won't support it... and 
while it worked with RELENG3, the stuff I did for HEAD doesn't seem 
to:

Index: compose.php
===================================================================
RCS file: /repository/imp/compose.php,v
retrieving revision 2.542
diff -U2 -r2.542 compose.php
--- compose.php 6 Aug 2002 16:35:51 -0000       2.542
+++ compose.php 14 Aug 2002 04:51:20 -0000
@@ -365,4 +365,8 @@
     $subject = MIME::decode(Horde::getFormData('subject'));
     $ACTION_TEXT = _("Message Composition");
+    if ($prefs->getValue('auto_expand') && (! 
$browser->hasFeature('iframes'))) {
+       $notification->push(_("Your browser does not support 
automatic name expansion.  Please use the Expand Names button."), 
'horde.warning');
+    }
+
     break;