The "/mailing/abtesting" route conflicted with the "/mailing/:id" route. The "abtesting" didn't match the module name.
(function (angular, $, _) {
var partialUrl = function (relPath) {
- return CRM.resourceUrls['civicrm'] + '/partials/abtesting/' + relPath;
+ return CRM.resourceUrls['civicrm'] + '/partials/crmMailingAB/' + relPath;
};
var crmMailingAB = angular.module('crmMailingAB');
mail.id = selectedABTest.mailing_id_c;
crmApi('Mailing', 'create', mail);
});
- $location.path('mailing/abtesting');
+ $location.path('abtest');
};
$scope.sendc = function () {
mail.id = selectedABTest.mailing_id_c;
crmApi('Mailing', 'create', mail);
});
- $location.path('mailing/abtesting');
+ $location.path('abtest');
};
var result = crmApi('Mailing', 'stats', {mailing_id: selectedABTest.mailing_id_a});
$scope.r = [];
(function (angular, $, _) {
var partialUrl = function (relPath) {
- return CRM.resourceUrls['civicrm'] + '/partials/abtesting/' + relPath;
+ return CRM.resourceUrls['civicrm'] + '/partials/crmMailingAB/' + relPath;
};
var crmMailingAB = angular.module('crmMailingAB', ['ngRoute', 'ui.utils', 'ngSanitize']);
crmMailingAB.config([
'$routeProvider',
function ($routeProvider) {
- $routeProvider.when('/mailing/abtesting', {
+ $routeProvider.when('/abtest', {
templateUrl: partialUrl('list.html'),
controller: 'ABListingCtrl',
resolve: {
}
}
});
- $routeProvider.when('/mailing/abtesting/report/:id', {
+ $routeProvider.when('/abtest/report/:id', {
templateUrl: partialUrl('report.html'),
controller: 'ReportCtrl',
resolve: {
}
}
});
- $routeProvider.when('/mailing/abtesting/:id', {
+ $routeProvider.when('/abtest/:id', {
templateUrl: partialUrl('main.html'),
controller: 'crmABTestingTabsCtrl',
resolve: {
// Ex: <crmAddName crm-options="['Alpha','Beta','Gamma']" crm-var="newItem" crm-on-add="callMyCreateFunction(newItem)" />
/**
* This controler lists the existing ABtests
- * used on /partials/abtesting/list.html
+ * used on /partials/abtest/list.html
* @returns mailingABList - object that contains the existing AB mailings
* @returns testing_criteria - array that has the name of the different test types
*/
<td>{{mailingAB.name}}</td>
<td>{{mailingAB.id}}</td>
<td>{{testing_criteria[mailingAB.testing_criteria_id]}}</td>
- <td><a class="action-item crm-hover-button" ng-href="#/mailing/abtesting/{{mailingAB.id}}">Edit</a> 
- <a class="action-item crm-hover-button" ng-href="#/mailing/abtesting/report/{{mailingAB.id}}">Results</a></td>
+ <td><a class="action-item crm-hover-button" ng-href="#/abtest/{{mailingAB.id}}">Edit</a> 
+ <a class="action-item crm-hover-button" ng-href="#/abtest/report/{{mailingAB.id}}">Results</a></td>
</tr>
</tbody>
<div class="crm-submit-buttons">
<br>
- <a ng-href="#/mailing/abtesting/new" class="button"><span><div class="icon add-icon"></div>New A/B Test</span></a>
+ <a ng-href="#/abtest/new" class="button"><span><div class="icon add-icon"></div>New A/B Test</span></a>
</div>
\ No newline at end of file
<input type="submit" ng-click=" tab1Form.$setPristine(); " ng-disabled="tab1Form.$invalid" value="Next" nexttab="{{tab_val}}"/>
</span>
<span class="crm-button">
- <input type="submit" ng-click="tab1Form.$setPristine(); goto('mailing/abtesting');" value="Cancel"/>
+ <input type="submit" ng-click="tab1Form.$setPristine(); goto('abtest');" value="Cancel"/>
</span>
</div>
</div>
<input type="submit" ng-click="tab2Form.$setPristine();" value="Next" ng-disabled="tab2Form.$invalid" submitform nexttab="{{tab_val}}"/>
</span>
<span class="crm-button">
- <input type="submit" ng-click="tab2Form.$setPristine(); goto('mailing/abtesting');" value="Cancel"/>
+ <input type="submit" ng-click="tab2Form.$setPristine(); goto('abtest');" value="Cancel"/>
</span>
</div>
</div>
<input type="submit" ng-click="tab3Form.$setPristine();" ng-disabled="tab3Form.$invalid" value="Next" nexttab="{{tab_val}}"/>
</span>
<span class="crm-button">
- <input type="submit" ng-click="tab3Form.$setPristine(); goto('mailing/abtesting');" value="Cancel"/>
+ <input type="submit" ng-click="tab3Form.$setPristine(); goto('abtest');" value="Cancel"/>
</span>
</div>
</div>
<input type="submit" ng-click="tab4Form.$setPristine();" value="Previous" prevtab/>
</span>
<span class="crm-button">
- <input type="submit" ng-click="tab4Form.$setPristine(); startabtest(); goto('mailing/abtesting');" value="Submit & Send"/>
+ <input type="submit" ng-click="tab4Form.$setPristine(); startabtest(); goto('abtest');" value="Submit & Send"/>
</span>
<span class="crm-button">
- <input type="submit" ng-click="tab4Form.$setPristine(); goto('mailing/abtesting');" value="Cancel"/>
+ <input type="submit" ng-click="tab4Form.$setPristine(); goto('abtest');" value="Cancel"/>
</span>
</div>
</div>