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