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() {
|
function renderEditMenu() {
|
||||||
var annotation, annotationTitle, folder,
|
var annotation, annotationTitle, folder, hasManualCalendarOrMap,
|
||||||
isDefined, isEditable, isEvent, isEventOrPlace, isPlace, isString,
|
isDefined, isEditable, isEvent, isEventOrPlace, isPlace, isString,
|
||||||
key, manageTitle, type, value;
|
key, manageTitle, type, value;
|
||||||
if (self.options.selected) {
|
if (self.options.selected) {
|
||||||
|
@ -214,7 +214,10 @@ Ox.AnnotationPanel = function(options, self) {
|
||||||
isDefined = isEventOrPlace && !!annotation[type] && !!annotation[type].type;
|
isDefined = isEventOrPlace && !!annotation[type] && !!annotation[type].type;
|
||||||
annotationTitle = folder.options('item') + ': "' + value + '"';
|
annotationTitle = folder.options('item') + ': "' + value + '"';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
hasManualCalendarOrMap = self.options.layers.some(function(layer) {
|
||||||
|
return layer.type == 'event' || layer.type == 'place';
|
||||||
|
});
|
||||||
manageTitle = Ox._((isDefined ? 'Edit' : 'Define') + ' '
|
manageTitle = Ox._((isDefined ? 'Edit' : 'Define') + ' '
|
||||||
+ (isPlace ? 'Place' : isEvent ? 'Event' : 'Place or Event') + '...');
|
+ (isPlace ? 'Place' : isEvent ? 'Event' : 'Place or Event') + '...');
|
||||||
self.$editMenuButton && self.$editMenuButton.remove();
|
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: 'undo', title: Ox._('Undo Changes'), disabled: !self.editing, keyboard: 'escape'},
|
||||||
{id: 'save', title: Ox._('Save Changes'), disabled: !self.editing, keyboard: isString ? 'return' : 'shift return'},
|
{id: 'save', title: Ox._('Save Changes'), disabled: !self.editing, keyboard: isString ? 'return' : 'shift return'},
|
||||||
],
|
],
|
||||||
//FIXME: pandora is not part of Ox.UI
|
hasManualCalendarOrMap ? [
|
||||||
pandora.site.map == 'manual' ? [
|
|
||||||
{},
|
{},
|
||||||
{id: 'manage', title: manageTitle, disabled: !self.options.selected || !isEventOrPlace},
|
{id: 'manage', title: manageTitle, disabled: !self.options.selected || !isEventOrPlace},
|
||||||
] : [],
|
] : [],
|
||||||
|
|
Loading…
Reference in a new issue