Merge remote-tracking branch 'upstream/4.6' into 4.6-master-2015-09-05-18-12-52
[civicrm-core.git] / ang / crmMailingAB / NewCtrl.js
1 (function(angular, $, _) {
2
3 angular.module('crmMailingAB').controller('CrmMailingABNewCtrl', function($scope, abtest, $location) {
4 // Transition URL "/abtest/new/foo" => "/abtest/123/foo"
5 var parts = $location.path().split('/'); // e.g. "/mailing/new" or "/mailing/123/wizard"
6 parts[2] = abtest.id;
7 $location.path(parts.join('/'));
8 $location.replace();
9 });
10
11 })(angular, CRM.$, CRM._);