[Fusionforge-commits] r16431 - in trunk/src/plugins/headermenu: common www
Franck VILLAUME
nerville at fusionforge.org
Wed Oct 3 20:21:23 CEST 2012
Author: nerville
Date: 2012-10-03 20:21:23 +0200 (Wed, 03 Oct 2012)
New Revision: 16431
Modified:
trunk/src/plugins/headermenu/common/headermenuPlugin.class.php
trunk/src/plugins/headermenu/www/index.php
Log:
use the correct hook to set javascript file
Modified: trunk/src/plugins/headermenu/common/headermenuPlugin.class.php
===================================================================
--- trunk/src/plugins/headermenu/common/headermenuPlugin.class.php 2012-10-02 22:08:28 UTC (rev 16430)
+++ trunk/src/plugins/headermenu/common/headermenuPlugin.class.php 2012-10-03 18:21:23 UTC (rev 16431)
@@ -30,6 +30,7 @@
$this->Plugin() ;
$this->name = 'headermenu' ;
$this->text = 'headermenu' ;
+ $this->_addHook('javascript_file');
$this->_addHook('headermenu');
$this->_addHook('site_admin_option_hook');
$this->_addHook('outermenu');
@@ -49,6 +50,11 @@
echo '<li>'.$this->getAdminOptionLink().'</li>';
break;
}
+ case 'javascript_file': {
+ html_use_jquery();
+ use_javascript('/plugins/'.$this->name.'/scripts/HeaderMenuController.js');
+ break;
+ }
}
}
Modified: trunk/src/plugins/headermenu/www/index.php
===================================================================
--- trunk/src/plugins/headermenu/www/index.php 2012-10-02 22:08:28 UTC (rev 16430)
+++ trunk/src/plugins/headermenu/www/index.php 2012-10-03 18:21:23 UTC (rev 16431)
@@ -33,9 +33,6 @@
global $use_tooltips;
$headermenu = plugin_get_object('headermenu');
-html_use_jquery();
-use_javascript('scripts/HeaderMenuController.js');
-
switch ($type) {
case 'globaladmin': {
if (!session_loggedin()) {
More information about the Fusionforge-commits
mailing list