Replace .stream_element by .stream-element
This commit is contained in:
parent
709547860a
commit
523f1e848e
66 changed files with 156 additions and 156 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
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 {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<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>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
–
|
||||
%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
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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|
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ describe("app.views.Contact", function(){
|
|||
this.view.$el.append($("<div id='flash-container'/>"));
|
||||
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($("<div id='flash-container'/>"));
|
||||
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);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -101,10 +101,10 @@ describe("app.views.NotificationDropdown", function() {
|
|||
|
||||
context("renderNotifications", function(){
|
||||
it("Removes the previous notifications", function(){
|
||||
this.view.dropdownNotifications.append("<div class=\"media stream_element\">Notification</div>");
|
||||
expect(this.view.dropdownNotifications.find(".media.stream_element").length).toBe(1);
|
||||
this.view.dropdownNotifications.append("<div class=\"media stream-element\">Notification</div>");
|
||||
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");
|
||||
|
|
|
|||
|
|
@ -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"));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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(){
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ describe("Diaspora.Mobile.Comments", function(){
|
|||
contentType: "text/plain",
|
||||
responseText: "<div class=\"commentContainerForTest\">new comments</div>"
|
||||
});
|
||||
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($("<span/>", {"class": "show-comments"}).text("No reaction"));
|
||||
|
||||
|
|
|
|||
|
|
@ -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\"}"});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue