diff --git a/source/UI/js/Video/AnnotationFolder.js b/source/UI/js/Video/AnnotationFolder.js index 9123262d..94a20a5e 100644 --- a/source/UI/js/Video/AnnotationFolder.js +++ b/source/UI/js/Video/AnnotationFolder.js @@ -141,7 +141,7 @@ Ox.AnnotationFolder = function(options, self) { click: function() { that.triggerEvent('add', {value: ''}); } - }); + }); self.$infoButton = Ox.Button({ style: 'symbol', @@ -456,7 +456,7 @@ Ox.AnnotationFolder = function(options, self) { ) && ( self.options.languages == 'all' || self.options.languages.some(function(language) { - return item.languages.indexOf(language) > -1; + return item.languages && item.languages.indexOf(language) > -1; }) ) && ( self.options.users == 'all' diff --git a/source/UI/js/Video/AnnotationPanel.js b/source/UI/js/Video/AnnotationPanel.js index 0eb82cc3..b4d66d82 100644 --- a/source/UI/js/Video/AnnotationPanel.js +++ b/source/UI/js/Video/AnnotationPanel.js @@ -247,7 +247,12 @@ Ox.AnnotationPanel = function(options, self) { self.$editMenuButton = Ox.MenuButton({ items: [].concat( self.options.layers.map(function(layer, i) { - return {id: 'add' + layer.id, title: Ox._('Add {0}', [layer.item]), keyboard: i < 9 ? i + 1 + '' : null} + return { + id: 'add' + layer.id, + disabled: !layer.editable, + title: Ox._('Add {0}', [layer.item]), + keyboard: i < 9 ? i + 1 + '' : null + } }), [ {},