Максим Червонный (fiskus_boulder) wrote in changelog,
Максим Червонный
fiskus_boulder
changelog

[livejournal] r20661: LJSUP-10206: There is no link to Collaps...

Committer: mchervonniy
LJSUP-10206: There is no link to Collapse in Gradient Strip style
U   trunk/bin/upgrading/s2layers/disjointed/layout.s2
U   trunk/bin/upgrading/s2layers/haven/layout.s2
U   trunk/bin/upgrading/s2layers/notepad/layout.s2
U   trunk/bin/upgrading/s2layers/variableflow/layout.s2
Modified: trunk/bin/upgrading/s2layers/disjointed/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/disjointed/layout.s2	2011-11-30 09:19:23 UTC (rev 20660)
+++ trunk/bin/upgrading/s2layers/disjointed/layout.s2	2011-11-30 09:38:26 UTC (rev 20661)
@@ -1091,7 +1091,6 @@
       $btwn_comments = "$*text_comment_divider";
   }
 
-  var string expand = "";
   if($this isa Comment) {
     var Comment c      = $this as Comment;
     var string  reply  = "";
@@ -1113,10 +1112,6 @@
       $url    = $c.thread_url;
       $text   = $*text_comment_thread;
       $thread = """<a href="$url">$text</a>$btwn_comments""";
-      var Link expand_link = $c->get_link("expand_comments");
-      if (defined $expand_link) {
-        $expand = $c->expand_link();
-      }
     }
     $linkbar = $linkbar + $parent + $thread;
     ###$c->print_reply_link({"linktext" => "$*text_comment_reply"}); 
@@ -1190,10 +1185,11 @@
   $url     = $.permalink_url;
   $text    = $*text_permalink;
   print safe """<a href="$url">$text</a>""";
-
-  if ($expand != "") {
-    print safe $btwn_comments;
-    print $expand;
+  if($this isa Comment) {
+    var Comment c = $this as Comment;
+    if($c.parent_url != "") {
+      $c->print_expand_collapse_links({ "expand"=>" $btwn_comments %_", "collapse"=>" $btwn_comments %_"}); 
+    }
   }
   print safe $*text_right_comments;
 }
@@ -1769,7 +1765,7 @@
   }
 }
 
-function EntryPage::print_comment(Comment c) {
+function EntryPage::print_comment_full(Comment c) {
   print_entry($c, null Color, null Color);
 }
 
@@ -1977,4 +1973,3 @@
 </div>
 """;
 }
-

Modified: trunk/bin/upgrading/s2layers/haven/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/haven/layout.s2	2011-11-30 09:19:23 UTC (rev 20660)
+++ trunk/bin/upgrading/s2layers/haven/layout.s2	2011-11-30 09:38:26 UTC (rev 20661)
@@ -1529,7 +1529,7 @@
     }
 }
 
-function EntryPage::print_comment(Comment c)
+function EntryPage::print_comment_full(Comment c)
 {
     var string class = "";
     if ($c.screened) {
@@ -1606,9 +1606,8 @@
     if ($c.parent_url != "") { println """(<a href="$c.parent_url">Parent</a>) """; }
     if ($c.thread_url != "") {
         println """(<a href="$c.thread_url">Thread</a>) """;
-        var Link expand_link = $c->get_link("expand_comments");
-        if (defined $expand_link) {
-            println "(" + $c->expand_link() + ") ";
+        if ($c.parent_url != "") {
+            $c->print_expand_collapse_links({ "expand"=>" %_", "collapse"=>" %_"}); 
         }
     }
     if (not $c.frozen) {

Modified: trunk/bin/upgrading/s2layers/notepad/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/notepad/layout.s2	2011-11-30 09:19:23 UTC (rev 20660)
+++ trunk/bin/upgrading/s2layers/notepad/layout.s2	2011-11-30 09:38:26 UTC (rev 20661)
@@ -780,7 +780,7 @@
     }
 }
 
-function EntryPage::print_comment (Comment c) {
+function EntryPage::print_comment_full (Comment c) {
     var Color barlight = $*color_comment_bar->clone();
     $barlight->lightness(($barlight->lightness() + 255) / 2);
     var Color barc = $c.depth % 2 ? $*color_comment_bar : $barlight;
@@ -853,9 +853,8 @@
     if ($c.parent_url != "") { "(<a href='$c.parent_url'>$*text_comment_parent</a>) "; }
     if ($c.thread_url != "") {
         "(<a href='$c.thread_url'>$*text_comment_thread</a>) ";
-        var Link expand_link = $c->get_link("expand_comments");
-        if (defined $expand_link) {
-            "(" + $c->expand_link() + ") ";
+        if ($c.parent_url != "") {
+            $c->print_expand_collapse_links({ "expand"=>"(%_)", "collapse"=>"(%_)"}); 
         }
     }
     if (not $c.frozen) {

Modified: trunk/bin/upgrading/s2layers/variableflow/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/variableflow/layout.s2	2011-11-30 09:19:23 UTC (rev 20660)
+++ trunk/bin/upgrading/s2layers/variableflow/layout.s2	2011-11-30 09:38:26 UTC (rev 20661)
@@ -794,9 +794,8 @@
     }
     if ($e.thread_url != "") {
         println """<li><a href="$e.thread_url">$*text_comment_thread</a></li>""";
-        var Link expand_link = $e->get_link("expand_comments");
-        if (defined $expand_link) {
-            println "<li>" + $e->expand_link() + "</li>";
+        if ($e.parent_url != "") {
+            $e->print_expand_collapse_links({ "expand"=>"<li>%_</li>", "collapse"=>"<li>%_</li>"}); 
         }
     }
     if ($e.reply_url != "") {

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