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

[ljcom] r10821: LJSUP-9404: Anchors

Committer: esavintcev
LJSUP-9404: Anchors
U   trunk/bin/upgrading/s2layers/gradient/layout.s2
Modified: trunk/bin/upgrading/s2layers/gradient/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/gradient/layout.s2	2011-08-09 07:44:14 UTC (rev 10820)
+++ trunk/bin/upgrading/s2layers/gradient/layout.s2	2011-08-09 09:05:14 UTC (rev 10821)
@@ -1404,7 +1404,7 @@
 function CommentInfo::print_readlink() {
    var Page p = get_page();
    if ($.count > 0 or $.screened) {
-      print safe """<a href="$.read_url">""" +
+      print safe """<a href="$.read_url#$*text_comments_id">""" +
       get_plural_phrase($.count, $p.view == "friends" ? "text_read_comments_friends" : "text_read_comments") +
       """</a> $*comment_link_divider """;
    }
@@ -1415,7 +1415,7 @@
    var string linktext = ( $p.view == "friends" ? $*text_post_comment_friends : $*text_post_comment );
    var string target = "topcomment";
 if (not $.locked) {
-   $p->print_reply_link({"target" => $target, "class" => "comments", "title" => "$linktext", "linktext" => $linktext, "reply_url" => $.post_url});
+   $p->print_reply_link({"target" => $target, "class" => "comments", "title" => "$linktext", "linktext" => $linktext, "reply_url" => $.post_url+"#$*text_addcomment_id"});
 }
    $p->print_reply_container({"target" => $target});
 }
@@ -1492,7 +1492,7 @@
       if ($p.showspam) {
          $comments_showspam = get_plural_phrase($e.comments.spam_counter, "text_read_spam_comments") + """</span> $*comment_link_divider """;
       } else {
-         $comments_showspam = """<a href=\"$e.comments.read_spam_url\">""" + get_plural_phrase($e.comments.spam_counter, "text_read_all_spam_comments") + """</a></span> $*comment_link_divider """;
+         $comments_showspam = """<a href=\"$e.comments.read_spam_url#$*text_comments_id\">""" + get_plural_phrase($e.comments.spam_counter, "text_read_all_spam_comments") + """</a></span> $*comment_link_divider """;
       }
    }
    if ($p.view == "entry") {print safe "$comments_showspam";}
@@ -1584,7 +1584,7 @@
       }
       else {
          var string subitem_url = $this->url_of($i);
-          """ $*link_divider <a href="$subitem_url">$i</a>""";
+          """ $*link_divider <a href="$subitem_url#$*text_comments_id">$i</a>""";
       }
    }
    lay_nav_box_bottom();
@@ -1759,6 +1759,7 @@
        "</div>";
    }
    if ($.entry.comments.enabled) {
+      """<span id="$*text_comments_id"></span>""";
       if ($.comment_pages.total_subitems > 0) {
          $.comment_pages->print();
       }
@@ -1876,6 +1877,7 @@
    """<div style="margin: 0px 10% 10px 20%; width:65%;">""";
    $.entry->print_ebox();
    "</div>";
+   """<span id="$*text_addcomment_id"></span>""";
    if (not $.entry.comments.enabled) {
       lay_nav_box_top();
       print safe """$*text_reply_nocomments""";

Tags: ljcom, 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