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

[ljcom] r10804: LJSUP-9404: S2 Anchors Minimalism

Committer: esavintcev
LJSUP-9404: S2 Anchors Minimalism
U   trunk/bin/upgrading/s2layers/sup/layout.s2
Modified: trunk/bin/upgrading/s2layers/sup/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/sup/layout.s2	2011-08-08 02:33:44 UTC (rev 10803)
+++ trunk/bin/upgrading/s2layers/sup/layout.s2	2011-08-08 07:29:52 UTC (rev 10804)
@@ -933,14 +933,14 @@
     var Page p = get_page();
     var string text_count = ($*active_theme == "x3")?get_plural_phrase($.count,"text_read_comments"):string($.count);
     if ($.show_readlink) {
-        """<li class="comments"><a href="$.read_url" class="btn btn-comments"><span><span><span>$text_count</span></span></span></a></li>""";
+        """<li class="comments"><a href="$.read_url#$*text_comments_id" class="btn btn-comments"><span><span><span>$text_count</span></span></span></a></li>""";
     }
     if ($.show_postlink) {
         """<li class="postcomment">""";
         if ($.maxcomments) {
             print safe """<span class="btn btn-comment"><span><span><span>$*text_max_comments</span></span></span></span>""";
         } else {
-            """<a href="$.post_url" class="btn btn-comment"><span><span><span>"""+($p.view == "friends" ? $*text_post_comment_friends : $*text_post_comment)+"</span></span></span></a>";
+            """<a href="$.post_url#$*text_addcomment_id" class="btn btn-comment"><span><span><span>"""+($p.view == "friends" ? $*text_post_comment_friends : $*text_post_comment)+"</span></span></span></a>";
         }
         "</li>";
     }
@@ -968,7 +968,7 @@
     }
     var string comments_count = string($e.comments.count);
     if ($.viewing_thread or $p.showspam) {
-        var string toplink = (($.comment_pages.total > 1) ? ($.comment_pages->url_of($.comment_pages.current)) : $e.permalink_url) + "#comments";
+        var string toplink = (($.comment_pages.total > 1) ? ($.comment_pages->url_of($.comment_pages.current)) : $e.permalink_url) + "#$*text_comments_id";
         $comments_count = """<a href="$toplink">"""+ get_plural_phrase($e.comments.count, "text_read_all_comments") +"""</a>""";
     } else {
         $comments_count = get_plural_phrase($e.comments.count, "text_read_comments");
@@ -983,7 +983,7 @@
     _print_entry($e);
     if ($.entry.comments.enabled) {
 """
-                    <div class="entry-wrap entry-comments">$corners1
+                    <div id="$*text_comments_id" class="entry-wrap entry-comments">$corners1
                     <div class="entry">$corners1_3
                         <div class="entry-text"><div class="entry-comments-text">
 """;
@@ -993,14 +993,14 @@
             if ($p.showspam) {
                 $comments_showspam = """<span class="comments-hidespam">""" + get_plural_phrase($e.comments.spam_counter, "text_read_spam_comments") + """</span> <span class="emdash">—</span> """;
             } else {
-                $comments_showspam = """<span class="comments-showspam"><a href=\"$e.comments.read_spam_url\">""" + get_plural_phrase($e.comments.spam_counter, "text_read_all_spam_comments") + """</a></span> <span class="emdash">—</span> """;
+                $comments_showspam = """<span class="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> <span class="emdash">—</span> """;
             }
         } else {
             $comments_showspam = "";
         }
         """<div class="comments-links">( $comments_count $comments_showspam""";
         if (not $.entry.comments.locked) {
-        """<span class="replylink">"""; $this->print_reply_link({ "linktext" => $*text_post_comment, "target" => "topcomment" });"""</span>""";
+        """<span class="replylink">"""; $this->print_reply_link({ "linktext" => $*text_post_comment, "target" => "topcomment", "reply_url" => $e.comments.post_url+"#$*text_addcomment_id" });"""</span>""";
         }
 
         var string rated_count = "";
@@ -1026,7 +1026,7 @@
             $this->print_comments($.comments);
             """<div class="comments-links">( $comments_count $comments_showspam""";
             if (not $.entry.comments.locked) { 
-            """<span class="replylink">"""; $this->print_reply_link({ "linktext" => $*text_post_comment, "target" => "bottomcomment" }); """</span>""";
+            """<span class="replylink">"""; $this->print_reply_link({ "linktext" => $*text_post_comment, "target" => "bottomcomment", "reply_url" => $e.comments.post_url+"#$*text_addcomment_id" }); """</span>""";
             }
             """ )$rated_count</div>""";
             $this->print_reply_container({"target" => "bottomcomment"});
@@ -1092,7 +1092,7 @@
 
             """<div class="comment-text">"""; $c->print_text(); """</div></div><div class="hr"><hr /></div>""";
         }
-        """<div class="replyform">""";
+        """<div id="$*text_addcomment_id" class="replyform">""";
         $.form->print();
         """</div>""";
     }

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