mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-19 04:49:15 +00:00
Various small functional tweaks
This commit is contained in:
@@ -27,4 +27,3 @@ $ ->
|
||||
Foundation.set_namespace = ->
|
||||
null
|
||||
$(document).foundation()
|
||||
$(document).foundation({reveal: {animation: 'fade'}})
|
||||
|
||||
@@ -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())
|
||||
@@ -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'])
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
3
app/views/modals/_food_hub.html.haml
Normal file
3
app/views/modals/_food_hub.html.haml
Normal file
@@ -0,0 +1,3 @@
|
||||
Information about Food Hubs
|
||||
%h4 test
|
||||
%a.close-reveal-modal{"ng-click" => "cancel()"} ×
|
||||
@@ -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
|
||||
|
||||
1
config/initializers/angular_assets.rb
Normal file
1
config/initializers/angular_assets.rb
Normal file
@@ -0,0 +1 @@
|
||||
Rails.application.assets.register_engine('.haml', Tilt::HamlTemplate)
|
||||
Reference in New Issue
Block a user