Skip to content

Commit

Permalink
Merge branch 'hotfix/mobile-bookmarklet'
Browse files Browse the repository at this point in the history
fix view layout determination for mobile bookmarklet
  • Loading branch information
Raven24 committed Oct 5, 2012
2 parents ad15897 + a26dc34 commit f45c5be
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion app/controllers/status_messages_controller.rb
Expand Up @@ -11,7 +11,17 @@ class StatusMessagesController < ApplicationController
:mobile, :mobile,
:json :json


layout 'blank', :only => [ :bookmarklet ] layout :bookmarklet_layout, :only => :bookmarklet

# Define bookmarklet layout depending on whether
# user is in mobile or desktop mode
def bookmarklet_layout
if request.format == :mobile
'application'
else
'blank'
end
end


# Called when a user clicks "Mention" on a profile page # Called when a user clicks "Mention" on a profile page
# @param person_id [Integer] The id of the person to be mentioned # @param person_id [Integer] The id of the person to be mentioned
Expand Down
2 changes: 1 addition & 1 deletion app/views/status_messages/bookmarklet.mobile.haml
Expand Up @@ -18,4 +18,4 @@
}); });


- content_for(:head) do - content_for(:head) do
= javascript_include_tag :mobile = javascript_include_tag :jquery, :mobile

0 comments on commit f45c5be

Please sign in to comment.