From: Vincent Zanotti Date: Tue, 1 Apr 2008 13:23:06 +0000 (+0200) Subject: Enables deactivation of RSS/iCal popups (to be used in Xorg/Goodies). X-Git-Tag: xorg/0.9.16~30 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=f14eed3fd3dfdb33d406df0c0aaa15922089fa8d;p=platal.git Enables deactivation of RSS/iCal popups (to be used in Xorg/Goodies). Signed-off-by: Vincent Zanotti --- 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();