diff --git a/source/Ox.UI/js/Core/Ox.Element.js b/source/Ox.UI/js/Core/Ox.Element.js index 1e2c6545..1966cae6 100644 --- a/source/Ox.UI/js/Core/Ox.Element.js +++ b/source/Ox.UI/js/Core/Ox.Element.js @@ -251,6 +251,8 @@ Ox.Element = function(options, self) { }); that.bind({ mouseenter: mouseenter + }).unbind({ + mousemove: mousemove }); } else { that.$tooltip = Ox.Tooltip({ @@ -258,13 +260,22 @@ Ox.Element = function(options, self) { }); that.bind({ mousemove: mousemove + }).unbind({ + mouseenter: mouseenter }); } that.bind({ mouseleave: mouseleave }); } else { - that.$tooltip && that.$tooltip.remove(); + if (that.$tooltip) { + that.$tooltip.remove(); + that.unbind({ + mouseenter: mouseenter, + mousemove: mousemove, + mouseleave: mouseleave + }); + } } } @@ -277,8 +288,6 @@ Ox.Element = function(options, self) { } }; - that._self = self; // fixme: remove - /*@ bindEvent Binds a function to an event (event, callback) -> This element diff --git a/source/Ox.UI/js/Form/Ox.Button.js b/source/Ox.UI/js/Form/Ox.Button.js index 88a466c5..d128f558 100644 --- a/source/Ox.UI/js/Form/Ox.Button.js +++ b/source/Ox.UI/js/Form/Ox.Button.js @@ -42,7 +42,10 @@ Ox.Button = function(options, self) { type: 'text', width: 'auto' }) - .options(options || {}) + .options(options ? Ox.extend(Ox.clone(options), { + // tooltip may be an array, so we can't pass it yet + tooltip: '' + }) : {}) .attr({ disabled: self.options.disabled, type: self.options.type == 'text' ? 'button' : 'image' @@ -71,9 +74,8 @@ Ox.Button = function(options, self) { setTitle(self.titles[self.selectedTitle].title); - if (self.options.tooltip) { - self.tooltips = Ox.isArray(self.options.tooltip) - ? self.options.tooltip : [self.options.tooltip]; + if (options.tooltip) { + self.tooltips = Ox.toArray(options.tooltip); that.options({tooltip: self.tooltips[self.selectedTitle]}); } diff --git a/source/Ox.UI/js/List/Ox.ListItem.js b/source/Ox.UI/js/List/Ox.ListItem.js index e1e94066..47bb0c46 100644 --- a/source/Ox.UI/js/List/Ox.ListItem.js +++ b/source/Ox.UI/js/List/Ox.ListItem.js @@ -44,7 +44,6 @@ Ox.ListItem = function(options, self) { } // that.$element = $element; that.setElement($element); - Ox.print('LISTITEM', that.$element.data('id')) } self.setOption = function(key, value) { diff --git a/source/Ox.UI/js/List/Ox.TextList.js b/source/Ox.UI/js/List/Ox.TextList.js index ee0b721f..d028cddf 100644 --- a/source/Ox.UI/js/List/Ox.TextList.js +++ b/source/Ox.UI/js/List/Ox.TextList.js @@ -737,7 +737,6 @@ Ox.TextList = function(options, self) { that.$element.find('.OxCell.OxColumn' + Ox.toTitleCase(self.options.columns[i].id)).css({ width: width - (self.options.columnsVisible ? 9 : 8) + 'px' }); - Ox.Log('??? resize column') setWidth(); }