Created missing view for mobile bookmarklet. Adjusted status_messages_controller.rb to render it.
This commit is contained in:
parent
253f948841
commit
af5c469f10
2 changed files with 25 additions and 1 deletions
|
|
@ -34,8 +34,12 @@ class StatusMessagesController < ApplicationController
|
|||
@aspects = current_user.aspects
|
||||
@selected_contacts = @aspects.map { |aspect| aspect.contacts }.flatten.uniq
|
||||
@aspect_ids = @aspects.map{|x| x.id}
|
||||
if is_mobile_device?
|
||||
#render :layout
|
||||
else
|
||||
render :layout => nil
|
||||
end
|
||||
end
|
||||
|
||||
def create
|
||||
params[:status_message][:aspect_ids] = params[:aspect_ids]
|
||||
|
|
|
|||
20
app/views/status_messages/bookmarklet.mobile.haml
Normal file
20
app/views/status_messages/bookmarklet.mobile.haml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
-# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
= include_javascripts :mobile
|
||||
|
||||
:javascript
|
||||
$(document).ready(function()
|
||||
{
|
||||
var contents = "#{params[:title]} - #{params[:url]}";
|
||||
if ("#{params[:notes]}".length > 0){
|
||||
contents = contents + " - #{params[:notes]}";
|
||||
}
|
||||
if (contents.length > 0) {
|
||||
$("#status_message_text").val(contents);
|
||||
}
|
||||
});
|
||||
|
||||
= render :partial => 'shared/publisher', :locals => { :aspect => :profile, :selected_aspects => @aspects, :aspect_ids => @aspect_ids }
|
||||
|
||||
Loading…
Reference in a new issue