fix list calendar bugs

This commit is contained in:
rlx 2012-01-30 23:27:27 +00:00
parent b19e4c0c79
commit e8b1362309
5 changed files with 17 additions and 15 deletions

View file

@ -344,6 +344,13 @@ Ox.Calendar = function(options, self) {
posision: 'absolute',
top: (self.options.showToolbar * 24) + 'px'
})
.bindEvent({
dragstart: dragstart,
drag: drag,
dragpause: dragpause,
dragend: dragend,
singleclick: singleclick
})
.appendTo(that);
self.$container = Ox.Element()

View file

@ -502,9 +502,7 @@ Ox.ListCalendar = function(options, self) {
if (result.status.code == 200) {
self.options.events[index][key] = value;
self.$list.value(id, key, value);
if (['name', 'type', 'start', 'end'].indexOf(key) > -1) {
self.$calendar.editEvent(id, key, value);
}
self.$calendar.editEvent(id, key, value);
if (key == 'name') {
self.$eventName.options({title: value});
} else if (['start', 'end'].indexOf(key) > -1) {
@ -518,7 +516,7 @@ Ox.ListCalendar = function(options, self) {
);
}
} else {
alert(result.status.text);
// ...
}
});
}
@ -576,6 +574,9 @@ Ox.ListCalendar = function(options, self) {
self.selectedEvent = event.id;
self.$eventName.options({title: event.name});
self.$eventTitle.show();
Ox.print('VALUES:', Ox.extend({}, event, {
end: event.current ? '' : event.end
}))
self.$eventForm.values(Ox.extend({}, event, {
end: event.current ? '' : event.end
})).show();

View file

@ -762,9 +762,8 @@ Ox.List = function(options, self) {
setTimeout(fillFirstPage, 0);
self.selected.length && scrollToPosition(self.selected[0]);
Ox.Log('List', 'CONSTRUCT:', timeC, 'APPEND:', timeA);
// that.triggerEvent('init', {items: self.options.items.length});
that.triggerEvent('init', {items: self.options.items.length});
// fixme: do sync lists need to trigger init?
// will this only be reached in sync lists?
}
function loadPage(page, callback) {

View file

@ -222,11 +222,6 @@ Ox.TextList = function(options, self) {
edit: function(data) {
that.editCell(data.id, data.key);
},
init: function(data) {
// fixme: why does this never reach?
//Ox.Log('List', 'INIT????')
//that.triggerEvent('init', data);
},
select: function() {
self.options.selected = that.$body.options('selected');
}

View file

@ -28,7 +28,7 @@ Ox.VideoEditor = function(options, self) {
clickLink: null,
cuts: [],
duration: 0,
download: false,
enableDownload: false,
enableSubtitles: false,
find: '',
fps: 25,
@ -427,9 +427,9 @@ Ox.VideoEditor = function(options, self) {
{id: 'largeTimeline', title: 'Hide Large Timeline', disabled: true},
{id: 'subtitlesTimeline', title: 'Hide Subtitles on Large Timeline', disabled: true},
{},
{id: 'downloadVideo', title: 'Download Video...', disabled: !self.options.download },
{id: 'downloadSelection', title: 'Download Selection...', disabled: !self.options.download},
{id: 'embedSelection', title: 'Embed Selection...', disabled: !self.options.download},
{id: 'downloadVideo', title: 'Download Video...', disabled: !self.options.enableDownload },
{id: 'downloadSelection', title: 'Download Selection...', disabled: !self.options.enableDownload},
{id: 'embedSelection', title: 'Embed Selection...'},
{},
{id: 'keyboard', title: 'Keyboard Shortcuts...', keyboard: 'h'}
],