use getPasteIndex; add sort mapping to columns; include annotation property

This commit is contained in:
rolux 2014-02-12 13:59:00 +00:00
parent 603dfa3d3a
commit 50f4bb145d
2 changed files with 27 additions and 1 deletions

View file

@ -79,6 +79,9 @@ Ox.ClipPanel = function(options, self) {
align: 'right', align: 'right',
id: 'index', id: 'index',
operator: '+', operator: '+',
sort: function(value, data) {
return data.sort;
},
title: Ox._('Index'), title: Ox._('Index'),
visible: false, visible: false,
width: 60 width: 60
@ -87,17 +90,26 @@ Ox.ClipPanel = function(options, self) {
addable: false, addable: false,
id: 'id', id: 'id',
operator: '+', operator: '+',
sort: function(value, data) {
return data.sort;
},
unique: true, unique: true,
}, },
{ {
addable: false, addable: false,
id: 'item', id: 'item',
operator: '+', operator: '+',
sort: function(value, data) {
return data.sort;
},
}, },
{ {
id: 'title', id: 'title',
format: self.options.formatTitle, format: self.options.formatTitle,
operator: '+', operator: '+',
sort: function(value, data) {
return data.sort;
},
title: Ox._('Title'), title: Ox._('Title'),
visible: true, visible: true,
width: 120 width: 120
@ -113,6 +125,9 @@ Ox.ClipPanel = function(options, self) {
}, },
id: 'in', id: 'in',
operator: '+', operator: '+',
sort: function(value, data) {
return data.sort;
},
title: Ox._('In'), title: Ox._('In'),
visible: true, visible: true,
width: 90 width: 90
@ -142,6 +157,9 @@ Ox.ClipPanel = function(options, self) {
}, },
id: 'duration', id: 'duration',
operator: '+', operator: '+',
sort: function(value, data) {
return data.sort;
},
title: Ox._('Duration'), title: Ox._('Duration'),
visible: true, visible: true,
width: 90 width: 90
@ -375,7 +393,7 @@ Ox.ClipPanel = function(options, self) {
}; };
}, },
items: self.options.clips, items: self.options.clips,
keys: ['id', 'in', 'out'], keys: ['annotation', 'id', 'in', 'out'],
orientation: 'both', orientation: 'both',
selected: self.options.selected, selected: self.options.selected,
sort: getListSort(), sort: getListSort(),
@ -600,6 +618,10 @@ Ox.ClipPanel = function(options, self) {
); );
} }
that.getPasteIndex = function() {
return self.$list.getPasteIndex();
};
that.invertSelection = function() { that.invertSelection = function() {
self.$list.invertSelection(); self.$list.invertSelection();
}; };

View file

@ -638,6 +638,10 @@ Ox.VideoEditPanel = function(options, self) {
}); });
} }
that.getPasteIndex = function() {
return self.$clipPanel.getPasteIndex();
};
that.getSelectedClips = function() { that.getSelectedClips = function() {
return self.options.selected.length ? self.options.selected.map(function(id) { return self.options.selected.length ? self.options.selected.map(function(id) {
var clip = getClipById(id); var clip = getClipById(id);