Skip to content

Commit

Permalink
Merge pull request #626 from blankse/flat_view_async
Browse files Browse the repository at this point in the history
Allows flat view for async thread
  • Loading branch information
XWB authored Dec 27, 2017
2 parents be6bd82 + 675e89c commit df6602e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Resources/public/js/comments.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@
permalink: encodeURIComponent(permalink || window.location.href)
};

if (typeof window.fos_comment_thread_view !== 'undefined') {
event.params.view = window.fos_comment_thread_view;
}

FOS_COMMENT.thread_container.trigger(event);
FOS_COMMENT.get(
FOS_COMMENT.base_url + '/' + encodeURIComponent(event.identifier) + '/comments',
Expand Down
1 change: 1 addition & 0 deletions Resources/views/Thread/async.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<script type="text/javascript">
// thread id
var fos_comment_thread_id = '{{ id }}';
var fos_comment_thread_view = '{{ view|default('tree') }}';
// api base url to use for initial requests
var fos_comment_thread_api_base_url = '{{ path('fos_comment_get_threads') }}';
Expand Down

0 comments on commit df6602e

Please sign in to comment.