Further discussion is moved to
http://groups.google.com/group/web2py-developers/browse_frm/thread/ab1f23e39dcd3c9d
Thanks for attention.
Regards,
Ray
On Tuesday, May 15, 2012 10:15:10 PM UTC+8, Anthony wrote:
>
> Meanwhile, shall we keep the discussion about how to utilize that
>> layout_jqm.html (no matter where it locates)? I am using two experimental
>> callers as below:
>>
>> cat myapp/views/generic.mobi
>> {{extend 'layout_jqm.html'}}
>> {{response.headers['Content-Type'] = 'text/html'}}
>> # the rest is same as generic.html
>>
>> cat myapp/controllers/default.py
>> if request.user_agent().is_mobile or request.user_agent().is_tablet:
>> response.view = 'generic.mobi'
>> # the rest is same as the out-of-box welcome/controllers/default.py
>>
>> These minimal effort makes my app works smooth for both desktop and
>> mobile. So far so good. Do you think they should go into scaffold too?
>>
>
> We might consider including that code commented out, but I don't think the
> "welcome" app should use jQuery Mobile by default (it should probably also
> allow the user to opt out of the mobile site and get to the desktop site if
> preferred). Note, we already have a mobile-friendly "responsive" layout
> (including a mobile menu).
>
> Anthony
>