Merge remote-tracking branch 'FagnerMartinsBrack/master'
This commit is contained in:
commit
20d46ef2d7
|
@ -1,4 +1,3 @@
|
|||
|
||||
|
||||
function Calendar(element, options, eventSources) {
|
||||
var t = this;
|
||||
|
@ -263,11 +262,13 @@ function Calendar(element, options, eventSources) {
|
|||
function calcSize() {
|
||||
if (options.contentHeight) {
|
||||
suggestedViewHeight = options.contentHeight;
|
||||
}
|
||||
else if (options.height) {
|
||||
suggestedViewHeight = options.height - (headerElement ? headerElement.height() : 0) - vsides(content);
|
||||
}
|
||||
else {
|
||||
} else if (options.height) {
|
||||
if(options.height.toString().match(new RegExp("^[0-9]+(px)?$"))) {
|
||||
suggestedViewHeight = parseInt(options.height) - (headerElement ? headerElement.height() : 0) - vsides(content);
|
||||
} else {
|
||||
suggestedViewHeight = options.height;
|
||||
}
|
||||
} else {
|
||||
suggestedViewHeight = Math.round(content.width() / Math.max(options.aspectRatio, .5));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -335,19 +335,22 @@ function AgendaView(element, calendar, viewName) {
|
|||
slotTopCache = {};
|
||||
|
||||
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);
|
||||
|
||||
slotScroller.height(bodyHeight - allDayHeight - 1);
|
||||
|
||||
slotHeight = slotTableFirstInner.height() + 1; // +1 for border
|
||||
|
||||
if (dateChanged) {
|
||||
|
|
Loading…
Reference in a new issue