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

[ljcom] r10957: LJSUP-9393: Expand Collapse links, new i...

Committer: mchervonniy
LJSUP-9393: Expand Collapse links, new implementation with template in function
U   trunk/bin/upgrading/s2layers/3column/layout.s2
U   trunk/bin/upgrading/s2layers/anovelconundrum/layout.s2
U   trunk/bin/upgrading/s2layers/component/layout.s2
U   trunk/bin/upgrading/s2layers/flexiblesquares/layout.s2
U   trunk/bin/upgrading/s2layers/nebula/layout.s2
U   trunk/bin/upgrading/s2layers/smoothsailing/layout.s2
U   trunk/bin/upgrading/s2layers/sup/layout.s2
U   trunk/bin/upgrading/s2layers/tranquilityii/layout.s2
U   trunk/bin/upgrading/s2layers/unearthed/layout.s2
U   trunk/bin/upgrading/s2layers/voxhtml/layout.s2
Modified: trunk/bin/upgrading/s2layers/3column/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/3column/layout.s2	2011-09-02 09:38:10 UTC (rev 10956)
+++ trunk/bin/upgrading/s2layers/3column/layout.s2	2011-09-02 10:24:56 UTC (rev 10957)
@@ -640,11 +640,10 @@
                 }
             }
 	}
-
     ###<a href="$c.reply_url">$*text_comment_reply</a>$*t_divider;
     print """<a href="$c.permalink_url">$*text_permalink</a>$*t_divider $parent$thread""";
     if (($c.thread_url != "") and (not $c.spam)) {
-        $c->print_expand_collapse_links();
+        $c->print_expand_collapse_links({ "expand"=>"%_", "collapse"=>"%_"});
     }
  """</div>""";
         $c->print_reply_container({"class" => "quickreply"});
@@ -687,11 +686,8 @@
     <a name='$c.anchor'></a><div style="margin-left: $indent;" id="$c.dom_id"><div><div class="entry">
         <div class="minicomment">$poster - <a href="$c.permalink_url">$subj</a>""";
 
-    # var Link expand_link = $c->get_link("expand_comments");
-    # if ($c.thread_url != "" and defined $expand_link) {
     if ($c.thread_url != "") {
-    #     print " " + $c->expand_link() + $*t_divider;
-        " - "; $c->print_expand_collapse_links();
+        $c->print_expand_collapse_links({ "expand"=>" - %_", "collapse"=>" - %_"});
     }
     print """</div></div></div></div>""";
     ### $this->print_comments($c.replies);

Modified: trunk/bin/upgrading/s2layers/anovelconundrum/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/anovelconundrum/layout.s2	2011-09-02 09:38:10 UTC (rev 10956)
+++ trunk/bin/upgrading/s2layers/anovelconundrum/layout.s2	2011-09-02 10:24:56 UTC (rev 10957)
@@ -1180,12 +1180,8 @@
     if ($c.parent_url != "") { " &middot; <a href='$c.parent_url'>Parent</a>"; }
     if ($c.thread_url != "" and (not $c.spam)) {
         " &middot; <a href='$c.thread_url'>Thread</a>";
-        # var Link expand_link = $c->get_link("expand_comments");
-        # if (defined $expand_link) {
-        #     " &middot; " + $c->expand_link();
-        # }
         if ($c.parent_url != "" and size $c.replies > 0) {
-            " &middot; "; $c->print_expand_collapse_links();
+            $c->print_expand_collapse_links({ "expand"=>" &middot; %_", "collapse"=>" &middot; %_"});
         }
     }
     $c->print_linkbar();
@@ -1211,10 +1207,8 @@
     if($subj) { """replied, <a href="$c.permalink_url">&ldquo;$c.subject&rdquo;</a>"""; }
     else { """posted <a href="$c.permalink_url">a reply</a>"""; }
     var Link expand_link = $c->get_link("expand_comments");
-    # if ($c.thread_url != "" and defined $expand_link) {
     if ($c.thread_url != "") {
-        # " " + $c->expand_link();
-        " &middot; "; $c->print_expand_collapse_links();
+        $c->print_expand_collapse_links({ "expand"=>" &middot; %_", "collapse"=>" &middot; %_"});
     }
     "</div>";
 }

Modified: trunk/bin/upgrading/s2layers/component/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/component/layout.s2	2011-09-02 09:38:10 UTC (rev 10956)
+++ trunk/bin/upgrading/s2layers/component/layout.s2	2011-09-02 10:24:56 UTC (rev 10957)
@@ -2810,7 +2810,7 @@
     print_comment_content_top($c);
     "$content";
     if ($c.thread_url != "") {
-        " - "; $c->print_expand_collapse_links();
+        $c->print_expand_collapse_links({ "expand"=>" - %_", "collapse"=>" - %_"});
     }
     print_comment_content_bottom();
 }
@@ -2975,7 +2975,7 @@
     if (($c.thread_url != "") and (not $c.spam)) {
         "(<a href=\"$c.thread_url\">Thread</a>) ";
         if ($c.parent_url != "" and size $c.replies > 0) {
-            "("; $c->print_expand_collapse_links(); ")";
+            $c->print_expand_collapse_links({ "expand"=>"(%_)", "collapse"=>"(%_)"});
         }
     }
     if (not $c.frozen) {

Modified: trunk/bin/upgrading/s2layers/flexiblesquares/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/flexiblesquares/layout.s2	2011-09-02 09:38:10 UTC (rev 10956)
+++ trunk/bin/upgrading/s2layers/flexiblesquares/layout.s2	2011-09-02 10:24:56 UTC (rev 10957)
@@ -2364,7 +2364,7 @@
         """(<a href="$comment.thread_url">$*text_comment_thread</a>) """;
         var Link expand_link = $comment->get_link("expand_comments");
         if ($comment.parent_url != "" and size $comment.replies > 0) {
-            "("; $comment->print_expand_collapse_links(); ") ";
+            $comment->print_expand_collapse_links({ "expand"=>"(%_) ", "collapse"=>"(%_) "});
         }
     }
 
@@ -2395,7 +2395,7 @@
     var string poster = isnull $c.poster ? $*text_poster_anonymous : $c.poster->as_string();
 
     print safe """<a href="$c.permalink_url">$subject</a> - $poster on $date""";
-    " ("; $c->print_expand_collapse_links(); ")";
+    $c->print_expand_collapse_links({ "expand"=>" (%_) ", "collapse"=>" (%_) "});
 }
 
 # -----------------------------------

Modified: trunk/bin/upgrading/s2layers/nebula/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/nebula/layout.s2	2011-09-02 09:38:10 UTC (rev 10956)
+++ trunk/bin/upgrading/s2layers/nebula/layout.s2	2011-09-02 10:24:56 UTC (rev 10957)
@@ -1719,7 +1719,7 @@
         #     println "(" + $c->expand_link() + ") ";
         # }
         if ($c.parent_url != "" and size $c.replies > 0) {
-            "("; $c->print_expand_collapse_links(); ") ";
+            $c->print_expand_collapse_links({ "expand"=>"(%_) ", "collapse"=>"(%_) "});
         }
     }
     if (not $c.frozen) {
@@ -1737,7 +1737,7 @@
     # if ($c.thread_url != "" and defined $expand_link) {
     if ($c.thread_url != "") {
         # " "; $c->print_expand_link();
-        " ("; $c->print_expand_collapse_links(); ")";
+        $c->print_expand_collapse_links({ "expand"=>" (%_) ", "collapse"=>" (%_) "});
     }
 }
 

Modified: trunk/bin/upgrading/s2layers/smoothsailing/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/smoothsailing/layout.s2	2011-09-02 09:38:10 UTC (rev 10956)
+++ trunk/bin/upgrading/s2layers/smoothsailing/layout.s2	2011-09-02 10:24:56 UTC (rev 10957)
@@ -1821,7 +1821,7 @@
           if ($.thread_url!="" and (not $.spam)) {
             print safe """<li><a href="$.thread_url">$*text_comment_thread</a></li>""";
             if ($.parent_url!="" and size $.replies > 0) {
-                $this->print_expand_collapse_links();
+                $this->print_expand_collapse_links({ "expand"=>"<li>%_</li>", "collapse"=>"<li>%_</li>"});
             }
           }
           print safe """<li><a href="$.permalink_url">$*text_comment_permalink</a></li>""";
@@ -1895,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({ "expand"=>" - %_", "collapse"=>" - %_"});
     """</div></div>""";
 }
 

Modified: trunk/bin/upgrading/s2layers/sup/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/sup/layout.s2	2011-09-02 09:38:10 UTC (rev 10956)
+++ trunk/bin/upgrading/s2layers/sup/layout.s2	2011-09-02 10:24:56 UTC (rev 10957)
@@ -1560,6 +1560,6 @@
     }
     print safe """<a href="$c.permalink_url">$subj</a> <span class="emdash">—</span> $poster""";
     if ($c.thread_url != "") {
-        " <span class=\"emdash\">—</span> "; $c->print_expand_collapse_links();
+        $c->print_expand_collapse_links({ "expand"=>"<span class='emdash'>—</span> %_", "collapse"=>"<span class='emdash'>—</span> %_"});
     }
 }

Modified: trunk/bin/upgrading/s2layers/tranquilityii/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/tranquilityii/layout.s2	2011-09-02 09:38:10 UTC (rev 10956)
+++ trunk/bin/upgrading/s2layers/tranquilityii/layout.s2	2011-09-02 10:24:56 UTC (rev 10957)
@@ -1331,7 +1331,7 @@
     print safe "<a href='$c.permalink_url'>$subj</a> - $poster";
     var Link expand_link = $c->get_link("expand_comments");
     if ($c.thread_url != "") {
-        " - "; $c->print_expand_collapse_links();
+        $c->print_expand_collapse_links({ "expand"=>" - %_", "collapse"=>" - %_"});
     }
 }
 
@@ -1426,7 +1426,7 @@
             }
             print safe "<a href=\"$c.thread_url\" title=\"$*text_comment_thread\">$*text_comment_thread</a>";
             if ($c.parent_url != "" and size $c.replies > 0) {
-                " | "; $c->print_expand_collapse_links();
+                $c->print_expand_collapse_links({ "expand"=>" | %_", "collapse"=>" | %_"});
             }
         }
         print "</h4>";

Modified: trunk/bin/upgrading/s2layers/unearthed/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/unearthed/layout.s2	2011-09-02 09:38:10 UTC (rev 10956)
+++ trunk/bin/upgrading/s2layers/unearthed/layout.s2	2011-09-02 10:24:56 UTC (rev 10957)
@@ -1407,7 +1407,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({ "expand"=>" - %_", "collapse"=>" - %_"});
     }
 }
 
@@ -1491,7 +1491,7 @@
     if ($c.thread_url != "" and (not $c.spam)) {
         println """(<a href="$c.thread_url">$*text_comment_thread</a>) """;
         if ($c.parent_url != "" and size $c.replies > 0) {
-            "("; $c->print_expand_collapse_links(); ") ";
+            $c->print_expand_collapse_links({ "expand"=>"(%_)", "collapse"=>"(%_)"});
         }
     }
     # $c->print_reply_container();

Modified: trunk/bin/upgrading/s2layers/voxhtml/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/voxhtml/layout.s2	2011-09-02 09:38:10 UTC (rev 10956)
+++ trunk/bin/upgrading/s2layers/voxhtml/layout.s2	2011-09-02 10:24:56 UTC (rev 10957)
@@ -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({ "expand"=>" - %_", "collapse"=>" - %_"});
  
      """
          </div>
@@ -2525,7 +2525,7 @@
         #    " $sep " + $e->expand_link();
         #}
         if ($e.parent_url != "" and size $e.replies > 0) {
-            " $sep "; $e->print_expand_collapse_links();
+            $e->print_expand_collapse_links({ "expand"=>" $sep %_", "collapse"=>" $sep %_"});
         }
     }
 

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