move import/export annotations to menu in annotations panel
This commit is contained in:
parent
dbd0db9b3f
commit
916c194301
2 changed files with 20 additions and 8 deletions
|
@ -47,6 +47,8 @@ Ox.AnnotationPanel = function(options, self) {
|
|||
calendarSize: 256,
|
||||
clickLink: null,
|
||||
editable: false,
|
||||
enableExport: false,
|
||||
enableImport: false,
|
||||
highlight: '',
|
||||
itemName: {singular: 'video', plural: 'videos'},
|
||||
layers: [],
|
||||
|
@ -263,7 +265,12 @@ Ox.AnnotationPanel = function(options, self) {
|
|||
{id: 'annotation', title: annotationTitle, disabled: true},
|
||||
{id: 'find', title: Ox._('Find in This {0}', [Ox.toTitleCase(self.options.itemName.singular)])},
|
||||
{id: 'findannotations', title: Ox._('Find in All {0}', [Ox.toTitleCase(self.options.itemName.plural)])}
|
||||
] : []
|
||||
] : [],
|
||||
[
|
||||
{},
|
||||
{id: 'import', title: Ox._('Import Annotations...'), disabled: !self.options.enableImport},
|
||||
{id: 'export', title: Ox._('Export Annotations...'), disabled: !self.options.enableExport},
|
||||
]
|
||||
),
|
||||
maxWidth: 256,
|
||||
style: 'square',
|
||||
|
@ -282,10 +289,14 @@ Ox.AnnotationPanel = function(options, self) {
|
|||
getFolder(self.options.selected).options({selected: ''});
|
||||
} else if (data.id == 'edit') {
|
||||
getFolder(self.options.selected).editItem();
|
||||
} else if (data.id == 'export') {
|
||||
that.triggerEvent('exportannotations');
|
||||
} else if (data.id == 'find') {
|
||||
that.triggerEvent('find', {value: value});
|
||||
} else if (data.id == 'findannotations') {
|
||||
that.triggerEvent('findannotations', {key: key, value: value});
|
||||
} else if (data.id == 'import') {
|
||||
that.triggerEvent('importannotations');
|
||||
} else if (data.id == 'insert') {
|
||||
var id = $('.OxEditableElement div.OxInput').data('oxid'),
|
||||
element = $('.OxEditableElement textarea.OxInput')[0];
|
||||
|
|
|
@ -637,9 +637,6 @@ Ox.VideoAnnotationPanel = function(options, self) {
|
|||
{id: 'embedSelection', title: Ox._('Embed Selection...')},
|
||||
{id: 'linkToSelection', title: Ox._('Link to Selection...')},
|
||||
{},
|
||||
{id: 'importAnnotations', title: Ox._('Import Annotations...'), disabled: !self.options.enableImport},
|
||||
{id: 'exportAnnotations', title: Ox._('Export Annotations...'), disabled: !self.options.enableExport},
|
||||
{},
|
||||
{id: 'keyboard', title: Ox._('Keyboard Shortcuts...'), keyboard: 'h'}
|
||||
]
|
||||
),
|
||||
|
@ -679,10 +676,6 @@ Ox.VideoAnnotationPanel = function(options, self) {
|
|||
'in': self.options['in'],
|
||||
out: self.options.out
|
||||
});
|
||||
} else if (id == 'importAnnotations') {
|
||||
that.triggerEvent('importannotations');
|
||||
} else if (id == 'exportAnnotations') {
|
||||
that.triggerEvent('exportannotations');
|
||||
} else if (id == 'keyboard') {
|
||||
showKeyboardShortcuts();
|
||||
}
|
||||
|
@ -802,6 +795,8 @@ Ox.VideoAnnotationPanel = function(options, self) {
|
|||
calendarSize: self.options.annotationsCalendarSize,
|
||||
clickLink: self.options.clickLink,
|
||||
editable: true,
|
||||
enableExport: self.options.enableExport,
|
||||
enableImport: self.options.enableImport,
|
||||
highlight: self.options.find,
|
||||
'in': self.options['in'],
|
||||
itemName: self.options.itemName,
|
||||
|
@ -855,6 +850,9 @@ Ox.VideoAnnotationPanel = function(options, self) {
|
|||
self.editing = true;
|
||||
setTimelineState();
|
||||
},
|
||||
exportannotations: function() {
|
||||
that.triggerEvent('exportannotations');
|
||||
},
|
||||
find: function(data) {
|
||||
self.$findInput.options({value: data.value});
|
||||
submitFindInput(data.value, true);
|
||||
|
@ -863,6 +861,9 @@ Ox.VideoAnnotationPanel = function(options, self) {
|
|||
that.triggerEvent('findannotations', data);
|
||||
},
|
||||
focus: that.gainFocus,
|
||||
importannotations: function() {
|
||||
that.triggerEvent('importannotations');
|
||||
},
|
||||
info: function(data) {
|
||||
that.triggerEvent('info', data);
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue