in ListCalendar, populate duration form field, fixes #756
This commit is contained in:
parent
4ad7bc8ad4
commit
244312aede
2 changed files with 10 additions and 9 deletions
|
@ -117,7 +117,6 @@ Ox.ListCalendar = function(options, self) {
|
|||
},
|
||||
{
|
||||
format: function(value, data) {
|
||||
// return Ox.formatDateRangeDuration(data.start, data.end, true);
|
||||
var key = data.start + ' - ' + data.end;
|
||||
if (!self.durationCache[key]) {
|
||||
self.durationCache[key] = data.start
|
||||
|
@ -366,7 +365,7 @@ Ox.ListCalendar = function(options, self) {
|
|||
}),
|
||||
self.$durationInput = Ox.Input({
|
||||
disabled: true,
|
||||
id: 'durationText',
|
||||
id: 'duration',
|
||||
label: 'Duration',
|
||||
labelWidth: 64,
|
||||
width: 240
|
||||
|
@ -433,6 +432,7 @@ Ox.ListCalendar = function(options, self) {
|
|||
width: 240
|
||||
})
|
||||
.css({margin: '8px'})
|
||||
.hide()
|
||||
.appendTo(self.$eventData);
|
||||
}
|
||||
|
||||
|
@ -480,8 +480,8 @@ Ox.ListCalendar = function(options, self) {
|
|||
.appendTo(self.$eventStatusbar);
|
||||
}
|
||||
|
||||
that.$element.replaceWith(
|
||||
that.$element = Ox.SplitPanel({
|
||||
that.setElement(
|
||||
Ox.SplitPanel({
|
||||
elements: [
|
||||
{
|
||||
collapsible: self.options.collapsible,
|
||||
|
@ -545,7 +545,6 @@ Ox.ListCalendar = function(options, self) {
|
|||
orientation: 'horizontal'
|
||||
})
|
||||
.addClass('OxListMap')
|
||||
.$element
|
||||
);
|
||||
|
||||
// if loaded with selection, set calendar and form
|
||||
|
@ -755,7 +754,10 @@ Ox.ListCalendar = function(options, self) {
|
|||
if (!isUndefined) {
|
||||
self.$eventForm.values(
|
||||
decodeValues(Ox.extend({}, event, {
|
||||
end: event.current ? '' : event.end
|
||||
end: event.current ? '' : event.end,
|
||||
duration: Ox.formatDateRangeDuration(
|
||||
event.start, event.end, true
|
||||
)
|
||||
}))
|
||||
).show();
|
||||
} else {
|
||||
|
|
|
@ -701,8 +701,8 @@ Ox.ListMap = function(options, self) {
|
|||
}
|
||||
*/
|
||||
|
||||
that.$element.replaceWith(
|
||||
that.$element = Ox.SplitPanel({
|
||||
that.setElement(
|
||||
Ox.SplitPanel({
|
||||
elements: [
|
||||
{
|
||||
collapsible: self.options.collapsible,
|
||||
|
@ -771,7 +771,6 @@ Ox.ListMap = function(options, self) {
|
|||
orientation: 'horizontal'
|
||||
})
|
||||
.addClass('OxListMap')
|
||||
.$element
|
||||
);
|
||||
|
||||
function addPlace() {
|
||||
|
|
Loading…
Reference in a new issue