Disabling buttons and some work on the price breakdowns, including commenting them out for now

This commit is contained in:
Will Marshall
2014-07-28 16:12:32 +10:00
parent 4ab781d74a
commit 39a79869c0
6 changed files with 48 additions and 47 deletions

View File

@@ -1,5 +1,6 @@
Darkswarm.controller "ProductsCtrl", ($scope, $rootScope, Products, OrderCycle, FilterSelectorsService) ->
Darkswarm.controller "ProductsCtrl", ($scope, $rootScope, Products, OrderCycle, FilterSelectorsService, Cart) ->
$scope.Products = Products
$scope.Cart = Cart
$scope.totalActive = FilterSelectorsService.totalActive
$scope.clearAll = FilterSelectorsService.clearAll
$scope.filterText = FilterSelectorsService.filterText

View File

@@ -4,12 +4,8 @@ Darkswarm.directive "priceBreakdown", ($tooltip)->
variant: "="
tooltip
Darkswarm.directive 'priceBreakdownPopup', ()->
Darkswarm.directive 'priceBreakdownPopup', ->
restrict: 'EA'
replace: true
templateUrl: 'price_breakdown.html'
scope: true
#link: (scope, elem, attrs)->
#angular.element($window).bind 'click', ->
#scope.tt_isOpen = false
#elem.remove()

View File

@@ -1,4 +1,4 @@
.joyride-tip-guide{"ng-class" => "{ in: isOpen(), fade: animation() }"}
.joyride-tip-guide{"ng-class" => "{ in: tt_isOpen, fade: tt_animation }"}
%span.joyride-nub.bottom
.joyride-content-wrapper
{{ variant.id }}

View File

@@ -3,7 +3,8 @@
%a.left-off-canvas-toggle.menu-icon
%span
%section.right
= render partial: "shared/menu/cart"
.cart
= render partial: "shared/menu/cart"
%a{href: main_app.shop_path}
{{ CurrentHub.hub.name }}

View File

@@ -1,47 +1,50 @@
%products.small-12.columns{"ng-controller" => "ProductsCtrl", "ng-show" => "order_cycle.order_cycle_id != null",
"infinite-scroll" => "incrementLimit()", "infinite-scroll-distance" => "1"}
%form.custom
.row
.small-12.medium-8.large-9.columns
%input#search.text{"ng-model" => "query",
placeholder: "Search by product or producer",
"ng-debounce" => "100",
"ofn-disable-enter" => true}
.row
.small-12.medium-8.large-9.columns
%input#search.text{"ng-model" => "query",
placeholder: "Search by product or producer",
"ng-debounce" => "100",
"ofn-disable-enter" => true}
= render partial: "shop/products/filters"
= render partial: "shop/products/filters"
%form{action: cart_path}
.small-12.medium-4.large-3.columns
%input.button.primary.right.add_to_cart{type: :submit, value: "Checkout now"}
%input.button.primary.right.add_to_cart{type: :submit, value: "Checkout now",
"ng-disabled" => "Cart.dirty"}
%div.pad-top{bindonce: true}
%product.animate-repeat{"ng-controller" => "ProductNodeCtrl",
"ng-repeat" => "product in filteredProducts = (Products.products | products:query | taxons:activeTaxons | orderBy:ordering.order) track by product.id "}
.product-thumb
%a{"ng-click" => "triggerProductModal()"}
%img{"bo-src" => "product.master.images[0].small_url", "ng-click" => "triggerProductModal()"}
%div.pad-top{bindonce: true}
%product.animate-repeat{"ng-controller" => "ProductNodeCtrl",
"ng-repeat" => "product in filteredProducts = (Products.products | products:query | taxons:activeTaxons | orderBy:ordering.order) track by product.id "}
.product-thumb
%a{"ng-click" => "triggerProductModal()"}
%img{"bo-src" => "product.master.images[0].small_url", "ng-click" => "triggerProductModal()"}
= render partial: "shop/products/summary"
= render partial: "shop/products/summary"
%span{"bo-if" => "product.hasVariants"}
= render partial: "shop/products/variants"
%span{"bo-if" => "product.hasVariants"}
= render partial: "shop/products/variants"
.variants.row{"bo-if" => "!product.hasVariants"}
= render partial: "shop/products/master"
%product{"ng-show" => "Products.loading"}
.row.summary
.small-12.columns.text-center
Loading products
.variants.row{"bo-if" => "!product.hasVariants"}
= render partial: "shop/products/master"
%product{"ng-show" => "Products.loading"}
.row.summary
.small-12.columns.text-center
Loading products
%div{"ng-show" => "filteredProducts.length == 0 && !Products.loading"}
.row.summary
.small-12.columns
%p.no-results
Sorry, no results found for
%strong {{query}}.
Try another search?
.row
.small-12.columns
%input.button.primary.right.add_to_cart{type: :submit, value: "Checkout now"}
%div{"ng-show" => "filteredProducts.length == 0 && !Products.loading"}
.row.summary
.small-12.columns
%p.no-results
Sorry, no results found for
%strong {{query}}.
Try another search?
.row
.small-12.columns
%form{action: cart_path}
%input.button.primary.right.add_to_cart{type: :submit, value: "Checkout now",
"ng-disabled" => "Cart.dirty"}

View File

@@ -47,10 +47,10 @@
.table-cell
%i.ofn-i_009-close
{{ product.master.price | currency }}
%button.graph-button{"price-breakdown" => "_",
"variant" => "product.master",
"price-breakdown-animation" => "true"}
%i.ofn-i-058-graph
-#%button.graph-button{"price-breakdown" => "_",
-#"variant" => "product.master",
-#"price-breakdown-animation" => "true"}
-#%i.ofn-i-058-graph
.small-12.medium-2.large-2.columns.total-price.text-right
.table-cell