Skip to content

Commit

Permalink
Fixes #15127: adding padding, fixed positioning to floating_menubar
Browse files Browse the repository at this point in the history
Signed-off-by: Ankush Patil <aspraz2658@gmail.com>

removed unrequired appends

Signed-off-by: Ankush Patil <aspraz2658@gmail.com>
  • Loading branch information
anksh1997 committed Nov 11, 2019
1 parent 431c954 commit 64d0cd8
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions js/navigation.js
Expand Up @@ -1128,8 +1128,24 @@ var ResizeHandler = function () {
var windowWidth = $(window).width();
$('#pma_navigation').width(pos);
$('body').css('margin-' + this.left, pos + 'px');
// Issue #15127
$('#floating_menubar, #pma_console')
// Issue #15127 : Adding fixed positioning to menubar
$('#floating_menubar')
.css('margin-' + this.left, $('#pma_navigation').width() + $('#pma_navigation_resizer').width())
.css(this.left, 0)
.css({
'position': 'fixed',
'top': 0,
'width': '100%',
'z-index': 99
})
// Allow the DOM to render, then adjust the padding on the body
setTimeout(function () {
$('body').css(
'padding-top',
$('#floating_menubar').outerHeight(true)
);
}, 2);
$('#pma_console')
.css('margin-' + this.left, (pos + resizer_width) + 'px');
$resizer.css(this.left, pos + 'px');
if (pos === 0) {
Expand Down

0 comments on commit 64d0cd8

Please sign in to comment.