enable keyboard shortcuts again, was disabled in [changeset:oxjs,1209]

This commit is contained in:
j 2012-02-08 15:52:22 +05:30
parent 89a3a119da
commit 600dc935f2

View file

@ -117,6 +117,7 @@ Ox.VideoEditor = function(options, self) {
key_g: function() {
self.results.length && selectAnnotation(getNextAnnotation('result', 1));
},
key_h: showKeyboardShortcuts,
key_i: function() {
setPoint('in', self.options.position);
},
@ -452,17 +453,7 @@ Ox.VideoEditor = function(options, self) {
click: function(data) {
var id = data.id;
if (id == 'keyboard') {
var dialog = Ox.Dialog({
buttons: [
Ox.Button({id: 'close', title: 'Close'})
.bindEvent({click: function() { dialog.close(); }})
],
content: self.$keyboardShortcuts,
height: 384,
keys: {enter: 'close', escape: 'close'},
title: 'Keyboard Shortcuts',
width: 256
}).open();
showKeyboardShortcuts();
} else if (id == 'downloadVideo') {
that.triggerEvent('downloadvideo');
} else if (id == 'downloadSelection') {
@ -1102,6 +1093,20 @@ Ox.VideoEditor = function(options, self) {
});
}
function showKeyboardShortcuts() {
var dialog = Ox.Dialog({
buttons: [
Ox.Button({id: 'close', title: 'Close'})
.bindEvent({click: function() { dialog.close(); }})
],
content: self.$keyboardShortcuts,
height: 384,
keys: {enter: 'close', escape: 'close'},
title: 'Keyboard Shortcuts',
width: 256
}).open();
}
function setTimelineState() {
self.$timeline[1].options({
state: self.editing ? 'editing'