hide volume column for smart edits

This commit is contained in:
j 2021-08-04 14:10:01 +02:00
parent 03c2f9f3a1
commit 1e0537c95f

View file

@ -89,7 +89,7 @@ Ox.ClipPanel = function(options, self) {
}
});
self.columns = [
self.columns = [].concat([
{
align: 'right',
id: 'index',
@ -183,7 +183,9 @@ Ox.ClipPanel = function(options, self) {
visible: true,
width: 90
},
{
],
hasVolume() ?
[{
align: 'right',
editable: self.options.editable,
format: function(value, data) {
@ -198,6 +200,8 @@ Ox.ClipPanel = function(options, self) {
visible: false,
width: 45
},
] : [],
[
{
addable: false,
id: 'sort',
@ -205,7 +209,8 @@ Ox.ClipPanel = function(options, self) {
// title: Ox._('Sort'),
visible: false
}
];
]
);
self.$menubar = Ox.Bar({
size: 24
@ -587,6 +592,12 @@ Ox.ClipPanel = function(options, self) {
&& self.options.sort[0].operator == '+';
}
function hasVolume() {
return self.options.editable
&& self.options.sort && self.options.sort.length
&& self.options.sort[0].key == 'index'
}
function joinClips() {
var clips = getEditable(self.options.selected).map(function(id) {
return Ox.clone(Ox.getObjectById(self.options.clips, id));