Fix file perms on files back to 664
[civicrm-core.git] / ang / crmCaseType.js
index e3b4a16c6ab72518e0b9aab66a8d290458351a26..2ae4b98b3f12c5bc57674516aca855e18972a463 100644 (file)
         };
 
         $(input).crmSelect2({
-          data: scope[attrs.crmOptions],
+          data: function () {
+            return { results: scope[attrs.crmOptions] };
+          },
           createSearchChoice: function(term) {
             return {id: term, text: term + ' (' + ts('new') + ')'};
           },
           scope.$evalAsync('_resetSelection()');
           e.preventDefault();
         });
-
-        scope.$watch(attrs.crmOptions, function(value) {
-          $(input).select2('data', scope[attrs.crmOptions]);
-          $(input).select2('val', '');
-        });
       }
     };
   });
       })
         .then(function (data) {
           delete caseTypes.values[caseType.id];
-          $scope.$digest();
         });
     };
     $scope.revertCaseType = function (caseType) {