video editor resolution toggle

This commit is contained in:
j 2011-12-20 19:15:24 +05:30
parent 6e0ff7158c
commit 87ba2a10ab
2 changed files with 20 additions and 5 deletions

View file

@ -113,18 +113,30 @@ Ox.MenuButton = function(options, self) {
} }
} }
/*@
checkItem <f>
@*/
that.checkItem = function(id) { that.checkItem = function(id) {
self.$menu.checkItem(id); self.$menu.checkItem(id);
}; };
/*@
disableItem <f>
@*/
that.disableItem = function(id) { that.disableItem = function(id) {
self.$menu.getItem(id).options({disabled: true}); self.$menu.getItem(id).options({disabled: true});
}; };
/*@
enableItem <f>
@*/
that.enableItem = function(id) { that.enableItem = function(id) {
self.$menu.getItem(id).options({disabled: false}); self.$menu.getItem(id).options({disabled: false});
}; };
/*@
remove <f>
@*/
self.superRemove = that.remove; self.superRemove = that.remove;
that.remove = function() { that.remove = function() {
self.$menu.remove(); self.$menu.remove();
@ -133,4 +145,4 @@ Ox.MenuButton = function(options, self) {
return that; return that;
}; };

View file

@ -396,7 +396,10 @@ Ox.VideoEditor = function(options, self) {
{id: 'toggleSize', title: 'Large Player', selected: self.options.playerSize == 'large', keyboard: 'shift +'}, {id: 'toggleSize', title: 'Large Player', selected: self.options.playerSize == 'large', keyboard: 'shift +'},
{} {}
], ],
self.resolutions, {
'id': 'resolution', title:'Resolution',
items: [ { group: 'resolution', min: 1, max: 1, items: self.resolutions } ]
},
[ [
{}, {},
{id: 'largeTimeline', title: 'Hide Large Timeline', disabled: true}, {id: 'largeTimeline', title: 'Hide Large Timeline', disabled: true},
@ -431,9 +434,9 @@ Ox.VideoEditor = function(options, self) {
title: 'Keyboard Shortcuts', title: 'Keyboard Shortcuts',
width: 256 width: 256
}).open(); }).open();
} else if (Ox.getObjectById(self.resolutions, id)) { } else if (id == 'resolution') {
//FIXME: uncheck previous resolution self.options.resolution = parseInt(data.checked[0].id);
self.$player[0].options({resolution: id}); self.$player[0].options({resolution: self.options.resolution});
} }
} }
}) })