diff --git a/source/Ox.UI/js/Calendar/Ox.ListCalendar.js b/source/Ox.UI/js/Calendar/Ox.ListCalendar.js index 058572db..6f2dd974 100644 --- a/source/Ox.UI/js/Calendar/Ox.ListCalendar.js +++ b/source/Ox.UI/js/Calendar/Ox.ListCalendar.js @@ -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 { diff --git a/source/Ox.UI/js/Map/Ox.ListMap.js b/source/Ox.UI/js/Map/Ox.ListMap.js index 2544c753..2687d3ae 100644 --- a/source/Ox.UI/js/Map/Ox.ListMap.js +++ b/source/Ox.UI/js/Map/Ox.ListMap.js @@ -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() {