Committer: esavintcev
LJSUP-9404: S2 AnchorU trunk/bin/upgrading/s2layers/flexiblesquares/layout.s2
Modified: trunk/bin/upgrading/s2layers/flexiblesquares/layout.s2 =================================================================== --- trunk/bin/upgrading/s2layers/flexiblesquares/layout.s2 2011-08-08 08:36:51 UTC (rev 10807) +++ trunk/bin/upgrading/s2layers/flexiblesquares/layout.s2 2011-08-08 08:53:23 UTC (rev 10808) @@ -2143,11 +2143,11 @@ var string comments_count = string($.entry.comments.count); if ($.viewing_thread) { - var string toplink = (($.comment_pages.total > 1) ? ($.comment_pages->url_of($.comment_pages.current)) : $.entry.permalink_url) + "#comments"; + var string toplink = (($.comment_pages.total > 1) ? ($.comment_pages->url_of($.comment_pages.current)) : $.entry.permalink_url) + "#$*text_comments_id"; $comments_count = """<a href="$toplink">"""+ get_plural_phrase($.entry.comments.count, "text_read_all_comments") +"""</a>"""; } else { if ($p.showspam) { - $comments_count = """<a href="$.entry.permalink_url#comments">""" + get_plural_phrase($.entry.comments.count, "text_read_comments") + """</a>"""; + $comments_count = """<a href="$.entry.permalink_url#$*text_comments_id">""" + get_plural_phrase($.entry.comments.count, "text_read_comments") + """</a>"""; } else { $comments_count = get_plural_phrase($.entry.comments.count, "text_read_comments"); } @@ -2167,7 +2167,7 @@ if ($p.showspam) { $comments_showspam = """<span class="comments-hidespam">""" + get_plural_phrase($.entry.comments.spam_counter, "text_read_spam_comments") + """</span> <span class="emdash">—</span> """; } else { - $comments_showspam = """<span class="comments-showspam"><a href=\"$.entry.comments.read_spam_url\">""" + get_plural_phrase($.entry.comments.spam_counter, "text_read_all_spam_comments") + """</a></span> <span class="emdash">—</span> """; + $comments_showspam = """<span class="comments-showspam"><a href=\"$.entry.comments.read_spam_url#$*text_comments_id\">""" + get_plural_phrase($.entry.comments.spam_counter, "text_read_all_spam_comments") + """</a></span> <span class="emdash">—</span> """; } } else { $comments_showspam = ""; @@ -2176,14 +2176,14 @@ if ($.entry.comments.enabled) { """ - <div class="box"> + <div class="box" id="$*text_comments_id"> <center>"""; $.comment_pages->print(); """ <b>( $comments_count $comments_showspam"""; if (not $.entry.comments.locked) { - $this->print_reply_link({"target" => "topcomment", "linktext" => "Post a new comment"}); + $this->print_reply_link({"target" => "topcomment", "linktext" => $*text_post_comment, "reply_url" => $.entry.comments.post_url+"#$*text_addcomment_id"}); } """ )</b></center>"""; $this->print_reply_container({"target" => "topcomment"}); @@ -2202,7 +2202,7 @@ <center> <b>( $comments_count $comments_showspam"""; if (not $.entry.comments.locked) { - $this->print_reply_link({"target" => "topcomment", "linktext" => "Post a new comment"}); + $this->print_reply_link({"target" => "topcomment", "linktext" => $*text_post_comment, "reply_url" => $.entry.comments.post_url+"#$*text_addcomment_id"}); } """ )</b>"""; $.comment_pages->print(); @@ -2456,9 +2456,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>"; } } } @@ -2534,7 +2534,7 @@ $.entry->print_ebox(); "</div>"; - """<div class="box">"""; + """<div class="box" id="$*text_addcomment_id">"""; print $.entry.comments.count > 0 ? (""" <center><b>( <a href="$.entry.permalink_url#comments">"""+ get_plural_phrase($.entry.comments.count, "text_read_all_comments") +"""</a> )</b> </center>""") : ""; """Post a comment in response:<br/>"""; $.form->print();