remove reference to window.pandora in annotation panel
This commit is contained in:
parent
da24434260
commit
89f5329c8b
1 changed files with 6 additions and 4 deletions
|
@ -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) {
|
||||
|
@ -215,6 +215,9 @@ Ox.AnnotationPanel = function(options, self) {
|
|||
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},
|
||||
] : [],
|
||||
|
|
Loading…
Reference in a new issue