entities are not links
This commit is contained in:
parent
f624c86309
commit
4f7b9846d8
2 changed files with 17 additions and 5 deletions
|
@ -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') {
|
||||
// ...
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue