mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-08 22:56:06 +00:00
Starting to prettify
This commit is contained in:
@@ -6,5 +6,4 @@ Shop.factory 'OrderCycle', ($resource, Product) ->
|
||||
|
||||
@push_order_cycle: ->
|
||||
new $resource("/shop/order_cycle").save {order_cycle_id: @order_cycle.order_cycle_id}, ->
|
||||
Product.update()
|
||||
|
||||
Product.update()
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
/*body { background: #ff0000; }*/
|
||||
|
||||
|
||||
|
||||
@@ -11,6 +11,6 @@
|
||||
- else
|
||||
Ready for:
|
||||
%select{"ng-model" => "order_cycle.order_cycle_id",
|
||||
"ng-init" => "order_cycle.order_cycle_id = #{current_order_cycle.id}",
|
||||
"ng-init" => "order_cycle.order_cycle_id = #{current_order_cycle.andand.id}",
|
||||
"ng-change" => "changeOrderCycle()",
|
||||
"ng-options" => "c for c in #{@order_cycles.map {|oc| oc.id}.to_json}"}
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
= @distributor.long_description.andand.html_safe
|
||||
|
||||
%products{"ng-controller" => "ProductsCtrl"}
|
||||
%product{"ng-repeat" => "product in data.products "}
|
||||
{{ product.product.name }}
|
||||
{{ product.product.description }}
|
||||
|
||||
%pre {{ data.products | json }}
|
||||
|
||||
= render partial: "enterprises/contact_us"
|
||||
|
||||
@@ -21,10 +21,6 @@ describe 'All controllers', ->
|
||||
it 'Fetches products from Product', ->
|
||||
expect(scope.data).toEqual 'testy mctest'
|
||||
|
||||
#it "updates products when the changeOrderCycle event is seen", ->
|
||||
#spyOn(scope, "updateProducts")
|
||||
#rootScope.$emit "changeOrderCycle"
|
||||
#expect(scope.updateProducts).toHaveBeenCalled()
|
||||
|
||||
describe 'OrderCycleCtrl', ->
|
||||
ctrl = null
|
||||
@@ -42,7 +38,3 @@ describe 'All controllers', ->
|
||||
scope = $rootScope.$new()
|
||||
ctrl = $controller 'OrderCycleCtrl', {$scope: scope}
|
||||
|
||||
#it "triggers an event when the order cycle changes", ->
|
||||
#spyOn(rootScope, "$emit")
|
||||
#scope.changeOrderCycle()
|
||||
#expect(scope.$emit).toHaveBeenCalledWith "changeOrderCycle"
|
||||
|
||||
Reference in New Issue
Block a user