Re: [web2py] could use some help ... mobile admin

2011-11-28 Thread Ross Peoples
Nice job. I'll be testing soon. By the way: Is @mobilize documented in the 
book? I looked through it briefly but didn't see any mention of it.

[web2py] could use some help ... mobile admin

2011-11-27 Thread Massimo Di Pierro
I could use some help. In trunk there is code for mobile admin.

That means that if you visit admin from a mobile device it will use
jquery.mobile. This is a work in progress and only some pages have
been implemented but you can help. It is easy.

In applications/admin/controllers/default.py there is this magic code:

is_mobile=request.user_agent().is_mobile
if is_mobile:
response.view =
response.view.replace('default/','default.mobile/')

so if you use a mobile is_mobile==True and is will pick up views from
views/default.mobile instead of views/default.

I copied all views from views/default into views/default.mobile and I
have fixed only index.html, site.html, edit.html about.html. The
other *.html files need work, this is where you can help

- replace {{extend 'layout.html'}} with {{extend 'default.mobile/
layout.html}}.
- remove any extra text that does not belong to a mobile
- replace ul with ul  data-role=listview
- replace all external links (i.e. not internal to admin) from a...
to a rel=external...

design.html is going to need some extra work.

If you can help send me the modified files.

Also let me know if you have comments or suggestions.

Massimo


Re: [web2py] could use some help ... mobile admin

2011-11-27 Thread Angelo Compagnucci
Great!

I'll work on it a soon as possible!

Are you using the Auto-initialization of form elements ?

Thanks!

2011/11/28 Massimo Di Pierro massimo.dipie...@gmail.com:
 I could use some help. In trunk there is code for mobile admin.

 That means that if you visit admin from a mobile device it will use
 jquery.mobile. This is a work in progress and only some pages have
 been implemented but you can help. It is easy.

 In applications/admin/controllers/default.py there is this magic code:

    is_mobile=request.user_agent().is_mobile
    if is_mobile:
        response.view =
 response.view.replace('default/','default.mobile/')

 so if you use a mobile is_mobile==True and is will pick up views from
 views/default.mobile instead of views/default.

 I copied all views from views/default into views/default.mobile and I
 have fixed only index.html, site.html, edit.html about.html. The
 other *.html files need work, this is where you can help

 - replace {{extend 'layout.html'}} with {{extend 'default.mobile/
 layout.html}}.
 - remove any extra text that does not belong to a mobile
 - replace ul with ul  data-role=listview
 - replace all external links (i.e. not internal to admin) from a...
 to a rel=external...

 design.html is going to need some extra work.

 If you can help send me the modified files.

 Also let me know if you have comments or suggestions.

 Massimo




-- 
Profile: http://www.gild.com/compagnucciangelo
Register on Gild: http://www.gild.com/referral/compagnucciangelo