Author: sevein
Date: Tue Nov 2 12:59:18 2010
New Revision: 8758
Log:
jQuery selector was wrong and dialog tooltips were being align with respect to
the form item instead of the YUI dialog. This code was tested in
IE7/IE8/FF/Chrome. Fixes issue 1854.
Modified:
trunk/js/description.js
Modified: trunk/js/description.js
==============================================================================
--- trunk/js/description.js Tue Nov 2 00:02:09 2010 (r8757)
+++ trunk/js/description.js Tue Nov 2 12:59:18 2010 (r8758)
@@ -15,9 +15,26 @@
var $sidebar = $('#sidebar-first');
var $content = $('#content');
- if ($this.parents(':has(.yui-dialog)').length)
+ // Specific case for tooltips in YUI dialogs
+ var $dialog = $this.closest('div.yui-panel');
+ if ($dialog.length)
{
- $description.addClass('description-right').show();
+ var positionateDialog = function()
+ {
+ $description
+
+ // Remove position relative to align with respect to
the dialog
+ .closest('.form-item').css('position', 'static').end()
+
+ // Show tooltip
+ .addClass('description-right').show();
+ };
+
+ positionateDialog();
+
+ // TODO Bind positionateDialog to window resize and scroll
+ // events. See configFixedCenter handler in YUI content.js.
+ // I can't figure out how to get the YUI dialog instance.
return true;
}
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-commits?hl=en.