From dc7a657edb4dcc7eb583ed7c82ec3ea064312e07 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Wed, 7 May 2014 18:07:48 -0700 Subject: [PATCH] CRM-14480 - crmCaseType - Make cells editable (per mockup) --- CRM/Case/Info.php | 10 ++++++++++ css/civicrm.css | 7 +++++++ js/angular-crmCaseType.js | 4 ++++ partials/crmCaseType/activityTypesTable.html | 2 +- partials/crmCaseType/timelineTable.html | 15 +++++++++++---- 5 files changed, 33 insertions(+), 5 deletions(-) diff --git a/CRM/Case/Info.php b/CRM/Case/Info.php index 61ec823c25..3f191b04f1 100644 --- a/CRM/Case/Info.php +++ b/CRM/Case/Info.php @@ -62,6 +62,16 @@ class CRM_Case_Info extends CRM_Core_Component_Info { 'js' => array('js/angular-crmCaseType.js'), 'css' => array('css/angular-crmCaseType.css'), ); + // Need full OptionValue records + $actStatuses = civicrm_api3('OptionValue', 'get', array('option_group_id' => 'activity_status')); + $actTypes = civicrm_api3('OptionValue', 'get', array('option_group_id' => 'activity_type')); + CRM_Core_Resources::singleton()->addSetting(array( + 'crmCaseType' => array( + 'actStatuses' => array_values($actStatuses['values']), + 'actTypes' => array_values($actTypes['values']), + //CRM_Core_PseudoConstant::activityType(TRUE, TRUE, FALSE, 'name'), + ), + )); return $result; } diff --git a/css/civicrm.css b/css/civicrm.css index 6f4b08dcf9..ecb79db720 100644 --- a/css/civicrm.css +++ b/css/civicrm.css @@ -4673,3 +4673,10 @@ span.crm-status-icon { .crm-container .survey-completed { text-decoration: line-through; } + +.crm-container .ng-invalid { + border: 1px solid red; +} +.crm-container .ng-valid { + border: 1px solid #666; +} \ No newline at end of file diff --git a/js/angular-crmCaseType.js b/js/angular-crmCaseType.js index ecaa871968..fd0447ff2c 100644 --- a/js/angular-crmCaseType.js +++ b/js/angular-crmCaseType.js @@ -18,6 +18,9 @@ crmCaseType.controller('CaseTypeCtrl', function($scope) { $scope.partialUrl = partialUrl; + $scope.activityStatuses = CRM.crmCaseType.actStatuses; + $scope.activityTypes = CRM.crmCaseType.actTypes; + $scope.workflows = { 'timeline': 'Timeline', 'pipeline': 'Sequence' @@ -63,6 +66,7 @@ ] } }; + window.ct = $scope.caseType; $scope.addActivitySet = function(workflow) { var activitySet = {}; diff --git a/partials/crmCaseType/activityTypesTable.html b/partials/crmCaseType/activityTypesTable.html index 1327078ad0..38b10fe6fb 100644 --- a/partials/crmCaseType/activityTypesTable.html +++ b/partials/crmCaseType/activityTypesTable.html @@ -17,7 +17,7 @@ Required vars: caseType {{ activityType.name }} - {{ activityType.max_instances }} + diff --git a/partials/crmCaseType/timelineTable.html b/partials/crmCaseType/timelineTable.html index ec8ea5b1c4..c44e41253c 100644 --- a/partials/crmCaseType/timelineTable.html +++ b/partials/crmCaseType/timelineTable.html @@ -20,16 +20,23 @@ Required vars: activitySet {{ activity.name }} - {{ activity.status }} + + - {{ activity.reference_activity }} + - {{ activity.reference_offset }} + - {{ activity.reference_select }} + -- 2.25.1