1
0
Fork 0
forked from 0x2620/oxjs

.bind -> .on, .unbind -> .off

This commit is contained in:
rolux 2012-05-28 16:06:22 +02:00
commit 461a237880
22 changed files with 54 additions and 54 deletions

View file

@ -29,7 +29,7 @@ Ox.BlockVideoTimeline = function(options, self) {
.css({
position: 'absolute'
})
.bind({
.on({
mousedown: mousedown,
mouseleave: mouseleave,
mousemove: mousemove

View file

@ -94,7 +94,7 @@ Ox.VideoElement = function(options, self) {
}
return $('<video>')
.css({position: 'absolute'})
.bind({
.on({
ended: function() {
if (i < item.parts - 1) {
setCurrentPart(self.currentPart + 1);

View file

@ -146,7 +146,7 @@ Ox.VideoPlayer = function(options, self) {
Ox.Log('VIDEO', 'VIDEO PLAYER OPTIONS', self.options)
Ox.UI.$window.bind({
Ox.UI.$window.on({
resize: function() {
self.options.fullscreen && setSizes();
}
@ -233,7 +233,7 @@ Ox.VideoPlayer = function(options, self) {
key_space: togglePaused
});
if (self.options.focus == 'mouseenter') {
that.bind({
that.on({
mouseenter: function() {
if (!self.inputHasFocus) {
that.gainFocus();
@ -244,7 +244,7 @@ Ox.VideoPlayer = function(options, self) {
}
});
} else {
that.bind({
that.on({
click: function() {
var focused = Ox.Focus.focused();
if (
@ -269,7 +269,7 @@ Ox.VideoPlayer = function(options, self) {
(self.options.controlsTop.length || self.options.controlsBottom.length)) ||
self.options.showIcon
) {
that.bind({
that.on({
mouseenter: function() {
showControls();
self.mouseHasLeft = false;
@ -338,7 +338,7 @@ Ox.VideoPlayer = function(options, self) {
} else {
self.options.enableMouse && self.$videoContainer.bind({
self.options.enableMouse && self.$videoContainer.on({
click: function(e) {
if (!$(e.target).is('.OxLogo')) {
goToPoint();
@ -671,7 +671,7 @@ Ox.VideoPlayer = function(options, self) {
width: self.positionWidth - 4 + 'px'
})
.html(formatPosition())
.bind({
.on({
click: function() {
if (self.options.enablePosition) {
if (self.options.type == 'play') {
@ -1149,7 +1149,7 @@ Ox.VideoPlayer = function(options, self) {
}
function enterFullscreen() {
that.bind({
that.on({
mousemove: function() {
showControls();
hideControls();
@ -1157,7 +1157,7 @@ Ox.VideoPlayer = function(options, self) {
});
showControls();
hideControls();
that.find('.OxControls').bind({
that.find('.OxControls').on({
mouseenter: function() {
self.mouseIsInControls = true;
},
@ -1585,9 +1585,9 @@ Ox.VideoPlayer = function(options, self) {
top: getCSS('logo').top,
opacity: 0.25
}, 250, function() {
self.options.logoLink && self.$logo.unbind('click');
self.options.logoLink && self.$logo.off('click');
self.options.logoTitle &&
self.$logo.unbind('mouseenter').unbind('mouseleave');
self.$logo.off('mouseenter mouseleave');
});
self.$subtitle && self.$subtitle.animate({
bottom: getCSS('subtitle').bottom
@ -1766,7 +1766,7 @@ Ox.VideoPlayer = function(options, self) {
function renderSettings() {
var $settings = $('<div>')
.addClass('OxControls OxSettings')
.bind({
.on({
click: function(e) {
var $target = $(e.target), resolution, title;
self.$settings.hide();
@ -1825,7 +1825,7 @@ Ox.VideoPlayer = function(options, self) {
if (item.title) {
$item = $('<div>')
.addClass('OxItem')
.bind({
.on({
mouseenter: function() {
$(this).addClass('OxSelected');
},
@ -2096,13 +2096,13 @@ Ox.VideoPlayer = function(options, self) {
opacity: 0.5
}, 250, function() {
self.options.logoLink && self.$logo
.bind({
.on({
click: function() {
document.location.href = self.options.logoLink;
}
});
self.options.logoTitle && self.$logo
.bind({
.on({
mouseenter: function(e) {
self.$logoTooltip.show(e);
},
@ -2213,11 +2213,10 @@ Ox.VideoPlayer = function(options, self) {
} else {
// exitFullscreen flag makes the animation end on absolute position
self.exitFullscreen = true;
that.unbind('mousemove');
that.off('mousemove');
that.find('.OxControls')
.trigger('mouseleave')
.unbind('mouseenter')
.unbind('mouseleave');
.off('mouseenter mouseleave');
clearTimeout(self.interfaceTimeout);
setSizes(true, function() {
self.exitFullscreen = false;

View file

@ -59,7 +59,7 @@ Ox.VideoPreview = function(options, self) {
}
})
.addClass('OxInterface')
.bind({
.on({
click: click,
mouseenter: startLoading,
mouseleave: function() {

View file

@ -119,7 +119,7 @@ Ox.VideoTimelinePlayer = function(options, self) {
self.$timelinePlayer = Ox.Element()
.css({overflowX: 'hidden', overflowY: 'auto'})
.bind({
.on({
mousedown: mousedown,
mouseleave: mouseleave,
mousemove: mousemove,
@ -206,7 +206,7 @@ Ox.VideoTimelinePlayer = function(options, self) {
width: self.positionWidth - 4 + 'px'
})
.html(formatPosition())
.bind({
.on({
click: function() {
if (!self.options.paused) {
self.playOnSubmit = true;