Skip to content

Commit

Permalink
Merge pull request fullcalendar#61 from archaeron/patch-1
Browse files Browse the repository at this point in the history
replace curCSS with css for jQuery 1.8
  • Loading branch information
arshaw committed Sep 5, 2012
2 parents 38ef267 + 76a1197 commit b39cbf6
Showing 1 changed file with 13 additions and 17 deletions.
30 changes: 13 additions & 17 deletions src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function sliceSegs(events, visEventEnds, start, end) {
msLength: segEnd - segStart
});
}
}
}
return segs.sort(segCmp);
}

Expand Down Expand Up @@ -155,29 +155,26 @@ function setOuterHeight(element, height, includeMargins) {
}


// TODO: curCSS has been deprecated (jQuery 1.4.3 - 10/16/2010)


function hsides(element, includeMargins) {
return hpadding(element) + hborders(element) + (includeMargins ? hmargins(element) : 0);
}


function hpadding(element) {
return (parseFloat($.curCSS(element[0], 'paddingLeft', true)) || 0) +
(parseFloat($.curCSS(element[0], 'paddingRight', true)) || 0);
return (parseFloat($.css(element[0], 'paddingLeft', true)) || 0) +
(parseFloat($.css(element[0], 'paddingRight', true)) || 0);
}


function hmargins(element) {
return (parseFloat($.curCSS(element[0], 'marginLeft', true)) || 0) +
(parseFloat($.curCSS(element[0], 'marginRight', true)) || 0);
return (parseFloat($.css(element[0], 'marginLeft', true)) || 0) +
(parseFloat($.css(element[0], 'marginRight', true)) || 0);
}


function hborders(element) {
return (parseFloat($.curCSS(element[0], 'borderLeftWidth', true)) || 0) +
(parseFloat($.curCSS(element[0], 'borderRightWidth', true)) || 0);
return (parseFloat($.css(element[0], 'borderLeftWidth', true)) || 0) +
(parseFloat($.css(element[0], 'borderRightWidth', true)) || 0);
}


Expand All @@ -187,20 +184,20 @@ function vsides(element, includeMargins) {


function vpadding(element) {
return (parseFloat($.curCSS(element[0], 'paddingTop', true)) || 0) +
(parseFloat($.curCSS(element[0], 'paddingBottom', true)) || 0);
return (parseFloat($.css(element[0], 'paddingTop', true)) || 0) +
(parseFloat($.css(element[0], 'paddingBottom', true)) || 0);
}


function vmargins(element) {
return (parseFloat($.curCSS(element[0], 'marginTop', true)) || 0) +
(parseFloat($.curCSS(element[0], 'marginBottom', true)) || 0);
return (parseFloat($.css(element[0], 'marginTop', true)) || 0) +
(parseFloat($.css(element[0], 'marginBottom', true)) || 0);
}


function vborders(element) {
return (parseFloat($.curCSS(element[0], 'borderTopWidth', true)) || 0) +
(parseFloat($.curCSS(element[0], 'borderBottomWidth', true)) || 0);
return (parseFloat($.css(element[0], 'borderTopWidth', true)) || 0) +
(parseFloat($.css(element[0], 'borderBottomWidth', true)) || 0);
}


Expand Down Expand Up @@ -368,4 +365,3 @@ function firstDefined() {
}
}


0 comments on commit b39cbf6

Please sign in to comment.