From: Michael M Slusarz Date: Wed, 28 Jul 2010 17:38:45 +0000 (-0600) Subject: Move sidebar out of portal namespace. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=b5009a9166b95bfc8d720e492cb5c0397d56512d;p=horde.git Move sidebar out of portal namespace. Sidebar really doesn't have anything to do with the portal, so separate thse elements in the Horde directory layout. --- diff --git a/ansel/templates/menu.inc b/ansel/templates/menu.inc index 900134078..5a8f3cea0 100644 --- a/ansel/templates/menu.inc +++ b/ansel/templates/menu.inc @@ -1,7 +1,7 @@ - + notify(array('listeners' => 'status')); diff --git a/beatnik/templates/menu.inc b/beatnik/templates/menu.inc index 56455b439..f9bfcbf7c 100644 --- a/beatnik/templates/menu.inc +++ b/beatnik/templates/menu.inc @@ -37,5 +37,5 @@ $menu_view = $prefs->getValue('menu_view'); - + notify(array('listeners' => 'status')) ?> diff --git a/chora/templates/menu.inc b/chora/templates/menu.inc index 4224b9f67..4e778493a 100644 --- a/chora/templates/menu.inc +++ b/chora/templates/menu.inc @@ -4,5 +4,5 @@ render() ?> - + notify(array('listeners' => 'status')) ?> diff --git a/crumb/templates/menu.inc b/crumb/templates/menu.inc index a77bfd53f..e996c4a13 100644 --- a/crumb/templates/menu.inc +++ b/crumb/templates/menu.inc @@ -1,5 +1,5 @@ - + notify(array('listeners' => 'status')) ?> diff --git a/fima/templates/menu.inc b/fima/templates/menu.inc index b6395f4cd..433b9e521 100644 --- a/fima/templates/menu.inc +++ b/fima/templates/menu.inc @@ -37,5 +37,5 @@ function ledgerSubmit(clear) } } - + notify(array('listeners' => 'status')) ?> diff --git a/folks/templates/menu.inc b/folks/templates/menu.inc index ddb1d82da..f56e51bfb 100644 --- a/folks/templates/menu.inc +++ b/folks/templates/menu.inc @@ -1,5 +1,5 @@ - + notify(array('listeners' => 'status')) ?> diff --git a/framework/Core/lib/Horde.php b/framework/Core/lib/Horde.php index 41b7d2fef..469484543 100644 --- a/framework/Core/lib/Horde.php +++ b/framework/Core/lib/Horde.php @@ -508,7 +508,7 @@ HTML; ->add('return_url', urlencode(self::selfUrl(true, true, true))); case 'sidebar': - return self::url($webroot . '/services/portal/sidebar.php'); + return self::url($webroot . '/services/sidebar.php'); } return false; diff --git a/gollem/lib/Gollem.php b/gollem/lib/Gollem.php index ce7d1f4a7..f21a0c3bc 100644 --- a/gollem/lib/Gollem.php +++ b/gollem/lib/Gollem.php @@ -714,7 +714,7 @@ class Gollem $t->set('menu_string', Gollem::getMenu()->render()); echo $t->fetch(GOLLEM_TEMPLATES . '/menu.html'); - require HORDE_BASE . '/services/portal/sidebar.php'; + require HORDE_BASE . '/services/sidebar.php'; } /** diff --git a/hermes/templates/menu.inc b/hermes/templates/menu.inc index 64e011b05..0ea6b2c5a 100644 --- a/hermes/templates/menu.inc +++ b/hermes/templates/menu.inc @@ -1,5 +1,5 @@ - + notify(array('listeners' => 'status')) ?> diff --git a/horde/js/sidebar.js b/horde/js/sidebar.js index 628f9841b..7ce40d817 100644 --- a/horde/js/sidebar.js +++ b/horde/js/sidebar.js @@ -6,7 +6,7 @@ */ var HordeSidebar = { - // Variables set in services/portal/sidebar.php: + // Variables set in services/sidebar.php: // domain, path, refresh, rtl, tree, url, width getCookie: function(name, deflt) diff --git a/horde/services/portal/sidebar.php b/horde/services/portal/sidebar.php deleted file mode 100644 index 6756d94a2..000000000 --- a/horde/services/portal/sidebar.php +++ /dev/null @@ -1,53 +0,0 @@ - - * @author Chuck Hagenbuch - * @category Horde - * @package Horde - */ - -require_once dirname(__FILE__) . '/../../lib/Application.php'; -Horde_Registry::appInit('horde', array('authentication' => 'none')); - -/* We may not be in global scope since this file can be included from other - * scripts. */ -global $conf, $language, $prefs, $registry; - -if (!Horde_Util::getFormData('ajaxui') && - ($conf['menu']['always'] || - ($registry->getAuth() && $prefs->getValue('show_sidebar')))) { - $sidebar = new Horde_Ui_Sidebar(); - $tree = $sidebar->getTree(); - - Horde::addScriptFile('prototype.js', 'horde'); - Horde::addScriptFile('sidebar.js', 'horde'); - - $ajax_url = Horde::getServiceLink('ajax', 'horde'); - $ajax_url->pathInfo = 'sidebarUpdate'; - - $charset = $registry->getCharset(); - - Horde::addInlineScript(array( - 'HordeSidebar.domain = ' . Horde_Serialize::serialize($conf['cookie']['domain'], Horde_Serialize::JSON, $charset), - 'HordeSidebar.path = ' . Horde_Serialize::serialize($conf['cookie']['path'], Horde_Serialize::JSON, $charset), - 'HordeSidebar.refresh = ' . intval($prefs->getValue('menu_refresh_time')), - 'HordeSidebar.rtl = ' . intval(isset($registry->nlsconfig['rtl'][$language])), - 'HordeSidebar.url = ' . Horde_Serialize::serialize(strval($ajax_url), Horde_Serialize::JSON, $charset), - 'HordeSidebar.width = ' . intval($prefs->getValue('sidebar_width')) - )); - - require $registry->get('templates', 'horde') . '/portal/sidebar.inc'; - - echo '
'; -} else { - echo '
'; -} - -$GLOBALS['sidebarLoaded'] = true; diff --git a/horde/services/sidebar.php b/horde/services/sidebar.php new file mode 100644 index 000000000..d9166dcec --- /dev/null +++ b/horde/services/sidebar.php @@ -0,0 +1,53 @@ + + * @author Chuck Hagenbuch + * @category Horde + * @package Horde + */ + +require_once dirname(__FILE__) . '/../../lib/Application.php'; +Horde_Registry::appInit('horde', array('authentication' => 'none')); + +/* We may not be in global scope since this file can be included from other + * scripts. */ +global $conf, $language, $prefs, $registry; + +if (!Horde_Util::getFormData('ajaxui') && + ($conf['menu']['always'] || + ($registry->getAuth() && $prefs->getValue('show_sidebar')))) { + $sidebar = new Horde_Ui_Sidebar(); + $tree = $sidebar->getTree(); + + Horde::addScriptFile('prototype.js', 'horde'); + Horde::addScriptFile('sidebar.js', 'horde'); + + $ajax_url = Horde::getServiceLink('ajax', 'horde'); + $ajax_url->pathInfo = 'sidebarUpdate'; + + $charset = $registry->getCharset(); + + Horde::addInlineScript(array( + 'HordeSidebar.domain = ' . Horde_Serialize::serialize($conf['cookie']['domain'], Horde_Serialize::JSON, $charset), + 'HordeSidebar.path = ' . Horde_Serialize::serialize($conf['cookie']['path'], Horde_Serialize::JSON, $charset), + 'HordeSidebar.refresh = ' . intval($prefs->getValue('menu_refresh_time')), + 'HordeSidebar.rtl = ' . intval(isset($registry->nlsconfig['rtl'][$language])), + 'HordeSidebar.url = ' . Horde_Serialize::serialize(strval($ajax_url), Horde_Serialize::JSON, $charset), + 'HordeSidebar.width = ' . intval($prefs->getValue('sidebar_width')) + )); + + require $registry->get('templates', 'horde') . '/sidebar/sidebar.inc'; + + echo '
'; +} else { + echo '
'; +} + +$GLOBALS['sidebarLoaded'] = true; diff --git a/horde/templates/admin/menu.inc b/horde/templates/admin/menu.inc index d9a48c27e..bcbcd4b1d 100644 --- a/horde/templates/admin/menu.inc +++ b/horde/templates/admin/menu.inc @@ -15,5 +15,5 @@ ?>
- + notify(array('listeners' => 'status')); diff --git a/horde/templates/menu/menu.inc b/horde/templates/menu/menu.inc index 40cac39a8..d2e6e693a 100644 --- a/horde/templates/menu/menu.inc +++ b/horde/templates/menu/menu.inc @@ -10,4 +10,4 @@ - + diff --git a/horde/templates/portal/sidebar.inc b/horde/templates/portal/sidebar.inc deleted file mode 100644 index abdb1d91d..000000000 --- a/horde/templates/portal/sidebar.inc +++ /dev/null @@ -1,12 +0,0 @@ - diff --git a/horde/templates/sidebar/sidebar.inc b/horde/templates/sidebar/sidebar.inc new file mode 100644 index 000000000..abdb1d91d --- /dev/null +++ b/horde/templates/sidebar/sidebar.inc @@ -0,0 +1,12 @@ + diff --git a/imp/lib/IMP.php b/imp/lib/IMP.php index e269a9771..cf34d970e 100644 --- a/imp/lib/IMP.php +++ b/imp/lib/IMP.php @@ -634,7 +634,7 @@ class IMP /* Need to buffer sidebar output here, because it may add things like * cookies which need to be sent before output begins. */ Horde::startBuffer(); - require HORDE_BASE . '/services/portal/sidebar.php'; + require HORDE_BASE . '/services/sidebar.php'; self::$_sidebar = Horde::endBuffer(); } diff --git a/ingo/lib/Ingo.php b/ingo/lib/Ingo.php index 3a7758284..90039b5d8 100644 --- a/ingo/lib/Ingo.php +++ b/ingo/lib/Ingo.php @@ -489,7 +489,7 @@ class Ingo { self::prepareMenu(); echo self::$_menuTemplate->fetch(INGO_TEMPLATES . '/menu/menu.html'); - require HORDE_BASE . '/services/portal/sidebar.php'; + require HORDE_BASE . '/services/sidebar.php'; } /** diff --git a/kastalia/templates/menu.inc b/kastalia/templates/menu.inc index 1b4437e14..d96bb7137 100755 --- a/kastalia/templates/menu.inc +++ b/kastalia/templates/menu.inc @@ -1,5 +1,5 @@ - + notify(array('listeners' => 'status')) ?> diff --git a/koward/www/horde/config/prefs.php.dist b/koward/www/horde/config/prefs.php.dist index fc207b544..86799f786 100644 --- a/koward/www/horde/config/prefs.php.dist +++ b/koward/www/horde/config/prefs.php.dist @@ -427,7 +427,7 @@ $_prefs['moz_sidebar'] = array( 'type' => 'link', 'xurl' => sprintf('javascript:if (window.sidebar && window.sidebar.addPanel) window.sidebar.addPanel(\'%s\', \'%s\', \'%s\'); else alert(\'%s\');', $GLOBALS['registry']->get('name', 'horde'), - Horde_Util::addParameter(Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/portal/sidebar.php', true, -1), 'mozbar', '1'), + Horde_Util::addParameter(Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/sidebar.php', true, -1), 'mozbar', '1'), Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/prefs.php', true, -1), addslashes(_("Couldn't find the Mozilla Sidebar. Make sure the sidebar is open."))), 'desc' => sprintf(_("Add the %s Menu as a Mozilla Sidebar"), $GLOBALS['registry']->get('name', 'horde')) diff --git a/kronolith/templates/menu.inc b/kronolith/templates/menu.inc index 1483c9e53..dad37e604 100644 --- a/kronolith/templates/menu.inc +++ b/kronolith/templates/menu.inc @@ -1,5 +1,5 @@ - + notify(array('listeners' => 'status')) ?> diff --git a/luxor/templates/menu.inc b/luxor/templates/menu.inc index c9df7890c..db81e3bc3 100644 --- a/luxor/templates/menu.inc +++ b/luxor/templates/menu.inc @@ -17,5 +17,5 @@ function jump()
- + notify(array('listeners' => 'status')) ?> diff --git a/mnemo/templates/menu.inc b/mnemo/templates/menu.inc index 49654b75b..30e96f3c0 100644 --- a/mnemo/templates/menu.inc +++ b/mnemo/templates/menu.inc @@ -1,4 +1,4 @@ - + diff --git a/nag/templates/menu.inc b/nag/templates/menu.inc index 0c6a24b3a..1b865dc4c 100644 --- a/nag/templates/menu.inc +++ b/nag/templates/menu.inc @@ -1,5 +1,5 @@ - + render() ?>
- + notify(array('listeners' => 'status')) ?> diff --git a/operator/templates/menu.inc b/operator/templates/menu.inc index d3c19df67..a80e27a3c 100644 --- a/operator/templates/menu.inc +++ b/operator/templates/menu.inc @@ -1,5 +1,5 @@ - + notify(array('listeners' => 'status')) ?> diff --git a/pastie/templates/menu.inc b/pastie/templates/menu.inc index a3881937f..71879f80d 100644 --- a/pastie/templates/menu.inc +++ b/pastie/templates/menu.inc @@ -1,5 +1,5 @@ - + notify(array('listeners' => 'status')) ?> diff --git a/shout/templates/menu.inc b/shout/templates/menu.inc index e5d54a9cc..233a0384c 100644 --- a/shout/templates/menu.inc +++ b/shout/templates/menu.inc @@ -55,4 +55,4 @@ function accountSubmit(clear) - + diff --git a/skeleton/templates/menu.inc b/skeleton/templates/menu.inc index c3ce3dfd5..57d26de44 100644 --- a/skeleton/templates/menu.inc +++ b/skeleton/templates/menu.inc @@ -1,5 +1,5 @@ - + notify(array('listeners' => 'status')) ?> diff --git a/skoli/templates/menu.inc b/skoli/templates/menu.inc index c1174406e..319b5c80d 100644 --- a/skoli/templates/menu.inc +++ b/skoli/templates/menu.inc @@ -1,5 +1,5 @@ - + notify(array('listeners' => 'status')) ?> diff --git a/trean/templates/menu.inc b/trean/templates/menu.inc index e21f50a58..e4334fbc7 100644 --- a/trean/templates/menu.inc +++ b/trean/templates/menu.inc @@ -1,5 +1,5 @@ - + notify(array('listeners' => 'status')) ?> diff --git a/turba/templates/menu.inc b/turba/templates/menu.inc index a9a510a5d..57bf2c604 100644 --- a/turba/templates/menu.inc +++ b/turba/templates/menu.inc @@ -13,5 +13,5 @@ - + notify(array('listeners' => 'status')) ?> diff --git a/whups/templates/menu.inc b/whups/templates/menu.inc index e2414d791..0683a7970 100644 --- a/whups/templates/menu.inc +++ b/whups/templates/menu.inc @@ -8,6 +8,6 @@
- + notify(array('listeners' => 'status')) ?> diff --git a/wicked/templates/menu.inc b/wicked/templates/menu.inc index c6cd627c6..4e0ce6fb5 100644 --- a/wicked/templates/menu.inc +++ b/wicked/templates/menu.inc @@ -20,5 +20,5 @@ function jump()
- + notify(array('listeners' => 'status'));