video-related fixes

This commit is contained in:
rolux 2011-08-19 02:13:16 +00:00
parent 98fcaf63aa
commit e7320cb890

View file

@ -112,7 +112,11 @@ pandora.ui.list = function() { // fixme: remove view argument
unique: 'id' unique: 'id'
}); });
} else if (view == 'info') { } else if (view == 'info') {
that = Ox.IconList({ that = Ox.Element().css({margin: '16px'}).html(view + ' results view still missing.');
} else if (view == 'clips') {
that = Ox.Element().css({margin: '16px'}).html(view + ' results view still missing.');
} else if (view == 'timelines') {
that = Ox.InfoList({
borderRadius: pandora.user.ui.icons == 'posters' ? 0 : 16, borderRadius: pandora.user.ui.icons == 'posters' ? 0 : 16,
defaultRatio: pandora.user.ui.icons == 'posters' ? 5/8 : 1, defaultRatio: pandora.user.ui.icons == 'posters' ? 5/8 : 1,
id: 'list', id: 'list',
@ -132,22 +136,16 @@ pandora.ui.list = function() { // fixme: remove view argument
}; };
}, },
items: function(data, callback) { items: function(data, callback) {
//Ox.print('data, pandora.Query.toObject', data, pandora.Query.toObject())
pandora.api.find($.extend(data, { pandora.api.find($.extend(data, {
query: pandora.Query.toObject() query: pandora.Query.toObject()
}), callback); }), callback);
}, },
keys: ['director', 'id', 'poster', 'title', 'year'], keys: ['director', 'duration', 'id', 'poster', 'title', 'year'],
orientation: 'vertical',
selected: pandora.user.ui.lists[pandora.user.ui.list].selected, selected: pandora.user.ui.lists[pandora.user.ui.list].selected,
size: 128, size: 192,
sort: pandora.user.ui.lists[pandora.user.ui.list].sort, sort: pandora.user.ui.lists[pandora.user.ui.list].sort,
unique: 'id' unique: 'id'
}); });
} else if (view == 'clips') {
that = Ox.Element().css({margin: '16px'}).html(view + ' results view still missing.');
} else if (view == 'timelines') {
that = Ox.Element().css({margin: '16px'}).html(view + ' results view still missing.');
} else if (view == 'maps') { } else if (view == 'maps') {
that = Ox.Element().css({margin: '16px'}).html(view + ' results view still missing.'); that = Ox.Element().css({margin: '16px'}).html(view + ' results view still missing.');
} else if (view == 'calendars') { } else if (view == 'calendars') {
@ -231,8 +229,9 @@ pandora.ui.list = function() { // fixme: remove view argument
video: '/' + item + '/96p.webm' video: '/' + item + '/96p.webm'
}) })
.addClass('OxTarget') .addClass('OxTarget')
.bind({ .bindEvent({
click: function() { // doubleclick opens item
singleclick: function() {
$player.$element.is('.OxSelectedVideo') && $player.togglePaused(); $player.$element.is('.OxSelectedVideo') && $player.togglePaused();
} }
}); });
@ -247,7 +246,7 @@ pandora.ui.list = function() { // fixme: remove view argument
setTimeout(function() { setTimeout(function() {
$('.OxSelectedVideo').removeClass('OxSelectedVideo'); $('.OxSelectedVideo').removeClass('OxSelectedVideo');
$video.addClass('OxSelectedVideo'); $video.addClass('OxSelectedVideo');
}, 25); }, 300);
} }
} }
} }