diff --git a/source/Ox.UI/js/Video/AnnotationPanel.js b/source/Ox.UI/js/Video/AnnotationPanel.js index b71a831a..d5852b0c 100644 --- a/source/Ox.UI/js/Video/AnnotationPanel.js +++ b/source/Ox.UI/js/Video/AnnotationPanel.js @@ -195,7 +195,7 @@ Ox.AnnotationPanel = function(options, self) { } function renderEditMenu() { - var annotation, annotationTitle, folder, + var annotation, annotationTitle, folder, hasManualCalendarOrMap, isDefined, isEditable, isEvent, isEventOrPlace, isPlace, isString, key, manageTitle, type, value; if (self.options.selected) { @@ -214,7 +214,10 @@ Ox.AnnotationPanel = function(options, self) { isDefined = isEventOrPlace && !!annotation[type] && !!annotation[type].type; annotationTitle = folder.options('item') + ': "' + value + '"'; } - } + } + hasManualCalendarOrMap = self.options.layers.some(function(layer) { + return layer.type == 'event' || layer.type == 'place'; + }); manageTitle = Ox._((isDefined ? 'Edit' : 'Define') + ' ' + (isPlace ? 'Place' : isEvent ? 'Event' : 'Place or Event') + '...'); self.$editMenuButton && self.$editMenuButton.remove(); @@ -233,8 +236,7 @@ Ox.AnnotationPanel = function(options, self) { {id: 'undo', title: Ox._('Undo Changes'), disabled: !self.editing, keyboard: 'escape'}, {id: 'save', title: Ox._('Save Changes'), disabled: !self.editing, keyboard: isString ? 'return' : 'shift return'}, ], - //FIXME: pandora is not part of Ox.UI - pandora.site.map == 'manual' ? [ + hasManualCalendarOrMap ? [ {}, {id: 'manage', title: manageTitle, disabled: !self.options.selected || !isEventOrPlace}, ] : [],