Created missing view for mobile bookmarklet. Adjusted status_messages_controller.rb to render it.

This commit is contained in:
Jason Robinson 2011-11-07 23:21:00 +02:00
parent 253f948841
commit af5c469f10
2 changed files with 25 additions and 1 deletions

View file

@ -34,7 +34,11 @@ class StatusMessagesController < ApplicationController
@aspects = current_user.aspects
@selected_contacts = @aspects.map { |aspect| aspect.contacts }.flatten.uniq
@aspect_ids = @aspects.map{|x| x.id}
render :layout => nil
if is_mobile_device?
#render :layout
else
render :layout => nil
end
end
def create

View 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 }