Commit 523f1e84 authored by Augier's avatar Augier Committed by Dennis Schubert

Replace .stream_element by .stream-element

parent 70954786
......@@ -23,7 +23,7 @@ app.views.Conversations = Backbone.View.extend({
app.helpers.timeago($(this.el));
$(".control-icons a").tooltip({placement: "bottom"});
var conv = $(".conversation-wrapper .stream_element.selected"),
var conv = $(".conversation-wrapper .stream-element.selected"),
cBadge = $("#conversations-link .badge");
if(conv.hasClass("unread") ){
......
......@@ -95,7 +95,7 @@ app.views.NotificationDropdown = app.views.Base.extend({
renderNotifications: function(){
var self = this;
this.dropdownNotifications.find(".media.stream_element").remove();
this.dropdownNotifications.find(".media.stream-element").remove();
$.each(self.notifications, function(index, notifications){
$.each(notifications, function(index, notification){
if($.inArray(notification, notifications) === -1){
......
......@@ -13,14 +13,14 @@ app.views.Notifications = Backbone.View.extend({
},
toggleUnread: function(evt) {
var note = $(evt.target).closest(".stream_element");
var note = $(evt.target).closest(".stream-element");
var unread = note.hasClass("unread");
var guid = note.data("guid");
if (unread){ this.setRead(guid); }
else { this.setUnread(guid); }
},
getAllUnread: function(){ return $(".media.stream_element.unread"); },
getAllUnread: function(){ return $(".media.stream-element.unread"); },
setRead: function(guid) { this.setUnreadStatus(guid, false); },
......@@ -38,7 +38,7 @@ app.views.Notifications = Backbone.View.extend({
clickSuccess: function(data) {
var guid = data.guid;
var type = $(".stream_element[data-guid=" + guid + "]").data("type");
var type = $(".stream-element[data-guid=" + guid + "]").data("type");
this.updateView(guid, type, data.unread);
},
......@@ -55,7 +55,7 @@ app.views.Notifications = Backbone.View.extend({
allNotes = $("#notifications_container .list-group > a:eq(0) .badge"),
typeNotes = $("#notifications_container .list-group > a[data-type=" + type + "] .badge"),
headerBadge = $(".notifications-link .badge"),
note = $(".notifications .stream_element[data-guid=" + guid + "]"),
note = $(".notifications .stream-element[data-guid=" + guid + "]"),
markAllReadLink = $("a#mark_all_read_link"),
translationKey = unread ? "notifications.mark_read" : "notifications.mark_unread";
......
......@@ -2,7 +2,7 @@
app.views.PreviewPost = app.views.Post.extend({
templateName: "stream-element",
className: "stream_element loaded",
className: "stream-element loaded",
subviews: {
".feedback": "feedbackView",
......
......@@ -57,7 +57,7 @@ app.views.StreamShortcuts = Backbone.View.extend({
gotoNext: function() {
// select next post: take the first post under the header
var streamElements = this.$("div.stream_element.loaded");
var streamElements = this.$("div.stream-element.loaded");
var posUser = window.pageYOffset;
for (var i = 0; i < streamElements.length; i++) {
......@@ -74,7 +74,7 @@ app.views.StreamShortcuts = Backbone.View.extend({
gotoPrev: function() {
// select previous post: take the first post above the header
var streamElements = this.$("div.stream_element.loaded");
var streamElements = this.$("div.stream-element.loaded");
var posUser = window.pageYOffset;
for (var i = streamElements.length - 1; i >= 0; i--) {
......@@ -90,23 +90,23 @@ app.views.StreamShortcuts = Backbone.View.extend({
},
commentSelected: function() {
$('a.focus_comment_textarea',this.$('div.stream_element.loaded.shortcut_selected')).click();
$('a.focus_comment_textarea',this.$('div.stream-element.loaded.shortcut_selected')).click();
},
likeSelected: function() {
$('a.like:first',this.$('div.stream_element.loaded.shortcut_selected')).click();
$('a.like:first',this.$('div.stream-element.loaded.shortcut_selected')).click();
},
reshareSelected: function() {
$('a.reshare:first',this.$('div.stream_element.loaded.shortcut_selected')).click();
$('a.reshare:first',this.$('div.stream-element.loaded.shortcut_selected')).click();
},
expandSelected: function() {
$('div.expander:first',this.$('div.stream_element.loaded.shortcut_selected')).click();
$('div.expander:first',this.$('div.stream-element.loaded.shortcut_selected')).click();
},
openFirstLinkSelected: function() {
var link = $('div.collapsible a[target="_blank"]:first',this.$('div.stream_element.loaded.shortcut_selected'));
var link = $('div.collapsible a[target="_blank"]:first',this.$('div.stream-element.loaded.shortcut_selected'));
if(link.length > 0) {
// click does only work with vanilla javascript
link[0].click();
......@@ -115,7 +115,7 @@ app.views.StreamShortcuts = Backbone.View.extend({
selectPost: function(element){
//remove the selection and selected-class from all posts
var selected=this.$('div.stream_element.loaded.shortcut_selected');
var selected=this.$('div.stream-element.loaded.shortcut_selected');
selected.removeClass('shortcut_selected').removeClass('highlighted');
//move to new post
window.scrollTo(window.pageXOffset, Math.round($(element).offset().top - this._headerSize));
......
......@@ -2,7 +2,7 @@
app.views.StreamPost = app.views.Post.extend({
templateName: "stream-element",
className : "stream_element loaded",
className : "stream-element loaded",
subviews : {
".feedback": "feedbackView",
......
......@@ -2,7 +2,7 @@
Diaspora.Mobile = {
initialize: function(){
$(".shield a").click(function(){
$(this).parents(".stream_element").removeClass("shield-active");
$(this).parents(".stream-element").removeClass("shield-active");
return false;
});
......
......@@ -195,7 +195,7 @@
if(!count){
text = Diaspora.I18n.t("stream.reactions", {count: 1});
var parent = toggleReactionsLink.parent();
var postGuid = bottomBar.parents(".stream_element").data("guid");
var postGuid = bottomBar.parents(".stream-element").data("guid");
toggleReactionsLink.remove();
toggleReactionsLink = $("<a/>", {"class": "show-comments", "href": Routes.postComments(postGuid) + ".mobile"})
......
......@@ -70,7 +70,7 @@
onLike: function(evt){
evt.preventDefault();
var link = $(evt.target),
likeCounter = $(evt.target).closest(".stream_element").find(".like-count");
likeCounter = $(evt.target).closest(".stream-element").find(".like-count");
if(!link.hasClass("loading") && link.hasClass("inactive")) {
Diaspora.Mobile.PostActions.like(likeCounter, link);
......
......@@ -3,9 +3,9 @@ body {
a,
a.tag,
.btn-link,
#main_stream .stream_element > .media a.author-name,
#main_stream .stream-element > .media a.author-name,
#hovercard h4 a,
.stream_element .from a.self {
.stream-element .from a.self {
color: $link-color;
&:hover, &:focus {
......
body {
#main_stream .stream_element {
#main_stream .stream-element {
border: 0;
border-bottom: 1px solid $border-grey;
margin-bottom: 10px;
......
......@@ -49,7 +49,7 @@
#suggest_member.btn { margin-top: 8px; }
}
.stream_element {
.stream-element {
.contact_remove-from-aspect, .contact_add-to-aspect {
text-decoration: none;
cursor: pointer;
......
......@@ -16,7 +16,7 @@
width: 100%;
}
.stream_element {
.stream-element {
background-color: $white;
padding: 10px;
......@@ -28,8 +28,8 @@
> .media { margin: 0; }
}
.stream_element.message,
.stream_element.new-message {
.stream-element.message,
.stream-element.new-message {
border: 1px solid $light-grey;
box-shadow: $card-shadow;
margin-bottom: 20px;
......@@ -46,7 +46,7 @@
}
}
.stream_element.new-message,
.stream-element.new-message,
.new-conversation {
label { font-weight: bold; }
......@@ -57,7 +57,7 @@
}
}
.stream_element.conversation {
.stream-element.conversation {
border-top: 1px solid $border-grey;
.timestamp { font-size: $font-size-small; }
......
......@@ -87,7 +87,7 @@
position: relative;
max-height: 350px;
}
.stream_element.media {
.stream-element.media {
padding: 5px;
.tooltip { position: fixed; }
.unread-toggle {
......
......@@ -41,10 +41,10 @@
}
}
.stream_element,
.stream-element,
.comment,
.photo,
.stream_element:hover .comment {
.stream-element:hover .comment {
.control-icons {
@include transition(opacity);
opacity: 0;
......@@ -53,7 +53,7 @@
&:hover .control-icons { opacity: 1; }
}
.stream_element,
.stream-element,
.comment,
.photo {
.control-icons > a {
......
......@@ -3,7 +3,7 @@
overflow: hidden;
}
.stream_element .near-from:hover {
.stream-element .near-from:hover {
cursor: pointer;
text-decoration: underline;
}
......
......@@ -90,7 +90,7 @@
}
}
.stream_element .comments {
.stream-element .comments {
margin: 0;
padding: 0;
width: 100%;
......
......@@ -31,14 +31,14 @@
}
}
.stream .stream_element .timeago,
.stream .stream-element .timeago,
.conversation-participants .last-message-timeago {
display: block;
font-style: italic;
color: $text-grey;
}
.stream .stream_element {
.stream .stream-element {
padding: 0.5rem;
.ltr {
......
......@@ -49,7 +49,7 @@ textarea { resize: vertical; }
.badge-important { background-color: $red; }
.stream_element,
.stream-element,
.comments {
overflow: auto;
position: relative;
......@@ -108,11 +108,11 @@ textarea { resize: vertical; }
width: 100%;
}
.stream_element:not(.shield-active) .shield{
.stream-element:not(.shield-active) .shield{
display: none;
}
.stream_element.shield-active .nsfw-hidden{
.stream-element.shield-active .nsfw-hidden{
display: none;
}
......@@ -153,7 +153,7 @@ footer {
}
.settings_container,
.stream_element,
.stream-element,
#login_form {
border-radius: 5px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
......@@ -165,7 +165,7 @@ footer {
border-bottom-color: #aaa;
}
.stream_element {
.stream-element {
padding: 0px;
div.img img.avatar {
......@@ -575,7 +575,7 @@ form#new_user.new_user input.btn {
}
}
.read.stream_element {
.read.stream-element {
color: dimGray;
.from {
a {
......
.stream_element {
.stream-element {
.location {
color: $text-grey;
font-size: $font-size-small;
......
......@@ -62,7 +62,7 @@
}
#notifications_container .stream, header .nav-badges .notifications {
.stream_element.media {
.stream-element.media {
padding: 10px;
margin: 0px;
line-height: 18px;
......
......@@ -9,7 +9,7 @@
.media, .media-body {
overflow: visible;
}
.stream_element.media {
.stream-element.media {
border-bottom: 1px solid $border-grey;
padding: 10px;
margin: 0;
......
......@@ -8,12 +8,12 @@ body {
right: auto;
}
.stream_element .content {
.stream-element .content {
padding-right: 60px;
padding-left: 0;
}
.stream_element .right {
.stream-element .right {
left: 12px;
right: auto;
}
......@@ -75,17 +75,17 @@ ul.comments li form p, ul.show_comments li form p, div.likes li form p, div.disl
right: 35px;
}
.stream .stream_element time {
.stream .stream-element time {
right: auto;
left: 20px;
}
.stream_element.conversation .message-count {
.stream-element.conversation .message-count {
right: auto;
left: 10px;
}
.stream_element.conversation .timestamp {
.stream-element.conversation .timestamp {
right: auto;
left: 10px;
}
......
.stream_element,
.stream-element,
.photo {
& > .media {
margin: 0px;
......@@ -60,7 +60,7 @@
}
}
#main_stream .stream_element {
#main_stream .stream-element {
margin-bottom: 20px;
border: 1px solid $light-grey;
box-shadow: $card-shadow;
......@@ -71,7 +71,7 @@
}
}
.stream_element {
.stream-element {
background-color: $white;
padding: 10px;
......
<div class="clearfix stream_element media contact {{in_aspect}}" id={{person_id}}>
<div class="clearfix stream-element media contact {{in_aspect}}" id={{person_id}}>
<div class="pull-right">
{{{aspectMembershipIndicator this in_aspect}}}
</div>
......
<div class="stream_element">
<div class="stream-element">
<div class="no-posts-info text-center">
<strong>{{ t "stream.no_posts_yet" }}</strong>
</div>
......
......@@ -4,7 +4,7 @@
- conversation = visibility.conversation
.conversation-wrapper{ :"data-conversation-path" => conversation_path(conversation) }
.stream_element.conversation{data: {guid: conversation.id},
.stream-element.conversation{data: {guid: conversation.id},
class: conversation_class(conversation, visibility.unread, @conversation.try(:id))}
.media
.img
......
- conversation = visibility.conversation
%a.conversation{ :href => conversation_path(conversation) }
.stream_element.conversation{data: {guid: conversation.id}, class: ("unread" if visibility.unread > 0)}
.stream-element.conversation{data: {guid: conversation.id}, class: ("unread" if visibility.unread > 0)}
.media
.img
= person_image_tag(conversation.author, size: :thumb_small)
......
.stream_element.message{data: {guid: message.id}, id: ("first_unread" if @first_unread_message_id == message.id)}
.stream-element.message{data: {guid: message.id}, id: ("first_unread" if @first_unread_message_id == message.id)}
.media
= person_image_link(message.author, size: :thumb_small, class: "img")
.bd
......
.stream_element.message{data: {guid: message.id}, id: ("first_unread" if @first_unread_message_id == message.id)}
.stream-element.message{data: {guid: message.id}, id: ("first_unread" if @first_unread_message_id == message.id)}
.media
.media-left
= person_image_link(message.author, size: :thumb_small, class: "media-object")
......
.stream
= render partial: "message", collection: conversation.messages
.stream_element.new-message
.stream-element.new-message
.media
.media-left
= owner_image_tag(:thumb_small)
......
......@@ -5,6 +5,6 @@ if($('.stream_container').hasClass('hidden')){
$('#conversation_show').html("<%= escape_javascript(render('conversations/show', :conversation => @conversation)) %>");
$(".stream_element", "#conversation_inbox").removeClass('selected');
$(".stream_element[data-guid='<%= @conversation.id %>']", "#conversation_inbox").addClass('selected');
$(".stream-element", "#conversation_inbox").removeClass('selected');
$(".stream-element[data-guid='<%= @conversation.id %>']", "#conversation_inbox").addClass('selected');
$('#conversation_show').trigger("conversation:loaded");
.media.stream_element{:data=>{:guid => note.id, :type => (Notification.types.key(note.type) || '') }, :class => (note.unread ? 'unread' : 'read')}
.media.stream-element{:data=>{:guid => note.id, :type => (Notification.types.key(note.type) || '') }, :class => (note.unread ? 'unread' : 'read')}
.unread-toggle.pull-right
%i.entypo-eye{title: (note.unread ? t("notifications.index.mark_read") : t("notifications.index.mark_unread"))}
- if note.type == "Notifications::StartedSharing" && (!defined?(no_aspect_dropdown) || !no_aspect_dropdown)
......
......@@ -14,7 +14,7 @@
= locale_date(date)
%ul.notifications_for_day
- notes.each do |note|
.stream_element{data: {guid: note.id}, class: "#{note.unread ? "unread" : "read"}"}
.stream-element{data: {guid: note.id}, class: "#{note.unread ? "unread" : "read"}"}
.content.from
.media
.media-left
......
#people_stream
- people.each do |person|
.media.stream_element{:id => person.id}
.media.stream-element{:id => person.id}
.media-object.pull-left
= person_image_link(person, :size => :thumb_small)
.media-body
......
.media.stream_element{id: person.id}
.media.stream-element{id: person.id}
.pull-right
= render partial: 'people/relationship_action',
locals: { person: person,
......
......@@ -2,7 +2,7 @@
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
.stream_element{id: person.id}
.stream-element{id: person.id}
.content
.media
.media-left
......
......@@ -8,7 +8,7 @@
#show_content.photos
.photo
= image_tag photo.url(:scaled_full)
.stream_element{:class => "photo_mobile"}
.stream-element{:class => "photo_mobile"}
.content
.from.media
.media-left
......
......@@ -21,7 +21,7 @@
= timeago(post.created_at)
%span.via
- if post.provider_display_name == "mobile"
= t('shared.stream_element.via_mobile', link: nil)
= t('shared.stream-element.via_mobile', link: nil)
&ndash;
%span.scope_scope
- if post.public?
......
......@@ -2,7 +2,7 @@
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
.stream_element{data: {guid: post.id}, class: post.respond_to?(:nsfw) && post.nsfw ? "shield-active" : ""}
.stream-element{data: {guid: post.id}, class: post.respond_to?(:nsfw) && post.nsfw ? "shield-active" : ""}
- if post.is_a?(Reshare)
= render "reshares/reshare", reshare: post, post: post.absolute_root
......
......@@ -15,7 +15,7 @@ Feature: Hovercards
Scenario: Hovercards on the main stream
Given I sign in as "alice@alice.alice"
And I am on "bob@bob.bob"'s page
Then I should see "public stuff" within ".stream_element"
Then I should see "public stuff" within ".stream-element"
When I activate the first hovercard
Then I should see a hovercard
When I deactivate the first hovercard
......@@ -34,7 +34,7 @@ Feature: Hovercards
Scenario: Hovercards on the tag stream as a logged out user
Given I am on the tag page for "hashtag"
Then I should see "public stuff" within ".stream_element"
Then I should see "public stuff" within ".stream-element"
When I activate the first hovercard
Then I should see a hovercard
When I deactivate the first hovercard
......@@ -44,7 +44,7 @@ Feature: Hovercards
Given a user with email "bob@bob.bob" is tagged "#first #second"
And I sign in as "alice@alice.alice"
And I am on "bob@bob.bob"'s page
Then I should see "public stuff" within ".stream_element"
Then I should see "public stuff" within ".stream-element"
When I activate the first hovercard
Then I should see a hovercard
And I should see "#first" hashtag in the hovercard
......
......@@ -16,13 +16,13 @@ Feature: Liking posts
Scenario: Liking and unliking a post from the stream
Then I should not have activated notifications for the post
When I like the post "I like unicorns" in the stream
Then I should see "Unlike" within ".stream_element .feedback"
And I should see a ".likes .media" within "#main_stream .stream_element"
Then I should see "Unlike" within ".stream-element .feedback"
And I should see a ".likes .media" within "#main_stream .stream-element"
And I should have activated notifications for the post
When I unlike the post "I like unicorns" in the stream
Then I should see "Like" within ".stream_element .feedback"
And I should not see a ".likes .media" within "#main_stream .stream_element"
Then I should see "Like" within ".stream-element .feedback"
And I should not see a ".likes .media" within "#main_stream .stream-element"
Scenario: Liking and unliking a post from a single post page
......@@ -39,4 +39,4 @@ Feature: Liking posts
When I like the post "I like unicorns" in the stream
And I sign out
And I sign in as "bob@bob.bob"
Then I should see a ".likes" within "#main_stream .stream_element"
Then I should see a ".likes" within "#main_stream .stream-element"
......@@ -26,7 +26,7 @@ Feature: Mentions
And I append "@Bob" to the publisher
And I click on the first user in the mentions dropdown list
And I press "Share"
Then I should see "Bob Jones" within ".stream_element"
Then I should see "Bob Jones" within ".stream-element"
When I follow "Bob Jones"
Then I should see "Bob Jones"
......@@ -45,12 +45,12 @@ Feature: Mentions
And I append "@Bob" to the publisher
Then I should not see the mentions dropdown list
When I press "Share"
Then I should see "Bob Jones" within ".stream_element"
Then I should see "Bob Jones" within ".stream-element"
When I expand the publisher
And I append "@Bob" to the publisher
And I click on the first user in the mentions dropdown list
And I press "Share"
Then I should see "Bob Jones" within ".stream_element"
Then I should see "Bob Jones" within ".stream-element"
When I follow "Bob Jones"
Then I should see "Bob Jones"
......@@ -21,23 +21,23 @@ Feature: oembed
When I click the publisher and post "http://mytube.com/watch?v=M3r2XDceM6A&format=json"
And I follow "My aspects"
Then I should not see a video player
And I should see "http://mytube.com/watch?v=M3r2XDceM6A&format=json" within ".stream_element"
And I should see "http://mytube.com/watch?v=M3r2XDceM6A&format=json" within ".stream-element"
Scenario: Post an unsecure rich-typed link
Given I expand the publisher
When I click the publisher and post "http://myrichtube.com/watch?v=M3r2XDceM6A&format=json"
And I follow "My aspects"
Then I should not see a video player
And I should see "http://myrichtube.com/watch?v=M3r2XDceM6A&format=json" within ".stream_element"
And I should see "http://myrichtube.com/watch?v=M3r2XDceM6A&format=json" within ".stream-element"
Scenario: Post a photo link
Given I expand the publisher
When I click the publisher and post "http://farm4.static.flickr.com/3123/2341623661_7c99f48bbf_m.jpg"
And I follow "My aspects"
Then I should see a "img" within ".stream_element"
Then I should see a "img" within ".stream-element"
Scenario: Post an unsupported text link
Given I expand the publisher
When I click the publisher and post "http://www.we-do-not-support-oembed.com/index.html"
And I follow "My aspects"
Then I should see "http://www.we-do-not-support-oembed.com/index.html" within ".stream_element"
Then I should see "http://www.we-do-not-support-oembed.com/index.html" within ".stream-element"
......@@ -46,8 +46,8 @@ Feature: preview posts in the stream
When I fill in the following:
| status_message_fake_text | Look at this dog |
And I preview the post
Then I should see a "img" within ".md-preview .stream_element .photo_attachments"
And I should see "Look at this dog" within ".md-preview .stream_element"
Then I should see a "img" within ".md-preview .stream-element .photo_attachments"
And I should see "Look at this dog" within ".md-preview .stream-element"
And I close the publisher
Scenario: preview a post with mentions
......@@ -80,8 +80,8 @@ Feature: preview posts in the stream
| normal |
| not normal |
And I preview the post
Then I should see a ".poll_form" within ".md-preview .stream_element"
And I should see a "form" within ".md-preview .stream_element"
Then I should see a ".poll_form" within ".md-preview .stream-element"
And I should see a "form" within ".md-preview .stream-element"
And I close the publisher
Scenario: preview a post with location
...