Skip to content
Snippets Groups Projects
Commit 053a1785 authored by Marcus Eibrink-Lunzenauer's avatar Marcus Eibrink-Lunzenauer Committed by Jan-Hendrik Willms
Browse files

Fix #1867.

Closes #1867

Merge request studip/studip!1227
parent 06f7ce56
No related branches found
No related tags found
No related merge requests found
...@@ -83,12 +83,22 @@ ...@@ -83,12 +83,22 @@
<studip-icon shape="upload" size="30"></studip-icon> <studip-icon shape="upload" size="30"></studip-icon>
</label> </label>
</div> </div>
<MountingPortal v-if="hasThreadsWidget" mountTo="#blubber-threads-widget" name="blubber-threads-widget">
<blubber-thread-widget
:threads="$root.threads"
:active_thread="$root.active_thread"
:more_down="$root.threads_more_down"></blubber-thread-widget>
</MountingPortal>
</div> </div>
</template> </template>
<script> <script>
import BlubberThreadWidget from "./BlubberThreadWidget.vue";
export default { export default {
name: 'blubber-thread', name: 'blubber-thread',
components: { BlubberThreadWidget },
data: function () { data: function () {
return { return {
already_loading_up: 0, already_loading_up: 0,
...@@ -474,6 +484,9 @@ ...@@ -474,6 +484,9 @@
}); });
}, },
computed: { computed: {
hasThreadsWidget() {
return document.getElementById("blubber-threads-widget");
},
sortedComments () { sortedComments () {
return [...this.threadData.comments].sort((a, b) => a.mkdate - b.mkdate); return [...this.threadData.comments].sort((a, b) => a.mkdate - b.mkdate);
}, },
......
...@@ -11,6 +11,6 @@ ...@@ -11,6 +11,6 @@
<?= count($json) > 1 ? _("Konversationen") : _("Konversation") ?> <?= count($json) > 1 ? _("Konversationen") : _("Konversation") ?>
</div> </div>
<div class="sidebar-widget-content"> <div class="sidebar-widget-content">
<blubber-thread-widget :threads="threads" :active_thread="active_thread" :more_down="threads_more_down"></blubber-thread-widget> <div id="blubber-threads-widget"></div>
</div> </div>
</div> </div>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment