mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Merge branch 'master' into enterprise-json-perf
This commit is contained in:
@@ -6,11 +6,12 @@
|
||||
#= require angular
|
||||
#= require angular-cookies
|
||||
#= require angular-sanitize
|
||||
#= require angular-animate
|
||||
#= require angular-resource
|
||||
#= require lodash.underscore.js
|
||||
#= require angular-scroll.min.js
|
||||
#= require angular-google-maps.min.js
|
||||
#= require ../shared/mm-foundation-tpls-0.2.0-SNAPSHOT
|
||||
#= require ../shared/mm-foundation-tpls-0.2.2.min.js
|
||||
#= require ../shared/bindonce.min.js
|
||||
#= require ../shared/ng-infinite-scroll.min.js
|
||||
#= require ../shared/angular-local-storage.js
|
||||
|
||||
@@ -2,5 +2,7 @@ Darkswarm.controller "GroupsCtrl", ($scope, Groups, $anchorScroll, $rootScope) -
|
||||
$scope.Groups = Groups
|
||||
$scope.order = 'position'
|
||||
|
||||
$rootScope.$on "$locationChangeSuccess", (newRoute, oldRoute) ->
|
||||
$anchorScroll()
|
||||
#$rootScope.$on "$locationChangeSuccess", (newRoute, oldRoute) ->
|
||||
#$anchorScroll()
|
||||
#
|
||||
#
|
||||
|
||||
@@ -6,9 +6,10 @@ window.Darkswarm = angular.module("Darkswarm", ["ngResource",
|
||||
'angular-flash.service',
|
||||
'templates',
|
||||
'ngSanitize',
|
||||
'ngAnimate',
|
||||
'google-maps',
|
||||
'duScroll',
|
||||
'backstretch']).config ($httpProvider, $tooltipProvider, $locationProvider, $anchorScrollProvider) ->
|
||||
]).config ($httpProvider, $tooltipProvider, $locationProvider, $anchorScrollProvider) ->
|
||||
$httpProvider.defaults.headers.post['X-CSRF-Token'] = $('meta[name="csrf-token"]').attr('content')
|
||||
$httpProvider.defaults.headers.put['X-CSRF-Token'] = $('meta[name="csrf-token"]').attr('content')
|
||||
$httpProvider.defaults.headers['common']['X-Requested-With'] = 'XMLHttpRequest'
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
Darkswarm.directive "offcanvas", ->
|
||||
restrict: "A"
|
||||
|
||||
link: (scope, el, attr) ->
|
||||
el.find(".left-off-canvas-toggle").bind 'click', ->
|
||||
el.toggleClass 'move-right'
|
||||
9
app/assets/javascripts/shared/mm-foundation-tpls-0.2.2.min.js
vendored
Normal file
9
app/assets/javascripts/shared/mm-foundation-tpls-0.2.2.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
30
app/assets/stylesheets/darkswarm/animations.sass
Normal file
30
app/assets/stylesheets/darkswarm/animations.sass
Normal file
@@ -0,0 +1,30 @@
|
||||
.fade
|
||||
opacity: 0
|
||||
-webkit-transition: opacity .15s linear
|
||||
transition: opacity .15s linear
|
||||
|
||||
.fade.in
|
||||
opacity: 1
|
||||
|
||||
.reveal-modal.fade
|
||||
-webkit-transition: -webkit-transform .3s ease-out
|
||||
-moz-transition: -moz-transform .3s ease-out
|
||||
-o-transition: -o-transform .3s ease-out
|
||||
transition: transform .3s ease-out
|
||||
-webkit-transform: translate(0, -25%)
|
||||
-ms-transform: translate(0, -25%)
|
||||
transform: translate(0, -25%)
|
||||
|
||||
.reveal-modal.in
|
||||
-webkit-transform: translate(0, 0)
|
||||
-ms-transform: translate(0, 0)
|
||||
transform: translate(0, 0)
|
||||
|
||||
.reveal-modal-bg.fade
|
||||
filter: alpha(opacity = 0)
|
||||
opacity: 0
|
||||
|
||||
.reveal-modal-bg.in
|
||||
filter: alpha(opacity = 50)
|
||||
opacity: .5
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
= inject_enterprises
|
||||
|
||||
:javascript
|
||||
angular.module('Darkswarm').value('groups', #{render partial: "json/groups", object: @groups})
|
||||
|
||||
@@ -38,9 +39,9 @@
|
||||
.small-6.columns
|
||||
%h5 Our hubs & producers
|
||||
%ul.small-block-grid-2
|
||||
%li{"ng-repeat" => "enterprise in group.enterprises"}
|
||||
%li{"ng-repeat" => "enterprise in group.enterprises", "scroll-after-load" => true}
|
||||
%hub-modal{"ng-if" => "enterprise.is_distributor"}
|
||||
%producer-modal{"ng-if" => "!enterprise.is_distributor"}
|
||||
%producer-modal{"ng-if" => "!enterprise.is_distributor", "show-hub-actions" => 'true'}
|
||||
|
||||
.row.group_footer
|
||||
.small-12.columns
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
%title= content_for?(:title) ? yield(:title) : 'Welcome to Open Food Network'
|
||||
= favicon_link_tag "favicon.png"
|
||||
%link{href: "http://fonts.googleapis.com/css?family=Open+Sans:400,700", rel: "stylesheet", type: "text/css"}/
|
||||
%link{href: "https://fonts.googleapis.com/css?family=Open+Sans:400,700", rel: "stylesheet", type: "text/css"}/
|
||||
|
||||
= yield :scripts
|
||||
%script{src: "//maps.googleapis.com/maps/api/js?sensor=false"}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
%input.button.primary.right{type: :submit, value: "Add to Cart"}
|
||||
|
||||
%div{bindonce: true}
|
||||
%product{"ng-controller" => "ProductNodeCtrl",
|
||||
%product.animate-repeat{"ng-controller" => "ProductNodeCtrl",
|
||||
"ng-repeat" => "product in Product.products | products:query | orderBy:ordering.order | limitTo: limit track by product.id"}
|
||||
%div
|
||||
= render partial: "shop/products/summary"
|
||||
|
||||
@@ -8,4 +8,7 @@
|
||||
%ul.bullet-list
|
||||
- for group in current_distributor.groups
|
||||
%li
|
||||
%a{href: main_app.groups_path(anchor: "#/#group#{group.id}")}= group.name
|
||||
= group.id
|
||||
%a{href: main_app.groups_path + "/#/#group#{group.id}"}
|
||||
= group.name
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
- @body_id = 'cart'
|
||||
= inject_enterprises
|
||||
|
||||
.darkswarm
|
||||
- content_for :order_cycle_form do
|
||||
%strong.avenir
|
||||
|
||||
Reference in New Issue
Block a user