changelog_bot (changelog_bot) wrote in changelog,
changelog_bot
changelog_bot
changelog

[ljcom] r11792: LJSUP-11939: Expressive need_res

Committer: ybuhvalova
LJSUP-11939: Expressive need_res
U   trunk/bin/upgrading/s2layers/voxhtml/layout.s2
Modified: trunk/bin/upgrading/s2layers/voxhtml/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/voxhtml/layout.s2	2012-04-25 12:05:50 UTC (rev 11791)
+++ trunk/bin/upgrading/s2layers/voxhtml/layout.s2	2012-04-25 12:06:01 UTC (rev 11792)
@@ -1606,6 +1606,8 @@
 }
 
 function Page::print_stylesheets() {
+    var Page p = get_page();
+
     # These are the themes that need the header.css file included
     var bool{} header_themes = {
         "ocean-fish" => true,
@@ -1687,8 +1689,11 @@
 
     if ($*use_vox_base) {
         var string theme = $*base_theme;
-        println safe """<link rel="stylesheet" href="$*STATDIR/voxhtml/base.css" type="text/css" />\n""";
-        println safe """<link rel="stylesheet" href="$*STATDIR/voxhtml/default/screen.css" type="text/css" />""";
+
+        $p->need_res({"args" => "media=\"screen\"" }, ["stc/voxhtml/base.css"]);
+
+        $p->need_res({"args" => "media=\"screen\"" }, ["stc/voxhtml/default/screen.css"]);
+
         var int pos = strpos($*base_theme, "-");
         if ($pos != -1) {
             $theme = $*base_theme->substr(0, $pos);
@@ -1698,27 +1703,30 @@
         }
         if ($*base_theme != "__none") {
             if ($winners{$*base_theme}) {
-                println safe """<link rel="stylesheet" href="$*STATDIR/voxhtml/winners.css" type="text/css" />\n""";
+                $p->need_res({"args" => "media=\"screen\"" }, ["stc/voxhtml/winners.css"]);
             }
             if ($parent_css{$theme} and not $no_parent_css{$*base_theme}) {
-                println safe """<link rel="stylesheet" href="$*STATDIR/voxhtml/$theme/screen.css" type="text/css" />\n""";
+                $p->need_res({"args" => "media=\"screen\"" }, ["stc/voxhtml/$theme/screen.css"]);
             }
+            
             println safe """<link rel="stylesheet" href="$*STATDIR/voxhtml/$*theme_stylesheet{$*base_theme}" type="text/css" />\n""";
+            
         }
-        println safe """<link rel="stylesheet" href="$*STATDIR/voxhtml/ljextras.css" type="text/css" />\n""";
+        $p->need_res({"args" => "media=\"screen\"" }, ["stc/voxhtml/ljextras.css"]);
+
         if ($header_themes{$*base_theme}) {
-            println safe """<link rel="stylesheet" href="$*STATDIR/voxhtml/header.css" type="text/css" />\n""";
+            $p->need_res({"args" => "media=\"screen\"" }, ["stc/voxhtml/header.css"]);
         } elseif ($theme == "bloom") {
-            println safe """<link rel="stylesheet" href="$*STATDIR/voxhtml/bloom.css" type="text/css" />\n""";
+            $p->need_res({"args" => "media=\"screen\"" }, ["stc/voxhtml/bloom.css"]);
         } elseif ($theme == "fleur") {
-            println safe """<link rel="stylesheet" href="$*STATDIR/voxhtml/fleur.css" type="text/css" />\n""";
+            $p->need_res({"args" => "media=\"screen\"" }, ["stc/voxhtml/fleur.css"]);
         } elseif ($theme == "bunnylicious") {
-            println safe """<link rel="stylesheet" href="$*STATDIR/voxhtml/bunnylicious.css" type="text/css" />\n""";
+            $p->need_res({"args" => "media=\"screen\"" }, ["stc/voxhtml/bunnylicious.css"]);
         } elseif ($theme == "weston") {
-            println safe """<link rel="stylesheet" href="$*STATDIR/voxhtml/weston.css" type="text/css" />\n""";
+            $p->need_res({"args" => "media=\"screen\"" }, ["stc/voxhtml/weston.css"]);
         }
     }
-
+    
     if ($*linked_stylesheet != "") {
         println safe """<link rel="stylesheet" href="$*linked_stylesheet" type="text/css" />\n""";
     }

Tags: changelog_bot, ljcom, s2, ybuhvalova
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