when player, editor, timeline or cliplist gains or loses focus, update item menu

This commit is contained in:
rolux 2013-08-02 16:01:50 +00:00
parent 8850153909
commit 6521488412
4 changed files with 25 additions and 0 deletions

View file

@ -139,11 +139,17 @@ pandora.ui.clipList = function(videoRatio) {
})
Ox.Clipboard.add(items, 'clip');
},
gainfocus: function() {
pandora.$ui.mainMenu.replaceItemMenu();
},
init: function(data) {
if (!ui.item && ui.listView == 'clip'/* && pandora.$ui.statusbar*/) {
pandora.$ui.statusbar.set('total', data);
}
},
losefocus: function() {
pandora.$ui.mainMenu.replaceItemMenu();
},
open: function(data) {
var id = data.ids[0],
item = !ui.item ? id.split('/')[0] : ui.item,
@ -260,6 +266,7 @@ pandora.ui.clipList = function(videoRatio) {
!ui.item && pandora.UI.set({listSelection: []});
!isEmbed && pandora.$ui.mainMenu.disableItem('findsimilar');
}
pandora.$ui.mainMenu.replaceItemMenu();
},
pandora_itemsort: function(data) {
that.options({sort: data.value});

View file

@ -175,6 +175,9 @@ pandora.ui.editor = function(data) {
listView: 'clip'
});
},
gainfocus: function() {
pandora.$ui.mainMenu.replaceItemMenu();
},
importannotations: function(data) {
pandora.ui.importAnnotations().open();
},
@ -183,6 +186,9 @@ pandora.ui.editor = function(data) {
Ox.getObjectById(pandora.site.layers, data.layer).title
).open();
},
losefocus: function() {
pandora.$ui.mainMenu.replaceItemMenu();
},
muted: function(data) {
pandora.UI.set({videoMuted: data.muted});
},

View file

@ -87,6 +87,9 @@ pandora.ui.player = function(data) {
find: function(data) {
pandora.UI.set({itemFind: data.find});
},
gainfocus: function() {
pandora.$ui.mainMenu.replaceItemMenu();
},
info: function(data) {
pandora.ui.annotationDialog(
Ox.getObjectById(pandora.site.layers, data.layer).title
@ -95,6 +98,9 @@ pandora.ui.player = function(data) {
loop: function(data) {
pandora.UI.set({videoLoop: data.loop});
},
losefocus: function() {
pandora.$ui.mainMenu.replaceItemMenu();
},
muted: function(data) {
pandora.UI.set({videoMuted: data.muted});
},

View file

@ -67,11 +67,17 @@ pandora.ui.timeline = function(data) {
follow: function(data) {
pandora.UI.set({followPlayer: data.follow});
},
gainfocus: function() {
pandora.$ui.mainMenu.replaceItemMenu();
},
info: function(data) {
pandora.ui.annotationDialog(
Ox.getObjectById(pandora.site.layers, data.layer).title
).open();
},
losefocus: function() {
pandora.$ui.mainMenu.replaceItemMenu();
},
muted: function(data) {
pandora.UI.set({videoMuted: data.muted});
},