From 4995dc39d01ecc55e016393b6818e28f369dbf32 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Fri, 22 Feb 2019 09:16:30 +0100 Subject: [PATCH] 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. --- public/js/module.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/public/js/module.js b/public/js/module.js index ec14cd0..39de745 100644 --- a/public/js/module.js +++ b/public/js/module.js @@ -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');