crmMailingAB - Change "partials/abtesting" to "partials/crmMailingAB". Change routes...
authorTim Otten <totten@civicrm.org>
Wed, 29 Oct 2014 02:32:11 +0000 (19:32 -0700)
committerTim Otten <totten@civicrm.org>
Wed, 29 Oct 2014 02:32:11 +0000 (19:32 -0700)
The "/mailing/abtesting" route conflicted with the "/mailing/:id" route. The "abtesting" didn't match the module name.

19 files changed:
js/angular-crmMailingAB-ReportCtrl.js
js/angular-crmMailingAB.js
partials/crmMailingAB/attachments.html [moved from partials/abtesting/attachments.html with 100% similarity]
partials/crmMailingAB/compose.html [moved from partials/abtesting/compose.html with 100% similarity]
partials/crmMailingAB/from_name.html [moved from partials/abtesting/from_name.html with 100% similarity]
partials/crmMailingAB/headerfooter.html [moved from partials/abtesting/headerfooter.html with 100% similarity]
partials/crmMailingAB/list.html [moved from partials/abtesting/list.html with 68% similarity]
partials/crmMailingAB/main.html [moved from partials/abtesting/main.html with 100% similarity]
partials/crmMailingAB/modal.html [moved from partials/abtesting/modal.html with 100% similarity]
partials/crmMailingAB/next.html [moved from partials/abtesting/next.html with 100% similarity]
partials/crmMailingAB/report.html [moved from partials/abtesting/report.html with 100% similarity]
partials/crmMailingAB/subject_lines.html [moved from partials/abtesting/subject_lines.html with 100% similarity]
partials/crmMailingAB/tab1.html [moved from partials/abtesting/tab1.html with 97% similarity]
partials/crmMailingAB/tab2.html [moved from partials/abtesting/tab2.html with 93% similarity]
partials/crmMailingAB/tab3.html [moved from partials/abtesting/tab3.html with 98% similarity]
partials/crmMailingAB/tab4.html [moved from partials/abtesting/tab4.html with 95% similarity]
partials/crmMailingAB/trackandRespond.html [moved from partials/abtesting/trackandRespond.html with 100% similarity]
partials/crmMailingAB/two_emails.html [moved from partials/abtesting/two_emails.html with 100% similarity]
partials/crmMailingAB/uploadContent.html [moved from partials/abtesting/uploadContent.html with 100% similarity]

index a8da475ef0c848bb5c6db692e7b969a7333139d7..45ee3bb776685f307346625f39046cd92ee8a5d6 100644 (file)
@@ -1,7 +1,7 @@
 (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');
 
@@ -38,7 +38,7 @@
         mail.id = selectedABTest.mailing_id_c;
         crmApi('Mailing', 'create', mail);
       });
-      $location.path('mailing/abtesting');
+      $location.path('abtest');
     };
 
     $scope.sendc = function () {
@@ -50,7 +50,7 @@
         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 = [];
index ba073cb29022d54c8db817379dc87ab0705ae63a..d872dbf2280d44c5a80937216712e6e8f0f7e316 100755 (executable)
@@ -4,7 +4,7 @@
 (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']);
 
@@ -16,7 +16,7 @@
   crmMailingAB.config([
     '$routeProvider',
     function ($routeProvider) {
-      $routeProvider.when('/mailing/abtesting', {
+      $routeProvider.when('/abtest', {
         templateUrl: partialUrl('list.html'),
         controller: 'ABListingCtrl',
         resolve: {
@@ -25,7 +25,7 @@
           }
         }
       });
-      $routeProvider.when('/mailing/abtesting/report/:id', {
+      $routeProvider.when('/abtest/report/:id', {
         templateUrl: partialUrl('report.html'),
         controller: 'ReportCtrl',
         resolve: {
@@ -34,7 +34,7 @@
           }
         }
       });
-      $routeProvider.when('/mailing/abtesting/:id', {
+      $routeProvider.when('/abtest/:id', {
         templateUrl: partialUrl('main.html'),
         controller: 'crmABTestingTabsCtrl',
         resolve: {
@@ -59,7 +59,7 @@
   // 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
    */
similarity index 68%
rename from partials/abtesting/list.html
rename to partials/crmMailingAB/list.html
index 6afd2ae78e5fdac984a42a80bfb448daf32089e6..99b691fde92a61cb3d34b1759c43a1a12fdf7c1b 100755 (executable)
@@ -23,8 +23,8 @@ Required vars: mailingABList
       <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>&nbsp
-      <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>&nbsp
+      <a class="action-item crm-hover-button" ng-href="#/abtest/report/{{mailingAB.id}}">Results</a></td>
 
     </tr>
     </tbody>
@@ -39,5 +39,5 @@ Required vars: mailingABList
 
 <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
similarity index 97%
rename from partials/abtesting/tab1.html
rename to partials/crmMailingAB/tab1.html
index 3fbc04214db5918dce8a58cf8a99ac65918556fb..ea8b8be83cba4f069268e3b27fd1fed9a75d570e 100755 (executable)
@@ -27,7 +27,7 @@
       <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>
similarity index 93%
rename from partials/abtesting/tab2.html
rename to partials/crmMailingAB/tab2.html
index 7ad30af57b3948da2dbfca97bb5561fe8819b895..e1530a4ba463ed9c6907c240f904c61531e030c9 100755 (executable)
@@ -9,7 +9,7 @@
         <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>
similarity index 98%
rename from partials/abtesting/tab3.html
rename to partials/crmMailingAB/tab3.html
index c69218a030ecff3b32b5d9f6b67a05430fdf522e..cee220669f528d4af31c5f5f1297930ff67a1ab4 100755 (executable)
@@ -60,7 +60,7 @@
         <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>
similarity index 95%
rename from partials/abtesting/tab4.html
rename to partials/crmMailingAB/tab4.html
index 0ba22dab0b0242c0d4d96208112c8807872a41ac..326a41530283cef00ae92879428ed50bc31f1856 100755 (executable)
         <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>