Igor Gariev (gariev) wrote in changelog,
Igor Gariev
gariev
changelog

[livejournal] r19431: LJSUP-9232: Refactor resources inclusion...

Committer: gariev
LJSUP-9232: Refactor resources inclusion in the integration (kommersant) project

U   trunk/htdocs/gadgets/logcom.bml
U   trunk/htdocs/talkpost_do.bml
Modified: trunk/htdocs/gadgets/logcom.bml
===================================================================
--- trunk/htdocs/gadgets/logcom.bml	2011-07-05 07:18:17 UTC (rev 19430)
+++ trunk/htdocs/gadgets/logcom.bml	2011-07-05 07:45:41 UTC (rev 19431)
@@ -24,8 +24,6 @@
         return 'this domain doesn\'t belong to this partner';
     }
 
-    $partner->request_logcom_resources;
-
     my $journal = $partner->journal;
 
     return 'rate limit exceeded'
@@ -52,7 +50,6 @@
 
     if (my $remote = LJ::get_remote() and not LJ::Request->get_param('viewform')) {
         ## show add comment form
-        LJ::need_res(qw( stc/partners/login.css ));
 
         my $remote_sessid;
         if ($remote) {
@@ -81,11 +78,6 @@
             });
     } else {
         ## display login widget
-        LJ::need_res(qw(
-          stc/lj_base.css
-          stc/partners/login.css
-        ));
-
         # send out a P3P header thing so as to work around IE's
         # unwillingness to receive our cookies while we're in an iframe
         LJ::Session->allow_login_from_iframe;
@@ -97,7 +89,7 @@
             'embedded'          => 1,
             'partner'           => $partner,
             'js_check_domain'   => $js_check_domain,
-            'resources_html'    => $partner->resources,
+            'resources_html'    => $partner->resources_html,
             'forwhat'           => 'external',
             'thispage'          => $thispage,
             'lj_auth'           => 1,

Modified: trunk/htdocs/talkpost_do.bml
===================================================================
--- trunk/htdocs/talkpost_do.bml	2011-07-05 07:18:17 UTC (rev 19430)
+++ trunk/htdocs/talkpost_do.bml	2011-07-05 07:45:41 UTC (rev 19431)
@@ -204,14 +204,7 @@
             $talkform_opts->{'partner_remote_ljuser'}
                 = $partner->ljuser_html($remote);
 
-            $partner->request_logcom_resources;
-
-            $talkform_opts->{'resources_html'} = $partner->partner_resources;
-
-            LJ::need_res( { clean_list => 1 } );
-            LJ::need_res( @{ $partner->{resources} } );
-            $talkform_opts->{'resources_html'} .= LJ::res_includes({only_needed => 1}); 
-
+            $talkform_opts->{'resources_html'} = $partner->resources_html({only_needed => 1});
             $talkform_opts->{'partner_domain'} = $POST{'partner_domain'};
         }
 

Tags: bml, gariev, livejournal
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