allow for multi-select in clip lists

This commit is contained in:
rolux 2013-07-15 09:58:20 +00:00
parent 9ca6613bc6
commit 6046a6792a

View file

@ -105,7 +105,6 @@ pandora.ui.clipList = function(videoRatio) {
keys: ['annotations', 'id', 'in', 'out'].concat( keys: ['annotations', 'id', 'in', 'out'].concat(
!ui.item ? ['videoRatio'] : [] !ui.item ? ['videoRatio'] : []
), ),
max: 1,
orientation: isEmbed && !isClipView ? 'horizontal' : 'both', orientation: isEmbed && !isClipView ? 'horizontal' : 'both',
size: 128, size: 128,
sort: !ui.item ? ui.listSort : ui.itemSort, sort: !ui.item ? ui.listSort : ui.itemSort,
@ -175,16 +174,18 @@ pandora.ui.clipList = function(videoRatio) {
}, },
openpreview: function(data) { openpreview: function(data) {
// on press space key // on press space key
if (data.ids.length == 1) {
var $video = that.find('.OxItem.OxSelected > .OxIcon > .OxVideoPlayer'); var $video = that.find('.OxItem.OxSelected > .OxIcon > .OxVideoPlayer');
if ($video) { if ($video) {
// trigger singleclick // trigger singleclick
$video.trigger('mousedown'); $video.trigger('mousedown');
Ox.UI.$window.trigger('mouseup'); Ox.UI.$window.trigger('mouseup');
} }
}
that.closePreview(); that.closePreview();
}, },
select: function(data) { select: function(data) {
if (data.ids.length) { if (data.ids.length == 1) {
var id = data.ids[0], var id = data.ids[0],
item = id.split('/')[0], width, height, item = id.split('/')[0], width, height,
$img = that.find('.OxItem.OxSelected > .OxIcon > img'), $img = that.find('.OxItem.OxSelected > .OxIcon > img'),