diff --git a/source/Ox.UI/js/Video/AnnotationPanel.js b/source/Ox.UI/js/Video/AnnotationPanel.js index 033af34b..ac246c24 100644 --- a/source/Ox.UI/js/Video/AnnotationPanel.js +++ b/source/Ox.UI/js/Video/AnnotationPanel.js @@ -117,7 +117,7 @@ Ox.AnnotationPanel = function(options, self) { self.options.editable && renderEditMenu(); that.setElement( - Ox.SplitPanel({ + self.$panel = Ox.SplitPanel({ elements: [ { element: self.$menubar, diff --git a/source/Ox.UI/js/Video/ClipPanel.js b/source/Ox.UI/js/Video/ClipPanel.js index edce09bd..de074163 100644 --- a/source/Ox.UI/js/Video/ClipPanel.js +++ b/source/Ox.UI/js/Video/ClipPanel.js @@ -56,8 +56,9 @@ Ox.ClipPanel = function(options, self) { .bindEvent({ change: function(data) { if (data.id == 'view') { - that.replaceElement(1, self.$list = getList()); - that.triggerEvent('view', {view: data.checked[0].id}); + self.options.view = data.checked[0].id; + self.$panel.replaceElement(1, self.$list = getList()); + self.$panel.triggerEvent('view', {view: self.options.view}); } }, click: function(data) { @@ -114,7 +115,7 @@ Ox.ClipPanel = function(options, self) { }); that.setElement( - Ox.SplitPanel({ + self.$panel = Ox.SplitPanel({ elements: [ { element: self.$menubar, @@ -224,90 +225,45 @@ Ox.ClipPanel = function(options, self) { sort: self.options.sort, sortable: isSortable(), unique: 'id' + }) : Ox.Element(); + + $list.bindEvent({ + copy: function(data) { + that.triggerEvent('copy', data); + }, + cut: function(data) { + that.triggerEvent('cut', data); + }, + 'delete': function(data) { + that.triggerEvent('remove', data); + }, + move: function(data) { + data.ids.forEach(function(id, index) { + self.$list.value(id, 'index', index); + }); + that.triggerEvent('move', data); + }, + open: function(data) { + that.triggerEvent('open', data); + }, + paste: function() { + that.triggerEvent('paste'); + }, + select: function(data) { + that.triggerEvent('select', data); + }, + sort: function(data) { + self.options.sort = self.$list.options('sort'); + self.$list.options({sortable: isSortable()}); + that.triggerEvent('sort', data); + }, + submit: function(data) { + data.value = Ox.parseDuration(data.value); + self.$list.value(data.id, data.key, data.value); + that.triggerEvent('edit', data); + } }); - } else { - self.$list = Ox.IconList({ - - }); - } - self.$list.bindEvent({ - copy: function(data) { - that.triggerEvent('copy', data); - }, - cut: function(data) { - that.triggerEvent('cut', data); - }, - 'delete': function(data) { - that.triggerEvent('remove', data); - }, - move: function(data) { - data.ids.forEach(function(id, index) { - self.$list.value(id, 'index', index); - }); - that.triggerEvent('move', data); - }, - open: function(data) { - that.triggerEvent('open', data); - }, - paste: function() { - that.triggerEvent('paste'); - }, - select: function(data) { - that.triggerEvent('select', data); - }, - sort: function(data) { - self.options.sort = self.$list.options('sort'); - self.$list.options({sortable: isSortable()}); - that.triggerEvent('sort', data); - }, - submit: function(data) { - data.value = Ox.parseDuration(data.value); - self.$list.value(data.id, data.key, data.value); - that.triggerEvent('edit', data); - } - }); - - self.$statusbar = Ox.Bar({ - size: 16 - }); - - that.setElement( - Ox.SplitPanel({ - elements: [ - { - element: self.$menubar, - size: 24 - }, - { - element: self.$list - }, - { - element: self.$statusbar, - size: 16 - } - ], - orientation: 'vertical' - }) - ); - - function cutClips() { - - } - - function editClip(data) { - var value = self.$list.value(data.id, data.key); - if (data.value != value && !(data.value === '' && value === null)) { - self.$list.value(data.id, data.key, data.value || null); - that.triggerEvent('edit', data); - } - } - - function getButtonTitle() { - return self.options.sort[0].operator == '+' ? 'up' : 'down'; - } - - function getButtonTooltip() { - return Ox._(self.options.sort[0].operator == '+' ? 'Ascending' : 'Descending'); + return $list; } function isEditable(data) { diff --git a/source/Ox.UI/js/Video/VideoPanel.js b/source/Ox.UI/js/Video/VideoPanel.js index c3fdfb2b..23027308 100644 --- a/source/Ox.UI/js/Video/VideoPanel.js +++ b/source/Ox.UI/js/Video/VideoPanel.js @@ -335,7 +335,7 @@ Ox.VideoPanel = function(options, self) { }); that.setElement( - Ox.SplitPanel({ + self.$panel = Ox.SplitPanel({ elements: [ { element: self.$videoPanel