Replace photo_attachments with photo-attachments

closes #7601
This commit is contained in:
Steffen van Bergerem 2017-08-30 12:40:53 +02:00 committed by Benjamin Neff
parent b77ecd482a
commit ddaa6df0b4
No known key found for this signature in database
GPG key ID: 971464C3F1A90194
12 changed files with 21 additions and 21 deletions

View file

@ -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 });
}

View file

@ -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});
}

View file

@ -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;

View file

@ -1,7 +1,7 @@
.message-content,
.post-content {
img { max-width: 100%; }
.photo_attachments {
.photo-attachments {
margin-top: 7px;
padding-bottom: 10px;
text-align: center;

View file

@ -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">

View file

@ -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

View file

@ -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}"

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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