Revert "Revert "Theme compatibility fixes""

This reverts commit 1db8b0f23c.
This commit is contained in:
ultimatemember
2015-01-14 00:11:38 +02:00
parent 1db8b0f23c
commit c4e6ef4933
17 changed files with 194 additions and 60 deletions
+8 -2
View File
@@ -37,7 +37,7 @@
width: this.$element[0].offsetWidth,
height: this.$element[0].offsetHeight
});
var actualWidth = $tip[0].offsetWidth,
actualHeight = $tip[0].offsetHeight,
gravity = maybeCall(this.options.gravity, this.$element[0]);
@@ -54,7 +54,13 @@
tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth - this.options.offset};
break;
case 'w':
tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width + this.options.offset};
extra_gap = 0;
if ( $('body').css('position').length > 0 && $('body').css('position') == 'relative' ) {
if ( $('#wpadminbar').length ) {
extra_gap = $('#wpadminbar').height();
}
}
tp = {top: pos.top + pos.height / 2 - actualHeight / 2 - extra_gap, left: pos.left + pos.width + this.options.offset};
break;
}