bind -> on, unbind -> off

This commit is contained in:
rolux 2012-05-28 16:10:11 +02:00
parent 81dbceb0ef
commit e477d4ee45
10 changed files with 18 additions and 18 deletions

View file

@ -210,7 +210,7 @@ appPanel
body: $('body'),
document: $(document),
window: $(window)
.bind({
.on({
beforeunload: pandora.beforeunloadWindow,
resize: function() {
pandora.resizeWindow();

View file

@ -9,7 +9,7 @@ pandora.ui.allItems = function() {
cursor: 'default',
overflow: 'hidden'
})
.bind({
.on({
click: function() {
that.gainFocus();
pandora.user.ui._list && pandora.UI.set('find', {conditions: [], operator: '&'});

View file

@ -57,7 +57,7 @@ pandora.ui.embedDialog = function(data) {
+ '" height="' + height
+ '" src="' + constructUrl(data)
+ '" frameborder="0" allowfullscreen></iframe>'
).bind({
).on({
click: function() {
this.focus();
this.select();

View file

@ -39,7 +39,7 @@ pandora.ui.home = function() {
bottom: 0,
width: '320px',
height: '160px',
margin: 'auto'
margin: 'auto',
})
.appendTo(that),
$logo = $('<img>')
@ -57,7 +57,7 @@ pandora.ui.home = function() {
margin: 'auto',
cursor: 'pointer'
})
.bind({
.on({
click: function() {
$browseButton.triggerEvent('click');
}

View file

@ -57,7 +57,7 @@ pandora.ui.home = function() {
margin: 'auto',
cursor: 'pointer'
})
.bind({
.on({
click: function() {
$browseButton.triggerEvent('click');
}

View file

@ -65,7 +65,7 @@ pandora.ui.home = function() {
margin: '0 auto 0 auto',
cursor: 'pointer'
})
.bind({
.on({
click: function() {
$browseButton.triggerEvent('click');
}
@ -414,7 +414,7 @@ pandora.ui.home = function() {
}
})
.appendTo($listsBox);
$listsBox.bind({
$listsBox.on({
mouseenter: function() {
mouse = true;
$('.visible').show().stop().animate({
@ -454,7 +454,7 @@ pandora.ui.home = function() {
}
}
};
Ox.$document.bind({keydown: self.keydown});
Ox.$document.on({keydown: self.keydown});
lists.forEach(function(list, i) {
$listBox[i] = $('<div>')
.css({
@ -584,7 +584,7 @@ pandora.ui.home = function() {
that.remove();
});
pandora.$ui.tv && pandora.$ui.tv.unmute();
self.keydown && Ox.$document.unbind({keydown: self.keydown});
self.keydown && Ox.$document.off({keydown: self.keydown});
return that;
};

View file

@ -111,7 +111,7 @@ pandora.ui.importAnnotations = function(data) {
.css({
padding: '8px'
})
.bind({
.on({
change: function(event) {
if(this.files.length) {
file = this.files[0];

View file

@ -75,7 +75,7 @@ pandora.ui.listDialog = function(section) {
);
}
})
]
],
})
.css({
float: 'right',
@ -340,7 +340,7 @@ pandora.ui.listIconPanel = function(listData) {
marginTop: '16px',
cursor: 'pointer'
})
.bind({
.on({
click: function(e) {
clickIcon(e);
},

View file

@ -47,7 +47,7 @@ pandora.ui.uploadDialog = function(data) {
height: 128,
removeOnClose: true,
width: 368,
title: 'Upload Video'
title: 'Upload Video',
})
.bindEvent({
close: function(data) {
@ -79,7 +79,7 @@ pandora.ui.uploadDialog = function(data) {
.css({
padding: '8px'
})
.bind({
.on({
change: function(event) {
if(this.files.length) {
file = this.files[0];

View file

@ -198,7 +198,7 @@ pandora.clickLink = function(e) {
pandora.createLinks = function($element) {
$element
.bind({
.on({
click: function() {
return false;
}
@ -243,7 +243,7 @@ pandora.enableDragAndDrop = function($list, canMove) {
});
});
$tooltip.options({title: getTitle()}).show(data.event);
canMove && Ox.UI.$window.bind({
canMove && Ox.UI.$window.on({
keydown: keydown,
keyup: keyup
});
@ -316,7 +316,7 @@ pandora.enableDragAndDrop = function($list, canMove) {
},
draganddropend: function(data) {
Ox.Log('', data, drag, '------------');
canMove && Ox.UI.$window.unbind({
canMove && Ox.UI.$window.off({
keydown: keydown,
keyup: keyup
});