diff --git a/couchpotato/static/scripts/library/mootools_tween_css3.js b/couchpotato/static/scripts/library/mootools_tween_css3.js index 6e2e0786..8f6460b4 100644 --- a/couchpotato/static/scripts/library/mootools_tween_css3.js +++ b/couchpotato/static/scripts/library/mootools_tween_css3.js @@ -16,9 +16,10 @@ provides: [Fx.Tween] Element.NativeEvents.transitionend = 2; Element.NativeEvents.webkitTransitionEnd = 2; Element.NativeEvents.oTransitionEnd = 2; +Element.NativeEvents.msTransitionEnd = 2; Element.Events.transitionend = { - base: Browser.safari || Browser.chrome ? 'webkitTransitionEnd' : (Browser.opera ? 'oTransitionEnd' : 'transitionend') + base: Browser.safari || Browser.chrome ? 'webkitTransitionEnd' : (Browser.opera ? 'oTransitionEnd' : (Browser.ie && Browser.version > 8 ? 'msTransitionEnd' : 'transitionend')) }; Event.implement({ @@ -37,12 +38,12 @@ Element.implement({ supportStyle: function(style){ var value = this.style[style]; - return !!(value || value == ''); + return !!(value || value === ''); }, supportVendorStyle: function(style){ var prefixedStyle = null; - return this.supportStyle(style) ? style : ['webkit', 'Moz', 'o'].some(function(prefix){ + return this.supportStyle(style) ? style : ['webkit', 'Moz', 'o', 'ms'].some(function(prefix){ prefixedStyle = prefix + style.capitalize(); return this.supportStyle(prefixedStyle); }, this) ? prefixedStyle : null; @@ -107,21 +108,21 @@ Fx.Tween = new Class({ if (event.getPropertyName() == this.property /* && event.getElapsedTime() == this.options.duration */ ){ this.element.removeEvent('transitionend', this.boundComplete); this.boundComplete = null; - this.fireEvent('complete', this.subject); + this.fireEvent('complete', this); } }.bind(this); this.element.addEvent('transitionend', this.boundComplete); var trans = function(){ this.element.setStyle(this.transition, this.property + ' ' + this.options.duration + 'ms cubic-bezier(' + this.transitionTimings[this.options.transition] + ')'); - this.element.setStyle(this.property, this.to[0].value + + this.options.unit); + this.element.setStyle(this.property, this.to[0].value + this.options.unit); }.bind(this); if (args[1]){ this.element.setStyle(this.transition, 'none'); - this.element.setStyle(this.property, this.from[0].value + + this.options.unit); + this.element.setStyle(this.property, this.from[0].value + this.options.unit); trans.delay(0.1); } else trans(); - this.fireEvent('start', this.subject); + this.fireEvent('start', this); return this; } return this.parent(property, from, to); @@ -137,4 +138,4 @@ Fx.Tween = new Class({ return this; } -}); \ No newline at end of file +});