aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2011-11-22 16:00:05 -0800
committerfriendica <info@friendica.com>2011-11-22 16:00:05 -0800
commit53590d216691a572ede5e30dbc631a6cd0669c41 (patch)
tree420bd55497f265b5f43931d262f598d81fbb3d6a /view
parentc568493f572bdc88cae288d5c43e9fb55361ce07 (diff)
downloadvolse-hubzilla-53590d216691a572ede5e30dbc631a6cd0669c41.tar.gz
volse-hubzilla-53590d216691a572ede5e30dbc631a6cd0669c41.tar.bz2
volse-hubzilla-53590d216691a572ede5e30dbc631a6cd0669c41.zip
rework show/hide comments
Diffstat (limited to 'view')
-rw-r--r--view/head.tpl12
-rw-r--r--view/hide_comments.tpl4
-rw-r--r--view/theme/duepuntozero/style.css4
3 files changed, 20 insertions, 0 deletions
diff --git a/view/head.tpl b/view/head.tpl
index 752915b14..055c3cef5 100644
--- a/view/head.tpl
+++ b/view/head.tpl
@@ -44,6 +44,18 @@
}
}
+ function showHideComments(id) {
+ if( $('#collapsed-comments-' + id).is(':visible')) {
+ $('#collapsed-comments-' + id).hide();
+ $('#hide-comments-' + id).html('$showmore');
+ }
+ else {
+ $('#collapsed-comments-' + id).show();
+ $('#hide-comments-' + id).html('$showfewer');
+ }
+ }
+
+
</script>
diff --git a/view/hide_comments.tpl b/view/hide_comments.tpl
new file mode 100644
index 000000000..123546bcc
--- /dev/null
+++ b/view/hide_comments.tpl
@@ -0,0 +1,4 @@
+<div class="hide-comments-outer">
+$num_comments <span id="hide-comments-$id" class="hide-comments fakelink" onclick="showHideComments($id);">$hide_text</span>
+</div>
+<div id="collapsed-comments-$id" class="collapsed-comments" style="display: $display;">
diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css
index 662518d43..d678876dc 100644
--- a/view/theme/duepuntozero/style.css
+++ b/view/theme/duepuntozero/style.css
@@ -61,6 +61,10 @@ blockquote {
padding: 5px;
}
+.hide-comments {
+ margin-left: 15px;
+}
+
#panel {
background-color: ivory;
position: absolute;