Author: sevein
Date: Tue Oct 12 07:51:40 2010
New Revision: 8061

Log:
Load qubitUpdateCheck relatet JavaScript assets into body tag due to some 
Symfony limitations loadding assets from components code.

Deleted:
   trunk/lib/QubitUpdateCheck.class.php
Modified:
   trunk/apps/qubit/modules/default/actions/updateCheckComponent.class.php
   trunk/apps/qubit/modules/default/templates/_updateCheck.php

Modified: 
trunk/apps/qubit/modules/default/actions/updateCheckComponent.class.php
==============================================================================
--- trunk/apps/qubit/modules/default/actions/updateCheckComponent.class.php     
Tue Oct 12 00:02:50 2010        (r8060)
+++ trunk/apps/qubit/modules/default/actions/updateCheckComponent.class.php     
Tue Oct 12 07:51:40 2010        (r8061)
@@ -60,11 +60,7 @@
     $this->updateCheckData['site_description'] = 
sfConfig::get('app_siteDescription');
     $this->updateCheckData['site_title'] = sfConfig::get('app_siteTitle');
 
-    if (($request->getCookie('has_js')))
-    {
-      QubitUpdateCheck::addAssets($this->response);
-    }
-    else
+    if (!$request->getCookie('has_js'))
     {
       if (null === ($this->lastVersion = 
$this->getUser()->getAttribute('last_version')))
       {

Modified: trunk/apps/qubit/modules/default/templates/_updateCheck.php
==============================================================================
--- trunk/apps/qubit/modules/default/templates/_updateCheck.php Tue Oct 12 
00:02:50 2010        (r8060)
+++ trunk/apps/qubit/modules/default/templates/_updateCheck.php Tue Oct 12 
07:51:40 2010        (r8061)
@@ -1,10 +1,13 @@
 <? if ($sf_request->getCookie('has_js')): ?>
 
-  <?php use_helper('Javascript') ?>
-
   <?php $data = json_encode($sf_data->getRaw('updateCheckData')) ?>
   <?php $notificationMessage = __('A release %1% upgrade is available.') ?>
 
+  <?php use_helper('Javascript') ?>
+
+  <?php echo javascript_include_tag('/vendor/yui/cookie/cookie-min') ?>
+  <?php echo javascript_include_tag('updateCheck') ?>
+
   <?php echo javascript_tag(<<<EOF
 Qubit.updateCheck.url = '$updateCheckUrl';
 Qubit.updateCheck.currentVersion = '$currentVersion';

-- 
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/qubit-commits?hl=en.

Reply via email to