From 80e64ffc0e48824cd4304ab8409c733f15510890 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 13 Feb 2015 17:50:12 -0800 Subject: [PATCH] crmMailingAB - Remove updateUrl calls These should have been removed when we switched to create-on-open/auto-save behavior. dgg reported some sporadic issues with redirects (in CRM-15856) which I haven't reproduced, but spurious updateUrl is a plausible cause. --- js/angular-crmMailingAB.js | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/js/angular-crmMailingAB.js b/js/angular-crmMailingAB.js index 1c8e833859..227b7c5720 100644 --- a/js/angular-crmMailingAB.js +++ b/js/angular-crmMailingAB.js @@ -121,7 +121,7 @@ // @return Promise $scope.save = function save() { - return block(crmStatus({start: ts('Saving...'), success: ts('Saved')}, abtest.save().then(updateUrl))); + return block(crmStatus({start: ts('Saving...'), success: ts('Saved')}, abtest.save())); }; // @return Promise @@ -131,7 +131,7 @@ // @return Promise $scope.sendTest = function sendTest(mailingName, recipient) { - return block(crmStatus({start: ts('Saving...'), success: ''}, abtest.save().then(updateUrl)) + return block(crmStatus({start: ts('Saving...'), success: ''}, abtest.save()) .then(function () { crmMailingPreviewMgr.sendTest(abtest.mailings[mailingName], recipient); })); @@ -166,19 +166,6 @@ $scope.criteriaName = criteria ? criteria.name : null; } - // Transition URL "/abtest/new" => "/abtest/123" - function updateUrl() { - var parts = $location.path().split('/'); // e.g. "/abtest/new" or "/abtest/123/wizard" - if (parts[2] != $scope.abtest.ab.id) { - parts[2] = $scope.abtest.ab.id; - $location.path(parts.join('/')); - $location.replace(); - // FIXME: Angular unnecessarily refreshes UI - // WARNING: Changing the URL triggers a full reload. Any pending AJAX operations - // could be inconsistently applied. Run updateUrl() after other changes complete. - } - } - // initialize updateCriteriaName(); $scope.$watch('abtest.ab.testing_criteria_id', updateCriteriaName); -- 2.25.1