Enforce ordering on inclusion of resources, so that we can make site 
scheme CSS come before per-page CSS. Includes a hack to make some pages respect 
old behavior.

        Patch by fu. 

diffs (50 lines):

diff -r 42c3f204bf4e -r 4dfb22e5ba03 cgi-bin/bml/scheme/tropo-purple.look
--- a/cgi-bin/bml/scheme/tropo-purple.look      Mon Aug 23 18:33:10 2010 +0800
+++ b/cgi-bin/bml/scheme/tropo-purple.look      Thu Aug 26 23:27:05 2010 +0800
@@ -39,15 +39,15 @@ head<=
     <meta http-equiv="content-type" content="text/html; charset=utf-8" />
 
     <?_code
-        LJ::need_res( "stc/lj_base-app.css" );
-        LJ::need_res( "stc/tropo/reset.css" );
-        LJ::need_res( "stc/tropo/tropo-base.css" );
-        LJ::need_res( "stc/tropo/tropo-purple.css" );
+        LJ::need_res( { priority => $LJ::SCHEME_RES_PRIORITY }, 
"stc/lj_base-app.css" );
+        LJ::need_res( { priority => $LJ::SCHEME_RES_PRIORITY }, 
"stc/tropo/reset.css" );
+        LJ::need_res( { priority => $LJ::SCHEME_RES_PRIORITY }, 
"stc/tropo/tropo-base.css" );
+        LJ::need_res( { priority => $LJ::SCHEME_RES_PRIORITY }, 
"stc/tropo/tropo-purple.css" );
 
         # we support both old style and new style pages; only one of these 
will get
         # loaded ...
-        LJ::need_res( {group=>'jquery'}, "js/nav-jquery.js" );
-        LJ::need_res( {group=>'default'}, "js/nav.js" );
+        LJ::need_res( { group => 'jquery', priority => 
$LJ::SCHEME_RES_PRIORITY }, "js/nav-jquery.js" );
+        LJ::need_res( { group => 'default', priority => 
$LJ::SCHEME_RES_PRIORITY }, "js/nav.js" );
     _code?>
     <?_code LJ::res_includes(); _code?>
 
diff -r 42c3f204bf4e -r 4dfb22e5ba03 cgi-bin/bml/scheme/tropo-red.look
--- a/cgi-bin/bml/scheme/tropo-red.look Mon Aug 23 18:33:10 2010 +0800
+++ b/cgi-bin/bml/scheme/tropo-red.look Thu Aug 26 23:27:05 2010 +0800
@@ -39,15 +39,15 @@ head<=
     <meta http-equiv="content-type" content="text/html; charset=utf-8" />
 
     <?_code
-        LJ::need_res( "stc/lj_base-app.css" );
-        LJ::need_res( "stc/tropo/reset.css" );
-        LJ::need_res( "stc/tropo/tropo-base.css" );
-        LJ::need_res( "stc/tropo/tropo-red.css" );
+        LJ::need_res( { priority => $LJ::SCHEME_RES_PRIORITY }, 
"stc/lj_base-app.css" );
+        LJ::need_res( { priority => $LJ::SCHEME_RES_PRIORITY }, 
"stc/tropo/reset.css" );
+        LJ::need_res( { priority => $LJ::SCHEME_RES_PRIORITY }, 
"stc/tropo/tropo-base.css" );
+        LJ::need_res( { priority => $LJ::SCHEME_RES_PRIORITY }, 
"stc/tropo/tropo-red.css" );
 
         # we support both old style and new style pages; only one of these 
will get
         # loaded ...
-        LJ::need_res( {group=>'jquery'}, "js/nav-jquery.js" );
-        LJ::need_res( {group=>'default'}, "js/nav.js" );
+        LJ::need_res( { group => 'jquery', priority => 
$LJ::SCHEME_RES_PRIORITY }, "js/nav-jquery.js" );
+        LJ::need_res( { group => 'default', priority => 
$LJ::SCHEME_RES_PRIORITY }, "js/nav.js" );
     _code?>
     <?_code LJ::res_includes(); _code?>
 
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to