afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
afuna ([personal profile] afuna) wrote in [site community profile] changelog2009-06-18 01:53 pm

[dw-free] print_module_navlinks should use the viewname as a class

[commit: http://hg.dwscoalition.org/dw-free/rev/14c8cc214a3a]

http://bugs.dwscoalition.org/show_bug.cgi?id=1329

Add view names as classes.

Patch by [personal profile] kareila.

Files modified:
  • bin/upgrading/s2layers/core2.s2
--------------------------------------------------------------------------------
diff -r 8fea186af84b -r 14c8cc214a3a bin/upgrading/s2layers/core2.s2
--- a/bin/upgrading/s2layers/core2.s2	Wed Jun 17 14:34:40 2009 +0000
+++ b/bin/upgrading/s2layers/core2.s2	Thu Jun 18 13:52:35 2009 +0000
@@ -3106,8 +3106,8 @@ function print_module_navlinks() {
     open_module("navlinks", "", "");
     var string[] links = [];
     foreach var string k ($p.views_order) {
-	var string css = "";
-	if ($p.view == $k) { $css = """ class="current" """; }
+        var string css = """ class="$k" """;
+        if ($p.view == $k) { $css = """ class="current $k" """; }
         $links[size $links] = """<a href="$p.view_url{$k}"$css>"""+lang_viewname($k)+"""</a>""";
     }
     print_module_list($links);
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org