Ox.CalendarEditor: cleanup
This commit is contained in:
parent
0b8ca39ba6
commit
e68b1e163b
1 changed files with 2 additions and 4 deletions
|
@ -232,7 +232,6 @@ Ox.CalendarEditor = function(options, self) {
|
||||||
// self.$list.options({items: self.options.events}) still
|
// self.$list.options({items: self.options.events}) still
|
||||||
// registers as a change
|
// registers as a change
|
||||||
items: Ox.clone(self.options.events, true),
|
items: Ox.clone(self.options.events, true),
|
||||||
keys: ['matches'],
|
|
||||||
max: 1,
|
max: 1,
|
||||||
min: 0,
|
min: 0,
|
||||||
pageLength: self.options.pageLength,
|
pageLength: self.options.pageLength,
|
||||||
|
@ -765,11 +764,10 @@ Ox.CalendarEditor = function(options, self) {
|
||||||
self.options.selected = data.ids.length ? data.ids[0] : '';
|
self.options.selected = data.ids.length ? data.ids[0] : '';
|
||||||
event = event || (
|
event = event || (
|
||||||
self.options.selected
|
self.options.selected
|
||||||
? self.$list.value(self.options.selected)
|
? Ox.getObjectById(self.options.events, self.options.selected)
|
||||||
: {}
|
: {}
|
||||||
);
|
);
|
||||||
isUndefined = !fromCalendar && !!self.options.selected
|
isUndefined = !fromCalendar && !!self.options.selected && !event.type;
|
||||||
&& !self.$list.value(self.options.selected, 'type');
|
|
||||||
if (!fromCalendar) {
|
if (!fromCalendar) {
|
||||||
selectedEvent = self.options.selected && !isUndefined
|
selectedEvent = self.options.selected && !isUndefined
|
||||||
? self.options.selected
|
? self.options.selected
|
||||||
|
|
Loading…
Reference in a new issue