Fix crmStatusPage file name to match module name per convention
authorColeman Watts <coleman@civicrm.org>
Wed, 25 Nov 2020 19:07:24 +0000 (14:07 -0500)
committerColeman Watts <coleman@civicrm.org>
Wed, 25 Nov 2020 23:29:28 +0000 (18:29 -0500)
Civi/Angular/Manager.php
ang/crmStatusPage.ang.php
ang/crmStatusPage.js
ang/crmStatusPage/StatusPageCtrl.js
ang/crmStatusPage/StatusPageServices.js

index d19c8c328ee586649d9ee9589a3f3e9474d8bab8..72e3f4401ab12ff8cb39179cc72ef65984b8ff1d 100644 (file)
@@ -118,7 +118,7 @@ class Manager {
       $angularModules['ui.bootstrap'] = include "$civicrm_root/ang/ui.bootstrap.ang.php";
       $angularModules['ui.sortable'] = include "$civicrm_root/ang/ui.sortable.ang.php";
       $angularModules['unsavedChanges'] = include "$civicrm_root/ang/unsavedChanges.ang.php";
-      $angularModules['statuspage'] = include "$civicrm_root/ang/crmStatusPage.ang.php";
+      $angularModules['crmStatusPage'] = include "$civicrm_root/ang/crmStatusPage.ang.php";
       $angularModules['exportui'] = include "$civicrm_root/ang/exportui.ang.php";
       $angularModules['api4Explorer'] = include "$civicrm_root/ang/api4Explorer.ang.php";
       $angularModules['api4'] = include "$civicrm_root/ang/api4.ang.php";
index b6d79374409b10fca737fcc6e2d38c7ca2e053e0..e5c2d397e445213ea92010cd587b97aef973d888 100644 (file)
@@ -1,6 +1,5 @@
 <?php
 // This file declares an Angular module which can be autoloaded
-// ODDITY: Angular name 'statuspage' doesn't match the file name 'crmStatusPage'.
 
 return [
   'ext' => 'civicrm',
index b0db81a350bdb1f7fe09a37c4224ee90c461e205..9693485b66cd16c6045615d4868030c7a08572a1 100644 (file)
@@ -1,11 +1,11 @@
 (function(angular, $, _) {
-  angular.module('statuspage', CRM.angRequires('statuspage'));
+  angular.module('crmStatusPage', CRM.angRequires('crmStatusPage'));
 
   // router
-  angular.module('statuspage').config( function($routeProvider) {
+  angular.module('crmStatusPage').config( function($routeProvider) {
     $routeProvider.when('/status', {
-      controller: 'statuspageStatusPage',
-      templateUrl: '~/statuspage/StatusPage.html',
+      controller: 'crmStatusPageCtrl',
+      templateUrl: '~/crmStatusPage/StatusPage.html',
 
       resolve: {
         statusData: function(crmApi) {
index 4abca2ab81eabf038ca98d6f7e0507e65d87e588..530d7ffdbe96ec974d6ebda604cd9a3a67daca88 100644 (file)
@@ -1,6 +1,6 @@
 (function(angular, $, _) {
 
-  angular.module('statuspage').controller('statuspageStatusPage',
+  angular.module('crmStatusPage').controller('crmStatusPageCtrl',
     function($scope, crmApi, crmStatus, statusData) {
       $scope.ts = CRM.ts();
       $scope.help = CRM.help;
@@ -40,7 +40,7 @@
           }]
         ], 'Set preference');
       };
-      
+
       $scope.countVisible = function(visibility) {
         return _.filter($scope.statuses, function(s) {
           return s.is_visible == visibility && s.severity_id >= 2;
index a37ceafb9a87051513662f2180d506888bbdbb8d..e895d8979caa77e01267cf254dc9d710abd343a8 100644 (file)
@@ -1,12 +1,12 @@
 (function(angular, $, _) {
 
-  angular.module('statuspage')
+  angular.module('crmStatusPage')
     .filter('trusted', function($sce){ return $sce.trustAsHtml; })
 
     // Todo: abstract this into a generic crmUi directive?
     .directive('statuspagePopupMenu', function($timeout) {
       return {
-        templateUrl: '~/statuspage/SnoozeOptions.html',
+        templateUrl: '~/crmStatusPage/SnoozeOptions.html',
         transclude: true,
 
         link: function(scope, element, attr) {