diff --git a/source/UI/js/Video/AnnotationPanel.js b/source/UI/js/Video/AnnotationPanel.js index 592e1201..1f1017cb 100644 --- a/source/UI/js/Video/AnnotationPanel.js +++ b/source/UI/js/Video/AnnotationPanel.js @@ -218,7 +218,7 @@ Ox.AnnotationPanel = function(options, self) { function renderEditMenu() { var annotation, annotationTitle, folder, hasManualCalendarOrMap, - isDefined, isEditable, isEvent, isEventOrPlace, isPlace, isString, + isDefined, isEditable, isEntity, isEvent, isEventOrPlace, isPlace, isString, key, manageTitle, type, value; if (self.options.selected) { annotation = getAnnotation(self.options.selected); @@ -228,6 +228,7 @@ Ox.AnnotationPanel = function(options, self) { type = folder.options('type'); value = annotation.entity ? annotation.entity.name : annotation.value; isEditable = annotation.editable; + isEntity = !!annotation.entity; isEvent = type == 'event'; isPlace = type == 'place'; isEventOrPlace = isEvent || isPlace; @@ -264,10 +265,16 @@ Ox.AnnotationPanel = function(options, self) { ] : [], isString ? [ {}, - {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: 'annotation', title: annotationTitle, disabled: true} + ].concat( + isEntity ? [ + {id: 'showentityinfo', title: Ox._('Show Entity Info')} + ] : [], + [ + {id: 'findannotations', title: Ox._('Find in All {0}', [Ox.toTitleCase(self.options.itemName.plural)])}, + {id: 'find', title: Ox._('Find in This {0}', [Ox.toTitleCase(self.options.itemName.singular)])} + ] + ) : [], [ {}, {id: 'import', title: Ox._('Import Annotations...'), disabled: !self.options.enableImport}, @@ -318,6 +325,8 @@ Ox.AnnotationPanel = function(options, self) { }); } else if (data.id == 'save') { // ... + } else if (data.id == 'showentityinfo') { + that.triggerEvent('showentityinfo', annotation.entity); } else if (data.id == 'undo') { // ... } diff --git a/source/UI/js/Video/VideoAnnotationPanel.js b/source/UI/js/Video/VideoAnnotationPanel.js index b11e4b25..bb2c37a3 100644 --- a/source/UI/js/Video/VideoAnnotationPanel.js +++ b/source/UI/js/Video/VideoAnnotationPanel.js @@ -894,6 +894,9 @@ Ox.VideoAnnotationPanel = function(options, self) { select: function(data) { selectAnnotation(data, true); }, + showentityinfo: function(data) { + that.triggerEvent('showentityinfo', data); + }, submit: submitAnnotation, toggle: toggleAnnotations, togglecalendar: function(data) {