diff options
Diffstat (limited to 'www/crm/wp-content/plugins/civicrm/civicrm/ang/crmMailingAB/NewCtrl.js')
-rw-r--r-- | www/crm/wp-content/plugins/civicrm/civicrm/ang/crmMailingAB/NewCtrl.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/ang/crmMailingAB/NewCtrl.js b/www/crm/wp-content/plugins/civicrm/civicrm/ang/crmMailingAB/NewCtrl.js new file mode 100644 index 00000000..edcfa705 --- /dev/null +++ b/www/crm/wp-content/plugins/civicrm/civicrm/ang/crmMailingAB/NewCtrl.js @@ -0,0 +1,11 @@ +(function(angular, $, _) { + + angular.module('crmMailingAB').controller('CrmMailingABNewCtrl', function($scope, abtest, $location) { + // Transition URL "/abtest/new/foo" => "/abtest/123/foo" + var parts = $location.path().split('/'); // e.g. "/mailing/new" or "/mailing/123/wizard" + parts[2] = abtest.id; + $location.path(parts.join('/')); + $location.replace(); + }); + +})(angular, CRM.$, CRM._); |