yellow team mailing list archive
-
yellow team
-
Mailing list archive
-
Message #01242
[Merge] lp:~gary/juju-gui/trunk into lp:juju-gui
Gary Poster has proposed merging lp:~gary/juju-gui/trunk into lp:juju-gui.
Requested reviews:
Juju GUI Hackers (juju-gui)
For more details, see:
https://code.launchpad.net/~gary/juju-gui/trunk/+merge/131324
Quick fix for silent error with charm tip
Matt reported that a silent error was thrown if you used the scrollwheel in the charm store config page before tabbing to a field. This is a quick fix that I plan to self-approve.
--
https://code.launchpad.net/~gary/juju-gui/trunk/+merge/131324
Your team Juju GUI Hackers is requested to review the proposed merge of lp:~gary/juju-gui/trunk into lp:juju-gui.
=== modified file 'app/views/charm-search.js'
--- app/views/charm-search.js 2012-10-24 14:56:12 +0000
+++ app/views/charm-search.js 2012-10-25 07:20:53 +0000
@@ -197,25 +197,27 @@
{click: function(evt) {evt.target.focus();}}
},
_moveTooltip: function() {
- if (Y.DOM.inRegion(
- this.tooltip.field.getDOMNode(),
- this.tooltip.panelRegion,
- true)) {
- var targetRect = this.tooltip.field.getClientRect();
- if (targetRect) {
- var widget = this.tooltip.get('boundingBox'),
- tooltipWidth = widget.get('clientWidth'),
- tooltipHeight = widget.get('clientHeight'),
- y_offset = (tooltipHeight - targetRect.height) / 2;
- this.tooltip.move( // These are the x, y coordinates.
- [this.tooltip.panel.getX() - tooltipWidth - 15,
- targetRect.top - y_offset]);
- if (!this.tooltip.get('visible')) {
- this.tooltip.show();
+ if (this.tooltip.get('visible')) {
+ if (Y.DOM.inRegion(
+ this.tooltip.field.getDOMNode(),
+ this.tooltip.panelRegion,
+ true)) {
+ var targetRect = this.tooltip.field.getClientRect();
+ if (targetRect) {
+ var widget = this.tooltip.get('boundingBox'),
+ tooltipWidth = widget.get('clientWidth'),
+ tooltipHeight = widget.get('clientHeight'),
+ y_offset = (tooltipHeight - targetRect.height) / 2;
+ this.tooltip.move( // These are the x, y coordinates.
+ [this.tooltip.panel.getX() - tooltipWidth - 15,
+ targetRect.top - y_offset]);
+ if (!this.tooltip.get('visible')) {
+ this.tooltip.show();
+ }
}
+ } else {
+ this.tooltip.hide();
}
- } else if (this.tooltip.get('visible')) {
- this.tooltip.hide();
}
},
showDescription: function(evt) {
Follow ups