From: Tim Otten Date: Sun, 20 Apr 2014 21:06:33 +0000 (-0700) Subject: CRM-14480 - crmCaseType - Prettier URL construction X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=64790eddf6e6dd1f305cbb7fca2158738684f098;p=civicrm-core.git CRM-14480 - crmCaseType - Prettier URL construction --- diff --git a/js/angular-crmCaseType.js b/js/angular-crmCaseType.js index 60f74762d1..fbb319a2ab 100644 --- a/js/angular-crmCaseType.js +++ b/js/angular-crmCaseType.js @@ -1,19 +1,22 @@ (function(angular, $, _) { - var partialsUrl = CRM.resourceUrls['civicrm'] + '/partials/crmCaseType'; + var partialUrl = function(relPath) { + return CRM.resourceUrls['civicrm'] + '/partials/crmCaseType/' + relPath; + } ; + var crmCaseType = angular.module('crmCaseType', ['ngRoute', 'ui.utils']); crmCaseType.config(['$routeProvider', function($routeProvider) { $routeProvider.when('/caseType/:id', { - templateUrl: partialsUrl + '/edit.html', + templateUrl: partialUrl('edit.html'), controller: 'CaseTypeCtrl' }); } ]); crmCaseType.controller('CaseTypeCtrl', function($scope) { - $scope.partialsUrl = partialsUrl; + $scope.partialUrl = partialUrl; $scope.workflows = { 'timeline': 'Timeline', @@ -108,9 +111,9 @@ */ $scope.activityTableTemplate = function(activitySet) { if (activitySet.timeline) { - return partialsUrl + '/timelineTable.html'; + return partialUrl('timelineTable.html'); } else if (activitySet.pipeline) { - return partialsUrl + '/pipelineTable.html'; + return partialUrl('pipelineTable.html'); } else { return ''; } diff --git a/partials/crmCaseType/edit.html b/partials/crmCaseType/edit.html index 599fe03b41..7f82988c69 100644 --- a/partials/crmCaseType/edit.html +++ b/partials/crmCaseType/edit.html @@ -3,11 +3,11 @@ Controller: CaseTypeCtrl Required vars: caseType -->
-
+

Roles

-
+

Activities

@@ -27,7 +27,7 @@ Required vars: caseType
-
+
@@ -35,7 +35,7 @@ Required vars: caseType

Advanced

-
+