Merge remote-tracking branch 'FagnerMartinsBrack/master'
commit
20d46ef2d7
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
|
|
||||||
function Calendar(element, options, eventSources) {
|
function Calendar(element, options, eventSources) {
|
||||||
var t = this;
|
var t = this;
|
||||||
|
@ -263,11 +262,13 @@ function Calendar(element, options, eventSources) {
|
||||||
function calcSize() {
|
function calcSize() {
|
||||||
if (options.contentHeight) {
|
if (options.contentHeight) {
|
||||||
suggestedViewHeight = options.contentHeight;
|
suggestedViewHeight = options.contentHeight;
|
||||||
}
|
} else if (options.height) {
|
||||||
else if (options.height) {
|
if(options.height.toString().match(new RegExp("^[0-9]+(px)?$"))) {
|
||||||
suggestedViewHeight = options.height - (headerElement ? headerElement.height() : 0) - vsides(content);
|
suggestedViewHeight = parseInt(options.height) - (headerElement ? headerElement.height() : 0) - vsides(content);
|
||||||
}
|
} else {
|
||||||
else {
|
suggestedViewHeight = options.height;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
suggestedViewHeight = Math.round(content.width() / Math.max(options.aspectRatio, .5));
|
suggestedViewHeight = Math.round(content.width() / Math.max(options.aspectRatio, .5));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -335,19 +335,22 @@ function AgendaView(element, calendar, viewName) {
|
||||||
slotTopCache = {};
|
slotTopCache = {};
|
||||||
|
|
||||||
var headHeight = dayBody.position().top;
|
var headHeight = dayBody.position().top;
|
||||||
var allDayHeight = slotScroller.position().top; // including divider
|
|
||||||
var bodyHeight = Math.min( // total body height, including borders
|
|
||||||
height - headHeight, // when scrollbars
|
|
||||||
slotTable.height() + allDayHeight + 1 // when no scrollbars. +1 for bottom border
|
|
||||||
);
|
|
||||||
|
|
||||||
dayBodyFirstCellStretcher
|
|
||||||
.height(bodyHeight - vsides(dayBodyFirstCell));
|
|
||||||
|
|
||||||
|
if($.type(height) === 'number') {
|
||||||
|
var allDayHeight = slotScroller.position().top; // including divider
|
||||||
|
var bodyHeight = Math.min( // total body height, including borders
|
||||||
|
height - headHeight, // when scrollbars
|
||||||
|
slotTable.height() + allDayHeight + 1 // when no scrollbars. +1 for bottom border
|
||||||
|
);
|
||||||
|
|
||||||
|
slotScroller.height(bodyHeight - allDayHeight - 1);
|
||||||
|
dayBodyFirstCellStretcher.height(bodyHeight - vsides(dayBodyFirstCell));
|
||||||
|
} else {
|
||||||
|
slotScroller.height(height);
|
||||||
|
dayBodyFirstCellStretcher.height(slotScroller.height());
|
||||||
|
}
|
||||||
slotLayer.css('top', headHeight);
|
slotLayer.css('top', headHeight);
|
||||||
|
|
||||||
slotScroller.height(bodyHeight - allDayHeight - 1);
|
|
||||||
|
|
||||||
slotHeight = slotTableFirstInner.height() + 1; // +1 for border
|
slotHeight = slotTableFirstInner.height() + 1; // +1 for border
|
||||||
|
|
||||||
if (dateChanged) {
|
if (dateChanged) {
|
||||||
|
|
Loading…
Reference in New Issue