diff --git a/include/conversation.php b/include/conversation.php index d7e3d5480..23a0dcbf2 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1082,10 +1082,9 @@ function format_like($cnt, array $arr, $type, $id) { break; } - $expanded .= "\t" . '
'; + $expanded .= "\t" . ' '; } - $phrase .= EOL; $o .= Renderer::replaceMacros(Renderer::getMarkupTemplate('voting_fakelink.tpl'), [ '$phrase' => $phrase, '$type' => $type, diff --git a/src/App.php b/src/App.php index 8068a1530..b9e22dd1b 100644 --- a/src/App.php +++ b/src/App.php @@ -663,8 +663,6 @@ class App '$local_user' => local_user(), '$generator' => 'Friendica' . ' ' . FRIENDICA_VERSION, '$delitem' => Core\L10n::t('Delete this item?'), - '$showmore' => Core\L10n::t('show more'), - '$showfewer' => Core\L10n::t('show fewer'), '$update_interval' => $interval, '$shortcut_icon' => $shortcut_icon, '$touch_icon' => $touch_icon, diff --git a/src/Object/Post.php b/src/Object/Post.php index 9fa9fcb50..05ffeb52b 100644 --- a/src/Object/Post.php +++ b/src/Object/Post.php @@ -415,6 +415,7 @@ class Post extends BaseObject 'dislike' => $responses['dislike']['output'], 'responses' => $responses, 'switchcomment' => L10n::t('Comment'), + 'reply_label' => L10n::t('Reply to %s', $name_e), 'comment' => $comment, 'previewing' => $conv->isPreview() ? ' preview ' : '', 'wait' => L10n::t('Please wait'), @@ -449,13 +450,13 @@ class Post extends BaseObject foreach ($children as $child) { $result['children'][] = $child->getTemplateData($conv_responses, $thread_level + 1); } + // Collapse if (($nb_children > 2) || ($thread_level > 1)) { $result['children'][0]['comment_firstcollapsed'] = true; $result['children'][0]['num_comments'] = L10n::tt('%d comment', '%d comments', $total_children); - $result['children'][0]['hidden_comments_num'] = $total_children; - $result['children'][0]['hidden_comments_text'] = L10n::tt('comment', 'comments', $total_children); - $result['children'][0]['hide_text'] = L10n::t('show more'); + $result['children'][0]['show_text'] = L10n::t('Show more'); + $result['children'][0]['hide_text'] = L10n::t('Show fewer'); if ($thread_level > 1) { $result['children'][$nb_children - 1]['comment_lastcollapsed'] = true; } else { diff --git a/view/global.css b/view/global.css index 6b0f38a07..afab5d903 100644 --- a/view/global.css +++ b/view/global.css @@ -90,6 +90,15 @@ span.connector { margin-right: 0px; } + +.wall-item-like-expanded, +.wall-item-dislike-expanded, +.wall-item-attendyes-expanded, +.wall-item-attendno-expanded, +.wall-item-attendmaybe-expanded { + margin: 0; +} + .type-link blockquote, .type-video blockquote { margin-left: 0px; max-height: 160px; diff --git a/view/js/main.js b/view/js/main.js index f81d7a423..3370d7ccd 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -17,25 +17,30 @@ function _resizeIframe(obj, desth) { } function openClose(theID) { - if (document.getElementById(theID).style.display == "block") { - document.getElementById(theID).style.display = "none" - } else { - document.getElementById(theID).style.display = "block" + var el = document.getElementById(theID); + if (el) { + if (window.getComputedStyle(el).display === "none") { + openMenu(theID); + } else { + closeMenu(theID); + } } } function openMenu(theID) { var el = document.getElementById(theID); - if (el) { - el.style.display = "block"; + if (!el.dataset.display) { + el.dataset.display = 'block'; + } + el.style.display = el.dataset.display; } } function closeMenu(theID) { - var el = document.getElementById(theID) - + var el = document.getElementById(theID); if (el) { + el.dataset.display = window.getComputedStyle(el).display; el.style.display = "none"; } } @@ -656,12 +661,14 @@ function preview_comment(id) { } function showHideComments(id) { - if ($("#collapsed-comments-" + id).is(":visible")) { - $("#collapsed-comments-" + id).hide(); - $("#hide-comments-" + id).html(window.showMore); + if ($('#collapsed-comments-' + id).is(':visible')) { + $('#collapsed-comments-' + id).slideUp(); + $('#hide-comments-' + id).hide(); + $('#hide-comments-total-' + id).show(); } else { - $("#collapsed-comments-" + id).show(); - $("#hide-comments-" + id).html(window.showFewer); + $('#collapsed-comments-' + id).slideDown(); + $('#hide-comments-' + id).show(); + $('#hide-comments-total-' + id).hide(); } } diff --git a/view/lang/C/messages.po b/view/lang/C/messages.po index 525a29c69..b0a1cf3f0 100644 --- a/view/lang/C/messages.po +++ b/view/lang/C/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-02-10 08:14+0100\n" +"POT-Creation-Date: 2019-02-15 09:33-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME{{* Action buttons to interact with the item (like: like, dislike, share and so on *}} -
{{$phrase nofilter}}
diff --git a/view/theme/frio/templates/wall_thread.tpl b/view/theme/frio/templates/wall_thread.tpl index c149b58a5..591e102c7 100644 --- a/view/theme/frio/templates/wall_thread.tpl +++ b/view/theme/frio/templates/wall_thread.tpl @@ -20,7 +20,7 @@ as the value of $top_child_total (this is done at the end of this file) {{/if}} {{if $item.thread_level==2 && $top_child_nr==1}} -
{{* Action buttons to interact with the item (like: like, dislike, share and so on *}} -
+ {{* Insert comment box of threaded children *}} + {{if $item.threaded && $item.comment && $item.indent==comment}} +