1
0
Fork 0
forked from 0x2620/oxjs

some work towards making the edit annotations menu functional

This commit is contained in:
rlx 2012-02-16 11:35:03 +00:00
commit 8ab8d8d67a
5 changed files with 135 additions and 74 deletions

View file

@ -603,7 +603,11 @@ Ox.VideoEditor = function(options, self) {
},
blur: function(data) {
Ox.print('VIDEO EDITOR BLUR')
!self.focused && blurAnnotation();
// Only blur if neither the video editor
// nor an active menu layer received the click
if (!self.focused && !$('.OxMenuLayer').length) {
blurAnnotation();
}
},
change: function(data) {
that.triggerEvent('editannotation', data);
@ -617,6 +621,9 @@ Ox.VideoEditor = function(options, self) {
self.editing = true;
setTimelineState();
},
find: function(data) {
that.triggerEvent('findannotation', data);
},
info: function(data) {
that.triggerEvent('info', data);
},
@ -723,7 +730,7 @@ Ox.VideoEditor = function(options, self) {
}
// setPosition causes a folder redraw
// so blur once that's done
setTimeout(self.$annotationPanel.blurItem, 0);
setTimeout(self.$annotationPanel.blurItem);
}
function editAnnotation() {
@ -1232,7 +1239,9 @@ Ox.VideoEditor = function(options, self) {
}
function updateWords(action) {
// action can be 'add' or 'remove'
var words = [];
Ox.print('#^#$^#$^#$^#$', self.options.selected, getAnnotationValue(self.options.selected))
Ox.forEach(Ox.count(Ox.words(
getAnnotationValue(self.options.selected)
)), function(count, value) {