use .on, not .eventname

This commit is contained in:
rolux 2013-12-06 21:43:00 +01:00
parent 81d9af2013
commit 7c640519d1
8 changed files with 45 additions and 35 deletions

View file

@ -387,8 +387,10 @@ Ox.load.UI = function(options, callback) {
opacity: error ? 0.9 : 0
}, 1000, function() {
if (error) {
$div.click(function() {
$div.on({
click: function() {
$div.remove();
}
});
} else {
clearInterval(loadingInterval);

View file

@ -156,7 +156,7 @@ Ox.Element = function(options, self) {
clientY = e.clientY;
Ox.UI.$window
.off('mouseup', mouseup)
.mousemove(mousemove)
.on({mousemove: mousemove})
.one('mouseup', function(e) {
// stop checking for mouserepeat
clearInterval(mouseInterval);

View file

@ -71,7 +71,7 @@ Ox.Checkbox = function(options, self) {
width: getTitleWidth()
})
.css({float: 'right'})
.click(clickTitle)
.on({click: clickTitle})
.appendTo(that);
}

View file

@ -209,9 +209,11 @@ Ox.Input = function(options, self) {
.css({
float: 'left' // fixme: use css rule
})
.click(function() {
.on({
click: function() {
// fixme: ???
// that.focus();
}
})
.appendTo(that);
}
@ -224,11 +226,11 @@ Ox.Input = function(options, self) {
title: 'left',
type: 'image'
})
.css({
float: 'left'
})
.click(function() {
.css({float: 'left'})
.on({
click: function() {
clickArrow(0);
}
})
.appendTo(that),
Ox.Button({
@ -236,11 +238,11 @@ Ox.Input = function(options, self) {
title: 'right',
type: 'image'
})
.css({
float: 'right'
})
.click(function() {
clickArrow(1);
.css({float: 'right'})
.on({
click: function() {
clickArrow(0);
}
})
.appendTo(that)
]

View file

@ -31,7 +31,7 @@ Ox.InputGroup = function(options, self) {
value: setValue
})
.addClass('OxInputGroup')
.click(click);
.on({click: click});
if (Ox.isEmpty(self.options.value)) {
self.options.value = getValue();

View file

@ -21,8 +21,10 @@ Ox.MainMenu = function(options, self) {
})
.options(options || {})
.addClass('OxMainMenu Ox' + Ox.toTitleCase(self.options.size)) // fixme: bar should accept small/medium/large ... like toolbar
.click(click)
.mousemove(mousemove);
.on({
click: click,
mousemove: mousemove
});
self.focused = false;
self.selected = -1;

View file

@ -42,8 +42,10 @@ Ox.LargeVideoTimeline = function(options, self) {
width: setWidth
})
.addClass('OxLargeVideoTimeline OxMedia')
.mouseleave(mouseleave)
.mousemove(mousemove);
.on({
mouseleave: mouseleave,
mousemove: mousemove
});
if (!self.options.disabled) {
that.bindEvent({

View file

@ -296,7 +296,8 @@ Ox.VideoAnnotationPanel = function(options, self) {
self.$editor = Ox.Element()
.addClass('OxVideoAnnotationPanel OxMedia')
.mousedown(function(e) {
.on({
mousedown: function(e) {
var $target = $(e.target);
!$target.is('.OxPosition') && !$target.is('input') && that.gainFocus();
// the following is needed to determine
@ -310,6 +311,7 @@ Ox.VideoAnnotationPanel = function(options, self) {
self.focused = false;
}, 25);
}
}
});
self.sizes = getSizes();