diff --git a/app/assets/javascripts/app/views/conversations_view.js b/app/assets/javascripts/app/views/conversations_view.js index d5ed22a3a..524b93f6b 100644 --- a/app/assets/javascripts/app/views/conversations_view.js +++ b/app/assets/javascripts/app/views/conversations_view.js @@ -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") ){ diff --git a/app/assets/javascripts/app/views/notification_dropdown_view.js b/app/assets/javascripts/app/views/notification_dropdown_view.js index 3fec6a793..a44556c9a 100644 --- a/app/assets/javascripts/app/views/notification_dropdown_view.js +++ b/app/assets/javascripts/app/views/notification_dropdown_view.js @@ -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){ diff --git a/app/assets/javascripts/app/views/notifications_view.js b/app/assets/javascripts/app/views/notifications_view.js index 3af3e717d..08400742e 100644 --- a/app/assets/javascripts/app/views/notifications_view.js +++ b/app/assets/javascripts/app/views/notifications_view.js @@ -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"; diff --git a/app/assets/javascripts/app/views/preview_post_view.js b/app/assets/javascripts/app/views/preview_post_view.js index 1f8fe3981..d3b975f65 100644 --- a/app/assets/javascripts/app/views/preview_post_view.js +++ b/app/assets/javascripts/app/views/preview_post_view.js @@ -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", diff --git a/app/assets/javascripts/app/views/stream/shortcuts.js b/app/assets/javascripts/app/views/stream/shortcuts.js index dd62588c9..56d9df05d 100644 --- a/app/assets/javascripts/app/views/stream/shortcuts.js +++ b/app/assets/javascripts/app/views/stream/shortcuts.js @@ -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,27 @@ app.views.StreamShortcuts = Backbone.View.extend({ }, commentSelected: function() { - $('a.focus_comment_textarea',this.$('div.stream_element.loaded.shortcut_selected')).click(); + this.shortcutSelected().find("a.focus_comment_textarea").click(); }, likeSelected: function() { - $('a.like:first',this.$('div.stream_element.loaded.shortcut_selected')).click(); + this.shortcutSelected().find("a.like:first").click(); }, reshareSelected: function() { - $('a.reshare:first',this.$('div.stream_element.loaded.shortcut_selected')).click(); + this.shortcutSelected().find("a.reshare:first").click(); }, expandSelected: function() { - $('div.expander:first',this.$('div.stream_element.loaded.shortcut_selected')).click(); + this.shortcutSelected().find("div.expander:first").click(); + }, + + shortcutSelected: function() { + return this.$("div.stream-element.loaded.shortcut_selected"); }, 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"); if(link.length > 0) { // click does only work with vanilla javascript link[0].click(); @@ -115,12 +119,11 @@ 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'); - selected.removeClass('shortcut_selected').removeClass('highlighted'); + this.shortcutSelected().removeClass("shortcut_selected").removeClass("highlighted"); //move to new post window.scrollTo(window.pageXOffset, Math.round($(element).offset().top - this._headerSize)); //add the selection and selected-class to new post element.className+=" shortcut_selected highlighted"; - }, + } }); // @license-end diff --git a/app/assets/javascripts/app/views/stream_post_views.js b/app/assets/javascripts/app/views/stream_post_views.js index 60812f6b9..31746783c 100644 --- a/app/assets/javascripts/app/views/stream_post_views.js +++ b/app/assets/javascripts/app/views/stream_post_views.js @@ -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", diff --git a/app/assets/javascripts/mobile/mobile_application.js b/app/assets/javascripts/mobile/mobile_application.js index d10e2111d..e1d3c64d1 100644 --- a/app/assets/javascripts/mobile/mobile_application.js +++ b/app/assets/javascripts/mobile/mobile_application.js @@ -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; }); diff --git a/app/assets/javascripts/mobile/mobile_comments.js b/app/assets/javascripts/mobile/mobile_comments.js index 1690b2d9c..e753b70f2 100644 --- a/app/assets/javascripts/mobile/mobile_comments.js +++ b/app/assets/javascripts/mobile/mobile_comments.js @@ -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 = $("", {"class": "show-comments", "href": Routes.postComments(postGuid) + ".mobile"}) diff --git a/app/assets/javascripts/mobile/mobile_post_actions.js b/app/assets/javascripts/mobile/mobile_post_actions.js index ff83a62f5..6f7c18ee6 100644 --- a/app/assets/javascripts/mobile/mobile_post_actions.js +++ b/app/assets/javascripts/mobile/mobile_post_actions.js @@ -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); diff --git a/app/assets/stylesheets/color_themes/_color_theme_override.scss b/app/assets/stylesheets/color_themes/_color_theme_override.scss index 899885f8e..2be21f1e1 100644 --- a/app/assets/stylesheets/color_themes/_color_theme_override.scss +++ b/app/assets/stylesheets/color_themes/_color_theme_override.scss @@ -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 { diff --git a/app/assets/stylesheets/color_themes/_color_theme_override_origwhite.scss b/app/assets/stylesheets/color_themes/_color_theme_override_origwhite.scss index ff7450ecf..c8e7fe62f 100644 --- a/app/assets/stylesheets/color_themes/_color_theme_override_origwhite.scss +++ b/app/assets/stylesheets/color_themes/_color_theme_override_origwhite.scss @@ -1,5 +1,5 @@ body { - #main_stream .stream_element { + #main_stream .stream-element { border: 0; border-bottom: 1px solid $border-grey; margin-bottom: 10px; diff --git a/app/assets/stylesheets/contacts.scss b/app/assets/stylesheets/contacts.scss index aaef928f7..a11cc8a93 100644 --- a/app/assets/stylesheets/contacts.scss +++ b/app/assets/stylesheets/contacts.scss @@ -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; diff --git a/app/assets/stylesheets/conversations.scss b/app/assets/stylesheets/conversations.scss index 01540628e..2cb78e2da 100644 --- a/app/assets/stylesheets/conversations.scss +++ b/app/assets/stylesheets/conversations.scss @@ -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; } diff --git a/app/assets/stylesheets/header.scss b/app/assets/stylesheets/header.scss index 9cb3a533d..4d7aa516b 100644 --- a/app/assets/stylesheets/header.scss +++ b/app/assets/stylesheets/header.scss @@ -87,7 +87,7 @@ position: relative; max-height: 350px; } - .stream_element.media { + .stream-element.media { padding: 5px; .tooltip { position: fixed; } .unread-toggle { diff --git a/app/assets/stylesheets/interactions.scss b/app/assets/stylesheets/interactions.scss index 90c5d0063..e2f95d677 100644 --- a/app/assets/stylesheets/interactions.scss +++ b/app/assets/stylesheets/interactions.scss @@ -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 { diff --git a/app/assets/stylesheets/map.scss b/app/assets/stylesheets/map.scss index c521795bf..ef190f3f5 100644 --- a/app/assets/stylesheets/map.scss +++ b/app/assets/stylesheets/map.scss @@ -3,7 +3,7 @@ overflow: hidden; } -.stream_element .near-from:hover { +.stream-element .near-from:hover { cursor: pointer; text-decoration: underline; } diff --git a/app/assets/stylesheets/mobile/comments.scss b/app/assets/stylesheets/mobile/comments.scss index 3b10f6bd3..7f5382c37 100644 --- a/app/assets/stylesheets/mobile/comments.scss +++ b/app/assets/stylesheets/mobile/comments.scss @@ -90,7 +90,7 @@ } } -.stream_element .comments { +.stream-element .comments { margin: 0; padding: 0; width: 100%; diff --git a/app/assets/stylesheets/mobile/conversations.scss b/app/assets/stylesheets/mobile/conversations.scss index ac6495f65..e0e02411a 100644 --- a/app/assets/stylesheets/mobile/conversations.scss +++ b/app/assets/stylesheets/mobile/conversations.scss @@ -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 { diff --git a/app/assets/stylesheets/mobile/mobile.scss b/app/assets/stylesheets/mobile/mobile.scss index 87e496e04..588ce26b8 100644 --- a/app/assets/stylesheets/mobile/mobile.scss +++ b/app/assets/stylesheets/mobile/mobile.scss @@ -49,7 +49,7 @@ textarea { resize: vertical; } .badge-important { background-color: $red; } -.stream_element, +.stream-element, .comments { overflow: auto; position: relative; @@ -108,14 +108,6 @@ textarea { resize: vertical; } width: 100%; } -.stream_element:not(.shield-active) .shield{ - display: none; -} - -.stream_element.shield-active .nsfw-hidden{ - display: none; -} - .login_error, .login_alert { color: #DF0101; @@ -153,7 +145,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 +157,7 @@ footer { border-bottom-color: #aaa; } -.stream_element { +.stream-element { padding: 0px; div.img img.avatar { @@ -195,6 +187,11 @@ footer { padding: 0; } margin-top: 0; } + + &.shield-active .nsfw-hidden, + &:not(.shield-active) .shield { + display: none; + } } .photo_attachments { @@ -575,7 +572,7 @@ form#new_user.new_user input.btn { } } -.read.stream_element { +.read.stream-element { color: dimGray; .from { a { diff --git a/app/assets/stylesheets/mobile/stream_element.scss b/app/assets/stylesheets/mobile/stream_element.scss index 13734c6a9..f52dc9fa4 100644 --- a/app/assets/stylesheets/mobile/stream_element.scss +++ b/app/assets/stylesheets/mobile/stream_element.scss @@ -1,4 +1,4 @@ -.stream_element { +.stream-element { .location { color: $text-grey; font-size: $font-size-small; diff --git a/app/assets/stylesheets/notifications.scss b/app/assets/stylesheets/notifications.scss index f4349d1e1..16f12513c 100644 --- a/app/assets/stylesheets/notifications.scss +++ b/app/assets/stylesheets/notifications.scss @@ -62,7 +62,7 @@ } #notifications_container .stream, header .nav-badges .notifications { - .stream_element.media { + .stream-element.media { padding: 10px; margin: 0px; line-height: 18px; diff --git a/app/assets/stylesheets/people.scss b/app/assets/stylesheets/people.scss index 66dcb7082..fbe3900ba 100644 --- a/app/assets/stylesheets/people.scss +++ b/app/assets/stylesheets/people.scss @@ -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; diff --git a/app/assets/stylesheets/rtl.scss b/app/assets/stylesheets/rtl.scss index 15a564872..bec248686 100644 --- a/app/assets/stylesheets/rtl.scss +++ b/app/assets/stylesheets/rtl.scss @@ -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; } diff --git a/app/assets/stylesheets/stream_element.scss b/app/assets/stylesheets/stream_element.scss index 26899f05f..e9f466676 100644 --- a/app/assets/stylesheets/stream_element.scss +++ b/app/assets/stylesheets/stream_element.scss @@ -1,4 +1,4 @@ -.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; diff --git a/app/assets/templates/contact_tpl.jst.hbs b/app/assets/templates/contact_tpl.jst.hbs index beddbdc3b..9be2e1d62 100644 --- a/app/assets/templates/contact_tpl.jst.hbs +++ b/app/assets/templates/contact_tpl.jst.hbs @@ -1,4 +1,4 @@ -
+
{{{aspectMembershipIndicator this in_aspect}}}
diff --git a/app/assets/templates/no_posts_info_tpl.jst.hbs b/app/assets/templates/no_posts_info_tpl.jst.hbs index b617b72f1..7786819c9 100644 --- a/app/assets/templates/no_posts_info_tpl.jst.hbs +++ b/app/assets/templates/no_posts_info_tpl.jst.hbs @@ -1,4 +1,4 @@ -
+
{{ t "stream.no_posts_yet" }}
diff --git a/app/views/conversations/_conversation.haml b/app/views/conversations/_conversation.haml index 5299debbd..b9bbd1ceb 100644 --- a/app/views/conversations/_conversation.haml +++ b/app/views/conversations/_conversation.haml @@ -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 diff --git a/app/views/conversations/_conversation.mobile.haml b/app/views/conversations/_conversation.mobile.haml index cce4df2ef..b2836af1a 100644 --- a/app/views/conversations/_conversation.mobile.haml +++ b/app/views/conversations/_conversation.mobile.haml @@ -1,6 +1,6 @@ - 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) diff --git a/app/views/conversations/_message.html.haml b/app/views/conversations/_message.html.haml index 1834e5920..cd284114e 100644 --- a/app/views/conversations/_message.html.haml +++ b/app/views/conversations/_message.html.haml @@ -1,4 +1,4 @@ -.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 diff --git a/app/views/conversations/_message.mobile.haml b/app/views/conversations/_message.mobile.haml index d40a3b15e..4761eb974 100644 --- a/app/views/conversations/_message.mobile.haml +++ b/app/views/conversations/_message.mobile.haml @@ -1,4 +1,4 @@ -.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") diff --git a/app/views/conversations/_messages.haml b/app/views/conversations/_messages.haml index 3b6781600..4b8f3f633 100644 --- a/app/views/conversations/_messages.haml +++ b/app/views/conversations/_messages.haml @@ -1,7 +1,7 @@ .stream = render partial: "message", collection: conversation.messages - .stream_element.new-message + .stream-element.new-message .media .media-left = owner_image_tag(:thumb_small) diff --git a/app/views/conversations/show.js.erb b/app/views/conversations/show.js.erb index c07578ee4..ad87047bb 100644 --- a/app/views/conversations/show.js.erb +++ b/app/views/conversations/show.js.erb @@ -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"); diff --git a/app/views/notifications/_notification.haml b/app/views/notifications/_notification.haml index 030221646..8c537bdc0 100644 --- a/app/views/notifications/_notification.haml +++ b/app/views/notifications/_notification.haml @@ -1,4 +1,5 @@ -.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) diff --git a/app/views/notifications/index.mobile.haml b/app/views/notifications/index.mobile.haml index 4d68b7911..d53a7db55 100644 --- a/app/views/notifications/index.mobile.haml +++ b/app/views/notifications/index.mobile.haml @@ -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 diff --git a/app/views/people/_index.html.haml b/app/views/people/_index.html.haml index 82c069364..3980b16d7 100644 --- a/app/views/people/_index.html.haml +++ b/app/views/people/_index.html.haml @@ -1,6 +1,6 @@ #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 diff --git a/app/views/people/_person.html.haml b/app/views/people/_person.html.haml index 48e543d2d..bd0649efd 100644 --- a/app/views/people/_person.html.haml +++ b/app/views/people/_person.html.haml @@ -1,4 +1,4 @@ -.media.stream_element{id: person.id} +.media.stream-element{id: person.id} .pull-right = render partial: 'people/relationship_action', locals: { person: person, diff --git a/app/views/people/_person.mobile.haml b/app/views/people/_person.mobile.haml index ace474342..9d9a45008 100644 --- a/app/views/people/_person.mobile.haml +++ b/app/views/people/_person.mobile.haml @@ -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 diff --git a/app/views/photos/show.mobile.haml b/app/views/photos/show.mobile.haml index 9428f9ec3..69d2a96f9 100644 --- a/app/views/photos/show.mobile.haml +++ b/app/views/photos/show.mobile.haml @@ -8,7 +8,7 @@ #show_content.photos .photo = image_tag photo.url(:scaled_full) - .stream_element{:class => "photo_mobile"} + .stream-element.photo_mobile .content .from.media .media-left diff --git a/app/views/shared/_post_info.mobile.haml b/app/views/shared/_post_info.mobile.haml index 1b51261f2..e5548d3a8 100644 --- a/app/views/shared/_post_info.mobile.haml +++ b/app/views/shared/_post_info.mobile.haml @@ -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) – %span.scope_scope - if post.public? diff --git a/app/views/shared/_stream_element.mobile.haml b/app/views/shared/_stream_element.mobile.haml index 237a36af6..0e899d089 100644 --- a/app/views/shared/_stream_element.mobile.haml +++ b/app/views/shared/_stream_element.mobile.haml @@ -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 diff --git a/features/desktop/hovercards.feature b/features/desktop/hovercards.feature index a1061ea4f..76313185a 100644 --- a/features/desktop/hovercards.feature +++ b/features/desktop/hovercards.feature @@ -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 diff --git a/features/desktop/likes.feature b/features/desktop/likes.feature index b32c7af62..eef1a4c4c 100644 --- a/features/desktop/likes.feature +++ b/features/desktop/likes.feature @@ -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" diff --git a/features/desktop/mentions.feature b/features/desktop/mentions.feature index 9c613bcf6..01791180f 100644 --- a/features/desktop/mentions.feature +++ b/features/desktop/mentions.feature @@ -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" diff --git a/features/desktop/oembed.feature b/features/desktop/oembed.feature index 02625de32..07ff4d5d1 100644 --- a/features/desktop/oembed.feature +++ b/features/desktop/oembed.feature @@ -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" diff --git a/features/desktop/post_preview.feature b/features/desktop/post_preview.feature index 20e785471..827b36d36 100644 --- a/features/desktop/post_preview.feature +++ b/features/desktop/post_preview.feature @@ -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 @@ -94,6 +94,6 @@ Feature: preview posts in the stream | status_message_fake_text | I am eating yogurt | | location_address | Some cool place | And I preview the post - Then I should see a ".near-from" within ".md-preview .stream_element" - And I should see "Some cool place" within ".md-preview .stream_element .near-from" + Then I should see a ".near-from" within ".md-preview .stream-element" + And I should see "Some cool place" within ".md-preview .stream-element .near-from" And I close the publisher diff --git a/features/desktop/post_with_a_poll.feature b/features/desktop/post_with_a_poll.feature index 954211df7..b5b3a0ff8 100644 --- a/features/desktop/post_with_a_poll.feature +++ b/features/desktop/post_with_a_poll.feature @@ -46,8 +46,8 @@ Feature: posting with a poll | normal | | not normal | And I press "Share" - Then I should see a ".poll_form" within ".stream_element" - And I should see a "form" within ".stream_element" + Then I should see a ".poll_form" within ".stream-element" + And I should see a "form" within ".stream-element" Scenario: vote for an option Given I expand the publisher @@ -61,7 +61,7 @@ Feature: posting with a poll And I press "Share" And I check the first option - And I press "Vote" within ".stream_element" + And I press "Vote" within ".stream-element" Then I should see an element ".poll_progress_bar" And I should see an element ".percentage" And I should see "1 vote so far" within ".poll_statistic" diff --git a/features/desktop/posts_from_main_page.feature b/features/desktop/posts_from_main_page.feature index 465bf8c0e..7e75c7df7 100644 --- a/features/desktop/posts_from_main_page.feature +++ b/features/desktop/posts_from_main_page.feature @@ -78,26 +78,26 @@ Feature: posting from the main page When I write the status message "Look at this dog" And I submit the publisher And I go to the aspects page - Then I should see a "img" within ".stream_element div.photo_attachments" - And I should see "Look at this dog" within ".stream_element" + Then I should see a "img" within ".stream-element div.photo_attachments" + And I should see "Look at this dog" within ".stream-element" When I log out And I sign in as "alice@alice.alice" And I go to "bob@bob.bob"'s page - Then I should see a "img" within ".stream_element div.photo_attachments" - And I should see "Look at this dog" within ".stream_element" + Then I should see a "img" within ".stream-element div.photo_attachments" + And I should see "Look at this dog" within ".stream-element" Scenario: post a photo without text Given I expand the publisher And I attach "spec/fixtures/button.png" to the publisher Then I should see an uploaded image within the photo drop zone When I press "Share" - Then I should see a "img" within ".stream_element div.photo_attachments" + Then I should see a "img" within ".stream-element div.photo_attachments" When I go to the aspects page - Then I should see a "img" within ".stream_element div.photo_attachments" + Then I should see a "img" within ".stream-element div.photo_attachments" When I log out And I sign in as "alice@alice.alice" And I go to "bob@bob.bob"'s page - Then I should see a "img" within ".stream_element div.photo_attachments" + Then I should see a "img" within ".stream-element div.photo_attachments" Scenario: back out of posting a photo-only post Given I expand the publisher @@ -136,7 +136,7 @@ Feature: posting from the main page And I sign in as "alice@alice.alice" And I am on "bob@bob.bob"'s page - And I hover over the ".stream_element" + And I hover over the ".stream-element" And I click to hide the first post And I go to "bob@bob.bob"'s page Then I should not see "Here is a post for you to hide" @@ -148,7 +148,7 @@ Feature: posting from the main page When I write the status message "I am eating a yogurt" And I submit the publisher And I go to the aspects page - And I hover over the ".stream_element" + And I hover over the ".stream-element" And I click to delete the first post And I go to the aspects page Then I should not see "I am eating a yogurt" @@ -209,6 +209,6 @@ Feature: posting from the main page When I write the status message "I am eating a yogurt" And I submit the publisher - And I hover over the ".stream_element" + And I hover over the ".stream-element" And I reject the alert after I prepare the deletion of the first post Then I should see "I am eating a yogurt" diff --git a/features/desktop/posts_from_profile_page.feature b/features/desktop/posts_from_profile_page.feature index 3ea86e32c..b4804b71c 100644 --- a/features/desktop/posts_from_profile_page.feature +++ b/features/desktop/posts_from_profile_page.feature @@ -39,8 +39,8 @@ Feature: posting from own profile page And I submit the publisher When I go to the home page - Then I should see a "img" within ".stream_element div.photo_attachments" - And I should see "who am I?" within ".stream_element" + Then I should see a "img" within ".stream-element div.photo_attachments" + And I should see "who am I?" within ".stream-element" Scenario: back out of posting a photo-only post Given I expand the publisher diff --git a/features/mobile/conversations.feature b/features/mobile/conversations.feature index c64e0ba2d..e88842f91 100644 --- a/features/mobile/conversations.feature +++ b/features/mobile/conversations.feature @@ -16,7 +16,7 @@ Feature: private conversations mobile And I should see "Greetings" within ".ltr" And I press the first ".ltr" within ".conversation" And "Alice Awesome" should be part of active conversation - And I should see "hello, alice!" within ".stream_element" + And I should see "hello, alice!" within ".stream-element" When I sign in as "alice@alice.alice" on the mobile website And I reply with "hey, how you doing?" And I press the first ".ltr" within ".conversation" diff --git a/features/mobile/posts_from_main_page.feature b/features/mobile/posts_from_main_page.feature index 27016314f..d4c688d56 100644 --- a/features/mobile/posts_from_main_page.feature +++ b/features/mobile/posts_from_main_page.feature @@ -35,11 +35,11 @@ Feature: posting from the mobile main page And I should see an uploaded image within the photo drop zone When I press "Share" When I go to the stream page - Then I should see a "img" within ".stream_element div.photo_attachments" + Then I should see a "img" within ".stream-element div.photo_attachments" When I log out And I sign in as "alice@alice.alice" on the mobile website When I go to the stream page - Then I should see a "img" within ".stream_element div.photo_attachments" + Then I should see a "img" within ".stream-element div.photo_attachments" Scenario: back out of posting a photo-only post Given I visit the mobile publisher page diff --git a/features/step_definitions/comment_steps.rb b/features/step_definitions/comment_steps.rb index d8993b175..0d669f1ac 100644 --- a/features/step_definitions/comment_steps.rb +++ b/features/step_definitions/comment_steps.rb @@ -3,12 +3,12 @@ When /^I focus the comment field$/ do end Then /^the first comment field should be open/ do - find("#main_stream .stream_element .new_comment").should be_visible + find("#main_stream .stream-element .new_comment").should be_visible end Then /^the first comment field should be closed$/ do - page.should have_css(".stream_element .media") - page.should_not have_selector("#main_stream .stream_element .new_comment", match: :first) + page.should have_css(".stream-element .media") + page.should_not have_selector("#main_stream .stream-element .new_comment", match: :first) end When /^I make a show page comment "([^"]*)"$/ do |comment_text| diff --git a/features/step_definitions/conversations_steps.rb b/features/step_definitions/conversations_steps.rb index 918e834d0..d47c36bf7 100644 --- a/features/step_definitions/conversations_steps.rb +++ b/features/step_definitions/conversations_steps.rb @@ -59,5 +59,5 @@ Then /^I send a mobile message with subject "([^"]*)" and text "([^"]*)" to "([^ end Then /^I should see "([^"]*)" as a participant$/ do |name| - find(".conversation.stream_element img.avatar[title^='#{name}']").should_not be_nil + find(".conversation.stream-element img.avatar[title^='#{name}']").should_not be_nil end diff --git a/features/step_definitions/custom_web_steps.rb b/features/step_definitions/custom_web_steps.rb index 3883d2acf..97a8e1035 100644 --- a/features/step_definitions/custom_web_steps.rb +++ b/features/step_definitions/custom_web_steps.rb @@ -88,8 +88,8 @@ And /^I hover over the "([^"]+)"$/ do |element| end When /^I prepare the deletion of the first post$/ do - find(".stream .stream_element", match: :first).hover - within(find(".stream .stream_element", match: :first)) do + find(".stream .stream-element", match: :first).hover + within(find(".stream .stream-element", match: :first)) do ctrl = find(".control-icons") ctrl.hover ctrl.find(".remove_post").click @@ -97,8 +97,8 @@ When /^I prepare the deletion of the first post$/ do end When /^I prepare hiding the first post$/ do - find(".stream .stream_element", match: :first).hover - within(find(".stream .stream_element", match: :first)) do + find(".stream .stream-element", match: :first).hover + within(find(".stream .stream-element", match: :first)) do ctrl = find(".control-icons") ctrl.hover ctrl.find(".hide_post").click @@ -204,7 +204,7 @@ Then /^the "([^"]*)" field(?: within "([^"]*)")? should be filled with "([^"]*)" end Then /^I should see (\d+) contacts$/ do |n_posts| - has_css?("#people_stream .stream_element", :count => n_posts.to_i).should be true + has_css?("#people_stream .stream-element", count: n_posts.to_i).should be true end And /^I scroll down$/ do @@ -232,7 +232,7 @@ Then /^the notification dropdown scrollbar should be visible$/ do end Then /^there should be (\d+) notifications loaded$/ do |n| - result = page.evaluate_script("$('.media.stream_element').length") + result = page.evaluate_script("$('.media.stream-element').length") result.should == n.to_i end @@ -245,11 +245,11 @@ When /^I resize my window to 800x600$/ do end Then 'I should see an image attached to the post' do - step %{I should see a "img" within ".stream_element div.photo_attachments"} + step %(I should see a "img" within ".stream-element div.photo_attachments") end Then 'I press the attached image' do - step %{I press the 1st "img" within ".stream_element div.photo_attachments"} + step %(I press the 1st "img" within ".stream-element div.photo_attachments") end And "I wait for the popovers to appear" do diff --git a/features/step_definitions/keyboard_navigation_steps.rb b/features/step_definitions/keyboard_navigation_steps.rb index 9bf47c478..e0109902d 100644 --- a/features/step_definitions/keyboard_navigation_steps.rb +++ b/features/step_definitions/keyboard_navigation_steps.rb @@ -1,6 +1,6 @@ When /^I press the "([^\"]*)" key somewhere$/ do |key| within("#main_stream") do - find("div.stream_element", match: :first).native.send_keys(key) + find("div.stream-element", match: :first).native.send_keys(key) end end diff --git a/features/step_definitions/notifications_steps.rb b/features/step_definitions/notifications_steps.rb index ba12d3403..c7852edce 100644 --- a/features/step_definitions/notifications_steps.rb +++ b/features/step_definitions/notifications_steps.rb @@ -7,7 +7,7 @@ When /^I filter notifications by mentions$/ do end Then /^I should( not)? have activated notifications for the post( in the single post view)?$/ do |negate, spv| - selector = spv ? "#single-post-moderation" : "#main_stream .stream_element" + selector = spv ? "#single-post-moderation" : "#main_stream .stream-element" if negate expect(find(selector, match: :first)).to have_no_css(".destroy_participation", visible: false) expect(find(selector, match: :first)).to have_css(".create_participation", visible: false) diff --git a/features/step_definitions/posts_steps.rb b/features/step_definitions/posts_steps.rb index 40799cd86..30ccaf38e 100644 --- a/features/step_definitions/posts_steps.rb +++ b/features/step_definitions/posts_steps.rb @@ -16,8 +16,8 @@ end Then /^I should not see any posts in my stream$/ do expect(page).not_to have_selector("#paginate .loader") - expect(page).not_to have_selector(".stream_element .media") - expect(page).to have_selector(".stream_element .no-posts-info") + expect(page).not_to have_selector(".stream-element .media") + expect(page).to have_selector(".stream-element .no-posts-info") end Then /^I should not see any picture in my stream$/ do @@ -78,7 +78,7 @@ And /^I submit the publisher$/ do end When /^I click on the first block button/ do - find(".stream_element", match: :first).hover + find(".stream-element", match: :first).hover find(".block_user").click end diff --git a/features/support/publishing_cuke_helpers.rb b/features/support/publishing_cuke_helpers.rb index 395318211..5d4ce7675 100644 --- a/features/support/publishing_cuke_helpers.rb +++ b/features/support/publishing_cuke_helpers.rb @@ -55,25 +55,25 @@ module PublishingCukeHelpers end def expand_first_post - within(".stream_element", match: :first) do + within(".stream-element", match: :first) do find(".expander").click expect(page).to have_no_css(".expander") end end def first_post_collapsed? - expect(find(".stream_element .collapsible", match: :first)).to have_css(".expander") - expect(page).to have_css(".stream_element .collapsible.collapsed", match: :first) + expect(find(".stream-element .collapsible", match: :first)).to have_css(".expander") + expect(page).to have_css(".stream-element .collapsible.collapsed", match: :first) end def first_post_expanded? - expect(page).to have_no_css(".stream_element .expander", match: :first) - expect(page).to have_no_css(".stream_element .collapsible.collapsed", match: :first) - expect(page).to have_css(".stream_element .collapsible.opened", match: :first) + expect(page).to have_no_css(".stream-element .expander", match: :first) + expect(page).to have_no_css(".stream-element .collapsible.collapsed", match: :first) + expect(page).to have_css(".stream-element .collapsible.opened", match: :first) end def first_post_text - find(".stream_element .post-content", match: :first).text + find(".stream-element .post-content", match: :first).text end def frame_numbers_content(position) @@ -85,12 +85,12 @@ module PublishingCukeHelpers end def stream_element_numbers_content(position) - find(".stream_element:nth-child(#{position}) .post-content") + find(".stream-element:nth-child(#{position}) .post-content") end def find_post_by_text(text) expect(page).to have_text(text) - find(".stream_element", text: text) + find(".stream-element", text: text) end def within_post(post_text) diff --git a/spec/javascripts/app/views/contact_stream_view_spec.js b/spec/javascripts/app/views/contact_stream_view_spec.js index 7ae93bb53..3c884f7fd 100644 --- a/spec/javascripts/app/views/contact_stream_view_spec.js +++ b/spec/javascripts/app/views/contact_stream_view_spec.js @@ -170,16 +170,16 @@ describe("app.views.ContactStream", function() { }); it("renders all added contacts", function() { - expect(this.view.$(".stream_element.contact").length).toBe(0); + expect(this.view.$(".stream-element.contact").length).toBe(0); this.view.appendContactViews(this.contactsData); - expect(this.view.$(".stream_element.contact").length).toBe(this.contactsData.length); + expect(this.view.$(".stream-element.contact").length).toBe(this.contactsData.length); }); it("appends contacts to an existing contact list", function() { this.view.appendContactViews([this.contactsData[0]]); - expect(this.view.$(".stream_element.contact").length).toBe(1); + expect(this.view.$(".stream-element.contact").length).toBe(1); this.view.appendContactViews(_.rest(this.contactsData)); - expect(this.view.$(".stream_element.contact").length).toBe(this.contactsData.length); + expect(this.view.$(".stream-element.contact").length).toBe(this.contactsData.length); }); }); diff --git a/spec/javascripts/app/views/contact_view_spec.js b/spec/javascripts/app/views/contact_view_spec.js index f5f8ba1c5..26520c764 100644 --- a/spec/javascripts/app/views/contact_view_spec.js +++ b/spec/javascripts/app/views/contact_view_spec.js @@ -29,7 +29,7 @@ describe("app.views.Contact", function(){ this.view.$el.append($("
")); app.flashMessages = new app.views.FlashMessages({ el: this.view.$("#flash-container") }); this.button = this.view.$el.find(".contact_add-to-aspect"); - this.contact = this.view.$el.find(".stream_element.contact"); + this.contact = this.view.$el.find(".stream-element.contact"); this.aspectMembership = {id: 42, aspect: app.aspect.toJSON()}; this.response = JSON.stringify(this.aspectMembership); }); @@ -93,7 +93,7 @@ describe("app.views.Contact", function(){ this.view.$el.append($("
")); app.flashMessages = new app.views.FlashMessages({ el: this.view.$("#flash-container") }); this.button = this.view.$el.find(".contact_remove-from-aspect"); - this.contact = this.view.$el.find(".stream_element.contact"); + this.contact = this.view.$el.find(".stream-element.contact"); this.aspectMembership = this.model.aspectMemberships.first().toJSON(); this.response = JSON.stringify(this.aspectMembership); }); diff --git a/spec/javascripts/app/views/notification_dropdown_view_spec.js b/spec/javascripts/app/views/notification_dropdown_view_spec.js index ec9641030..891023032 100644 --- a/spec/javascripts/app/views/notification_dropdown_view_spec.js +++ b/spec/javascripts/app/views/notification_dropdown_view_spec.js @@ -101,10 +101,10 @@ describe("app.views.NotificationDropdown", function() { context("renderNotifications", function(){ it("Removes the previous notifications", function(){ - this.view.dropdownNotifications.append("
Notification
"); - expect(this.view.dropdownNotifications.find(".media.stream_element").length).toBe(1); + this.view.dropdownNotifications.append("
Notification
"); + expect(this.view.dropdownNotifications.find(".media.stream-element").length).toBe(1); this.view.renderNotifications(); - expect(this.view.dropdownNotifications.find(".media.stream_element").length).toBe(0); + expect(this.view.dropdownNotifications.find(".media.stream-element").length).toBe(0); }); it("Calls hideAjaxLoader()", function(){ spyOn(this.view, "hideAjaxLoader"); diff --git a/spec/javascripts/app/views/notifications_view_spec.js b/spec/javascripts/app/views/notifications_view_spec.js index 890676478..94f8a8394 100644 --- a/spec/javascripts/app/views/notifications_view_spec.js +++ b/spec/javascripts/app/views/notifications_view_spec.js @@ -7,7 +7,7 @@ describe("app.views.Notifications", function(){ describe("mark read", function() { beforeEach(function() { - this.unreadN = $(".stream_element.unread").first(); + this.unreadN = $(".stream-element.unread").first(); this.guid = this.unreadN.data("guid"); }); @@ -21,7 +21,7 @@ describe("app.views.Notifications", function(){ describe("mark unread", function() { beforeEach(function() { - this.readN = $(".stream_element.read").first(); + this.readN = $(".stream-element.read").first(); this.guid = this.readN.data("guid"); }); @@ -35,7 +35,7 @@ describe("app.views.Notifications", function(){ describe("updateView", function() { beforeEach(function() { - this.readN = $(".stream_element.read").first(); + this.readN = $(".stream-element.read").first(); this.guid = this.readN.data("guid"); this.type = this.readN.data("type"); }); @@ -113,9 +113,9 @@ describe("app.views.Notifications", function(){ it("calls setRead for each unread notification", function(){ spyOn(this.view, "setRead"); this.view.markAllRead(); - expect(this.view.setRead).toHaveBeenCalledWith(this.view.$(".stream_element.unread").eq(0).data("guid")); + expect(this.view.setRead).toHaveBeenCalledWith(this.view.$(".stream-element.unread").eq(0).data("guid")); this.view.markAllRead(); - expect(this.view.setRead).toHaveBeenCalledWith(this.view.$(".stream_element.unread").eq(1).data("guid")); + expect(this.view.setRead).toHaveBeenCalledWith(this.view.$(".stream-element.unread").eq(1).data("guid")); }); }); }); diff --git a/spec/javascripts/app/views/stream/shortcuts_spec.js b/spec/javascripts/app/views/stream/shortcuts_spec.js index 071a0605a..3933c6324 100644 --- a/spec/javascripts/app/views/stream/shortcuts_spec.js +++ b/spec/javascripts/app/views/stream/shortcuts_spec.js @@ -10,7 +10,7 @@ describe("app.views.StreamShortcuts", function () { spec.content().html(this.streamView.render().el); this.view = new app.views.StreamShortcuts({el: $(document)}); - expect(spec.content().find("div.stream_element.loaded").length).toBe(2); + expect(spec.content().find("div.stream-element.loaded").length).toBe(2); }); describe("pressing 'j'", function(){ diff --git a/spec/javascripts/app/views/stream_view_spec.js b/spec/javascripts/app/views/stream_view_spec.js index 412728222..c0caee100 100644 --- a/spec/javascripts/app/views/stream_view_spec.js +++ b/spec/javascripts/app/views/stream_view_spec.js @@ -27,7 +27,7 @@ describe("app.views.Stream", function() { describe("#render", function() { beforeEach(function() { this.statusMessage = this.stream.items.models[0]; - this.statusElement = $(this.view.$(".stream_element")[0]); + this.statusElement = $(this.view.$(".stream-element")[0]); }); context("when rendering a status message", function() { diff --git a/spec/javascripts/mobile/mobile_application_spec.js b/spec/javascripts/mobile/mobile_application_spec.js index ee9655dda..3b6ecc4c9 100644 --- a/spec/javascripts/mobile/mobile_application_spec.js +++ b/spec/javascripts/mobile/mobile_application_spec.js @@ -13,7 +13,7 @@ describe("Diaspora.Mobile", function(){ it("deactivates shield", function(){ Diaspora.Mobile.initialize(); - var $shield = $(".stream_element").first(); + var $shield = $(".stream-element").first(); expect($shield).toHaveClass("shield-active"); $shield.find(".shield a").click(); expect($shield).not.toHaveClass("shield-active"); diff --git a/spec/javascripts/mobile/mobile_comments_spec.js b/spec/javascripts/mobile/mobile_comments_spec.js index e8fd7551a..290ba618a 100644 --- a/spec/javascripts/mobile/mobile_comments_spec.js +++ b/spec/javascripts/mobile/mobile_comments_spec.js @@ -68,7 +68,7 @@ describe("Diaspora.Mobile.Comments", function(){ contentType: "text/plain", responseText: "
new comments
" }); - expect($(".stream .stream_element").first()).toContainElement(".commentContainerForTest"); + expect($(".stream .stream-element").first()).toContainElement(".commentContainerForTest"); }); it("shows and hides the mobile spinner", function(){ @@ -110,7 +110,7 @@ describe("Diaspora.Mobile.Comments", function(){ it("Creates the reaction link when no reactions", function(){ var parent = this.toggleReactionsLink.parent(); - var postGuid = this.bottomBar.parents(".stream_element").data("guid"); + var postGuid = this.bottomBar.parents(".stream-element").data("guid"); this.toggleReactionsLink.remove(); parent.prepend($("", {"class": "show-comments"}).text("No reaction")); diff --git a/spec/javascripts/mobile/mobile_post_actions_spec.js b/spec/javascripts/mobile/mobile_post_actions_spec.js index b2a2f570e..5cdca9000 100644 --- a/spec/javascripts/mobile/mobile_post_actions_spec.js +++ b/spec/javascripts/mobile/mobile_post_actions_spec.js @@ -88,7 +88,7 @@ describe("Diaspora.Mobile.PostActions", function(){ spec.loadFixture("aspects_index_mobile_public_post"); Diaspora.Mobile.PostActions.initialize(); this.link = $(".stream .like-action").first(); - this.likeCounter = this.link.closest(".stream_element").find(".like-count"); + this.likeCounter = this.link.closest(".stream-element").find(".like-count"); }); it("always calls showLoader before sending request", function(){ @@ -135,7 +135,7 @@ describe("Diaspora.Mobile.PostActions", function(){ spec.loadFixture("aspects_index_mobile_public_post"); Diaspora.Mobile.PostActions.initialize(); this.link = $(".stream .like-action").first(); - this.likeCounter = this.link.closest(".stream_element").find(".like-count"); + this.likeCounter = this.link.closest(".stream-element").find(".like-count"); Diaspora.Mobile.PostActions.like(this.likeCounter, this.link); jasmine.Ajax.requests.mostRecent().respondWith({status: 201, responseText: "{\"id\": \"18\"}"}); });