Starting to prettify

This commit is contained in:
Will Marshall
2013-12-12 10:28:43 +11:00
parent 8f41078c0c
commit 36694822db
5 changed files with 8 additions and 11 deletions

View File

@@ -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()

View File

@@ -1 +1,3 @@
/*body { background: #ff0000; }*/

View File

@@ -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}"}

View File

@@ -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"

View File

@@ -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"