[horde] imp/mimp tweak?

Kevin Konowalec webadmin at ualberta.ca
Tue Oct 28 21:01:55 UTC 2008


I see the behavior you're describing on my iPhone but it wasn't doing  
that on the crackberry I was testing.  I'll have to go and borrow it  
again to see if I can reproduce the problem.  Could have been just  
some caching weirdness or something...

K


On Oct 28, 2008, at 2:52 PM, Michael M Slusarz wrote:

> Quoting Kevin Konowalec <webadmin at ualberta.ca>:
>
>> Hmmm.... from my tests so far I'd have to say "nuh uh!".  Looks to  
>> me that it does detect the mobile browser and so you get the  
>> stripped-down login page BUT you still get the option to change  
>> modes and traditionalist seems to be the default... which is  
>> counterintuative.  You'd think if it's gone to mobile mode you'd  
>> want it to default to minimalist but still have the option for  
>> traditional (hell I'd love to see an iphone app mode...).
>
> Hmmm... this is the code I am talking about:
>
> if (!empty($conf['user']['select_view'])) {
>    $apps = $registry->listApps(null, true);
>    $view_cookie = isset($_COOKIE['default_imp_view'])
>        ? $_COOKIE['default_imp_view']
>        : ($browser->isMobile() && isset($apps['mimp']) ? 'mimp' :  
> 'imp');
>    if (isset($apps['dimp']) || isset($apps['mimp'])) {
>        $views[] = array('sel' => $view_cookie == 'imp',
>                         'val' => 'imp', 'name' => _("Traditional"));
>        if (isset($apps['dimp'])) {
>            $views[] = array('sel' => $view_cookie == 'dimp',
>                             'val' => 'dimp', 'name' => _("Dynamic"));
>        }
>        if (isset($apps['mimp'])) {
>            $views[] = array('sel' => $view_cookie == 'mimp',
>                             'val' => 'mimp', 'name' =>  
> _("Minimalist"));
>        }
>    }
> }
>
> That code will set $view_cookie to 'mimp' if there is not a cookie  
> already set, the browser is mobile, and mimp is available.  Then  
> when creating the drop-down list, the 'mimp' entry should be  
> selected (because 'sel' is set to true - this causes a  
> selected="selected" to be added to the HTML <option> output).
>
> michael
>
> -- 
> ___________________________________
> Michael Slusarz [slusarz at horde.org]
>
>



More information about the horde mailing list