From f14eed3fd3dfdb33d406df0c0aaa15922089fa8d Mon Sep 17 00:00:00 2001 From: Vincent Zanotti Date: Tue, 1 Apr 2008 15:23:06 +0200 Subject: [PATCH] Enables deactivation of RSS/iCal popups (to be used in Xorg/Goodies). Signed-off-by: Vincent Zanotti --- htdocs/javascript/xorg.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/htdocs/javascript/xorg.js b/htdocs/javascript/xorg.js index 0e5f5d0..2a7b1fa 100644 --- a/htdocs/javascript/xorg.js +++ b/htdocs/javascript/xorg.js @@ -165,6 +165,11 @@ function goodiesPopup(node) { } } +function disableGoodiesPopups() { + __goodies_active = false; +} + +var __goodies_active = true; var __goodies_ical_sites = [ {'url_prefix': '', 'img': 'images/icons/calendar_view_day.gif', @@ -206,9 +211,11 @@ function __goodies_popupText(url, sites) { function __goodies_popup(node, sites, default_title) { var mouseover_cb = function() { - var rss_text = __goodies_popupText(node.href, sites); - var rss_title = (node.title ? node.title : default_title); - return overlib(rss_text, CAPTION, rss_title, CLOSETEXT, 'Fermer', DELAY, 800, STICKY, WIDTH, 150); + if (__goodies_active) { + var rss_text = __goodies_popupText(node.href, sites); + var rss_title = (node.title ? node.title : default_title); + return overlib(rss_text, CAPTION, rss_title, CLOSETEXT, 'Fermer', DELAY, 800, STICKY, WIDTH, 150); + } } var mouseout_cb = function() { nd(); -- 2.1.4