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

[ljcom] r11226: 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/boxer/layout.s2
U   trunk/bin/upgrading/s2layers/cuteness/layout.s2
U   trunk/bin/upgrading/s2layers/gradient/layout.s2
Modified: trunk/bin/upgrading/s2layers/boxer/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/boxer/layout.s2	2011-11-29 12:01:08 UTC (rev 11225)
+++ trunk/bin/upgrading/s2layers/boxer/layout.s2	2011-11-30 09:38:58 UTC (rev 11226)
@@ -1220,19 +1220,15 @@
 
 }
 
-function EntryPage::print_comments (Comment[] cs) {
-    if (size $cs == 0) { return; }
+function EntryPage::print_comment (Comment c) {
     var Page p = get_page();
-    foreach var Comment c ($cs) {
-        if (($c.spam) and (not $p.showspam) and (not $c.can_marked_as_spam) and (size($c.replies) > 0)) {
-            var int sidewidth = 122 + ($c.depth - 1) * 25;
-            """ <a name="t$c.talkid"></a><table class="new" id="$c.dom_id" width="$*page_width" cellpadding="0" cellspacing="0"><tr><td style="background:#2F382E;" width="$sidewidth"></td><td width="2"></td><td class="entry"><div class="entrycontent"><strong>$*text_spam_comment</strong></div></td></tr></table> """;
-        } elseif ($c.full) {
-            $this->print_comment($c);
-        } else {
-            $this->print_comment_partial($c);
-        }
-        $this->print_comments($c.replies);
+    if (($c.spam) and (not $p.showspam) and (not $c.can_marked_as_spam) and (size($c.replies) > 0)) {
+        var int sidewidth = 122 + ($c.depth - 1) * 25;
+        """ <a name="t$c.talkid"></a><table class="new" id="$c.dom_id" width="$*page_width" cellpadding="0" cellspacing="0"><tr><td style="background:#2F382E;" width="$sidewidth"></td><td width="2"></td><td class="entry"><div class="entrycontent"><strong>$*text_spam_comment</strong></div></td></tr></table> """;
+    } elseif ($c.full) {
+        $this->print_comment_full($c);
+    } else {
+        $this->print_comment_partial($c);
     }
 }
 
@@ -1266,10 +1262,8 @@
             <td valign="top" width="$sidewidth" style="background-color: $mybg;" align="center"><br></td>
             <td width="2"><img src="$*PALIMGROOT/boxer/clear.gif" width="2" height="1" alt="" border="0" /></td>
             <td valign="top" class="entry" align="left"><div style="padding-top: 3px; padding-bottom: 3px; padding-left: 3px;"><a href='$c.permalink_url'>$subj</a> - $poster""";
-
-            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"=>" %_"}); 
             }
 
     """</div></td>
@@ -1278,7 +1272,7 @@
     """;
 }
 
-function EntryPage::print_comment (Comment c) {
+function EntryPage::print_comment_full (Comment c) {
 
     var int count = $c.depth / 8; # get how many times greater is the depth than our 8 color choices
     $count = $count + (($count*10%10 >= 5) ? 1 : 0);  # round that number
@@ -1398,13 +1392,9 @@
     """;
 
     if ($c.parent_url != "") { """        <span class="icon"><a href=\"$c.parent_url\"><img src="$*parent" border="0" alt="Parent" title="Parent" width="20" height="21" align="middle"></a></span> """; }
-    if ($c.thread_url != "") {
-        var Link expand_link = $c->get_link("expand_comments");
-        if (defined $expand_link) {
-            """<span class="icon">""";
-            print $c->expand_link({ "img_url" => "$*expand", "img_border" => "0", "img_width" => "20", "img_height" => "21", "img_align" => "middle" });
-            "</span> ";
-        }
+    if ($c.parent_url != "") {
+        #$c->print_expand_collapse_links({ "expand"=>"<span class='icon'><img src='http://www.ljdev5.livejournal.ru/palimg/boxer/expand.gif' alt='%_'/></span>", "collapse"=>"<span class='icon'><img src='http://www.ljdev5.livejournal.ru/palimg/boxer/expand.gif' alt='%_'/></span>"}); 
+        $c->print_expand_collapse_links({ "expand"=>" %_ ", "collapse"=>" %_ "}); 
     }
 
     var string{} link_image = {

Modified: trunk/bin/upgrading/s2layers/cuteness/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/cuteness/layout.s2	2011-11-29 12:01:08 UTC (rev 11225)
+++ trunk/bin/upgrading/s2layers/cuteness/layout.s2	2011-11-30 09:38:58 UTC (rev 11226)
@@ -1502,7 +1502,7 @@
 # -------------------------------
 # print comment
 # -------------------------------
-function EntryPage::print_comment ( Comment c )
+function EntryPage::print_comment_full ( Comment c )
 {
         var string comment_class = "";
         if ( $c.screened ) {
@@ -1593,9 +1593,8 @@
 					 print safe " | ";
 }
 					print safe"<a href=\"$c.thread_url\" title=\"$*text_comment_thread\">$*text_comment_thread</a>";
-                     var Link expand_link = $c->get_link("expand_comments");
-                     if (defined $expand_link) {
-                        " | " + $c->expand_link({ "title" => $*text_comment_expand }) + " ";
+                     if ($c.parent_url != "") {
+                         $c->print_expand_collapse_links({ "expand"=>" | %_ ", "collapse"=>" | %_ "}); 
                      }
                 }
                 print "</h4>";

Modified: trunk/bin/upgrading/s2layers/gradient/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/gradient/layout.s2	2011-11-29 12:01:08 UTC (rev 11225)
+++ trunk/bin/upgrading/s2layers/gradient/layout.s2	2011-11-30 09:38:58 UTC (rev 11226)
@@ -1694,9 +1694,8 @@
     """<div class="commentlinks">$*comment_link_divider """;
     if ($c.thread_url != "") {
         """<a href="$c.thread_url">Thread</a> $*comment_link_divider """;
-        var Link expand_link = $c->get_link("expand_comments");
-        if (defined $expand_link) {
-            println $c->expand_link() + " $*comment_link_divider";
+        if ($c.parent_url != "") {
+            $c->print_expand_collapse_links({ "expand"=>" %_", "collapse"=>" %_"}); 
         }
     }
     if ($c.parent_url != "") {

Tags: fiskus_boulder, ljcom, 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