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

[livejournal] r19324: LJSUP-9117: S2 Expand

Committer: esavintcev
LJSUP-9117: S2 Expand
U   trunk/bin/upgrading/s2layers/classic/layout.s2
U   trunk/bin/upgrading/s2layers/generator/layout.s2
U   trunk/bin/upgrading/s2layers/punquin/layout.s2
U   trunk/bin/upgrading/s2layers/sixhtml/layout.s2
U   trunk/bin/upgrading/s2layers/sturdygesture/layout.s2
U   trunk/bin/upgrading/s2layers/tabularindent/layout.s2
Modified: trunk/bin/upgrading/s2layers/classic/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/classic/layout.s2	2011-06-20 08:15:09 UTC (rev 19323)
+++ trunk/bin/upgrading/s2layers/classic/layout.s2	2011-06-20 08:31:35 UTC (rev 19324)
@@ -982,7 +982,7 @@
     var string subj = $c.subject != "" ? $c.subject : $*text_nosubject;
     print safe "<a href='$c.permalink_url'>$subj</a> - $poster";
     if ($c.thread_url != "") {
-        " ("; $c->print_expand_collapse_links(); ")";
+        " - "; $c->print_expand_collapse_links();
     }
 }
 

Modified: trunk/bin/upgrading/s2layers/generator/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/generator/layout.s2	2011-06-20 08:15:09 UTC (rev 19323)
+++ trunk/bin/upgrading/s2layers/generator/layout.s2	2011-06-20 08:31:35 UTC (rev 19324)
@@ -1357,7 +1357,7 @@
     var string poster = isnull $c.poster ? $*text_poster_anonymous : $c.poster->as_string();
 
     print safe """<a href="$c.permalink_url">$subject</a> $poster""";
-    " (";$c->print_expand_collapse_links(); ")";
+    " ";$c->print_expand_collapse_links();
 }
 function EntryPage::print_comment_full (Comment c) {
     var Page p = get_page();

Modified: trunk/bin/upgrading/s2layers/punquin/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/punquin/layout.s2	2011-06-20 08:15:09 UTC (rev 19323)
+++ trunk/bin/upgrading/s2layers/punquin/layout.s2	2011-06-20 08:31:35 UTC (rev 19324)
@@ -889,7 +889,7 @@
     var string subj = $c.subject != "" ? $c.subject : $*text_nosubject;
     print safe "<a href='$c.permalink_url'>$subj</a> - $poster";
     if ($c.thread_url != "") {
-        $c->print_expand_collapse_links();
+        " - "; $c->print_expand_collapse_links();
     }
 }
 
@@ -984,7 +984,9 @@
 #          # if (defined $expand_link) {
 #          #     "(" + $c->expand_link() + ") ";
 #          # }
-         $c->print_expand_collapse_links();
+         if ($c.parent_url != "" and size $c.replies > 0) {
+            "("; $c->print_expand_collapse_links(); ") ";
+        }
     }
     "</div>";
     if (not $c.frozen) {

Modified: trunk/bin/upgrading/s2layers/sixhtml/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/sixhtml/layout.s2	2011-06-20 08:15:09 UTC (rev 19323)
+++ trunk/bin/upgrading/s2layers/sixhtml/layout.s2	2011-06-20 08:31:35 UTC (rev 19324)
@@ -1053,6 +1053,7 @@
 
 function EntryPage::print_comment_partial(Comment e) {
      var Page p = get_page();
+     var string sep = "<span class='separator'>|</span>";
      "<div class='comment collapsed-comment'>\n";
      "<div class='comment-footer'>";
      var string subject = $e.subject;
@@ -1060,7 +1061,7 @@
      "<a href='$e.permalink_url' class='collapsed-comment-link'>$subject</a> <span class='separator'>-</span> ";
      print safe lang_posted_by($e.poster, $e.poster); " <span class='separator'>-</span> ";
      print lang_posted_date_and_time($e, $e.time, true, true);
-     $e->print_expand_collapse_links();
+     " $sep "; $e->print_expand_collapse_links();
      "</div>";
      "</div>";
 }
@@ -1105,7 +1106,9 @@
      if ($e.parent_url) { print " $sep <a href='$e.parent_url'>$*text_comment_parent</a>"; }
      if (($e.thread_url != "") and (not $e.spam)) {
          print " $sep <a href='$e.thread_url'>$*text_comment_thread</a>";
-         $e->print_expand_collapse_links();
+         if ($e.parent_url != "" and size $e.replies > 0) {
+            " $sep "; $e->print_expand_collapse_links();
+        }
      }
      if (($e.reply_url != "") and ((not $e.spam) or ($p.showspam)))  {
  if (not $e.frozen) {

Modified: trunk/bin/upgrading/s2layers/sturdygesture/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/sturdygesture/layout.s2	2011-06-20 08:15:09 UTC (rev 19323)
+++ trunk/bin/upgrading/s2layers/sturdygesture/layout.s2	2011-06-20 08:31:35 UTC (rev 19324)
@@ -864,7 +864,9 @@
     if ($c.parent_url != "") { """<a href="$c.parent_url">$*text_comment_parent</a> - """; }
     if ($c.thread_url != "" and (not $c.spam)) {
         """<a href="$c.thread_url">$*text_comment_thread</a> """;
-        $c->print_expand_collapse_links();
+        if ($c.parent_url != "" and size $c.replies > 0) {
+            " - "; $c->print_expand_collapse_links();
+        }
 	""" - """;
     }
     var Link l = new Link;
@@ -908,7 +910,7 @@
     print """<div class="minicomment" id="$c.dom_id"><a href="$c.permalink_url">$subj</a> - $poster""";
     var Link expand_link = $c->get_link("expand_comments");
     if ($c.thread_url != "" and (not $c.spam)) {
-        $c->print_expand_collapse_links();
+        " - "; $c->print_expand_collapse_links();
     }
     print """</div>""";
 }

Modified: trunk/bin/upgrading/s2layers/tabularindent/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/tabularindent/layout.s2	2011-06-20 08:15:09 UTC (rev 19323)
+++ trunk/bin/upgrading/s2layers/tabularindent/layout.s2	2011-06-20 08:31:35 UTC (rev 19324)
@@ -570,14 +570,14 @@
             
             ") ";
         }
-        print $footer;
-        if ($c.thread_url != "" and (not $c.spam)) {
-            $c->print_expand_collapse_links();
+        if ($c.thread_url != "" and (not $c.spam) and $c.parent_url != "" and size $c.replies > 0) {
+            " ("; $c->print_expand_collapse_links(); ")";
         }
 
         if (not $c.frozen) {
             $c->print_reply_container({"class" => "quickreply"});
         }
+        print $footer;
     }
     "</td></tr></table></div><br />";
 }
@@ -1060,7 +1060,7 @@
     print_genericbox_open();
     print "<a href='$c.permalink_url'>$subj</a> - $poster";
     if ($c.thread_url != "") {
-        $c->print_expand_collapse_links();
+        " - "; $c->print_expand_collapse_links();
     }
     print_genericbox_close();
 }

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