diff --git a/source/UI/js/Video/AnnotationPanel.js b/source/UI/js/Video/AnnotationPanel.js index 40482e87..c7de1184 100644 --- a/source/UI/js/Video/AnnotationPanel.js +++ b/source/UI/js/Video/AnnotationPanel.js @@ -492,6 +492,23 @@ Ox.AnnotationPanel = function(options, self) { }; })} ] : [], + [ + {}, + {id: 'results', title: Ox._('Find Annotations'), disabled: true}, + {group: 'results', max: 1, items: [ + { + id: 'result_*', + title: Ox._('All'), + checked: self.options.highlightLayer == '*' + } + ].concat(self.options.layers.map(function(result) { + return { + id: 'result_' + result.id, + title: result.title, + checked: result.id == self.options.highlightLayer + }; + }))} + ], self.options.showUsers && self.users.length ? [ {}, {id: 'users', title: Ox._('Show Users'), disabled: true}, @@ -532,6 +549,10 @@ Ox.AnnotationPanel = function(options, self) { self.$folder.forEach(function($folder) { $folder.options({users: self.enabledUsers}); }); + } else if (data.id == 'results') { + var layer = data.checked[0].id.split('_').pop() + that.options('highlightLayer', layer); + that.triggerEvent('highlightlayer', self.options.highlightLayer); } else { self.options[data.id] = data.checked[0].id; set[data.id] = self.options[data.id]; diff --git a/source/UI/js/Video/VideoAnnotationPanel.js b/source/UI/js/Video/VideoAnnotationPanel.js index ff79a92e..07733639 100644 --- a/source/UI/js/Video/VideoAnnotationPanel.js +++ b/source/UI/js/Video/VideoAnnotationPanel.js @@ -791,28 +791,6 @@ Ox.VideoAnnotationPanel = function(options, self) { }) .appendTo(self.$menubar); - self.$findLayerSelect = Ox.Select({ - items: [ - {id: '*', title: Ox._('Find: {0}', [Ox._('All')])}, - ].concat(self.options.layers.map(function(layer) { - return { - id: layer.id, - title: Ox._('Find: {0}', [Ox._(layer.title)]) - } - })), - value: self.options.findLayer, - width: 128, - overlap: 'right', - }) - .css({float: 'right', background: 'transparent'}) - .bindEvent({ - change: function(data) { - self.options.findLayer = data.value; - submitFindInput(self.$findInput.value(), false); - }, - }) - .appendTo(self.$menubar); - self.$nextButton = Ox.Button({ disabled: true, style: 'symbol', @@ -920,6 +898,11 @@ Ox.VideoAnnotationPanel = function(options, self) { that.triggerEvent('findannotations', data); }, focus: that.gainFocus, + highlightlayer: function(data) { + console.log('!! hl', data) + self.options.findLayer = data; + submitFindInput(self.$findInput.value(), false); + }, importannotations: function() { that.triggerEvent('importannotations'); },