Self hosted FLOSS fitness/workout, nutrition and weight tracker
Readout the current URL before trying to redirect to it
Roland Geideref2214539f43
diff --git a/wger/manager/static/js/workout-manager.js b/wger/manager/static/js/workout-manager.jsindex 1436cbca5..52838a111 100644--- a/wger/manager/static/js/workout-manager.js+++ b/wger/manager/static/js/workout-manager.js@@ -319,17 +319,18 @@ function modal_dialog_form_edit(){$("#ajax-info").dialog("close");- // TODO: There seems to be problems sometimes when using the technique below and- // bootstrap's menu bar (drop downs won't open). So just do a normal- // redirect.- window.location.href = current_url;-// If there was a redirect we must change the URL of the browser. Otherwise// a reload would not change the adress bar, but the content would.// Since it is not possible to get this URL from the AJAX request, we read it out// from a hidden HTML DIV in the document...- //current_url = $(data).find("#current-url").data('currentUrl');+ current_url = $(data).find("#current-url").data('currentUrl');+ // TODO: There seems to be problems sometimes when using the technique below and+ // bootstrap's menu bar (drop downs won't open). So just do a normal+ // redirect.+ window.location.href = current_url;++/*if(document.URL.indexOf(current_url)){