1
0
Fork 0
forked from 0x2620/oxjs

update video editor (places, events)

This commit is contained in:
rlx 2012-01-13 21:55:47 +05:30
commit 8384fcc913
13 changed files with 346 additions and 144 deletions

View file

@ -9,13 +9,17 @@ Ox.AnnotationPanel = function(options, self) {
self = self || {};
var that = Ox.Element({}, self)
.defaults({
calendarSize: 256,
editable: false,
font: 'small',
layers: [],
mapSize: 256,
range: 'all',
selected: '',
showCalendar: false,
showFonts: false,
showLayers: {},
showMap: false,
showUsers: false,
sort: 'position',
width: 256
@ -112,7 +116,10 @@ Ox.AnnotationPanel = function(options, self) {
{id: 'deselect', title: 'Deselect Annotation', disabled: !self.options.selected, keyboard: 'escape'},
{},
{id: 'save', title: 'Save Changes', disabled: true, keyboard: 'shift return'},
{id: 'undo', title: 'Undo Changes', disabled: true, keyboard: 'escape'}
{id: 'undo', title: 'Undo Changes', disabled: true, keyboard: 'escape'},
{},
{id: 'find', title: 'Find Annotation', disabled: true},
{id: 'manage', title: 'Edit Place/Event', disabled: true}
],
style: 'square',
title: 'edit',
@ -152,7 +159,13 @@ Ox.AnnotationPanel = function(options, self) {
selected: selected,
sort: self.options.sort,
width: self.options.width - Ox.UI.SCROLLBAR_SIZE
}, layer)
}, layer, layer.type == 'event' ? {
showWidget: self.options.showCalendar,
widgetSize: self.options.calendarSize
} : layer.type == 'place' ? {
showWidget: self.options.showMap,
widgetSize: self.options.mapSize
} : {})
)
.bindEvent({
add: function(data) {
@ -271,6 +284,7 @@ Ox.AnnotationPanel = function(options, self) {
self.$folder[i].addItem(item);
};
that.blurItem = function() {
getFolder(self.options.selected).blurItem();
};
@ -279,6 +293,11 @@ Ox.AnnotationPanel = function(options, self) {
getFolder(self.options.selected).editItem();
};
that.updateItem = function(layer, item) {
var i = Ox.getIndexById(self.options.layers, layer);
self.$folder[i].updateItem(item);
};
return that;
};
};