make click on clip in clips view open the item at the appropriate position
This commit is contained in:
parent
0b2a068697
commit
0ef3aa0ad3
1 changed files with 13 additions and 4 deletions
|
@ -7,7 +7,7 @@ pandora.ui.itemClips = function(options) {
|
||||||
margin: '4px'
|
margin: '4px'
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
mousedown: mousedown
|
singleclick: singleclick
|
||||||
});
|
});
|
||||||
|
|
||||||
self.options = Ox.extend({
|
self.options = Ox.extend({
|
||||||
|
@ -43,8 +43,7 @@ pandora.ui.itemClips = function(options) {
|
||||||
that.append($item);
|
that.append($item);
|
||||||
});
|
});
|
||||||
|
|
||||||
function mousedown(data) {
|
function singleclick(data) {
|
||||||
Ox.print('MOUSEDOWN', data)
|
|
||||||
var $img, $item, $target = $(data.target), $video, points;
|
var $img, $item, $target = $(data.target), $video, points;
|
||||||
if ($target.is('.OxSpecialTarget')) {
|
if ($target.is('.OxSpecialTarget')) {
|
||||||
$item = $target.parent().parent();
|
$item = $target.parent().parent();
|
||||||
|
@ -73,7 +72,17 @@ pandora.ui.itemClips = function(options) {
|
||||||
.addClass('OxTarget OxSpecialTarget')
|
.addClass('OxTarget OxSpecialTarget')
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
doubleclick: function() {
|
doubleclick: function() {
|
||||||
|
var item = self.options.id,
|
||||||
|
set = {
|
||||||
|
item: item,
|
||||||
|
itemView: pandora.user.ui.videoView
|
||||||
|
};
|
||||||
|
set['videoPoints.' + item] = {
|
||||||
|
'in': points[0],
|
||||||
|
out: points[1],
|
||||||
|
position: points[0]
|
||||||
|
};
|
||||||
|
pandora.UI.set(set);
|
||||||
},
|
},
|
||||||
singleclick: function() {
|
singleclick: function() {
|
||||||
$player.togglePaused();
|
$player.togglePaused();
|
||||||
|
|
Loading…
Reference in a new issue