Permalink
Browse files

Mobile UI fixes

This fixes issues with mobile UI rendering

Issues fixed:
* vendor/bootstrap.css and vendor/bootstrap-responsive.css need to
  be precompiled for the mobile UI to render properly
* Rails 3.1 is more strict about layout fallbacks, the single-post
  view in the mobile UI needs to have the "application" layout
  specified to render properly
  • Loading branch information...
stevenh512 committed Mar 29, 2012
1 parent 731446e commit 6abe718227bcc858bcb88c0f997c523908b1d256
Showing with 3 additions and 2 deletions.
  1. +1 −1 app/controllers/posts_controller.rb
  2. +2 −1 config/application.rb
@@ -39,7 +39,7 @@ def show
respond_to do |format|
format.xml{ render :xml => @post.to_diaspora_xml }
- format.mobile{render 'posts/show.mobile.haml'}
+ format.mobile{render 'posts/show.mobile.haml', :layout => "application"}
format.json{ render :json => PostPresenter.new(@post, current_user).to_json }
format.any{render 'posts/show.html.haml'}
end
View
@@ -82,7 +82,8 @@ class Application < Rails::Application
# Stylesheets
config.assets.precompile += [ "blueprint.css", "bootstrap.css", "default.css",
- "login.css", "mobile.css", "new-templates.css", "rtl.css" ]
+ "login.css", "mobile.css", "new-templates.css", "rtl.css", "vendor/bootstrap.css",
+ "vendor/bootstrap-responsive.css" ]
# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'

1 comment on commit 6abe718

@stevenh512

This comment has been minimized.

Show comment Hide comment
@stevenh512

stevenh512 Mar 29, 2012

Contributor

With these changes, the mobile version of the stream and single post view renders properly in my Blackberry and in Firefox faking the Blackberry's User-Agent header.

I will be offline tomorrow (Friday), but will have access to an iPhone and an Android phone all day, so I'll be able to do more testing on those devices. 😁

Firebug + ModifyHeaders helped a lot, my Blackberry doesn't give me any useful info, just a page that either renders properly or doesn't.. lol

Contributor

stevenh512 commented on 6abe718 Mar 29, 2012

With these changes, the mobile version of the stream and single post view renders properly in my Blackberry and in Firefox faking the Blackberry's User-Agent header.

I will be offline tomorrow (Friday), but will have access to an iPhone and an Android phone all day, so I'll be able to do more testing on those devices. 😁

Firebug + ModifyHeaders helped a lot, my Blackberry doesn't give me any useful info, just a page that either renders properly or doesn't.. lol

Please sign in to comment.