janinedog: (Default)
Janine ([personal profile] janinedog) wrote in [site community profile] changelog2009-07-29 03:13 am

[dw-free] Add "has-navstrip" class to body tag

[commit: http://hg.dwscoalition.org/dw-free/rev/2fcb78e47159]

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

Add a CSS class to the body tag that shows whether the nav strip is
displaying or not.

Patch by [personal profile] foxfirefey.

Files modified:
  • bin/upgrading/s2layers/core2.s2
--------------------------------------------------------------------------------
diff -r adfcf7b3198e -r 2fcb78e47159 bin/upgrading/s2layers/core2.s2
--- a/bin/upgrading/s2layers/core2.s2	Tue Jul 28 19:31:21 2009 -0500
+++ b/bin/upgrading/s2layers/core2.s2	Wed Jul 29 03:13:13 2009 +0000
@@ -2947,7 +2947,8 @@ function Page::print_wrapper_start(strin
 {
 # FIXME: this should also print classes that identify the layout/style and other options like the number of columns.
     var string class = $opts{"class"} ? """class="$opts{"class"}" """ : "";
-    """<body class="page-$.view $*layout_type $class">\n""";
+    var string control_strip = viewer_sees_control_strip() ? "has-navstrip" : "no-navstrip";
+    """<body class="page-$.view $*layout_type $class $control_strip">\n""";
 }
 
 function Page::print_wrapper_end() 
--------------------------------------------------------------------------------