From 89f5329c8b0d26dd5991ad0a703862c5b7403897 Mon Sep 17 00:00:00 2001 From: rolux Date: Sun, 19 Jan 2014 12:04:03 +0530 Subject: [PATCH] remove reference to window.pandora in annotation panel --- source/Ox.UI/js/Video/AnnotationPanel.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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}, ] : [],