forked from 0x2620/oxjs
form elements rewrite, part 2
This commit is contained in:
parent
fe303bf2b0
commit
074902d079
33 changed files with 163 additions and 153 deletions
|
|
@ -156,7 +156,7 @@ Ox.ListCalendar = function(options, self) {
|
|||
})
|
||||
.bindEvent({
|
||||
change: function(data) {
|
||||
var key = data.selected[0].id,
|
||||
var key = data.value,
|
||||
value = self.$findInput.value();
|
||||
value && updateList(key, value);
|
||||
}
|
||||
|
|
@ -364,7 +364,7 @@ Ox.ListCalendar = function(options, self) {
|
|||
self.$alternativeNamesInput.setErrors([exists]);
|
||||
}
|
||||
} else if (data.id == 'type') {
|
||||
editEvent('type', data.data.selected[0].id);
|
||||
editEvent('type', data.data.value);
|
||||
} else if (data.id == 'start') {
|
||||
editEvent('start', data.data.value);
|
||||
} else if (data.id == 'end') {
|
||||
|
|
@ -508,14 +508,14 @@ Ox.ListCalendar = function(options, self) {
|
|||
if (key == 'name') {
|
||||
self.$eventName.options({title: value});
|
||||
} else if (['start', 'end'].indexOf(key) > -1) {
|
||||
self.$durationInput.options({
|
||||
value: Ox.formatDateRangeDuration(
|
||||
self.$startInput.options('value'),
|
||||
self.$endInput.options('value')
|
||||
self.$durationInput.value(
|
||||
Ox.formatDateRangeDuration(
|
||||
self.$startInput.value(),
|
||||
self.$endInput.value()
|
||||
|| Ox.formatDate(new Date(), '%Y-%m-%d %H%:%M:%S'),
|
||||
true
|
||||
)
|
||||
});
|
||||
);
|
||||
}
|
||||
} else {
|
||||
alert(result.status.text);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue