mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 15:54:03 +02:00
js/responsiveness: respect singlecolumn layouts
Target _next now depends on current layout
This commit is contained in:
parent
0604d30348
commit
1385667edc
@ -561,11 +561,16 @@
|
|||||||
// Simulate _next to prepare migration to dynamic column layout
|
// Simulate _next to prepare migration to dynamic column layout
|
||||||
// YES, there are duplicate lines right now.
|
// YES, there are duplicate lines right now.
|
||||||
if (targetId === '_next') {
|
if (targetId === '_next') {
|
||||||
if ($el.closest('#col2').length) {
|
if (this.icinga.ui.hasOnlyOneColumn()) {
|
||||||
this.icinga.ui.moveToLeft();
|
targetId = 'col1';
|
||||||
|
$target = $('#' + targetId);
|
||||||
|
} else {
|
||||||
|
if ($el.closest('#col2').length) {
|
||||||
|
this.icinga.ui.moveToLeft();
|
||||||
|
}
|
||||||
|
targetId = 'col2';
|
||||||
|
$target = $('#' + targetId);
|
||||||
}
|
}
|
||||||
targetId = 'col2';
|
|
||||||
$target = $('#' + targetId);
|
|
||||||
} else if (targetId === '_self') {
|
} else if (targetId === '_self') {
|
||||||
$target = $el.closest('.container');
|
$target = $el.closest('.container');
|
||||||
targetId = $target.attr('id');
|
targetId = $target.attr('id');
|
||||||
|
@ -196,6 +196,10 @@
|
|||||||
self.refreshDebug();
|
self.refreshDebug();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
hasOnlyOneColumn: function () {
|
||||||
|
return this.currentLayout === 'poor' || this.currentLayout === 'minimal';
|
||||||
|
},
|
||||||
|
|
||||||
layoutHasBeenChanged: function () {
|
layoutHasBeenChanged: function () {
|
||||||
|
|
||||||
var layout = $('html').css('fontFamily').replace(/['",]/g, '');
|
var layout = $('html').css('fontFamily').replace(/['",]/g, '');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user