forked from 0x2620/pandora
another bugfix for clips view
This commit is contained in:
parent
89ba815617
commit
e040e1bc5d
3 changed files with 13 additions and 4 deletions
|
@ -9,6 +9,14 @@ pandora.ui.backButton = function() {
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
click: function() {
|
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: ''});
|
pandora.UI.set({item: ''});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -46,6 +46,10 @@ pandora.ui.itemClips = function(options) {
|
||||||
|
|
||||||
function doubleclick(data) {
|
function doubleclick(data) {
|
||||||
var $item, $target = $(data.target), item, points, set;
|
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')) {
|
if ($target.is('.OxSpecialTarget')) {
|
||||||
$item = $target.parent().parent();
|
$item = $target.parent().parent();
|
||||||
item = self.options.id;
|
item = self.options.id;
|
||||||
|
@ -56,17 +60,15 @@ pandora.ui.itemClips = function(options) {
|
||||||
out: points[1],
|
out: points[1],
|
||||||
position: points[0]
|
position: points[0]
|
||||||
};
|
};
|
||||||
//Ox.print('SETTING VIDEO POINTS', set)
|
|
||||||
pandora.UI.set(set);
|
pandora.UI.set(set);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function singleclick(data) {
|
function singleclick(data) {
|
||||||
var $img, $item, $target = $(data.target), $video, points;
|
var $img, $item, $target = $(data.target), points;
|
||||||
if ($target.is('.OxSpecialTarget')) {
|
if ($target.is('.OxSpecialTarget')) {
|
||||||
$item = $target.parent().parent();
|
$item = $target.parent().parent();
|
||||||
$img = $item.find('.OxIcon > img');
|
$img = $item.find('.OxIcon > img');
|
||||||
$video = $item.find('.OxIcon > .OxVideoPlayer');
|
|
||||||
points = [$item.data('in'), $item.data('out')];
|
points = [$item.data('in'), $item.data('out')];
|
||||||
if ($img.length) {
|
if ($img.length) {
|
||||||
pandora.api.get({id: self.options.id, keys: ['durations']}, function(result) {
|
pandora.api.get({id: self.options.id, keys: ['durations']}, function(result) {
|
||||||
|
|
|
@ -387,7 +387,6 @@ pandora.ui.list = function() {
|
||||||
if (data.isSpecialTarget) {
|
if (data.isSpecialTarget) {
|
||||||
set.itemView = pandora.user.ui.videoView;
|
set.itemView = pandora.user.ui.videoView;
|
||||||
}
|
}
|
||||||
//Ox.print('SETTING ITEM', set)
|
|
||||||
pandora.UI.set(set);
|
pandora.UI.set(set);
|
||||||
},
|
},
|
||||||
openpreview: function(data) {
|
openpreview: function(data) {
|
||||||
|
|
Loading…
Reference in a new issue