use .on, not .eventname
This commit is contained in:
parent
81d9af2013
commit
7c640519d1
8 changed files with 45 additions and 35 deletions
|
@ -387,8 +387,10 @@ Ox.load.UI = function(options, callback) {
|
||||||
opacity: error ? 0.9 : 0
|
opacity: error ? 0.9 : 0
|
||||||
}, 1000, function() {
|
}, 1000, function() {
|
||||||
if (error) {
|
if (error) {
|
||||||
$div.click(function() {
|
$div.on({
|
||||||
$div.remove();
|
click: function() {
|
||||||
|
$div.remove();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
clearInterval(loadingInterval);
|
clearInterval(loadingInterval);
|
||||||
|
|
|
@ -156,7 +156,7 @@ Ox.Element = function(options, self) {
|
||||||
clientY = e.clientY;
|
clientY = e.clientY;
|
||||||
Ox.UI.$window
|
Ox.UI.$window
|
||||||
.off('mouseup', mouseup)
|
.off('mouseup', mouseup)
|
||||||
.mousemove(mousemove)
|
.on({mousemove: mousemove})
|
||||||
.one('mouseup', function(e) {
|
.one('mouseup', function(e) {
|
||||||
// stop checking for mouserepeat
|
// stop checking for mouserepeat
|
||||||
clearInterval(mouseInterval);
|
clearInterval(mouseInterval);
|
||||||
|
|
|
@ -71,7 +71,7 @@ Ox.Checkbox = function(options, self) {
|
||||||
width: getTitleWidth()
|
width: getTitleWidth()
|
||||||
})
|
})
|
||||||
.css({float: 'right'})
|
.css({float: 'right'})
|
||||||
.click(clickTitle)
|
.on({click: clickTitle})
|
||||||
.appendTo(that);
|
.appendTo(that);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -209,9 +209,11 @@ Ox.Input = function(options, self) {
|
||||||
.css({
|
.css({
|
||||||
float: 'left' // fixme: use css rule
|
float: 'left' // fixme: use css rule
|
||||||
})
|
})
|
||||||
.click(function() {
|
.on({
|
||||||
// fixme: ???
|
click: function() {
|
||||||
// that.focus();
|
// fixme: ???
|
||||||
|
// that.focus();
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.appendTo(that);
|
.appendTo(that);
|
||||||
}
|
}
|
||||||
|
@ -224,11 +226,11 @@ Ox.Input = function(options, self) {
|
||||||
title: 'left',
|
title: 'left',
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.css({
|
.css({float: 'left'})
|
||||||
float: 'left'
|
.on({
|
||||||
})
|
click: function() {
|
||||||
.click(function() {
|
clickArrow(0);
|
||||||
clickArrow(0);
|
}
|
||||||
})
|
})
|
||||||
.appendTo(that),
|
.appendTo(that),
|
||||||
Ox.Button({
|
Ox.Button({
|
||||||
|
@ -236,11 +238,11 @@ Ox.Input = function(options, self) {
|
||||||
title: 'right',
|
title: 'right',
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.css({
|
.css({float: 'right'})
|
||||||
float: 'right'
|
.on({
|
||||||
})
|
click: function() {
|
||||||
.click(function() {
|
clickArrow(0);
|
||||||
clickArrow(1);
|
}
|
||||||
})
|
})
|
||||||
.appendTo(that)
|
.appendTo(that)
|
||||||
]
|
]
|
||||||
|
|
|
@ -31,7 +31,7 @@ Ox.InputGroup = function(options, self) {
|
||||||
value: setValue
|
value: setValue
|
||||||
})
|
})
|
||||||
.addClass('OxInputGroup')
|
.addClass('OxInputGroup')
|
||||||
.click(click);
|
.on({click: click});
|
||||||
|
|
||||||
if (Ox.isEmpty(self.options.value)) {
|
if (Ox.isEmpty(self.options.value)) {
|
||||||
self.options.value = getValue();
|
self.options.value = getValue();
|
||||||
|
|
|
@ -21,8 +21,10 @@ Ox.MainMenu = function(options, self) {
|
||||||
})
|
})
|
||||||
.options(options || {})
|
.options(options || {})
|
||||||
.addClass('OxMainMenu Ox' + Ox.toTitleCase(self.options.size)) // fixme: bar should accept small/medium/large ... like toolbar
|
.addClass('OxMainMenu Ox' + Ox.toTitleCase(self.options.size)) // fixme: bar should accept small/medium/large ... like toolbar
|
||||||
.click(click)
|
.on({
|
||||||
.mousemove(mousemove);
|
click: click,
|
||||||
|
mousemove: mousemove
|
||||||
|
});
|
||||||
|
|
||||||
self.focused = false;
|
self.focused = false;
|
||||||
self.selected = -1;
|
self.selected = -1;
|
||||||
|
|
|
@ -42,8 +42,10 @@ Ox.LargeVideoTimeline = function(options, self) {
|
||||||
width: setWidth
|
width: setWidth
|
||||||
})
|
})
|
||||||
.addClass('OxLargeVideoTimeline OxMedia')
|
.addClass('OxLargeVideoTimeline OxMedia')
|
||||||
.mouseleave(mouseleave)
|
.on({
|
||||||
.mousemove(mousemove);
|
mouseleave: mouseleave,
|
||||||
|
mousemove: mousemove
|
||||||
|
});
|
||||||
|
|
||||||
if (!self.options.disabled) {
|
if (!self.options.disabled) {
|
||||||
that.bindEvent({
|
that.bindEvent({
|
||||||
|
|
|
@ -296,19 +296,21 @@ Ox.VideoAnnotationPanel = function(options, self) {
|
||||||
|
|
||||||
self.$editor = Ox.Element()
|
self.$editor = Ox.Element()
|
||||||
.addClass('OxVideoAnnotationPanel OxMedia')
|
.addClass('OxVideoAnnotationPanel OxMedia')
|
||||||
.mousedown(function(e) {
|
.on({
|
||||||
var $target = $(e.target);
|
mousedown: function(e) {
|
||||||
!$target.is('.OxPosition') && !$target.is('input') && that.gainFocus();
|
var $target = $(e.target);
|
||||||
// the following is needed to determine
|
!$target.is('.OxPosition') && !$target.is('input') && that.gainFocus();
|
||||||
// how to handle annotation input blur
|
// the following is needed to determine
|
||||||
if (self.editing) {
|
// how to handle annotation input blur
|
||||||
self.focused = true;
|
if (self.editing) {
|
||||||
setTimeout(function() {
|
self.focused = true;
|
||||||
// annotation folder will gain focus on blur
|
setTimeout(function() {
|
||||||
// so we need to get focus back
|
// annotation folder will gain focus on blur
|
||||||
that.gainFocus();
|
// so we need to get focus back
|
||||||
self.focused = false;
|
that.gainFocus();
|
||||||
}, 25);
|
self.focused = false;
|
||||||
|
}, 25);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue