Author: sevein
Date: Mon Jul 30 20:06:08 2012
New Revision: 12011
Log:
Show level of description as popover title, fix bug in the scroll
Modified:
trunk/js/treeView.js
Modified: trunk/js/treeView.js
==============================================================================
--- trunk/js/treeView.js Mon Jul 30 16:47:20 2012 (r12010)
+++ trunk/js/treeView.js Mon Jul 30 20:06:08 2012 (r12011)
@@ -193,10 +193,11 @@
mouseenter: function (e)
{
var $li = 'LI' === e.target.tagName ? $(e.target) :
$(e.target).closest('li');
- var anchor = $li.find('a');
+ var anchor = $li.children('a');
+ var level = $li.children('strong');
// Do nothing if anchor is not collapsed
- if (anchor.width() <= this.$element.width())
+ if (anchor.width() + level.width() <= $li.width() - 5)
{
return this;
}
@@ -206,6 +207,13 @@
{
$li.data('content', anchor.attr('title'));
+ if (level.text())
+ {
+ $li.data('title', level.text());
+ }
+
+ // Remove HTML title attribute so the browser won't show its
+ // native tooltip
anchor.removeAttr('title');
}
@@ -326,7 +334,7 @@
// Delay the trigger
window.setTimeout(function()
{
- self.$element.find('li.more:last').trigger('click');
+ self.$element.find('.more').eq(1).trigger('click');
}, 250);
}
},
--
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.