mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 08:44:10 +02:00
js/loader: support multi-container redirection
Redirections to #!-separated URLs (multiple containers) should also work when not re-rendering the whole layout.
This commit is contained in:
parent
6298d303c4
commit
95f9bebdc5
@ -269,15 +269,24 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (req.$target.attr('id') === 'col2') { // TODO: multicol
|
|
||||||
if ($('#col1').data('icingaUrl') === redirect) {
|
|
||||||
icinga.ui.layout1col();
|
|
||||||
req.$target = $('#col1');
|
|
||||||
delete(this.requests['col2']);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.loadUrl(redirect, req.$target);
|
if (redirect.match(/#!/)) {
|
||||||
|
var parts = redirect.split(/#!/);
|
||||||
|
icinga.ui.layout2col();
|
||||||
|
this.loadUrl(parts.shift(), $('#col1'));
|
||||||
|
this.loadUrl(parts.shift(), $('#col2'));
|
||||||
|
} else {
|
||||||
|
|
||||||
|
if (req.$target.attr('id') === 'col2') { // TODO: multicol
|
||||||
|
if ($('#col1').data('icingaUrl') === redirect) {
|
||||||
|
icinga.ui.layout1col();
|
||||||
|
req.$target = $('#col1');
|
||||||
|
delete(this.requests['col2']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.loadUrl(redirect, req.$target);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user