mirror of https://github.com/ColorlibHQ/AdminLTE
Merge pull request #2789 from XhmikosR/patch-13
Use an object when setting multiple CSS propertiespull/2790/head
commit
c4bc2c676c
|
@ -50,7 +50,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "./dist/js/adminlte.js",
|
"path": "./dist/js/adminlte.js",
|
||||||
"maxSize": "9 kB"
|
"maxSize": "10 kB"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "./dist/js/adminlte.min.js",
|
"path": "./dist/js/adminlte.min.js",
|
||||||
|
|
|
@ -176,8 +176,10 @@ class ControlSidebar {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (positions.top === 0 && positions.bottom === 0) {
|
if (positions.top === 0 && positions.bottom === 0) {
|
||||||
$(Selector.CONTROL_SIDEBAR).css('bottom', heights.footer)
|
$(Selector.CONTROL_SIDEBAR).css({
|
||||||
$(Selector.CONTROL_SIDEBAR).css('top', heights.header)
|
bottom: heights.footer,
|
||||||
|
top: heights.header
|
||||||
|
})
|
||||||
$(Selector.CONTROL_SIDEBAR + ', ' + Selector.CONTROL_SIDEBAR + ' ' + Selector.CONTROL_SIDEBAR_CONTENT).css('height', heights.window - (heights.header + heights.footer))
|
$(Selector.CONTROL_SIDEBAR + ', ' + Selector.CONTROL_SIDEBAR + ' ' + Selector.CONTROL_SIDEBAR_CONTENT).css('height', heights.window - (heights.header + heights.footer))
|
||||||
} else if (positions.bottom <= heights.footer) {
|
} else if (positions.bottom <= heights.footer) {
|
||||||
if (footerFixed === false) {
|
if (footerFixed === false) {
|
||||||
|
|
|
@ -63,11 +63,15 @@ class Dropdown {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($element.hasClass(ClassName.DROPDOWN_RIGHT)) {
|
if ($element.hasClass(ClassName.DROPDOWN_RIGHT)) {
|
||||||
$element.css('left', 'inherit')
|
$element.css({
|
||||||
$element.css('right', 0)
|
left: 'inherit',
|
||||||
|
right: 0
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
$element.css('left', 0)
|
$element.css({
|
||||||
$element.css('right', 'inherit')
|
left: 0,
|
||||||
|
right: 'inherit'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const offset = $element.offset()
|
const offset = $element.offset()
|
||||||
|
@ -75,11 +79,15 @@ class Dropdown {
|
||||||
const visiblePart = $(window).width() - offset.left
|
const visiblePart = $(window).width() - offset.left
|
||||||
|
|
||||||
if (offset.left < 0) {
|
if (offset.left < 0) {
|
||||||
$element.css('left', 'inherit')
|
$element.css({
|
||||||
$element.css('right', (offset.left - 5))
|
left: 'inherit',
|
||||||
|
right: offset.left - 5
|
||||||
|
})
|
||||||
} else if (visiblePart < width) {
|
} else if (visiblePart < width) {
|
||||||
$element.css('left', 'inherit')
|
$element.css({
|
||||||
$element.css('right', 0)
|
left: 'inherit',
|
||||||
|
right: 0
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue