From 20385701d26985f9e507bc13d841694be84ef19f Mon Sep 17 00:00:00 2001
From: Steffen van Bergerem <svbergerem@online.de>
Date: Mon, 5 Oct 2015 16:35:10 +0200
Subject: [PATCH] Move interactions.scss

---
 app/assets/stylesheets/_application.scss      |  2 +-
 app/assets/stylesheets/interactions.scss      | 65 +++++++++++++++++++
 .../stylesheets/new_styles/_interactions.scss | 59 -----------------
 .../templates/single-post-viewer_tpl.jst.hbs  |  4 +-
 features/step_definitions/custom_web_steps.rb |  2 +
 5 files changed, 70 insertions(+), 62 deletions(-)
 create mode 100644 app/assets/stylesheets/interactions.scss
 delete mode 100644 app/assets/stylesheets/new_styles/_interactions.scss

diff --git a/app/assets/stylesheets/_application.scss b/app/assets/stylesheets/_application.scss
index b24858d611..aba3ee9729 100644
--- a/app/assets/stylesheets/_application.scss
+++ b/app/assets/stylesheets/_application.scss
@@ -15,7 +15,7 @@
 @import 'sprites';
 @import 'hovercard';
 @import 'base';
-@import 'new_styles/interactions';
+@import 'interactions';
 @import 'spinner';
 @import 'timeago';
 @import 'vendor/fileuploader';
diff --git a/app/assets/stylesheets/interactions.scss b/app/assets/stylesheets/interactions.scss
new file mode 100644
index 0000000000..90c5d00631
--- /dev/null
+++ b/app/assets/stylesheets/interactions.scss
@@ -0,0 +1,65 @@
+.control-icons {
+  a {
+    &:hover { text-decoration: none; }
+
+    [class^="entypo-"],
+    [class*="entypo-"] {
+      color: $text-grey;
+      font-size: $font-size-base;
+      line-height: $line-height-base;
+      vertical-align: middle;
+    }
+
+    [class^="entypo-"]:hover,
+    [class*="entypo-"]:hover {
+      color: $text;
+    }
+
+    &.hide_conversation i { font-size: $line-height-computed * 1.5; }
+    &.delete_conversation i { font-size: $font-size-base * 1.5; }
+    &.destroy_participation i { color: $black; }
+    &.destroy_participation i:hover { color: $text-dark-grey; }
+  }
+}
+
+.stream_container,
+.single-post-interactions {
+  .control-icons {
+    float: right;
+    z-index: 6;
+
+    .block_user,
+    .comment_report,
+    .create_participation,
+    .delete,
+    .destroy_participation,
+    .post_report {
+      display: inline-block;
+    }
+
+    > a:hover { text-decoration: none; }
+  }
+}
+
+.stream_element,
+.comment,
+.photo,
+.stream_element:hover .comment {
+  .control-icons {
+    @include transition(opacity);
+    opacity: 0;
+  }
+
+  &:hover .control-icons { opacity: 1; }
+}
+
+.stream_element,
+.comment,
+.photo {
+  .control-icons > a {
+    @include transition(opacity);
+    opacity: .8;
+  }
+
+  .control-icons > a:hover { opacity: 1; }
+}
diff --git a/app/assets/stylesheets/new_styles/_interactions.scss b/app/assets/stylesheets/new_styles/_interactions.scss
deleted file mode 100644
index 9fc583764a..0000000000
--- a/app/assets/stylesheets/new_styles/_interactions.scss
+++ /dev/null
@@ -1,59 +0,0 @@
-.control-icons {
-  a {
-    &:hover { text-decoration: none; }
-
-    [class^="entypo-"], [class*="entypo-"] {
-      color: $text-grey;
-      font-size: $font-size-base;
-      line-height: $line-height-base;
-      vertical-align: middle;
-      &:hover { color: $text; }
-      &.cross { font-size: $line-height-base; }
-    }
-
-    &.hide_conversation i {
-      font-size: $line-height-computed*1.5;
-    }
-
-    &.delete_conversation i {
-      font-size: $font-size-base*1.5;
-    }
-
-    &.destroy_participation i {
-      color: $black;
-      &:hover { color: $text-dark-grey; }
-    }
-  }
-}
-
-.stream_container, #single-post-interactions {
-  .control-icons {
-    z-index: 6;
-    float: right;
-
-    .block_user,
-    .comment_report,
-    .create_participation,
-    .delete,
-    .destroy_participation,
-    .post_report {
-      display: inline-block;
-    }
-
-    & > a:hover {
-      text-decoration: none;
-    }
-  }
-
-  .stream_element, .comment, .photo, .stream_element:hover .comment {
-    .control-icons > a {
-      @include transition(opacity);
-      opacity: 0;
-    }
-
-    &:hover .control-icons {
-      & > a { opacity: 0.8; }
-      & > a:hover { opacity: 1; }
-    }
-  }
-}
diff --git a/app/assets/templates/single-post-viewer_tpl.jst.hbs b/app/assets/templates/single-post-viewer_tpl.jst.hbs
index 0d4ea63dea..f06916a633 100644
--- a/app/assets/templates/single-post-viewer_tpl.jst.hbs
+++ b/app/assets/templates/single-post-viewer_tpl.jst.hbs
@@ -1,8 +1,8 @@
 <div id='single-post-container' class='container-fluid'>
   <div class='row'>
-    <div id='single-post-content' class='col-md-6'>
+    <div id='single-post-content' class='col-md-6 single-post-content'>
     </div>
-    <div id='single-post-interactions' class='col-md-6'>
+    <div id='single-post-interactions' class='col-md-6 single-post-interactions'>
     </div>
   </div>
 </div>
diff --git a/features/step_definitions/custom_web_steps.rb b/features/step_definitions/custom_web_steps.rb
index 7acb69cc0c..e5bbfb2755 100644
--- a/features/step_definitions/custom_web_steps.rb
+++ b/features/step_definitions/custom_web_steps.rb
@@ -88,6 +88,7 @@ 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
     ctrl = find(".control-icons")
     ctrl.hover
@@ -96,6 +97,7 @@ 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
     ctrl = find(".control-icons")
     ctrl.hover
-- 
GitLab