From 4441c908f773f1b7c2b203fc6f47349408ae82c0 Mon Sep 17 00:00:00 2001
From: Ugnich Anton
Date: Tue, 6 Mar 2012 03:28:19 +0700
Subject: UserThread unfoldReply
---
src/java/com/juick/http/www/PageTemplates.java | 4 ++--
src/java/com/juick/http/www/UserThread.java | 9 +++++++--
web/scripts3.js | 13 ++++++++++++-
3 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/src/java/com/juick/http/www/PageTemplates.java b/src/java/com/juick/http/www/PageTemplates.java
index a07d5ed8..a76e0280 100644
--- a/src/java/com/juick/http/www/PageTemplates.java
+++ b/src/java/com/juick/http/www/PageTemplates.java
@@ -46,12 +46,12 @@ public class PageTemplates {
out.println("
");
out.println(" ");
out.println(" " + title + "");
- out.println(" ");
+ out.println(" ");
out.println(" ");
out.println(" ");
out.println(" ");
out.println(" ");
- out.println(" ");
+ out.println(" ");
out.println(" ");
if (headers != null) {
out.println(headers);
diff --git a/src/java/com/juick/http/www/UserThread.java b/src/java/com/juick/http/www/UserThread.java
index 406698bf..e64b4437 100644
--- a/src/java/com/juick/http/www/UserThread.java
+++ b/src/java/com/juick/http/www/UserThread.java
@@ -71,7 +71,7 @@ public class UserThread {
PageTemplates.pageNavigation(out, locale, visitor);
PageTemplates.pageUserTitle(out, sql, locale, user, visitor);
-
+
out.println("");
out.println("
");
@@ -80,9 +80,14 @@ public class UserThread {
printReplies(out, sql, MID, locale, listview);
out.println("
");
-
+
out.println("
");
+ out.println("");
+
PageTemplates.pageFooter(request, out, locale, visitor);
} finally {
out.close();
diff --git a/web/scripts3.js b/web/scripts3.js
index f6e9cdef..bf3da76f 100644
--- a/web/scripts3.js
+++ b/web/scripts3.js
@@ -41,7 +41,7 @@ function showCommentForm(mid,rid) {
c.before('');
c.append('');
}
-// $('#replies #'+rid+' .msg-links').hide();
+ // $('#replies #'+rid+' .msg-links').hide();
$('#replies #'+rid+' .msg-comment').show();
$('#replies #'+rid+' textarea')[0].focus();
$('#replies #'+rid+' textarea').autoResize({
@@ -51,6 +51,17 @@ function showCommentForm(mid,rid) {
return false;
}
+function unfoldReply() {
+ if((0+window.location.hash.substring(1))>0) {
+ var el=$(window.location.hash);
+ while(el.is(":hidden")) {
+ el=el.prev();
+ }
+ showMoreReplies(el.attr('id'));
+ window.location.replace(window.location.hash);
+ }
+}
+
$(document).ready(function() {
$('textarea.reply').autoResize({
extraSpace: 0,
--
cgit v1.2.3