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

[ljcom] r10813: LJSUP-9404: S2 Anchors

Committer: esavintcev
LJSUP-9404: S2 Anchors
U   trunk/bin/upgrading/s2layers/anovelconundrum/layout.s2
Modified: trunk/bin/upgrading/s2layers/anovelconundrum/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/anovelconundrum/layout.s2	2011-08-09 03:16:22 UTC (rev 10812)
+++ trunk/bin/upgrading/s2layers/anovelconundrum/layout.s2	2011-08-09 03:41:09 UTC (rev 10813)
@@ -752,7 +752,7 @@
         } else {
             ###  "<a href=\"$.comments.post_url\">Leave a Comment</a>";
             if (not $.comments.locked) {
-                $p->print_reply_link({"target" => "bottomcomment", "linktext" => $*text_post_comment});
+                $p->print_reply_link({"target" => "bottomcomment", "linktext" => $*text_post_comment, "reply_url" => $.comments.post_url+"#$*text_addcomment_id"});
             }
         }
 
@@ -762,7 +762,7 @@
             if ($p.showspam) {
                 $comments_showspam = get_plural_phrase($.comments.spam_counter, "text_read_spam_comments");
             } else {
-                $comments_showspam = """ <a href="$.comments.read_spam_url">""" + get_plural_phrase($.comments.spam_counter, "text_read_all_spam_comments") + """</a> """;
+                $comments_showspam = """ <a href="$.comments.read_spam_url#$*text_comments_id">""" + get_plural_phrase($.comments.spam_counter, "text_read_all_spam_comments") + """</a> """;
             }
             print safe """ &middot; $comments_showspam""";
         }
@@ -853,11 +853,11 @@
     } else {
         if ($p.view == "entry") {
 if (not $.locked) {
-           $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 {
 if (not $.locked) {
-        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>";
 }
        }
     }
@@ -1012,6 +1012,7 @@
     }
 
     if ($.entry.comments.enabled and $.comment_pages.total_subitems > 0) {
+        "<a id='$*text_comments_id'></a>";
         $.comment_pages->print();
 
         $this->print_multiform_start();
@@ -1058,7 +1059,7 @@
     <img src="$*dingbar_url" alt="$*text_dingbar_alt" />
     </div>""";
     "<center>";
-    print safe "<a name='comments'></a><div style='width: $*body_width; text-align:center;'>";
+    print safe "<div style='width: $*body_width; text-align:center;'>";
     "<h2>" + lang_page_of_pages($.current, $.total) + "</h2>";
     var string url_prev = $this->url_of($.current - 1);
     "<table cellspacing='0' cellpadding='0' border='0' align='center'><tr><td align='center' style='font-size: 14pt'>";
@@ -1273,7 +1274,7 @@
     print safe """<div class="bs">
     <img src="$*dingbar_url" alt="$*text_dingbar_alt" />
     </div>""";
-    "<div style='text-align:center;'><h2><a href='$.entry.comments.read_url'>Read Comments</a></h2></div>";
+    "<div style='text-align:center;'><h2><a href='$.entry.comments.read_url#$*text_comments_id'>Read Comments</a></h2></div>";
     print safe """<div class="bs">
     <img src="$*dingbar_url" alt="$*text_dingbar_alt" />
     </div>""";
@@ -1290,7 +1291,7 @@
     }
 
 
-    "<center><h3 style='margin-top:0px; line-height:" + (2*$*font_leading) + "pt;'>Reply " + ($ent ? "to this entry" : "to this comment") + ":</h3>";
+    "<center><h3 id=\"$*text_addcomment_id\" style='margin-top:0px; line-height:" + (2*$*font_leading) + "pt;'>Reply " + ($ent ? "to this entry" : "to this comment") + ":</h3>";
     $.form->print();
     "</center>";
 }

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