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

[ljcom] r10661: LJSUP-9117: S2 Expand

Committer: esavintcev
LJSUP-9117: S2 Expand
U   trunk/bin/upgrading/s2layers/smoothsailing/layout.s2
U   trunk/bin/upgrading/s2layers/sup/layout.s2
U   trunk/bin/upgrading/s2layers/voxhtml/layout.s2
Modified: trunk/bin/upgrading/s2layers/smoothsailing/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/smoothsailing/layout.s2	2011-06-17 10:27:37 UTC (rev 10660)
+++ trunk/bin/upgrading/s2layers/smoothsailing/layout.s2	2011-06-20 03:42:18 UTC (rev 10661)
@@ -1820,7 +1820,9 @@
           if ($.parent_url!="") { print safe """<li><a href="$.parent_url">$*text_comment_parent</a></li>"""; }
           if ($.thread_url!="" and (not $.spam)) {
             print safe """<li><a href="$.thread_url">$*text_comment_thread</a></li>""";
-            $this->print_expand_collapse_links();
+            if ($.parent_url!="" and size $.replies > 0) {
+                $this->print_expand_collapse_links();
+            }
           }
           print safe """<li><a href="$.permalink_url">$*text_comment_permalink</a></li>""";
           var Link l;
@@ -1893,7 +1895,7 @@
     <div class="commentHolder"><div class="commentText">""";
     print "<a href=\"$comment.permalink_url\">"+($comment.subject==""?"<i>(no subject)</i>":"$comment.subject")+"</a> - ";
     print (defined $comment.poster?"<span class=\"ljuser\" style=\"white-space:nowrap;\">$comment.poster</span>":"<i>Anonymous</i>");
-    $comment->print_expand_collapse_links();
+    " ("; $comment->print_expand_collapse_links(); ") ";
     """</div></div>""";
 }
 

Modified: trunk/bin/upgrading/s2layers/sup/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/sup/layout.s2	2011-06-17 10:27:37 UTC (rev 10660)
+++ trunk/bin/upgrading/s2layers/sup/layout.s2	2011-06-20 03:42:18 UTC (rev 10661)
@@ -1529,7 +1529,7 @@
     if ($c.parent_url != "") { print safe """(<a href="$c.parent_url">$*text_comment_parent</a>) """; }
     if (($c.thread_url != "") and (not $c.spam)) {
         print safe """(<a href="$c.thread_url">$*text_comment_thread</a>) """;
-        if ($c.parent_url != "") {
+        if ($c.parent_url != "" and size $c.replies > 0) {
             "("; $c->print_expand_collapse_links(); ") ";
         }
     }

Modified: trunk/bin/upgrading/s2layers/voxhtml/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/voxhtml/layout.s2	2011-06-17 10:27:37 UTC (rev 10660)
+++ trunk/bin/upgrading/s2layers/voxhtml/layout.s2	2011-06-20 03:42:18 UTC (rev 10661)
@@ -2397,7 +2397,7 @@
      #if ($e.thread_url != "" and defined $expand_link) {
      #      " " + $e->expand_link({ "class" => "collapsed-comment-link" });
      #}
-        $e->print_expand_collapse_links();
+        " ("; $e->print_expand_collapse_links(); ") ";
  
      """
          </div>
@@ -2524,7 +2524,9 @@
         #if (defined $expand_link) {
         #    " $sep " + $e->expand_link();
         #}
-        $e->print_expand_collapse_links();
+        if ($e.parent_url != "" and size $e.replies > 0) {
+            " $sep "; $e->print_expand_collapse_links();
+        }
     }
 
     $e->print_linkbar();

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