diff --git a/app/assets/javascripts/app/views/content_view.js b/app/assets/javascripts/app/views/content_view.js
index 5a5a9e9af..78367563b 100644
--- a/app/assets/javascripts/app/views/content_view.js
+++ b/app/assets/javascripts/app/views/content_view.js
@@ -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 });
}
diff --git a/app/assets/javascripts/app/views/publisher_view.js b/app/assets/javascripts/app/views/publisher_view.js
index b61a27301..19eb92296 100644
--- a/app/assets/javascripts/app/views/publisher_view.js
+++ b/app/assets/javascripts/app/views/publisher_view.js
@@ -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});
}
diff --git a/app/assets/stylesheets/mobile/mobile.scss b/app/assets/stylesheets/mobile/mobile.scss
index 4520aa234..6447df013 100644
--- a/app/assets/stylesheets/mobile/mobile.scss
+++ b/app/assets/stylesheets/mobile/mobile.scss
@@ -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;
diff --git a/app/assets/stylesheets/post-content.scss b/app/assets/stylesheets/post-content.scss
index c58f567e1..8505a9a3f 100644
--- a/app/assets/stylesheets/post-content.scss
+++ b/app/assets/stylesheets/post-content.scss
@@ -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;
diff --git a/app/assets/templates/status-message_tpl.jst.hbs b/app/assets/templates/status-message_tpl.jst.hbs
index 14ee8889a..6ca21236e 100644
--- a/app/assets/templates/status-message_tpl.jst.hbs
+++ b/app/assets/templates/status-message_tpl.jst.hbs
@@ -23,7 +23,7 @@
{{#if largePhoto}}
-
+
{{#with largePhoto}}
diff --git a/app/views/shared/_photo_area.mobile.haml b/app/views/shared/_photo_area.mobile.haml
index 19417b915..e37a90391 100644
--- a/app/views/shared/_photo_area.mobile.haml
+++ b/app/views/shared/_photo_area.mobile.haml
@@ -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
diff --git a/app/views/status_messages/_status_message.mobile.haml b/app/views/status_messages/_status_message.mobile.haml
index 51881e1da..1758a96cc 100644
--- a/app/views/status_messages/_status_message.mobile.haml
+++ b/app/views/status_messages/_status_message.mobile.haml
@@ -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}"
diff --git a/features/desktop/post_preview.feature b/features/desktop/post_preview.feature
index 3a240e1a0..bf6301c12 100644
--- a/features/desktop/post_preview.feature
+++ b/features/desktop/post_preview.feature
@@ -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
diff --git a/features/desktop/posts_from_main_page.feature b/features/desktop/posts_from_main_page.feature
index 7e75c7df7..f4be7342b 100644
--- a/features/desktop/posts_from_main_page.feature
+++ b/features/desktop/posts_from_main_page.feature
@@ -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
diff --git a/features/desktop/posts_from_profile_page.feature b/features/desktop/posts_from_profile_page.feature
index b4804b71c..aa559e812 100644
--- a/features/desktop/posts_from_profile_page.feature
+++ b/features/desktop/posts_from_profile_page.feature
@@ -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
diff --git a/features/mobile/posts_from_main_page.feature b/features/mobile/posts_from_main_page.feature
index 9afee520d..338b271aa 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/custom_web_steps.rb b/features/step_definitions/custom_web_steps.rb
index 25405d5b9..728dda1b4 100644
--- a/features/step_definitions/custom_web_steps.rb
+++ b/features/step_definitions/custom_web_steps.rb
@@ -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