Merge branch 'master' of git://github.com/diaspora/diaspora
This commit is contained in:
commit
5730aea142
8 changed files with 30 additions and 8 deletions
|
|
@ -34,7 +34,9 @@ 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 => nil
|
||||
end
|
||||
end
|
||||
|
||||
def create
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ class StatusMessage < Post
|
|||
acts_as_taggable_on :tags
|
||||
extract_tags_from :raw_message
|
||||
|
||||
validates_length_of :text, :maximum => 10000, :message => I18n.t('status_messages.too_long', :count => 10000)
|
||||
validates_length_of :text, :maximum => 65535, :message => I18n.t('status_messages.too_long', :count => 65535)
|
||||
xml_name :status_message
|
||||
xml_attr :raw_message
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
-if publisher_explain
|
||||
:javascript
|
||||
$(document).ready(function()
|
||||
$(document).ready(function()
|
||||
{
|
||||
Publisher.triggerGettingStarted();
|
||||
});
|
||||
|
|
@ -54,7 +54,6 @@
|
|||
= image_tag "social_media_logos/#{service.provider}-16x16.png", :title => service.provider.titleize, :class => "service_icon dim", :id =>"#{service.provider}", :maxchar => "#{service.class::MAX_CHARACTERS}"
|
||||
= link_to (image_tag "icons/monotone_wrench_settings.png"), "#question_mark_pane", :class => 'question_mark', :rel => 'facebox', :title => t('shared.public_explain.manage')
|
||||
|
||||
// NOTE(dropdown special casing to DRY up -- taken from the aspect_dropdown partial)
|
||||
.dropdown{:class => "hang_right", :title => popover_with_close_html("2. #{t('shared.public_explain.control_your_audience')}"), 'data-content'=> t('shared.public_explain.visibility_dropdown')}
|
||||
.button.toggle.publisher
|
||||
- if publisher_public
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
%h5
|
||||
= t('aspects.index.new_here.title')
|
||||
.content
|
||||
!= t('aspects.index.new_here.follow', :link => link_to('#NewHere', tag_path(:name => "NewHere")))
|
||||
!= t('aspects.index.new_here.follow', :link => link_to("#"+t('shared.publisher.new_user_prefill.newhere'), tag_path(:name => "NewHere")))
|
||||
%br
|
||||
= link_to(t('aspects.index.new_here.learn_more'), "https://github.com/diaspora/diaspora/wiki/Welcoming-Committee")
|
||||
|
||||
|
|
|
|||
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 }
|
||||
|
||||
|
|
@ -760,6 +760,7 @@ en:
|
|||
publishing_to: "publishing to: "
|
||||
discard_post: "Discard post"
|
||||
new_user_prefill:
|
||||
newhere: "NewHere"
|
||||
hello: "Hey everyone, I'm #%{new_user_tag}. "
|
||||
i_like: "I'm interested in %{tags}. "
|
||||
invited_by: "Thanks for the invite, "
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ class Stream::Multi < Stream::Base
|
|||
#
|
||||
# @return [String]
|
||||
def publisher_prefill
|
||||
prefill = I18n.t("shared.publisher.new_user_prefill.hello", :new_user_tag => "NewHere")
|
||||
prefill = I18n.t("shared.publisher.new_user_prefill.hello", :new_user_tag => I18n.t('shared.publisher.new_user_prefill.newhere'))
|
||||
if self.user.followed_tags.size > 0
|
||||
tag_string = self.user.followed_tags.map{|t| "##{t.name}"}.to_sentence
|
||||
prefill << I18n.t("shared.publisher.new_user_prefill.i_like", :tags => tag_string)
|
||||
|
|
|
|||
|
|
@ -116,9 +116,9 @@ describe StatusMessage do
|
|||
db_status.text.should == message
|
||||
end
|
||||
|
||||
it 'should require status messages to be less than 10000 characters' do
|
||||
it 'should require status messages to be less than 65535 characters' do
|
||||
message = ''
|
||||
10001.times{message = message +'1'}
|
||||
65535.times{message = message +'1'}
|
||||
status = Factory.build(:status_message, :text => message)
|
||||
|
||||
status.should_not be_valid
|
||||
|
|
|
|||
Loading…
Reference in a new issue