Fix broken mobile bookmarklet, isse #3613

This commit is contained in:
Jason Robinson 2012-10-02 22:43:55 +03:00 committed by Florian Staudacher
parent ad15897567
commit a26dc34a7b
2 changed files with 12 additions and 2 deletions

View file

@ -11,7 +11,17 @@ class StatusMessagesController < ApplicationController
:mobile,
: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
# @param person_id [Integer] The id of the person to be mentioned

View file

@ -18,4 +18,4 @@
});
- content_for(:head) do
= javascript_include_tag :mobile
= javascript_include_tag :jquery, :mobile