[Fusionforge-commits] r10097 - trunk/src/www/widgets

Alain Peyrat aljeux at libremir.placard.fr.eu.org
Fri Jun 18 19:23:48 CEST 2010


Author: aljeux
Date: 2010-06-18 19:23:48 +0200 (Fri, 18 Jun 2010)
New Revision: 10097

Modified:
   trunk/src/www/widgets/widgets.php
Log:
widgets: Fix to display javascript after the header

Modified: trunk/src/www/widgets/widgets.php
===================================================================
--- trunk/src/www/widgets/widgets.php	2010-06-18 17:23:42 UTC (rev 10096)
+++ trunk/src/www/widgets/widgets.php	2010-06-18 17:23:48 UTC (rev 10097)
@@ -6,7 +6,7 @@
 //require_once('www/my/my_utils.php');
 require_once('common/widget/WidgetLayoutManager.class.php');
 require_once('common/widget/Valid_Widget.class.php');
-echo "<script type=javascript src='/scripts/codendi/LayoutManager.js'></script>";
+
 $hp = Codendi_HTMLPurifier::instance();
 if (isLogged()) {
     
@@ -27,10 +27,11 @@
                 case WidgetLayoutManager::OWNER_TYPE_USER:
                     $owner_id = user_getid();
 
-		    $userm=UserManager::instance();
-		    $current=$userm->getCurrentUser();
-		    echo site_user_header(array('title'=>sprintf(_('Personal Page For %s'),user_getname())));
-                    //my_header(array('title'=>$title, 'selected_top_tab' => '/my/'));
+		    		$userm=UserManager::instance();
+		    		$current=$userm->getCurrentUser();
+		    		echo site_user_header(array('title'=>sprintf(_('Personal Page For %s'),user_getname())));
+ 					use_javascript('/scripts/codendi/LayoutManager.js');
+                   //my_header(array('title'=>$title, 'selected_top_tab' => '/my/'));
                     $lm->displayAvailableWidgets(user_getid(), WidgetLayoutManager::OWNER_TYPE_USER, $layout_id);
                     site_footer(array());
                     
@@ -44,6 +45,7 @@
                         if (user_ismember($group_id, 'A') || user_is_super_user()) {
                             $title = _("Project info").' - '. $project->getPublicName();
                             site_project_header(array('title'=>$title,'group'=>$group_id,'toptab'=>'summary'));
+							use_javascript('/scripts/codendi/LayoutManager.js');
                             $lm->displayAvailableWidgets($group_id, WidgetLayoutManager::OWNER_TYPE_GROUP, $layout_id);
                             site_footer(array());
                         } else {




More information about the Fusionforge-commits mailing list