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

[ljcom] r10817: LJSUP-9404: S2 Anchors

Committer: esavintcev
LJSUP-9404: S2 Anchors
U   trunk/bin/upgrading/s2layers/component/layout.s2
Modified: trunk/bin/upgrading/s2layers/component/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/component/layout.s2	2011-08-09 05:57:24 UTC (rev 10816)
+++ trunk/bin/upgrading/s2layers/component/layout.s2	2011-08-09 06:57:25 UTC (rev 10817)
@@ -2237,7 +2237,7 @@
                                 if ($p.showspam) {
                                     $comments_showspam = """ or """ + get_plural_phrase($e.comments.spam_counter, "text_read_spam_comments");
                                 } else {
-                                    $comments_showspam = """ or <a href="$e.comments.read_spam_url">""" + get_plural_phrase($e.comments.spam_counter, "text_read_all_spam_comments") + """</a>""";
+                                    $comments_showspam = """ or <a href="$e.comments.read_spam_url#$*text_comments_id">""" + get_plural_phrase($e.comments.spam_counter, "text_read_all_spam_comments") + """</a>""";
                                 }
                             } else {
                                 $comments_showspam = "";
@@ -2265,11 +2265,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>";
 }
        }
     }
@@ -2635,7 +2635,7 @@
             "<b>[$i]</b> ";
         } else {
                 var string url_of = $this->url_of($i);
-                """<a href="$url_of" class="link"><b>[$i]</b></a> """;
+                """<a href="$url_of#$*text_comments_id" class="link"><b>[$i]</b></a> """;
             }
     }
 }
@@ -2655,7 +2655,7 @@
     {
         $this->print_multiform_start();
     """
-                <table cellspacing="0" cellpadding="0" border="0">
+                <table cellspacing="0" cellpadding="0" border="0" id="$*text_comments_id">
                     <tr>
                         <td colspan="3" class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
                     </tr><tr>
@@ -3071,12 +3071,12 @@
                 </tr>
             </table>
 
-            <div><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></div>
+            <div id="$*text_addcomment_id"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></div>
 
 """;
                     print_ebox($.entry);
                     print_system_box_top();
-                    "<h2>Reply</h2>";
+                    "<h2>$*text_post_comment</h2>";
                     $.form->print();
                     print_system_box_bottom();
 

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