Sha256: 720b4681886349cfbae1b04292adfb3ddc2cd5e1d5c84f8e4516f9e924e204b2

Contents?: true

Size: 1.88 KB

Versions: 2

Compression:

Stored size: 1.88 KB

Contents

{I"
class:ETI"ProcessedAsset;FI"logical_path;TI"+sprangular/directives/quantityInput.js;FI"
pathname;TI"l/home/josh/Projects/Dynamo/sprangular/app/assets/javascripts/sprangular/directives/quantityInput.coffee;FI"content_type;TI"application/javascript;TI"
mtime;Tl+×ZUI"length;TiI"digest;TI"%eda193eac16213a494b92fd1989171d6;FI"source;TI"(function() {
  'use strict';
  Sprangular.directive('quantityInput', function() {
    return {
      restrict: 'E',
      templateUrl: 'directives/quantity_input.html',
      scope: {
        variant: '=',
        updateCart: '=',
        quantity: '='
      },
      controller: function($scope, Cart, Angularytics) {
        $scope.$watch('quantity', function(newValue, oldValue) {
          if (oldValue !== newValue) {
            if ($scope.updateCart) {
              Cart.updateItemQuantity($scope.variant.id, $scope.quantity);
            }
            if (oldValue > newValue) {
              return Angularytics.trackEvent("Cart", "Quantity decrease", oldValue - newValue);
            } else {
              return Angularytics.trackEvent("Cart", "Quantity increase", newValue - oldValue);
            }
          }
        });
        return $scope.update = function(delta) {
          if (($scope.quantity + delta) !== 0) {
            return $scope.quantity += delta;
          }
        };
      }
    };
  });

}).call(this);
;TI"dependency_digest;TI"%eb7b5fedf7ef38f1716dd1fac26cd971;FI"required_paths;T[I"l/home/josh/Projects/Dynamo/sprangular/app/assets/javascripts/sprangular/directives/quantityInput.coffee;FI"dependency_paths;T[{I"	path;TI"l/home/josh/Projects/Dynamo/sprangular/app/assets/javascripts/sprangular/directives/quantityInput.coffee;FI"
mtime;TI"2015-03-13T17:47:03-04:00;TI"digest;TI"%752797b242bacfc082b7a17de0e143c8;FI"
_version;TI"%64e62ddc273c2f5847f30d698ca14b67;F

Version data entries

2 entries across 1 versions & 1 rubygems

Version Path
sprangular-0.1.0 spec/dummy/tmp/cache/assets/development/sprockets/127d234320552310304473dfa66a6eb1
sprangular-0.1.0 spec/dummy/tmp/cache/assets/development/sprockets/16b60f5ae17c43041964f589c810af83