another bugfix for clips view

This commit is contained in:
rolux 2011-10-19 13:00:10 +00:00
parent 89ba815617
commit e040e1bc5d
3 changed files with 13 additions and 4 deletions

View file

@ -9,6 +9,14 @@ pandora.ui.backButton = function() {
})
.bindEvent({
click: function() {
/*
FIXME: if, on page load, one clicks back quickly,
the item content may overwrite the list content.
but we cannot cancel all requests, since that
might keep the lists folders from loading.
so we'd have to cancel with a function -- and
it's unclear if the best place for that is here
*/
pandora.UI.set({item: ''});
}
});

View file

@ -46,6 +46,10 @@ pandora.ui.itemClips = function(options) {
function doubleclick(data) {
var $item, $target = $(data.target), item, points, set;
if ($target.parent().parent().is('.OxSpecialTarget')) {
// for videos, the click registers deeper inside
$target = $target.parent().parent();
}
if ($target.is('.OxSpecialTarget')) {
$item = $target.parent().parent();
item = self.options.id;
@ -56,17 +60,15 @@ pandora.ui.itemClips = function(options) {
out: points[1],
position: points[0]
};
//Ox.print('SETTING VIDEO POINTS', set)
pandora.UI.set(set);
}
}
function singleclick(data) {
var $img, $item, $target = $(data.target), $video, points;
var $img, $item, $target = $(data.target), points;
if ($target.is('.OxSpecialTarget')) {
$item = $target.parent().parent();
$img = $item.find('.OxIcon > img');
$video = $item.find('.OxIcon > .OxVideoPlayer');
points = [$item.data('in'), $item.data('out')];
if ($img.length) {
pandora.api.get({id: self.options.id, keys: ['durations']}, function(result) {

View file

@ -387,7 +387,6 @@ pandora.ui.list = function() {
if (data.isSpecialTarget) {
set.itemView = pandora.user.ui.videoView;
}
//Ox.print('SETTING ITEM', set)
pandora.UI.set(set);
},
openpreview: function(data) {