From 1e0537c95feb6487ec51c1a7f8046c34cb438408 Mon Sep 17 00:00:00 2001 From: j Date: Wed, 4 Aug 2021 14:10:01 +0200 Subject: [PATCH] hide volume column for smart edits --- source/UI/js/Video/ClipPanel.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/source/UI/js/Video/ClipPanel.js b/source/UI/js/Video/ClipPanel.js index 275da1d9..ea9eb562 100644 --- a/source/UI/js/Video/ClipPanel.js +++ b/source/UI/js/Video/ClipPanel.js @@ -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));