fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2010-08-26 03:28 pm

[dw-free] change order of need_res calls

[commit: http://hg.dwscoalition.org/dw-free/rev/7c9c6b2c951a]

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

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 (so that colors in per-page CSS don't clash with site scheme
colors); this is a temporary measure and should be removed as the CSS
framework is made consistent.

Patch by [personal profile] fu.

Files modified:
  • cgi-bin/DW/Controller/Shop.pm
  • cgi-bin/DW/Widget/ShopCartStatusBar.pm
  • cgi-bin/LJ/Setting/EmailPosting.pm
  • cgi-bin/LJ/Widget/LayoutChooser.pm
  • cgi-bin/LJ/Widget/LinksList.pm
  • cgi-bin/LJ/Widget/MoodThemeChooser.pm
  • cgi-bin/LJ/Widget/S2PropGroup.pm
  • cgi-bin/bml/scheme/blueshift.look
  • cgi-bin/bml/scheme/celerity.look
  • cgi-bin/bml/scheme/gradation-horizontal.look
  • cgi-bin/bml/scheme/gradation-vertical.look
  • cgi-bin/bml/scheme/lynx.look
  • cgi-bin/ljdefaults.pl
  • cgi-bin/ljlib.pl
  • cgi-bin/weblib.pl
  • htdocs/customize/index.bml
  • htdocs/editicons.bml
  • htdocs/edittags.bml
  • htdocs/login.bml
  • htdocs/manage/externalaccount.bml
  • htdocs/manage/profile/index.bml
  • htdocs/manage/settings/index.bml
  • htdocs/manage/subscriptions/filters.bml
  • htdocs/manage/tags.bml
  • htdocs/profile.bml
  • htdocs/shop/account.bml
  • htdocs/shop/cart.bml
  • htdocs/shop/checkout.bml
  • htdocs/shop/creditcard.bml
  • htdocs/shop/creditcard_wait.bml
  • htdocs/shop/entercc.bml
  • htdocs/shop/history.bml
  • htdocs/shop/renames.bml
  • htdocs/stc/editicons.css
  • htdocs/stc/gradation/gradation.css
  • htdocs/stc/settings-colors.css
  • htdocs/stc/settings.css
  • htdocs/stc/shop-colors.css
  • htdocs/stc/shop.css
  • htdocs/stc/widgets/createaccountnextsteps.css
  • htdocs/stc/widgets/createaccountprofile.css
  • htdocs/tools/importer.bml
  • htdocs/update.bml
--------------------------------------------------------------------------------
diff -r 820b3a80693f -r 7c9c6b2c951a cgi-bin/DW/Controller/Shop.pm
--- a/cgi-bin/DW/Controller/Shop.pm	Wed Aug 25 14:20:49 2010 -0500
+++ b/cgi-bin/DW/Controller/Shop.pm	Thu Aug 26 23:28:16 2010 +0800
@@ -54,6 +54,7 @@ sub _shop_controller {
 
     # the entire shop uses these files
     LJ::need_res( 'stc/shop.css' );
+    LJ::need_res( { priority => $LJ::OLD_RES_PRIORITY }, 'stc/shop-colors.css' );
     LJ::set_active_resource_group( 'jquery' );
 
     # figure out what shop/cart to use
diff -r 820b3a80693f -r 7c9c6b2c951a cgi-bin/DW/Widget/ShopCartStatusBar.pm
--- a/cgi-bin/DW/Widget/ShopCartStatusBar.pm	Wed Aug 25 14:20:49 2010 -0500
+++ b/cgi-bin/DW/Widget/ShopCartStatusBar.pm	Thu Aug 26 23:28:16 2010 +0800
@@ -23,7 +23,8 @@ use Carp qw/ croak /;
 
 use DW::Shop;
 
-sub need_res { qw( stc/shop.css ) }
+sub need_res { qw( stc/shop.css stc/shop-colors.css ) }
+sub need_res_opts { priority => $LJ::OLD_RES_PRIORITY }
 
 sub render_body {
     my ( $class, %opts ) = @_;
diff -r 820b3a80693f -r 7c9c6b2c951a cgi-bin/LJ/Setting/EmailPosting.pm
--- a/cgi-bin/LJ/Setting/EmailPosting.pm	Wed Aug 25 14:20:49 2010 -0500
+++ b/cgi-bin/LJ/Setting/EmailPosting.pm	Thu Aug 26 23:28:16 2010 +0800
@@ -64,7 +64,7 @@ sub option {
                 size => 40,
                 maxlength => 80,
             });
-            $ret .= " <label for='${key}emailposting_senderrors$i' style='color: #000;'>";
+            $ret .= " <label for='${key}emailposting_senderrors$i'>";
             $ret .= $class->ml( 'setting.emailposting.option.senderrors' ) . "</label>";
             $ret .= " " . LJ::html_check( {
                 name => "${key}emailposting_senderrors$i",
@@ -76,7 +76,7 @@ sub option {
                             ? 1 : 0,
             } );
             $ret .= "<br />";
-            $ret .= " <label for='${key}emailposting_helpmessage$i' style='color: #000;'>";
+            $ret .= " <label for='${key}emailposting_helpmessage$i'>";
             $ret .= $class->ml( 'setting.emailposting.option.helpmessage' ) . "</label>";
             $ret .= " " . LJ::html_check( {
                 name => "${key}emailposting_helpmessage$i",
diff -r 820b3a80693f -r 7c9c6b2c951a cgi-bin/LJ/Widget/LayoutChooser.pm
--- a/cgi-bin/LJ/Widget/LayoutChooser.pm	Wed Aug 25 14:20:49 2010 -0500
+++ b/cgi-bin/LJ/Widget/LayoutChooser.pm	Thu Aug 26 23:28:16 2010 +0800
@@ -21,6 +21,7 @@ sub ajax { 1 }
 sub ajax { 1 }
 sub authas { 1 }
 sub need_res { qw( stc/widgets/layoutchooser.css ) }
+sub need_res_opts { priority => $LJ::OLD_RES_PRIORITY }
 
 sub render_body {
     my $class = shift;
diff -r 820b3a80693f -r 7c9c6b2c951a cgi-bin/LJ/Widget/LinksList.pm
--- a/cgi-bin/LJ/Widget/LinksList.pm	Wed Aug 25 14:20:49 2010 -0500
+++ b/cgi-bin/LJ/Widget/LinksList.pm	Thu Aug 26 23:28:16 2010 +0800
@@ -19,6 +19,7 @@ use Carp qw(croak);
 
 sub authas { 1 }
 sub need_res { qw( stc/widgets/linkslist.css ) }
+sub need_res_opts { priority => $LJ::OLD_RES_PRIORITY }
 
 sub render_body {
     my $class = shift;
diff -r 820b3a80693f -r 7c9c6b2c951a cgi-bin/LJ/Widget/MoodThemeChooser.pm
--- a/cgi-bin/LJ/Widget/MoodThemeChooser.pm	Wed Aug 25 14:20:49 2010 -0500
+++ b/cgi-bin/LJ/Widget/MoodThemeChooser.pm	Thu Aug 26 23:28:16 2010 +0800
@@ -21,6 +21,7 @@ sub ajax { 1 }
 sub ajax { 1 }
 sub authas { 1 }
 sub need_res { qw( stc/widgets/moodthemechooser.css ) }
+sub need_res_opts { priority => $LJ::OLD_RES_PRIORITY }
 
 sub render_body {
     my $class = shift;
diff -r 820b3a80693f -r 7c9c6b2c951a cgi-bin/LJ/Widget/S2PropGroup.pm
--- a/cgi-bin/LJ/Widget/S2PropGroup.pm	Wed Aug 25 14:20:49 2010 -0500
+++ b/cgi-bin/LJ/Widget/S2PropGroup.pm	Thu Aug 26 23:28:16 2010 +0800
@@ -20,6 +20,7 @@ use LJ::Customize;
 
 sub authas { 1 }
 sub need_res { qw( stc/widgets/s2propgroup.css js/colorpicker.js ) }
+sub need_res_opts { ( priority => $LJ::OLD_RES_PRIORITY ) }
 
 sub render_body {
     my $class = shift;
diff -r 820b3a80693f -r 7c9c6b2c951a cgi-bin/bml/scheme/blueshift.look
--- a/cgi-bin/bml/scheme/blueshift.look	Wed Aug 25 14:20:49 2010 -0500
+++ b/cgi-bin/bml/scheme/blueshift.look	Thu Aug 26 23:28:16 2010 +0800
@@ -40,8 +40,8 @@ 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/blueshift/blueshift.css" );
+        LJ::need_res( { priority => $LJ::SCHEME_RES_PRIORITY }, "stc/lj_base-app.css" );
+        LJ::need_res( { priority => $LJ::SCHEME_RES_PRIORITY }, "stc/blueshift/blueshift.css" );
 
     _code?>
     <?_code LJ::res_includes(); _code?>
diff -r 820b3a80693f -r 7c9c6b2c951a cgi-bin/bml/scheme/celerity.look
--- a/cgi-bin/bml/scheme/celerity.look	Wed Aug 25 14:20:49 2010 -0500
+++ b/cgi-bin/bml/scheme/celerity.look	Thu Aug 26 23:28:16 2010 +0800
@@ -40,8 +40,8 @@ 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/celerity/celerity.css" );
+        LJ::need_res( { priority => $LJ::SCHEME_RES_PRIORITY }, "stc/lj_base-app.css" );
+        LJ::need_res( { priority => $LJ::SCHEME_RES_PRIORITY }, "stc/celerity/celerity.css" );
 
     _code?>
     <?_code LJ::res_includes(); _code?>
diff -r 820b3a80693f -r 7c9c6b2c951a cgi-bin/bml/scheme/gradation-horizontal.look
--- a/cgi-bin/bml/scheme/gradation-horizontal.look	Wed Aug 25 14:20:49 2010 -0500
+++ b/cgi-bin/bml/scheme/gradation-horizontal.look	Thu Aug 26 23:28:16 2010 +0800
@@ -40,11 +40,11 @@ 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/gradation/gradation.css" );
+        LJ::need_res( { priority => $LJ::SCHEME_RES_PRIORITY }, "stc/lj_base-app.css" );
+        LJ::need_res( { priority => $LJ::SCHEME_RES_PRIORITY }, "stc/gradation/gradation.css" );
 
-        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 820b3a80693f -r 7c9c6b2c951a cgi-bin/bml/scheme/gradation-vertical.look
--- a/cgi-bin/bml/scheme/gradation-vertical.look	Wed Aug 25 14:20:49 2010 -0500
+++ b/cgi-bin/bml/scheme/gradation-vertical.look	Thu Aug 26 23:28:16 2010 +0800
@@ -40,8 +40,8 @@ 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/gradation/gradation.css" );
+        LJ::need_res( { priority => $LJ::SCHEME_RES_PRIORITY }, "stc/lj_base-app.css" );
+        LJ::need_res( { priority => $LJ::SCHEME_RES_PRIORITY }, "stc/gradation/gradation.css" );
 
     _code?>
     <?_code LJ::res_includes(); _code?>
diff -r 820b3a80693f -r 7c9c6b2c951a cgi-bin/bml/scheme/lynx.look
--- a/cgi-bin/bml/scheme/lynx.look	Wed Aug 25 14:20:49 2010 -0500
+++ b/cgi-bin/bml/scheme/lynx.look	Thu Aug 26 23:28:16 2010 +0800
@@ -32,7 +32,7 @@ page<=
 <link rel="help" title="<?_ml lynx.nav.help _ml?>" href="<?siteroot?>/support/" />
 <?_code
     use strict;
-    LJ::need_res("stc/lj_base-app.css");
+    LJ::need_res( { priority => $LJ::SCHEME_RES_PRIORITY }, "stc/lj_base-app.css" );
 
     my $crumb_up;
     if (LJ::get_active_crumb() ne '') {
diff -r 820b3a80693f -r 7c9c6b2c951a cgi-bin/ljdefaults.pl
--- a/cgi-bin/ljdefaults.pl	Wed Aug 25 14:20:49 2010 -0500
+++ b/cgi-bin/ljdefaults.pl	Thu Aug 26 23:28:16 2010 +0800
@@ -315,9 +315,22 @@
     # default to limit to 50,000 watch or trust edges to load
     $LJ::MAX_WT_EDGES_LOAD ||= 50_000;
 
-
     # to avoid S2 error "Excessive recursion detected and stopped."
     $S2::MAX_RECURSION ||= 500;
+
+    # not expected to need to be changed
+    # default priority for libraries and resources in a sitescheme,
+    # so that they come before any stylesheets declared by the page itself
+    $LJ::LIB_RES_PRIORITY = 3;
+    $LJ::SCHEME_RES_PRIORITY = 2;
+
+    # FIXME: remove the need for this, it's a hack of a hack of a hack
+    # it used to be that site scheme pages were called later than page-level CSS
+    # so page-level CSS was written with that assumption, and overrode some colors
+    # now that site scheme pages are called earlier than page-level CSS
+    # (as they should be) some pages look weird.
+    # So let us temporarily force old behavior on existing files
+    $LJ::OLD_RES_PRIORITY = 5;
 }
 
 
diff -r 820b3a80693f -r 7c9c6b2c951a cgi-bin/ljlib.pl
--- a/cgi-bin/ljlib.pl	Wed Aug 25 14:20:49 2010 -0500
+++ b/cgi-bin/ljlib.pl	Thu Aug 26 23:28:16 2010 +0800
@@ -1328,7 +1328,7 @@ sub start_request
         # note that we're calling need_res and advising that these items
         # are the new style global items
 
-        LJ::need_res( {group=>'jquery'},
+        LJ::need_res( { group => 'jquery', priority => $LJ::LIB_RES_PRIORITY },
             # jquery library is the big one, load first
             $LJ::IS_DEV_SERVER ?
                 'js/jquery/jquery-1.4.2.js' :
@@ -1343,7 +1343,7 @@ sub start_request
         # old/standard libraries are below here.
 
         # standard site-wide JS and CSS
-        LJ::need_res(qw(
+        LJ::need_res( { priority => $LJ::LIB_RES_PRIORITY }, qw(
                         js/core.js
                         js/dom.js
                         js/httpreq.js
@@ -1352,14 +1352,14 @@ sub start_request
                         ));
 
         # esn ajax
-        LJ::need_res(qw(
+        LJ::need_res( { priority => $LJ::LIB_RES_PRIORITY }, qw(
                         js/esn.js
                         stc/esn.css
                         ))
             if LJ::is_enabled('esn_ajax');
 
         # contextual popup JS
-        LJ::need_res(qw(
+        LJ::need_res( { priority => $LJ::LIB_RES_PRIORITY }, qw(
                         js/ippu.js
                         js/lj_ippu.js
                         js/hourglass.js
@@ -1369,7 +1369,7 @@ sub start_request
             if $LJ::CTX_POPUP;
 
         # development JS
-        LJ::need_res(qw(
+        LJ::need_res( { priority => $LJ::LIB_RES_PRIORITY }, qw(
                         js/devel.js
                         js/livejournal-devel.js
                         ))
diff -r 820b3a80693f -r 7c9c6b2c951a cgi-bin/weblib.pl
--- a/cgi-bin/weblib.pl	Wed Aug 25 14:20:49 2010 -0500
+++ b/cgi-bin/weblib.pl	Thu Aug 26 23:28:16 2010 +0800
@@ -2153,6 +2153,9 @@ sub need_res {
 
     my $group = $opts{group};
 
+    # higher priority means it comes first in the ordering
+    my $priority = $opts{priority} || 0;
+
     foreach my $reskey (@_) {
         die "Bogus reskey $reskey" unless $reskey =~ m!^(js|stc)/!;
 
@@ -2160,7 +2163,9 @@ sub need_res {
         # since we need CSS everywhere and we are switching JS groups
         my $lgroup = $group || ( $reskey =~ /^js/ ? 'default' : 'all' );
         unless ($LJ::NEEDED_RES{$lgroup}->{$reskey}++) {
-            push @LJ::NEEDED_RES, [ $lgroup, $reskey ];
+            $LJ::NEEDED_RES[$priority] ||= [];
+
+            push @{$LJ::NEEDED_RES[$priority]}, [ $lgroup, $reskey ];
         }
     }
 }
@@ -2269,39 +2274,42 @@ sub res_includes {
         $oldest{$type} = $modtime if $modtime > $oldest{$type};
     };
 
-    foreach my $resrow (@LJ::NEEDED_RES) {
+    foreach my $by_priority ( reverse @LJ::NEEDED_RES ) {
+        next unless $by_priority;
 
-        # determine if this resource is part of the resource group that is active;
-        # or 'default' if no group explicitly active
-        my ( $group, $key ) = @$resrow;
-        next if
-            $group ne 'all' &&
-            ( ( defined $LJ::ACTIVE_RES_GROUP && $group ne $LJ::ACTIVE_RES_GROUP ) ||
-              ( ! defined $LJ::ACTIVE_RES_GROUP && $group ne 'default' ) );
-
-        my $path;
-        my $mtime = _file_modtime($key, $now);
-        if ($key =~ m!^stc/fck/! || $LJ::FORCE_WSTAT{$key}) {
-            $path = "w$key";  # wstc/ instead of stc/
-        } else {
-            $path = $key;
-        }
-
-        # if we want to also include a local version of this file, include that too
-        if (@LJ::USE_LOCAL_RES) {
-            if (grep { lc $_ eq lc $key } @LJ::USE_LOCAL_RES) {
-                my $inc = $key;
-                $inc =~ s/(\w+)\.(\w+)$/$1-local.$2/;
-                LJ::need_res($inc);
+        foreach my $resrow ( @$by_priority ) {
+            # determine if this resource is part of the resource group that is active;
+            # or 'default' if no group explicitly active
+            my ( $group, $key ) = @$resrow;
+            next if
+                $group ne 'all' &&
+                ( ( defined $LJ::ACTIVE_RES_GROUP && $group ne $LJ::ACTIVE_RES_GROUP ) ||
+                  ( ! defined $LJ::ACTIVE_RES_GROUP && $group ne 'default' ) );
+    
+            my $path;
+            my $mtime = _file_modtime($key, $now);
+            if ($key =~ m!^stc/fck/! || $LJ::FORCE_WSTAT{$key}) {
+                $path = "w$key";  # wstc/ instead of stc/
+            } else {
+                $path = $key;
             }
-        }
-
-        if ($path =~ m!^js/(.+)!) {
-            $add->('js', $1, $mtime);
-        } elsif ($path =~ /\.css$/ && $path =~ m!^(w?)stc/(.+)!) {
-            $add->("${1}stccss", $2, $mtime);
-        } elsif ($path =~ /\.js$/ && $path =~ m!^(w?)stc/(.+)!) {
-            $add->("${1}stcjs", $2, $mtime);
+    
+            # if we want to also include a local version of this file, include that too
+            if (@LJ::USE_LOCAL_RES) {
+                if (grep { lc $_ eq lc $key } @LJ::USE_LOCAL_RES) {
+                    my $inc = $key;
+                    $inc =~ s/(\w+)\.(\w+)$/$1-local.$2/;
+                    LJ::need_res($inc);
+                }
+            }
+    
+            if ($path =~ m!^js/(.+)!) {
+                $add->('js', $1, $mtime);
+            } elsif ($path =~ /\.css$/ && $path =~ m!^(w?)stc/(.+)!) {
+                $add->("${1}stccss", $2, $mtime);
+            } elsif ($path =~ /\.js$/ && $path =~ m!^(w?)stc/(.+)!) {
+                $add->("${1}stcjs", $2, $mtime);
+            }
         }
     }
 
diff -r 820b3a80693f -r 7c9c6b2c951a htdocs/customize/index.bml
--- a/htdocs/customize/index.bml	Wed Aug 25 14:20:49 2010 -0500
+++ b/htdocs/customize/index.bml	Thu Aug 26 23:28:16 2010 +0800
@@ -18,7 +18,8 @@ body<=
 {
     use strict;
     use vars qw(%GET %POST $title $headextra @errors @warnings);
-    LJ::need_res(qw( stc/customize.css js/customize.js ));
+    LJ::need_res( { priority => $LJ::OLD_RES_PRIORITY }, "stc/customize.css" );
+    LJ::need_res( "js/customize.js" );
 
     $title = $ML{'.title2'};
 
diff -r 820b3a80693f -r 7c9c6b2c951a htdocs/editicons.bml
--- a/htdocs/editicons.bml	Wed Aug 25 14:20:49 2010 -0500
+++ b/htdocs/editicons.bml	Thu Aug 26 23:28:16 2010 +0800
@@ -47,7 +47,6 @@ use strict;
     }
 
     LJ::need_res(qw(
-                    stc/lj_base.css
                     stc/editicons.css
                     js/progressbar.js
                     js/ljprogressbar.js
@@ -350,7 +349,7 @@ use strict;
             # upload form (with perlbal upload-tracking)
             $body .= qq {
                 <iframe name='upiframe' width='1' height='1' style='border: none'></iframe>
-                <div id='uploadBox' class='pkg'><div id='uploadBox-inner'>
+                <div id='uploadBox' class='box pkg'><div id='uploadBox-inner'>
                     <form enctype="multipart/form-data" action="editicons$suffix$getextra" method='post' id='uploadPic'>
                     <input type="hidden" id="go_to" name="go_to" value="editicons$suffix$getextra" />
             };
diff -r 820b3a80693f -r 7c9c6b2c951a htdocs/edittags.bml
--- a/htdocs/edittags.bml	Wed Aug 25 14:20:49 2010 -0500
+++ b/htdocs/edittags.bml	Thu Aug 26 23:28:16 2010 +0800
@@ -26,7 +26,8 @@ body<=
     my $err = sub { return "<?h1 $ML{'Error'} h1?><?p $_[0] p?>"; };
     return $err->($ML{'.disabled'}) unless LJ::is_enabled('tags');
 
-    LJ::need_res("stc/tags.css", "js/tags.js");
+    LJ::need_res( "js/tags.js" );
+    LJ::need_res( { priority => $LJ::OLD_RES_PRIORITY }, "stc/tags.css" );
 
     my ($ret, $msg);
 
diff -r 820b3a80693f -r 7c9c6b2c951a htdocs/login.bml
--- a/htdocs/login.bml	Wed Aug 25 14:20:49 2010 -0500
+++ b/htdocs/login.bml	Thu Aug 26 23:28:16 2010 +0800
@@ -153,7 +153,7 @@ _c?>
             $body .= "<form action='login$getextra' method='post' id='login'>\n";
             $body .= LJ::form_auth();
             $body .= "<?h2 $ML{'.login.changelog'} h2?>";
-            $body .= "<table cellpadding='3' style='width: 300px; background-color: #ededed; border: 1px solid #aaa'>\n";
+            $body .= "<table cellpadding='3' class='solid-neutral' style='width: 300px; border: 1px solid #aaa'>\n";
             $body .= "<tr><td colspan='2' style='white-space: nowrap;'>";
             # expiration
             my $curexp = $cursess ? $cursess->exptype : "short";
diff -r 820b3a80693f -r 7c9c6b2c951a htdocs/manage/externalaccount.bml
--- a/htdocs/manage/externalaccount.bml	Wed Aug 25 14:20:49 2010 -0500
+++ b/htdocs/manage/externalaccount.bml	Thu Aug 26 23:28:16 2010 +0800
@@ -27,6 +27,7 @@ use strict;
     BML::set_language_scope('/manage/externalaccount.bml');
 
     LJ::need_res("stc/settings.css", "js/externalaccount.js");
+    LJ::need_res( { priority => $LJ::OLD_RES_PRIORITY }, "stc/settings-colors.css" );
     LJ::set_active_crumb('manage');
 
     my $remote = LJ::get_remote();
diff -r 820b3a80693f -r 7c9c6b2c951a htdocs/manage/profile/index.bml
--- a/htdocs/manage/profile/index.bml	Wed Aug 25 14:20:49 2010 -0500
+++ b/htdocs/manage/profile/index.bml	Thu Aug 26 23:28:16 2010 +0800
@@ -22,7 +22,7 @@ body<=
     use LJ::Setting;
 
     LJ::set_active_crumb('editprofile');
-    LJ::need_res('stc/lj_base.css', 'stc/lj_settings.css');
+    LJ::need_res( { priority => $LJ::OLD_RES_PRIORITY }, 'stc/lj_settings.css' );
 
     return LJ::server_down_html() if $LJ::SERVER_DOWN;
 
diff -r 820b3a80693f -r 7c9c6b2c951a htdocs/manage/settings/index.bml
--- a/htdocs/manage/settings/index.bml	Wed Aug 25 14:20:49 2010 -0500
+++ b/htdocs/manage/settings/index.bml	Thu Aug 26 23:28:16 2010 +0800
@@ -22,6 +22,7 @@ body<=
     BML::set_language_scope('/manage/settings/index.bml');
 
     LJ::need_res("stc/settings.css", "js/settings.js");
+    LJ::need_res( { priority => $LJ::OLD_RES_PRIORITY }, "stc/settings-colors.css" );
     LJ::set_active_crumb('manage');
 
     my $remote = LJ::get_remote();
diff -r 820b3a80693f -r 7c9c6b2c951a htdocs/manage/subscriptions/filters.bml
--- a/htdocs/manage/subscriptions/filters.bml	Wed Aug 25 14:20:49 2010 -0500
+++ b/htdocs/manage/subscriptions/filters.bml	Thu Aug 26 23:28:16 2010 +0800
@@ -22,7 +22,8 @@ body<=
 
     # this is how you include custom CSS/JS/etc
     LJ::set_active_resource_group( 'jquery' );
-    LJ::need_res( {group=>'jquery'}, qw# js/subfilters.js stc/subfilters.css js/json2.js # );
+    LJ::need_res( { priority => $LJ::OLD_RES_PRIORITY }, qw# stc/subfilters.css # );
+    LJ::need_res( { group => 'jquery' }, qw# js/subfilters.js js/json2.js # );
 
     # for pages that require authentication
     my $remote = LJ::get_remote();
diff -r 820b3a80693f -r 7c9c6b2c951a htdocs/manage/tags.bml
--- a/htdocs/manage/tags.bml	Wed Aug 25 14:20:49 2010 -0500
+++ b/htdocs/manage/tags.bml	Thu Aug 26 23:28:16 2010 +0800
@@ -27,7 +27,8 @@ body<=
     my $remote = LJ::get_remote();
     return "<?needlogin?>" unless $remote;
 
-    LJ::need_res("stc/tags.css", "js/tags.js");
+    LJ::need_res( "js/tags.js" );
+    LJ::need_res( { priority => $LJ::OLD_RES_PRIORITY }, "stc/tags.css" );
 
    $headextra = <<HEAD;
 <script type="text/javascript">
diff -r 820b3a80693f -r 7c9c6b2c951a htdocs/profile.bml
--- a/htdocs/profile.bml	Wed Aug 25 14:20:49 2010 -0500
+++ b/htdocs/profile.bml	Thu Aug 26 23:28:16 2010 +0800
@@ -22,7 +22,8 @@ body<=
     use strict;
     use vars qw/ %GET %POST $title $windowtitle $headextra @errors @warnings /;
 
-    LJ::need_res( qw( stc/profile.css js/profile.js ) );
+    LJ::need_res( "js/profile.js" );
+    LJ::need_res( { priority => $LJ::OLD_RES_PRIORITY }, "stc/profile.css" );
 
     BML::set_language_scope( '/profile.bml' );
 
diff -r 820b3a80693f -r 7c9c6b2c951a htdocs/shop/account.bml
--- a/htdocs/shop/account.bml	Wed Aug 25 14:20:49 2010 -0500
+++ b/htdocs/shop/account.bml	Thu Aug 26 23:28:16 2010 +0800
@@ -27,6 +27,7 @@ body<=
 
     # this page uses new style JS
     LJ::need_res( 'stc/shop.css' );
+    LJ::need_res( { priority => $LJ::OLD_RES_PRIORITY }, 'stc/shop-colors.css' );
     LJ::set_active_resource_group( 'jquery' );
 
     # let's see what they're trying to do
diff -r 820b3a80693f -r 7c9c6b2c951a htdocs/shop/cart.bml
--- a/htdocs/shop/cart.bml	Wed Aug 25 14:20:49 2010 -0500
+++ b/htdocs/shop/cart.bml	Thu Aug 26 23:28:16 2010 +0800
@@ -26,6 +26,7 @@ body<=
 
     # this page uses new style JS
     LJ::need_res( 'stc/shop.css' );
+    LJ::need_res( { priority => $LJ::OLD_RES_PRIORITY }, 'stc/shop-colors.css' );
     LJ::set_active_resource_group( 'jquery' );
 
     $title = $ML{'.title'};
diff -r 820b3a80693f -r 7c9c6b2c951a htdocs/shop/checkout.bml
--- a/htdocs/shop/checkout.bml	Wed Aug 25 14:20:49 2010 -0500
+++ b/htdocs/shop/checkout.bml	Thu Aug 26 23:28:16 2010 +0800
@@ -28,6 +28,7 @@ body<=
 
     # this page uses new style JS
     LJ::need_res( 'stc/shop.css' );
+    LJ::need_res( { priority => $LJ::OLD_RES_PRIORITY }, 'stc/shop-colors.css' );
     LJ::set_active_resource_group( 'jquery' );
 
     my $err = DW::Shop->remote_sysban_check;
diff -r 820b3a80693f -r 7c9c6b2c951a htdocs/shop/creditcard.bml
--- a/htdocs/shop/creditcard.bml	Wed Aug 25 14:20:49 2010 -0500
+++ b/htdocs/shop/creditcard.bml	Thu Aug 26 23:28:16 2010 +0800
@@ -28,6 +28,7 @@ body<=
 
     # this page uses new style JS
     LJ::need_res( 'stc/shop.css' );
+    LJ::need_res( { priority => $LJ::OLD_RES_PRIORITY }, 'stc/shop-colors.css' );
     LJ::set_active_resource_group( 'jquery' );
 
     my $err = DW::Shop->remote_sysban_check;
diff -r 820b3a80693f -r 7c9c6b2c951a htdocs/shop/creditcard_wait.bml
--- a/htdocs/shop/creditcard_wait.bml	Wed Aug 25 14:20:49 2010 -0500
+++ b/htdocs/shop/creditcard_wait.bml	Thu Aug 26 23:28:16 2010 +0800
@@ -29,6 +29,7 @@ body<=
 
     # this page uses new style JS
     LJ::need_res( 'stc/shop.css' );
+    LJ::need_res( { priority => $LJ::OLD_RES_PRIORITY }, 'stc/shop-colors.css' );
     LJ::set_active_resource_group( 'jquery' );
 
     # see they got here ok
diff -r 820b3a80693f -r 7c9c6b2c951a htdocs/shop/entercc.bml
--- a/htdocs/shop/entercc.bml	Wed Aug 25 14:20:49 2010 -0500
+++ b/htdocs/shop/entercc.bml	Thu Aug 26 23:28:16 2010 +0800
@@ -41,6 +41,7 @@ body<=
 
     # this page uses new style JS
     LJ::need_res( 'stc/shop.css' );
+    LJ::need_res( { priority => $LJ::OLD_RES_PRIORITY }, 'stc/shop-colors.css' );
     LJ::set_active_resource_group( 'jquery' );
 
     # get their shop/cart
diff -r 820b3a80693f -r 7c9c6b2c951a htdocs/shop/history.bml
--- a/htdocs/shop/history.bml	Wed Aug 25 14:20:49 2010 -0500
+++ b/htdocs/shop/history.bml	Thu Aug 26 23:28:16 2010 +0800
@@ -27,6 +27,7 @@ body<=
 
     # this page uses new style JS
     LJ::need_res( 'stc/shop.css' );
+    LJ::need_res( { priority => $LJ::OLD_RES_PRIORITY }, 'stc/shop-colors.css' );
     LJ::set_active_resource_group( 'jquery' );
 
     my @carts = DW::Shop::Cart->get_all( $remote, finished => 1 );
diff -r 820b3a80693f -r 7c9c6b2c951a htdocs/shop/renames.bml
--- a/htdocs/shop/renames.bml	Wed Aug 25 14:20:49 2010 -0500
+++ b/htdocs/shop/renames.bml	Thu Aug 26 23:28:16 2010 +0800
@@ -25,6 +25,7 @@ body<=
 
     # this page uses new style JS
     LJ::need_res( 'stc/shop.css' );
+    LJ::need_res( { priority => $LJ::OLD_RES_PRIORITY }, 'stc/shop-colors.css' );
     LJ::set_active_resource_group( 'jquery' );
 
     # let's see what they're trying to do
diff -r 820b3a80693f -r 7c9c6b2c951a htdocs/stc/editicons.css
--- a/htdocs/stc/editicons.css	Wed Aug 25 14:20:49 2010 -0500
+++ b/htdocs/stc/editicons.css	Thu Aug 26 23:28:16 2010 +0800
@@ -21,11 +21,15 @@ hr {
 #userpic_authas {
     margin-bottom: 10px;
 }
+.box {
+    background-color: #eee;
+}
+
 #uploadBox {
     float: left;
     width: 300px;
     margin: 0 15px 0 0;
-	background: #eee; }
+}
 	
 #uploadBox-inner  {
     padding: 6px 12px;
diff -r 820b3a80693f -r 7c9c6b2c951a htdocs/stc/gradation/gradation.css
--- a/htdocs/stc/gradation/gradation.css	Wed Aug 25 14:20:49 2010 -0500
+++ b/htdocs/stc/gradation/gradation.css	Thu Aug 26 23:28:16 2010 +0800
@@ -926,7 +926,7 @@ table.editfilters td {
 }
 
 .appwidget-createaccountprogressmeter .step-next {
-    color: #111111;
+    color: #666666;
 }
 
 .appwidget-createaccountprofile .header {
@@ -935,6 +935,14 @@ table.editfilters td {
 
 .appwidget-createaccountprofile .field-name {
     background-color: #e0e0e0;
+}
+
+.error-list {
+    background-color: #916E10;
+}
+
+.errors-present, li.formitemFlag {
+    color: #731815;
 }
 
 
diff -r 820b3a80693f -r 7c9c6b2c951a htdocs/stc/settings-colors.css
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/htdocs/stc/settings-colors.css	Thu Aug 26 23:28:16 2010 +0800
@@ -0,0 +1,37 @@
+/* Common */
+.disabled {
+    color: #999;
+}
+#settings_save {
+    background: #eee;
+}
+
+/* Tabs */
+#settings_nav li a {
+    color: #000;
+    background: #ddd;
+	border: 1px solid #ccc;
+}
+
+#settings_nav li a:hover, #settings_nav li a.active {
+    background: #eee;
+}
+#settings_nav li.disabled {
+    color: #999;
+    background: #efefef;
+    border: 1px solid #ccc;
+}
+#settings_nav_title p {
+    background: #eee;
+	border-left: 1px solid #ccc;
+}
+.account td, .display td, .mobile td, .privacy td, .history td, .othersites td {
+    border-bottom: 1px #ccc solid;
+}
+.display_option, .mobile_option, .privacy_option, .othersites_option {
+    color: #000;
+}
+.xpost_footer_preview {
+    border: 1px solid #000000;
+    background: #EEEEEE;
+}
diff -r 820b3a80693f -r 7c9c6b2c951a htdocs/stc/settings.css
--- a/htdocs/stc/settings.css	Wed Aug 25 14:20:49 2010 -0500
+++ b/htdocs/stc/settings.css	Thu Aug 26 23:28:16 2010 +0800
@@ -5,9 +5,6 @@
 }
 .smaller {
     font-size: 11px;
-}
-.disabled {
-    color: #999;
 }
 
 /* Layout */
@@ -18,7 +15,6 @@
     min-width: 625px;
 }
 #settings_save {
-    background: #eee;
     padding: 5px 7px;
 }
 
@@ -32,33 +28,22 @@
     float: left;
 }
 #settings_nav li a {
-    color: #000;
     text-decoration: none;
     display: block;
     margin-right: 5px;
     padding: 2px 7px;
     font-weight: bold;
-    background: #ddd;
-	border: 1px solid #ccc;
 	border-bottom: none;
-}
-#settings_nav li a:hover, #settings_nav li a.active {
-    background: #eee;
 }
 #settings_nav li.disabled {
     display: block;
     margin-right: 5px;
     padding: 2px 7px;
     font-weight: bold;
-    color: #999;
-    background: #efefef;
-    border: 1px solid #ccc;
 	border-bottom: none;
 }
 #settings_nav_title p {
     clear: left;
-    background: #eee;
-	border-left: 1px solid #ccc;
     padding: 4px 10px;
     display: block;
     margin: 0;
@@ -66,25 +51,21 @@
 }
 
 /* Shared Content */
-.account table, .display table, .mobile table, .privacy table, .history table, .advertising table, .othersites table {
+.account table, .display table, .mobile table, .privacy table, .history table, .othersites table {
     width: 100%;
 }
-.account td, .display td, .mobile td, .privacy td, .history td, .advertising td, .othersites td {
-    border-bottom: 1px #ccc solid;
+.account td, .display td, .mobile td, .privacy td, .history td, .othersites td {
     padding: 10px 10px 10px 5px;
 }
-.account td.last, .display td.last, .mobile td.last, .privacy td.last, .history td.last, .advertising td.last, .othersites td.last {
+.account td.last, .display td.last, .mobile td.last, .privacy td.last, .history td.last, .othersites td.last {
     border-bottom: none;
 }
-.account td.help, .display td.help, .mobile td.help, .privacy td.help, .history td.help, .advertising td.help, .othersites td.help {
+.account td.help, .display td.help, .mobile td.help, .privacy td.help, .history td.help, .othersites td.help {
     width: 14px;
     text-align: right;
 }
 .account_label, .display_label, .mobile_label, .privacy_label, .history_label, .othersites_label {
     font-weight: bold;
-}
-.display_option, .mobile_option, .privacy_option, .othersites_option {
-    color: #000;
 }
 
 /* Account Content */
@@ -95,7 +76,6 @@
     text-align: right;
 }
 .account_stats {
-    /*background: #eee;*/
     padding: 5px 10px;
     line-height: 18px;
 }
@@ -122,7 +102,6 @@
 }
 .mobile td.setting_label {
     text-align: right;
-    /*color: #000;*/
 }
 .mobile_label, .mobile .help {
     vertical-align: top;
@@ -139,29 +118,7 @@
     margin-bottom: 0;
 }
 
-/* Advertising Content */
-.advertising table.setting_table {
-    width: auto;
-    margin: 0;
-}
-.advertising table.setting_table td {
-    border: 0;
-    padding: 0;
-    vertical-align: top;
-}
-.advertising p {
-    margin-top: 0;
-}
-.advertising .example {
-    font-size: .8em;
-    color: #666;
-}
-.advertising .category {
-    padding-left: 1px;
-    margin-bottom: 10px;
-    margin-left: 20px;
-}
-
+/* other sites */
 .othersites table.setting_table td.checkbox {
     text-align: center;
 }
@@ -171,8 +128,6 @@
 }
 
 .xpost_footer_preview {
-    border: 1px solid #000000;
     width: 100%;
-    background: #EEEEEE;
     padding: 10px 5px 10px 5px;
 }
diff -r 820b3a80693f -r 7c9c6b2c951a htdocs/stc/shop-colors.css
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/htdocs/stc/shop-colors.css	Thu Aug 26 23:28:16 2010 +0800
@@ -0,0 +1,32 @@
+.shopbox, div.appwidget-shopitemgroupdisplay {
+    border: 1px solid #c1272d;
+}
+.shop-account-status {
+    border: solid 1px #c1272d;
+    background-color: #ffff00;
+}
+.shop-error {
+    border: 1px solid #c1272d;
+}
+.shop-cart-status {
+    border: 1px solid #c1272d;
+    background-color: #c5c5c5;
+}
+.shop-cart th {
+    background-color: #c5c5c5;
+}
+.shop-cart td, .shop-cart th {
+    border: 1px solid #c1272d;
+}
+.shop-cart td.total {
+    background-color: #e0e0e0;
+}
+.shop-item-highlight {
+    color: #c1272d;
+}
+.ccrowerr {
+    background-color: #ccc;
+}
+.shop-points-status {
+    border: 1px solid #c1272d;
+}
diff -r 820b3a80693f -r 7c9c6b2c951a htdocs/stc/shop.css
--- a/htdocs/stc/shop.css	Wed Aug 25 14:20:49 2010 -0500
+++ b/htdocs/stc/shop.css	Thu Aug 26 23:28:16 2010 +0800
@@ -16,7 +16,6 @@
 
 
 .shopbox, div.appwidget-shopitemgroupdisplay {
-    border: 1px solid #c1272d;
     margin: 10px;
     padding: 5px;
     min-width: 30em;
@@ -32,8 +31,6 @@
 }
 
 .shop-account-status {
-    border: solid 1px #c1272d;
-    background-color: #ffff00;
     float: right;
     width: 30em;
     padding: 5px;
@@ -60,15 +57,12 @@
 }
 
 .shop-error {
-    border: 1px solid #c1272d;
     clear: both;
     padding: 5px;
     margin: 10px;
 }
 
 .shop-cart-status {
-    border: 1px solid #c1272d;
-    background-color: #c5c5c5;
     padding: 0.5em;
 }
 
@@ -87,12 +81,7 @@
     margin: 1em;
 }
 
-.shop-cart th {
-    background-color: #c5c5c5;
-}
-
 .shop-cart td, .shop-cart th {
-    border: 1px solid #c1272d;
     padding: 0.5em;
     text-align: center;
 }
@@ -100,7 +89,6 @@
 .shop-cart td.total {
     font-weight: bold;
     text-align: right;
-    background-color: #e0e0e0;
 }
 
 .shop-cart-btn {
@@ -108,7 +96,6 @@
 }
 
 .shop-item-highlight {
-    color: #c1272d;
     font-weight: bold;
 }
 
@@ -120,13 +107,8 @@
     padding: 3px;
 }
 
-.ccrowerr {
-    background-color: #ccc;
-}
-
 .shop-points-status {
     margin: 20px;
-    border: 1px solid #c1272d;
     padding: 0.5em;
     font-size: larger;
 }
diff -r 820b3a80693f -r 7c9c6b2c951a htdocs/stc/widgets/createaccountnextsteps.css
--- a/htdocs/stc/widgets/createaccountnextsteps.css	Wed Aug 25 14:20:49 2010 -0500
+++ b/htdocs/stc/widgets/createaccountnextsteps.css	Thu Aug 26 23:28:16 2010 +0800
@@ -1,5 +1,4 @@
 .appwidget-createaccountnextsteps h2 {
-    color: #213368;
     font-size: 18px;
     font-weight: bold;
     margin: 0;
diff -r 820b3a80693f -r 7c9c6b2c951a htdocs/stc/widgets/createaccountprofile.css
--- a/htdocs/stc/widgets/createaccountprofile.css	Wed Aug 25 14:20:49 2010 -0500
+++ b/htdocs/stc/widgets/createaccountprofile.css	Thu Aug 26 23:28:16 2010 +0800
@@ -3,7 +3,6 @@
 }
 
 .appwidget-createaccountprofile h2 {
-    color: #213368;
     font-size: 18px;
     font-weight: bold;
     margin: 0;
diff -r 820b3a80693f -r 7c9c6b2c951a htdocs/tools/importer.bml
--- a/htdocs/tools/importer.bml	Wed Aug 25 14:20:49 2010 -0500
+++ b/htdocs/tools/importer.bml	Thu Aug 26 23:28:16 2010 +0800
@@ -28,7 +28,7 @@ body<=
         return BML::redirect( "$LJ::SSLROOT/tools/importer" );
     }
 
-    LJ::need_res( 'stc/importer.css' );
+    LJ::need_res( { priority => $LJ::OLD_RES_PRIORITY }, 'stc/importer.css' );
 
     $title = $ML{'.title'};
 
diff -r 820b3a80693f -r 7c9c6b2c951a htdocs/update.bml
--- a/htdocs/update.bml	Wed Aug 25 14:20:49 2010 -0500
+++ b/htdocs/update.bml	Thu Aug 26 23:28:16 2010 +0800
@@ -86,7 +86,8 @@ _c?>
     # see if we need to do any transformations
     LJ::Hooks::run_hooks("transform_update_$POST{transform}", \%GET, \%POST) if $POST{transform};
 
-    LJ::need_res('stc/display_none.css', 'stc/lj_base.css', 'stc/entry.css', 'js/inputcomplete.js');
+    LJ::need_res( { priority => $LJ::OLD_RES_PRIORITY }, 'stc/entry.css' );
+    LJ::need_res('stc/display_none.css', 'stc/lj_base.css', 'js/inputcomplete.js');
 
     ## figure out times
     my $now = DateTime->now;
--------------------------------------------------------------------------------
kareila: (Default)

[personal profile] kareila 2010-08-27 07:38 pm (UTC)(link)
Why is it that Gradation Horizonal includes nav.js and nav-jquery.js, when none of the other siteschemes do? That seems very odd to me.