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

[livejournal] r19666: LJSUP-9404: Anchors

Committer: esavintcev
LJSUP-9404: Anchors
U   trunk/bin/upgrading/s2layers/lickable/layout.s2
Modified: trunk/bin/upgrading/s2layers/lickable/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/lickable/layout.s2	2011-08-09 09:21:11 UTC (rev 19665)
+++ trunk/bin/upgrading/s2layers/lickable/layout.s2	2011-08-09 09:33:40 UTC (rev 19666)
@@ -1107,9 +1107,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>";
        }
     }
 }
@@ -1129,7 +1129,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>""";
             }
         }
         if ($p.view == "entry") {print safe "$comments_showspam";}
@@ -1502,7 +1502,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>";
@@ -1514,6 +1514,7 @@
         $.entry->print_ebox();
         "</div>";
     }
+    """<span id="$*text_comments_id"></span>""";
     $this->lay_print_pager();
     $this->print_comments($.comments);
     $this->lay_print_pager();
@@ -1525,7 +1526,7 @@
         $.entry->print_ebox();
         "</div>";
     }
-    """<div id="commentform">""";
+    """<div id="$*text_addcomment_id">""";
     $.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