Савинцев Егор 🚶 (savintsev_egor) wrote in changelog,
Савинцев Егор 🚶
savintsev_egor
changelog

[livejournal] r19657: LJSUP-9404: S2 Anchors

Committer: esavintcev
LJSUP-9404: S2 Anchors
U   trunk/bin/upgrading/s2layers/deardiary/layout.s2
Modified: trunk/bin/upgrading/s2layers/deardiary/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/deardiary/layout.s2	2011-08-09 07:15:32 UTC (rev 19656)
+++ trunk/bin/upgrading/s2layers/deardiary/layout.s2	2011-08-09 07:33:04 UTC (rev 19657)
@@ -831,9 +831,9 @@
         print safe "$*text_max_comments";
     } else {
         if ($p.view == "entry") {
-                $p->print_reply_link({"target" => "topcomment", "linktext" => $*text_post_comment});
+                $p->print_reply_link({"target" => "topcomment", "linktext" => $*text_post_comment, "reply_url" => $.post_url+"#$*text_addcomment_id"});
         } else {
-        print safe "<a href=\"$.post_url\">"+($p.view == "friends" ? $*text_post_comment_friends : $*text_post_comment)+"</a>";
+        print safe "<a href=\"$.post_url#$*text_addcomment_id\">"+($p.view == "friends" ? $*text_post_comment_friends : $*text_post_comment)+"</a>";
        }
     }
 }
@@ -854,7 +854,7 @@
             if ($p.showspam) {
                 $comments_showspam = """<li>""" + get_plural_phrase($.comments.spam_counter, "text_read_spam_comments") + """</li>""";
             } else {
-                $comments_showspam = """<li><a href="$.comments.read_spam_url">""" + get_plural_phrase($.comments.spam_counter, "text_read_all_spam_comments") + """</a></li>""";
+                $comments_showspam = """<li><a href="$.comments.read_spam_url#$*text_comments_id">""" + get_plural_phrase($.comments.spam_counter, "text_read_all_spam_comments") + """</a></li>""";
             }
         } else {
             $comments_showspam = "";
@@ -1246,7 +1246,7 @@
             print "<li class=\"current\">$i</li>";
         }
         else {
-            print "<li><a href=\""+$.comment_pages->url_of($i)+"\">$i</a></li>";
+            print "<li><a href=\""+$.comment_pages->url_of($i)+"#$*text_comments_id\">$i</a></li>";
         }
     }
     print "</ul>";
@@ -1258,6 +1258,7 @@
         $.entry->print_ebox();
         "</div>";
     }
+    """<span id="$*text_comments_id"></span>""";
     $this->lay_print_pager();
     $this->print_comments($.comments);
     $this->lay_print_pager();
@@ -1268,7 +1269,7 @@
     """<div class="entry">""";
     $e->print_ebox();
     "</div>";
-    """<div id="commentform" style="margin-bottom: 10px;">""";
+    """<div id="$*text_addcomment_id" style="margin-bottom: 10px;">""";
     $.form->print();
     """</div>""";
 }

Tags: livejournal, s2, savintsev_egor
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments