js: Don't use icinga.utils.addUrlParams, that's broken and not necessary here

broken? Try to keep sequenced parameters when adding different ones. Good luck.
This commit is contained in:
Johannes Meyer 2019-02-22 09:16:30 +01:00
parent 728d4cb2ae
commit 4995dc39d0

View file

@ -91,10 +91,11 @@
var evt = event.originalEvent;
if (evt.oldIndex !== evt.newIndex) {
var $source = $(evt.from);
var actionUrl = icinga.utils.addUrlParams($source.data('actionUrl'), {
action: 'move',
movenode: $(evt.item).data('nodeName')
});
var actionUrl = [
$source.data('actionUrl'),
'action=move',
'movenode=' + $(evt.item).data('nodeName')
].join('&');
if (! $source.is('.few') && $('.addnew', $source).length === 2) {
// This assumes we're not moving things between different lists
@ -141,9 +142,11 @@
to: evt.newIndex
};
var actionUrl = icinga.utils.addUrlParams($source.data('actionUrl'), {
action: 'move',
movenode: $(evt.item).data('nodeName')
var actionUrl = [
$source.data('actionUrl'),
'action=move',
'movenode=' + $(evt.item).data('nodeName')
].join('&');
var $container = $target.closest('.container');
var req = icinga.loader.loadUrl(actionUrl, $container, data, 'POST');