From cde8f76045a646483b7febfe0b5313f4216eea34 Mon Sep 17 00:00:00 2001
From: "robinwilliam.hundt" <robinwilliam.hundt@stud.uni-goettingen.de>
Date: Fri, 16 Mar 2018 19:48:21 +0100
Subject: [PATCH] Correction Comp on Subscr. WorkPage is sticky

Closes #101
---
 frontend/src/pages/SubscriptionWorkPage.vue   |  9 +++++++--
 .../pages/student/StudentSubmissionPage.vue   | 19 ++++++++++---------
 2 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/frontend/src/pages/SubscriptionWorkPage.vue b/frontend/src/pages/SubscriptionWorkPage.vue
index aa1636ee..0449d1a6 100644
--- a/frontend/src/pages/SubscriptionWorkPage.vue
+++ b/frontend/src/pages/SubscriptionWorkPage.vue
@@ -2,7 +2,7 @@
   <v-layout
     row wrap
   >
-    <v-flex xs12 md6>
+    <v-flex xs12 md6 class="sub-correction">
       <submission-correction
         :assignment="currentAssignment"
         :key="subscription.pk"
@@ -125,5 +125,10 @@
 </script>
 
 <style scoped>
-
+  .sub-correction {
+    position: sticky;
+    top: 64px;
+    overflow-y: auto;
+    height: 90vh;
+  }
 </style>
diff --git a/frontend/src/pages/student/StudentSubmissionPage.vue b/frontend/src/pages/student/StudentSubmissionPage.vue
index 4d77dbc5..bfc9b209 100644
--- a/frontend/src/pages/student/StudentSubmissionPage.vue
+++ b/frontend/src/pages/student/StudentSubmissionPage.vue
@@ -17,13 +17,14 @@
           <template slot="table-content">
             <tr v-for="(code, lineNo) in submission" :key="lineNo">
               <submission-line :code="code" :lineNo="lineNo">
-                <feedback-comment
-                  v-if="feedback[lineNo] && showFeedback"
-                  v-for="(comment, index) in feedback[lineNo]"
-                  v-bind="comment"
-                  :line-no="lineNo"
-                  :key="index"
-                />
+                <template v-for="(comment, index) in feedback[lineNo]">
+                  <feedback-comment
+                    v-if="feedback[lineNo] && showFeedback"
+                    v-bind="comment"
+                    :line-no="lineNo"
+                    :key="index"
+                  />
+                </template>
               </submission-line>
             </tr>
           </template>
@@ -32,11 +33,11 @@
           :tests="submission.tests"
           :expand="true"
           class="mt-3"
-        ></submission-tests>
+        />
       </v-flex>
       <v-flex lg6 md12 mt-5 pl-3>
         <submission-type
-        v-bind="submissionType">
+          v-bind="submissionType">
         </submission-type>
       </v-flex>
     </v-layout>
-- 
GitLab