{I" class:ETI"ProcessedAsset;FI"logical_path;TI".sprangular/directives/addressSelection.js;FI" pathname;TI"o/home/josh/Projects/Dynamo/sprangular/app/assets/javascripts/sprangular/directives/addressSelection.coffee;FI"content_type;TI"application/javascript;TI" mtime;Tl+3t%UI" length;TiÝI" digest;TI"%96ebce6e8d92c22aca5c073da1f81e04;FI" source;TI"Ý(function() { Sprangular.directive('addressSelection', function() { return { restrict: 'E', templateUrl: 'addresses/selection.html', scope: { address: '=', addresses: '=', countries: '=', disabled: '=', submitted: '=' }, controller: function($scope) { $scope.existingAddress = false; $scope.$watch('addresses', function(addresses) { var found; if (!(addresses && addresses.length > 0)) { return; } found = _.find(addresses, function(existing) { return existing.same($scope.address); }); if (found) { return $scope.toggleExistingAddress(); } }); return $scope.toggleExistingAddress = function() { $scope.existingAddress = !$scope.existingAddress; if ($scope.existingAddress) { return $scope.address = $scope.addresses[0]; } else { return $scope.address = new Sprangular.Address(); } }; }, link: function(element, attrs) { if (attrs.disabled == null) { return attrs.disabled = false; } } }; }); }).call(this); ;TI"dependency_digest;TI"%d78dc4c2a60c229110fe233781842454;FI"required_paths;T[I"o/home/josh/Projects/Dynamo/sprangular/app/assets/javascripts/sprangular/directives/addressSelection.coffee;FI"dependency_paths;T[{I" path;TI"o/home/josh/Projects/Dynamo/sprangular/app/assets/javascripts/sprangular/directives/addressSelection.coffee;FI" mtime;TI"2015-04-08T14:32:19-04:00;TI" digest;TI"%e569d968bac9437103962b767c452078;FI" _version;TI"%64e62ddc273c2f5847f30d698ca14b67;F