From: Jan Schneider Date: Wed, 29 Jul 2009 15:16:44 +0000 (+0200) Subject: One tooltips library to rule them all. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=76df7175390bcb497009edf2ebf6e106c91618a4;p=horde.git One tooltips library to rule them all. --- diff --git a/kronolith/js/src/kronolith.js b/kronolith/js/src/kronolith.js index 9b04092f8..3e5126bbf 100644 --- a/kronolith/js/src/kronolith.js +++ b/kronolith/js/src/kronolith.js @@ -931,9 +931,9 @@ KronolithCore = { if (title) { td.writeAttribute('title', title).addClassName('kronolithHasEvents'); if (td.readAttribute('nicetitle')) { - ToolTips.detach(td); + Horde_ToolTips.detach(td); } - ToolTips.attach(td); + Horde_ToolTips.attach(td); if (busy) { td.addClassName('kronolithIsBusy'); } diff --git a/kronolith/js/src/views.js b/kronolith/js/src/views.js index 9ed1b4308..e19e2a7d0 100644 --- a/kronolith/js/src/views.js +++ b/kronolith/js/src/views.js @@ -72,9 +72,9 @@ function _ShowView() if (Object.isFunction(stripeAllElements)) { stripeAllElements(); } - if (typeof ToolTips == 'object') { - ToolTips.out(); - ToolTips.attachBehavior(); + if (!Object.isUndefined(Horde_ToolTips)) { + Horde_ToolTips.out(); + Horde_ToolTips.attachBehavior(); } var titleDiv = $('view_title'); diff --git a/kronolith/lib/Ajax/Imple/Embed.php b/kronolith/lib/Ajax/Imple/Embed.php index 03b5d85dc..1f0434ed3 100644 --- a/kronolith/lib/Ajax/Imple/Embed.php +++ b/kronolith/lib/Ajax/Imple/Embed.php @@ -86,7 +86,7 @@ class Kronolith_Ajax_Imple_Embed extends Horde_Ajax_Imple_Base /* Horde's js */ $hjs_path = $registry->get('jsuri', 'horde'); - $hjsurl = Horde::url($hjs_path . '/horde-embed.js', true); + $hjsurl = Horde::url($hjs_path . '/tooltips.js', true); $pturl = Horde::url($hjs_path . '/prototype.js', true); /* CSS */ @@ -102,13 +102,14 @@ class Kronolith_Ajax_Imple_Embed extends Horde_Ajax_Imple_Base $html = <<'); + } if (typeof Horde_ToolTips == 'undefined') { + Horde_ToolTips_Autoload = false; document.write(''); document.write(''); } - if (typeof Prototype == 'undefined') { - document.write(''); - } kronolith = new Object(); kronolithNodes = new Array(); document.write('');