Merge branch 'goobertron-rename_messages' into develop

This commit is contained in:
Jonne Haß 2014-02-09 15:44:27 +01:00
commit a462c84fae
18 changed files with 32 additions and 31 deletions

View file

@ -5,6 +5,7 @@
* Remove some unused beta code [#4738](https://github.com/diaspora/diaspora/issues/4738) * Remove some unused beta code [#4738](https://github.com/diaspora/diaspora/issues/4738)
* Style improvements for SPV, use original author's avatar for reshares [#4754](https://github.com/diaspora/diaspora/issue/4754) * Style improvements for SPV, use original author's avatar for reshares [#4754](https://github.com/diaspora/diaspora/issue/4754)
* Update image branding to the new decided standard [#4702](https://github.com/diaspora/diaspora/pull/4702) * Update image branding to the new decided standard [#4702](https://github.com/diaspora/diaspora/pull/4702)
* Consistent naming of conversations and messages [#4756](https://github.com/diaspora/diaspora/pull/4756)
## Bug fixes ## Bug fixes

View file

@ -34,7 +34,7 @@ $(document).ready(function(){
history.pushState(null, "", conversation_path); history.pushState(null, "", conversation_path);
var conv = $(this).children('.stream_element'), var conv = $(this).children('.stream_element'),
cBadge = $("#message_inbox_badge .badge_count"); cBadge = $("#conversations_badge .badge_count");
if(conv.hasClass('unread') ){ if(conv.hasClass('unread') ){
conv.removeClass('unread'); conv.removeClass('unread');
} }

View file

@ -14,7 +14,7 @@ header
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif
font-size: 13px font-size: 13px
#message_inbox_badge, #notification_badge #conversations_badge, #notification_badge
background: none background: none

View file

@ -189,7 +189,7 @@
font-size: 12px; font-size: 12px;
} }
#new_message_pane { #new_conversation_pane {
ul.as-selections { width: 100% !important; } ul.as-selections { width: 100% !important; }
input#contact_ids { box-shadow: none; } input#contact_ids { box-shadow: none; }
textarea { width: 98%; } textarea { width: 98%; }

View file

@ -95,12 +95,12 @@ body > header {
} }
} }
#notification_badge, #message_inbox_badge { #notification_badge, #conversations_badge {
float: left; float: left;
padding: 0px 3px; padding: 0px 3px;
} }
#message_inbox_badge { #conversations_badge {
padding-top: 3px; padding-top: 3px;
margin-right: 0px; margin-right: 0px;
padding-right: 0px; padding-right: 0px;

View file

@ -770,7 +770,7 @@ display: inline-block;
color: #3F8FBA; color: #3F8FBA;
} }
form#new_message.new_message input.button.creation{ form#new_conversation.new_message input.button.creation{
float: right; float: right;
margin: 0 5px 5px; margin: 0 5px 5px;
} }

View file

@ -20,7 +20,7 @@ body {
float: right; float: right;
} }
#notification_badge, #message_inbox_badge { #notification_badge, #conversations_badge {
margin: 0 10px 0 -5px; margin: 0 10px 0 -5px;
} }
@ -42,11 +42,11 @@ body {
margin-left: 3px; margin-left: 3px;
} }
#notification_badge, #message_inbox_badge { #notification_badge, #conversations_badge {
margin: 0 10px 0 -5px; margin: 0 10px 0 -5px;
} }
#notification_badge a, #message_inbox_badge a { #notification_badge a, #conversations_badge a {
right: 0; right: 0;
} }

View file

@ -30,9 +30,9 @@
</div> </div>
</div> </div>
<div class="badge badge-inverse" id="message_inbox_badge"> <div class="badge badge-inverse" id="conversations_badge">
<div class="icons-mail_grey" > <div class="icons-mail_grey" >
<a href="/conversations" title="{{t "header.messages"}}" class="badge_link" > <a href="/conversations" title="{{t "header.conversations"}}" class="badge_link" >
<div class="badge_count {{#unless current_user.unread_messages_count}} hidden {{/unless}}"> <div class="badge_count {{#unless current_user.unread_messages_count}} hidden {{/unless}}">
{{current_user.unread_messages_count}} {{current_user.unread_messages_count}}
</div> </div>

View file

@ -18,7 +18,7 @@ class MessagesController < ApplicationController
Rails.logger.info("event=create type=comment user=#{current_user.diaspora_handle} status=success message=#{message.id} chars=#{params[:message][:text].length}") Rails.logger.info("event=create type=comment user=#{current_user.diaspora_handle} status=success message=#{message.id} chars=#{params[:message][:text].length}")
Postzord::Dispatcher.build(current_user, message).post Postzord::Dispatcher.build(current_user, message).post
else else
flash[:error] = I18n.t('conversations.new_message.fail') flash[:error] = I18n.t('conversations.new_conversation.fail')
end end
redirect_to conversations_path(:conversation_id => conversation.id) redirect_to conversations_path(:conversation_id => conversation.id)
end end

View file

@ -7,7 +7,7 @@
= javascript_include_tag :inbox = javascript_include_tag :inbox
- content_for :page_title do - content_for :page_title do
= t('.message_inbox') = t('.conversations_inbox')
.container-fluid.conversations_container .container-fluid.conversations_container
.row-fluid .row-fluid
@ -16,7 +16,7 @@
#left_pane_header #left_pane_header
%h3 %h3
.pull-right .pull-right
= link_to t('.new_message'), new_conversation_path, :class => 'btn btn-default', :rel => 'facebox' = link_to t('.new_conversation'), new_conversation_path, :class => 'btn btn-default', :rel => 'facebox'
= t('.inbox') = t('.inbox')
#conversation_inbox #conversation_inbox
@ -38,4 +38,4 @@
#no_conversation_text #no_conversation_text
= t('.no_conversation_selected') = t('.no_conversation_selected')
#no_conversation_controls #no_conversation_controls
= link_to t('.create_a_new_message'), new_conversation_path, :rel => 'facebox' = link_to t('.create_a_new_conversation'), new_conversation_path, :rel => 'facebox'

View file

@ -3,7 +3,7 @@
-# the COPYRIGHT file. -# the COPYRIGHT file.
.right .right
= link_to t('.new_message'), new_conversation_path, :class => 'btn' = link_to t('.new_conversation'), new_conversation_path, :class => 'btn'
- flash.each do |name, msg| - flash.each do |name, msg|
%div{:id => "flash_#{name}", :class => "expose"} %div{:id => "flash_#{name}", :class => "expose"}

View file

@ -26,10 +26,10 @@
autocompleteInput.focus(); autocompleteInput.focus();
}); });
.span6#new_message_pane .span6#new_conversation_pane
.span5#facebox_header .span5#facebox_header
%h3 %h3
= t('conversations.index.new_message') = t('conversations.index.new_conversation')
= form_for Conversation.new, html: {class: "new_conversation form_do_not_clear"}, remote: true do |conversation| = form_for Conversation.new, html: {class: "new_conversation form_do_not_clear"}, remote: true do |conversation|

View file

@ -327,10 +327,10 @@ en:
conversations: conversations:
index: index:
message_inbox: "Message Inbox" conversations_inbox: "Conversations Inbox"
new_message: "New Message" new_conversation: "New conversation"
no_conversation_selected: "no conversation selected" no_conversation_selected: "no conversation selected"
create_a_new_message: "create a new message" create_a_new_conversation: "start a new conversation"
no_messages: "no messages" no_messages: "no messages"
inbox: "Inbox" inbox: "Inbox"
conversation: conversation:
@ -354,7 +354,7 @@ en:
sent: "Message sent" sent: "Message sent"
fail: "Invalid message" fail: "Invalid message"
no_contact: "Hey, you need to add the contact first!" no_contact: "Hey, you need to add the contact first!"
new_message: new_conversation:
fail: "Invalid message" fail: "Invalid message"
destroy: destroy:
success: "Conversation successfully removed" success: "Conversation successfully removed"

View file

@ -150,7 +150,7 @@ en:
log_out: "Log out" log_out: "Log out"
notifications: "Notifications" notifications: "Notifications"
messages: "Messages" conversations: "Conversations"
search: "Search" search: "Search"

View file

@ -1,5 +1,5 @@
@javascript @javascript
Feature: private messages Feature: private conversations
In order to be talkative In order to be talkative
As a User As a User
I want to converse with people I want to converse with people

View file

@ -1,5 +1,5 @@
@javascript @javascript
Feature: private messages mobile Feature: private conversations mobile
In order to be talkative In order to be talkative
As a mobile user As a mobile user
I want to converse with people I want to converse with people

View file

@ -6,7 +6,7 @@ end
Then /^I send a message with subject "([^"]*)" and text "([^"]*)" to "([^"]*)"$/ do |subject, text, person| Then /^I send a message with subject "([^"]*)" and text "([^"]*)" to "([^"]*)"$/ do |subject, text, person|
step %(I am on the conversations page) step %(I am on the conversations page)
step %(I follow "New Message") step %(I follow "New conversation")
step %(I fill in "contact_autocomplete" with "#{person}" in the modal window) step %(I fill in "contact_autocomplete" with "#{person}" in the modal window)
step %(I press the first ".as-result-item" within ".as-results" in the modal window) step %(I press the first ".as-result-item" within ".as-results" in the modal window)
step %(I fill in "conversation_subject" with "#{subject}" in the modal window) step %(I fill in "conversation_subject" with "#{subject}" in the modal window)
@ -23,7 +23,7 @@ end
Then /^I send a mobile message with subject "([^"]*)" and text "([^"]*)" to "([^"]*)"$/ do |subject, text, person| Then /^I send a mobile message with subject "([^"]*)" and text "([^"]*)" to "([^"]*)"$/ do |subject, text, person|
step %(I am on the conversations page) step %(I am on the conversations page)
step %(I follow "New Message") step %(I follow "New conversation")
step %(I fill in "contact_autocomplete" with "#{person}") step %(I fill in "contact_autocomplete" with "#{person}")
step %(I press the first ".as-result-item" within ".as-results") step %(I press the first ".as-result-item" within ".as-results")
step %(I fill in "conversation_subject" with "#{subject}") step %(I fill in "conversation_subject" with "#{subject}")

View file

@ -24,18 +24,18 @@ describe("app.views.Header", function() {
}) })
}) })
context("messages badge", function(){ context("conversations badge", function(){
it("displays a count when the current user has a notification", function(){ it("displays a count when the current user has a notification", function(){
loginAs(_.extend(this.userAttrs, {unread_messages_count : 1})) loginAs(_.extend(this.userAttrs, {unread_messages_count : 1}))
this.view.render(); this.view.render();
expect(this.view.$("#message_inbox_badge .badge_count").hasClass('hidden')).toBe(false); expect(this.view.$("#conversations_badge .badge_count").hasClass('hidden')).toBe(false);
expect(this.view.$("#message_inbox_badge .badge_count").text()).toContain("1"); expect(this.view.$("#conversations_badge .badge_count").text()).toContain("1");
}) })
it("does not display a count when the current user has a notification", function(){ it("does not display a count when the current user has a notification", function(){
loginAs(_.extend(this.userAttrs, {unread_messages_count : 0})) loginAs(_.extend(this.userAttrs, {unread_messages_count : 0}))
this.view.render(); this.view.render();
expect(this.view.$("#message_inbox_badge .badge_count").hasClass('hidden')).toBe(true); expect(this.view.$("#conversations_badge .badge_count").hasClass('hidden')).toBe(true);
}) })
}) })