move layer selection into annotation options menu
This commit is contained in:
parent
8b14537dce
commit
066de44cd2
2 changed files with 26 additions and 22 deletions
|
@ -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 ? [
|
self.options.showUsers && self.users.length ? [
|
||||||
{},
|
{},
|
||||||
{id: 'users', title: Ox._('Show Users'), disabled: true},
|
{id: 'users', title: Ox._('Show Users'), disabled: true},
|
||||||
|
@ -532,6 +549,10 @@ Ox.AnnotationPanel = function(options, self) {
|
||||||
self.$folder.forEach(function($folder) {
|
self.$folder.forEach(function($folder) {
|
||||||
$folder.options({users: self.enabledUsers});
|
$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 {
|
} else {
|
||||||
self.options[data.id] = data.checked[0].id;
|
self.options[data.id] = data.checked[0].id;
|
||||||
set[data.id] = self.options[data.id];
|
set[data.id] = self.options[data.id];
|
||||||
|
|
|
@ -791,28 +791,6 @@ Ox.VideoAnnotationPanel = function(options, self) {
|
||||||
})
|
})
|
||||||
.appendTo(self.$menubar);
|
.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({
|
self.$nextButton = Ox.Button({
|
||||||
disabled: true,
|
disabled: true,
|
||||||
style: 'symbol',
|
style: 'symbol',
|
||||||
|
@ -920,6 +898,11 @@ Ox.VideoAnnotationPanel = function(options, self) {
|
||||||
that.triggerEvent('findannotations', data);
|
that.triggerEvent('findannotations', data);
|
||||||
},
|
},
|
||||||
focus: that.gainFocus,
|
focus: that.gainFocus,
|
||||||
|
highlightlayer: function(data) {
|
||||||
|
console.log('!! hl', data)
|
||||||
|
self.options.findLayer = data;
|
||||||
|
submitFindInput(self.$findInput.value(), false);
|
||||||
|
},
|
||||||
importannotations: function() {
|
importannotations: function() {
|
||||||
that.triggerEvent('importannotations');
|
that.triggerEvent('importannotations');
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue