{I" class:ETI"ProcessedAsset;FI"logical_path;TI"1sprangular/directives/creditCardSelection.js;FI" pathname;TI"r/home/josh/Projects/Dynamo/sprangular/app/assets/javascripts/sprangular/directives/creditCardSelection.coffee;FI"content_type;TI"application/javascript;TI" mtime;Tl+'t%UI" length;TiI" digest;TI"%b47b4855cd75ec2382e02f54e94253bf;FI" source;TI"(function() { Sprangular.directive('creditCardSelection', function() { return { restrict: 'E', templateUrl: 'credit_cards/selection.html', scope: { creditCard: '=', creditCards: '=', disabled: '=', submitted: '=' }, controller: function($scope) { $scope.existingCreditCard = false; $scope.$watch('creditCards', function(creditCards) { var found; if (!creditCards) { return; } if (creditCards.length > 0) { found = _.find(creditCards, function(existing) { return existing.same($scope.creditCard); }); if (found) { return $scope.toggleExistingCreditCard(); } } }); return $scope.toggleExistingCreditCard = function() { $scope.existingCreditCard = !$scope.existingCreditCard; if ($scope.existingCreditCard) { return $scope.creditCard = $scope.creditCards[0]; } else { return $scope.creditCard = new Sprangular.CreditCard; } }; }, link: function(element, attrs) { if (attrs.disabled == null) { return attrs.disabled = false; } } }; }); }).call(this); ;TI"dependency_digest;TI"%0d7c8f813047f8350d77bbdcde87fb2e;FI"required_paths;T[I"r/home/josh/Projects/Dynamo/sprangular/app/assets/javascripts/sprangular/directives/creditCardSelection.coffee;FI"dependency_paths;T[{I" path;TI"r/home/josh/Projects/Dynamo/sprangular/app/assets/javascripts/sprangular/directives/creditCardSelection.coffee;FI" mtime;TI"2015-04-08T14:32:07-04:00;TI" digest;TI"%10807656825392879626e492a90d82a1;FI" _version;TI"%64e62ddc273c2f5847f30d698ca14b67;F