Commit ddaa6df0 authored by Steffen van Bergerem's avatar Steffen van Bergerem Committed by Benjamin Neff

Replace photo_attachments with photo-attachments

closes #7601
parent b77ecd48
......@@ -80,7 +80,7 @@ app.views.Content = app.views.Base.extend({
});
});
var photoAttachments = this.$(".photo_attachments");
var photoAttachments = this.$(".photo-attachments");
if(photoAttachments.length > 0) {
new app.views.Gallery({ el: photoAttachments });
}
......@@ -93,7 +93,7 @@ app.views.StatusMessage = app.views.Content.extend({
app.views.ExpandedStatusMessage = app.views.StatusMessage.extend({
postRenderTemplate : function(){
var photoAttachments = this.$(".photo_attachments");
var photoAttachments = this.$(".photo-attachments");
if(photoAttachments.length > 0) {
new app.views.Gallery({ el: photoAttachments });
}
......
......@@ -129,7 +129,7 @@ app.views.Publisher = Backbone.View.extend({
},
onPostPreview: function() {
var photoAttachments = self.wrapperEl.find(".photo_attachments");
var photoAttachments = self.wrapperEl.find(".photo-attachments");
if (photoAttachments.length > 0) {
new app.views.Gallery({el: photoAttachments});
}
......
......@@ -83,7 +83,7 @@ h3 { margin-top: 0; }
> .content, .reshare > .content { padding: 6px; }
.info{ margin-top: 0; }
.photo_attachments{ margin-top: 6px; }
.photo-attachments{ margin-top: 6px; }
.timeago{ font-weight: normal; }
}
......@@ -172,7 +172,7 @@ footer {
padding: 0;
}
.photo_attachments {
.photo-attachments {
border-radius: 3px 3px 0 0;
border: {
......@@ -194,7 +194,7 @@ footer {
}
}
.photo_attachments {
.photo-attachments {
position: relative;
left: 0;
top: 0;
......
.message-content,
.post-content {
img { max-width: 100%; }
.photo_attachments {
.photo-attachments {
margin-top: 7px;
padding-bottom: 10px;
text-align: center;
......
......@@ -23,7 +23,7 @@
</div>
{{#if largePhoto}}
<div class="photo_attachments nsfw-hidden">
<div class="photo-attachments nsfw-hidden">
{{#with largePhoto}}
<a href="{{sizes.large}}" class="stream-photo-link gallery-picture">
<img src="{{sizes.large}}" class="stream-photo big_stream_photo">
......
......@@ -5,7 +5,7 @@
.photo_area
- if post.is_a?(StatusMessage)
-if post.photos.size > 0
.photo_attachments
.photo-attachments
= link_to person_photo_path(post.author, post.photos.first), class: "stream-photo-link" do
- if post.photos.size > 1
.additional_photo_count
......
......@@ -6,7 +6,7 @@
.photo_area
- if post.is_a?(StatusMessage)
-if post.photos.size > 0
.photo_attachments
.photo-attachments
- if post.photos.size > 1
.additional_photo_count
= "+ #{post.photos.size-1}"
......
......@@ -46,7 +46,7 @@ Feature: preview posts in the stream
When I fill in the following:
| status_message_text | Look at this dog |
And I preview the post
Then I should see a "img" within ".md-preview .stream-element .photo_attachments"
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
......
......@@ -78,12 +78,12 @@ 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"
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"
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
......@@ -91,13 +91,13 @@ Feature: posting from the main page
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
......
......@@ -39,7 +39,7 @@ 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"
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
......
......@@ -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
......
......@@ -221,11 +221,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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment