1
0
Fork 0
forked from 0x2620/oxjs

fix list calendar bugs

This commit is contained in:
rlx 2012-01-30 23:27:27 +00:00
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();