From 60dd172b9573b6e7e780f3bc9ca3d080f306c039 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Mon, 2 Jun 2014 16:11:20 -0700 Subject: [PATCH] CRM-14480 - crmCaseType - New options should appear in dropdowns --- js/angular-crmCaseType.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/js/angular-crmCaseType.js b/js/angular-crmCaseType.js index 617f6726c7..e473574a0e 100644 --- a/js/angular-crmCaseType.js +++ b/js/angular-crmCaseType.js @@ -90,6 +90,11 @@ scope.$evalAsync('_resetSelection()'); e.preventDefault(); }); + + scope.$watch(attrs.crmOptions, function(value) { + $(input).select2('data', getFormattedOptions); + $(input).select2('val', ''); + }); } }; }); @@ -136,6 +141,9 @@ activitySet.activityTypes.push({ name: activityType }); + if (!_.contains($scope.activityTypeNames, activityType)) { + $scope.activityTypeNames.push(activityType); + } }; /// Add a new top-level activity-type entry @@ -145,6 +153,10 @@ $scope.caseType.definition.activityTypes.push({ name: activityType }); + + } + if (!_.contains($scope.activityTypeNames, activityType)) { + $scope.activityTypeNames.push(activityType); } }; @@ -156,6 +168,9 @@ name: roleName }); } + if (!_.contains($scope.relationshipTypeNames, roleName)) { + $scope.relationshipTypeNames.push(roleName); + } }; $scope.onManagerChange = function(managerRole) { -- 2.25.1