Various small functional tweaks

This commit is contained in:
Will Marshall
2014-04-24 16:28:12 +10:00
parent 4b95b9979e
commit f6bfc71c4b
9 changed files with 24 additions and 18 deletions

View File

@@ -27,4 +27,3 @@ $ ->
Foundation.set_namespace = ->
null
$(document).foundation()
$(document).foundation({reveal: {animation: 'fade'}})

View File

@@ -6,8 +6,9 @@ Darkswarm.directive "ofnModal", ($modal)->
link: (scope, elem, attrs, ctrl, transclude)->
scope.title = attrs.title
scope.cancel = ->
scope.modalInstance.dismiss("cancel")
elem.on "click", ->
scope.modalInstance = $modal.open(template: transclude())
scope.modalInstance = $modal.open(controller: ctrl, template: transclude())

View File

@@ -1,4 +1,4 @@
Darkswarm.factory 'Hubs', ($location, hubs, $filter) ->
new class Hubs
constructor: ->
@hubs = $filter('orderBy')(hubs, 'active', true)
@hubs = $filter('orderBy')(hubs, ['-active', '+orders_close_at'])

View File

@@ -1,7 +1,7 @@
Darkswarm.factory 'Navigation', ($location) ->
new class Navigation
paths: []
path: $location.path()
path: null
navigate: (path = false)->
@path = path || @path || @paths[0]

View File

@@ -25,8 +25,9 @@
background-size: 100% auto
@mixin csstrans
-webkit-transition: all 200ms ease-in-out
-moz-transition: all 200ms ease-in-out
-ms-transition: all 200ms ease-in-out
-o-transition: all 200ms ease-in-out
transition: all 200ms ease-in-out
-webkit-transition: all 100ms ease-in-out
-moz-transition: all 100ms ease-in-out
-ms-transition: all 100ms ease-in-out
-o-transition: all 100ms ease-in-out
transition: all 100ms ease-in-out
-webkit-transform-style: preserve-3d

View File

@@ -7,17 +7,17 @@
%h1 Ready to shop?
%p
Select a
%a food hub (modal)
-#%ofn-modal{title: "food hub"}
-#= render partial: "modals/food_hub"
from the list below:
#hub-search.row
.small-9.columns
.small-12.columns
%input{type: :text,
"ng-model" => "query",
placeholder: "Search postcode, suburb or hub name...",
"ng-debounce" => "150",
"ofn-disable-enter" => true}
.small-3.columns.advanced
Advanced search
.row{bindonce: true}
.small-12.columns
@@ -29,6 +29,7 @@
.small-12.columns
= render partial: 'darkswarm/skinny'
= render partial: 'darkswarm/fat'
.row{"ng-show" => "filteredHubs.length == 0"}
.columns.small-12.text-center
No results

View File

@@ -0,0 +1,3 @@
Information about Food Hubs
%h4 test
%a.close-reveal-modal{"ng-click" => "cancel()"} ×

View File

@@ -1,5 +1,5 @@
%li#login-link
%a.sidebar-button{"ng-click" => "toggle('/login')"} Login
%li.divider
%li#sign-up-link
%a.sidebar-button{"ng-click" => "toggle('/signup')"} Sign Up
-#%li#login-link
-#%a.sidebar-button{"ng-click" => "toggle('/login')"} Login
-#%li.divider
-#%li#sign-up-link
-#%a.sidebar-button{"ng-click" => "toggle('/signup')"} Sign Up

View File

@@ -0,0 +1 @@
Rails.application.assets.register_engine('.haml', Tilt::HamlTemplate)