roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tiger Gui (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ROL-1937) Standard and Mobile template switch improvement patch
Date Sat, 11 Feb 2012 09:45:59 GMT

    [ https://issues.apache.org/jira/browse/ROL-1937?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13206068#comment-13206068
] 

Tiger Gui commented on ROL-1937:
--------------------------------

1. if there is a "g_ut" parameter, we will parse its value, "standard" means use standard
template, else we use mobile template 

public static DeviceType getRequestType(HttpServletRequest request) { DeviceType type = DeviceType.standard;
String g_ut = request.getParameter(USER_AGENT_PARAMETER); if(g_ut !=null){ return g_ut.trim().equals("standard")
? DeviceType.standard : DeviceType.mobile; } String cookie = getCookieValue(request.getCookies(),
USER_REQUEST_TYPE, null); if (cookie != null) { return cookie.equals("standard") ? DeviceType.standard
: DeviceType.mobile; } if (isMobileDevice(request)) { type = DeviceType.mobile; } return type;
} 

2. then we can confirm the link to mobile template is "http://localhost:8080/roller/?g_ut=mobile",
the link to standard template is "http://localhost:8080/roller/?g_ut=standard" 

3. in standard theme sidebar.vm, we set cookie "roller_user_request_type=standard" with "path=/",
in weblog-mobile.vm, we set cookie "roller_user_request_type=mobile". So, after that, we can
use cookie to determine standard or mobile template.

 4.improve standard/mobile theme switch button looking, just as shown in attach figure file
                
> Standard and Mobile template switch improvement patch
> -----------------------------------------------------
>
>                 Key: ROL-1937
>                 URL: https://issues.apache.org/jira/browse/ROL-1937
>             Project: Roller
>          Issue Type: Improvement
>          Components: User Interface - General
>    Affects Versions: 5.1
>         Environment: Win 7 Chrome/Firefox; IPad, IPhone, Android HTC Desire
>            Reporter: Tiger Gui
>            Assignee: Roller Unassigned
>              Labels: patch
>             Fix For: 5.1
>
>         Attachments: roller.zip
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Problem discussed in Roller dev mail list :
> > 1. I click the "view mobile weblog" button, frontpage does not change
> > to mobile device template, i have to refresh current page to enter
> > mobile template. Is it normal ? When i want to come back from mobile
> > template, it works same, click and refresh.
> >
> Yes. That was a problem that i could not solve. When you click on the
> button , You need to refresh the page to see the changes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message