Enables deactivation of RSS/iCal popups (to be used in Xorg/Goodies).
authorVincent Zanotti <vincent.zanotti@polytechnique.org>
Tue, 1 Apr 2008 13:23:06 +0000 (15:23 +0200)
committerVincent Zanotti <vincent.zanotti@polytechnique.org>
Tue, 1 Apr 2008 13:23:06 +0000 (15:23 +0200)
Signed-off-by: Vincent Zanotti <vincent.zanotti@polytechnique.org>
htdocs/javascript/xorg.js

index 0e5f5d0..2a7b1fa 100644 (file)
@@ -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();