Merge remote-tracking branch 'upstream/4.5' into 4.5-master-2015-03-09-21-44-34
[civicrm-core.git] / js / angular-crmCaseType.js
index f8ae9551485c1dc873472ecf6a9b5ea8111264ab..cb5e5797a57d99f50ab29e697c22ec6d17b7e52c 100644 (file)
@@ -1,9 +1,5 @@
 (function(angular, $, _) {
 
-  var partialUrl = function(relPath) {
-    return CRM.resourceUrls.civicrm + '/partials/crmCaseType/' + relPath;
-  };
-
   var crmCaseType = angular.module('crmCaseType', ['ngRoute', 'ui.utils', 'crmUi', 'unsavedChanges', 'crmUtil']);
 
   // Note: This template will be passed to cloneDeep(), so don't put any funny stuff in here!
@@ -39,7 +35,7 @@
   crmCaseType.config(['$routeProvider',
     function($routeProvider) {
       $routeProvider.when('/caseType', {
-        templateUrl: partialUrl('list.html'),
+        templateUrl: '~/crmCaseType/list.html',
         controller: 'CaseTypeListCtrl',
         resolve: {
           caseTypes: function($route, crmApi) {
@@ -48,7 +44,7 @@
         }
       });
       $routeProvider.when('/caseType/:id', {
-        templateUrl: partialUrl('edit.html'),
+        templateUrl: '~/crmCaseType/edit.html',
         controller: 'CaseTypeCtrl',
         resolve: {
           apiCalls: function($route, crmApi) {
   });
 
   crmCaseType.controller('CaseTypeCtrl', function($scope, crmApi, apiCalls) {
-    $scope.partialUrl = partialUrl;
-    var ts = $scope.ts = CRM.ts('CiviCase');
+    var ts = $scope.ts = CRM.ts(null);
 
     $scope.activityStatuses = _.values(apiCalls.actStatuses.values);
     $scope.activityTypes = apiCalls.actTypes.values;
      */
     $scope.activityTableTemplate = function(activitySet) {
       if (activitySet.timeline) {
-        return partialUrl('timelineTable.html');
+        return '~/crmCaseType/timelineTable.html';
       } else if (activitySet.sequence) {
-        return partialUrl('sequenceTable.html');
+        return '~/crmCaseType/sequenceTable.html';
       } else {
         return '';
       }