diff --git a/public/js/icinga/events.js b/public/js/icinga/events.js index e6a122b16..e56fe47d4 100644 --- a/public/js/icinga/events.js +++ b/public/js/icinga/events.js @@ -561,11 +561,16 @@ // Simulate _next to prepare migration to dynamic column layout // YES, there are duplicate lines right now. if (targetId === '_next') { - if ($el.closest('#col2').length) { - this.icinga.ui.moveToLeft(); + if (this.icinga.ui.hasOnlyOneColumn()) { + 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') { $target = $el.closest('.container'); targetId = $target.attr('id'); diff --git a/public/js/icinga/ui.js b/public/js/icinga/ui.js index 8614d003b..3169eba82 100644 --- a/public/js/icinga/ui.js +++ b/public/js/icinga/ui.js @@ -196,6 +196,10 @@ self.refreshDebug(); }, + hasOnlyOneColumn: function () { + return this.currentLayout === 'poor' || this.currentLayout === 'minimal'; + }, + layoutHasBeenChanged: function () { var layout = $('html').css('fontFamily').replace(/['",]/g, '');