0001-backoffice-keep-sidebar-sticky-9879.patch
wcs/qommon/static/css/dc2/admin.css | ||
---|---|---|
511 | 511 |
} |
512 | 512 | |
513 | 513 |
div#sidebar { |
514 |
float: right; |
|
514 |
position: absolute; |
|
515 |
right: 0; |
|
515 | 516 |
width: 21%; |
516 | 517 |
margin-right: 2%; |
517 | 518 |
color: #666; |
519 |
height: calc(100vh - 5em - 3em); |
|
520 |
overflow-y: auto; |
|
518 | 521 |
} |
519 | 522 | |
520 | 523 |
div#sidebar select { |
wcs/qommon/static/css/dc2/gadjo.css | ||
---|---|---|
630 | 630 | |
631 | 631 |
#main { |
632 | 632 |
transition: margin-left 0ms ease-in; |
633 |
position: relative; |
|
633 | 634 |
} |
634 | 635 | |
635 | 636 |
#sidepage span#applabel { |
wcs/qommon/static/js/qommon.admin.js | ||
---|---|---|
46 | 46 |
$(elem).removeClass('highlight'); |
47 | 47 |
}); |
48 | 48 |
}); |
49 | ||
50 |
/* keep sidebar sticky */ |
|
51 |
var $window = $(window); |
|
52 |
var sidebar_fixed_from = $('#sidebar').offset().top; |
|
53 |
var sidebar_top = $('#sidebar').position().top; |
|
54 |
$window.bind('scroll', function() { |
|
55 |
var pos = $window.scrollTop(); |
|
56 |
var minus = 0; |
|
57 |
if (pos >= sidebar_fixed_from) { |
|
58 |
$('#sidebar').css('top', pos - (sidebar_fixed_from - sidebar_top)); |
|
59 |
} else { |
|
60 |
$('#sidebar').css('top', 'auto'); |
|
61 |
minus = sidebar_fixed_from - pos; |
|
62 |
} |
|
63 |
$('#sidebar').css('height', 'calc(100vh - 5px - ' + minus + 'px)'); |
|
64 |
}); |
|
65 |
$window.trigger('scroll'); |
|
49 | 66 |
}); |
50 |
- |