mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-12 18:36:49 +00:00
Revert "Fix JS render-blocking in Darkswarm"
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
- content_for :injection_data do
|
||||
= inject_available_shipping_methods
|
||||
= inject_available_payment_methods
|
||||
= inject_saved_credit_cards
|
||||
|
||||
= f_form_for current_order,
|
||||
html: {name: "checkout",
|
||||
id: "checkout_form",
|
||||
novalidate: true,
|
||||
"ng-submit" => "purchase($event, checkout)"} do |f|
|
||||
|
||||
= inject_available_shipping_methods
|
||||
= inject_available_payment_methods
|
||||
= inject_saved_credit_cards
|
||||
|
||||
= render "checkout/details", f: f
|
||||
= render "checkout/billing", f: f
|
||||
= render "checkout/shipping", f: f
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
- content_for(:title) do
|
||||
= t :checkout_title
|
||||
|
||||
- content_for :injection_data do
|
||||
= inject_enterprise_and_relatives
|
||||
= inject_available_countries
|
||||
= inject_enterprise_and_relatives
|
||||
= inject_available_countries
|
||||
|
||||
.darkswarm.footer-pad
|
||||
- content_for :order_cycle_form do
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
- content_for(:image) do
|
||||
= current_distributor.logo.url
|
||||
|
||||
- content_for :injection_data do
|
||||
= inject_enterprise_shopfront(@enterprise)
|
||||
= inject_enterprise_shopfront(@enterprise)
|
||||
|
||||
%shop.darkswarm
|
||||
- if @shopfront_layout == 'embedded'
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
- content_for(:title) do
|
||||
= t :groups_title
|
||||
|
||||
- content_for :injection_data do
|
||||
= inject_groups
|
||||
= inject_groups
|
||||
|
||||
#groups.pad-top.footer-pad{"ng-controller" => "GroupsCtrl"}
|
||||
.row
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
- content_for(:image) do
|
||||
= @group.logo.url
|
||||
|
||||
- content_for :injection_data do
|
||||
= inject_group_enterprises
|
||||
= inject_group_enterprises
|
||||
|
||||
#group-page.row.pad-top.footer-pad{"ng-controller" => "GroupPageCtrl"}
|
||||
.small-12.columns.pad-top
|
||||
|
||||
@@ -15,7 +15,16 @@
|
||||
%link{href: "https://fonts.googleapis.com/css?family=Roboto:400,300italic,400italic,300,700,700italic|Oswald:300,400,700", rel: "stylesheet", type: "text/css"}
|
||||
%link{href: "/OFN-v2.woff?eslsji", rel: "preload", as: "font", crossorigin: "anonymous"}
|
||||
|
||||
= yield :scripts
|
||||
%script{:src => "https://js.stripe.com/v3/", :type => "text/javascript"}
|
||||
%script{src: "//maps.googleapis.com/maps/api/js?libraries=places,geometry#{ ENV['GOOGLE_MAPS_API_KEY'] ? '&key=' + ENV['GOOGLE_MAPS_API_KEY'] : ''} "}
|
||||
= stylesheet_link_tag "darkswarm/all"
|
||||
= javascript_include_tag "darkswarm/all"
|
||||
= javascript_include_tag "web/all"
|
||||
|
||||
= render "layouts/i18n_script"
|
||||
= render "layouts/bugherd_script"
|
||||
= render "layouts/matomo_tag"
|
||||
= csrf_meta_tags
|
||||
|
||||
%body{class: body_classes, ng: {app: "Darkswarm"}}
|
||||
@@ -25,6 +34,14 @@
|
||||
|
||||
= render "layouts/shopfront_script" if @shopfront_layout
|
||||
|
||||
= inject_current_hub
|
||||
= inject_json "user", "current_user"
|
||||
= inject_json "railsFlash", "flash"
|
||||
= inject_taxons
|
||||
= inject_properties
|
||||
= inject_current_order
|
||||
= inject_currency_config
|
||||
|
||||
.off-canvas-wrap{offcanvas: true}
|
||||
.inner-wrap
|
||||
= render "shared/menu/menu" unless @hide_menu
|
||||
@@ -34,23 +51,4 @@
|
||||
|
||||
#footer
|
||||
%loading
|
||||
|
||||
%script{:src => "https://js.stripe.com/v3/", :type => "text/javascript"}
|
||||
%script{src: "//maps.googleapis.com/maps/api/js?libraries=places,geometry#{ ENV['GOOGLE_MAPS_API_KEY'] ? '&key=' + ENV['GOOGLE_MAPS_API_KEY'] : ''} "}
|
||||
= javascript_include_tag "darkswarm/all"
|
||||
= javascript_include_tag "web/all"
|
||||
= render "layouts/i18n_script"
|
||||
= yield :scripts
|
||||
|
||||
= inject_current_hub
|
||||
= inject_json "user", "current_user"
|
||||
= inject_json "railsFlash", "flash"
|
||||
= inject_taxons
|
||||
= inject_properties
|
||||
= inject_current_order
|
||||
= inject_currency_config
|
||||
= yield :injection_data
|
||||
|
||||
= render "layouts/bugherd_script"
|
||||
= render "layouts/matomo_tag"
|
||||
= render 'spree/shared/google_analytics'
|
||||
|
||||
@@ -10,7 +10,13 @@
|
||||
= favicon_link_tag "/favicon-staging.ico"
|
||||
%link{href: "https://fonts.googleapis.com/css?family=Roboto:400,300italic,400italic,300,700,700italic|Oswald:300,400,700", rel: "stylesheet", type: "text/css"}
|
||||
|
||||
= yield :scripts
|
||||
%script{src: "//maps.googleapis.com/maps/api/js?libraries=places"}
|
||||
= stylesheet_link_tag "darkswarm/all"
|
||||
= javascript_include_tag "darkswarm/all"
|
||||
|
||||
= render "layouts/i18n_script"
|
||||
= render "layouts/bugherd_script"
|
||||
= csrf_meta_tags
|
||||
|
||||
%body.off-canvas{"ng-app" => "Darkswarm", style: 'background-image: url("/assets/tile-wide.png")' }
|
||||
@@ -18,6 +24,8 @@
|
||||
= render partial: "shared/ie_warning"
|
||||
= javascript_include_tag "iehack"
|
||||
|
||||
= inject_json "user", "current_user"
|
||||
|
||||
.off-canvas-wrap{offcanvas: true}
|
||||
.inner-wrap
|
||||
|
||||
@@ -26,13 +34,3 @@
|
||||
|
||||
#footer
|
||||
%loading
|
||||
|
||||
%script{src: "//maps.googleapis.com/maps/api/js?libraries=places"}
|
||||
= javascript_include_tag "darkswarm/all"
|
||||
= yield :scripts
|
||||
|
||||
= inject_json "user", "current_user"
|
||||
= yield :injection_data
|
||||
|
||||
= render "layouts/i18n_script"
|
||||
= render "layouts/bugherd_script"
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
- content_for(:title) do
|
||||
= t :label_map
|
||||
|
||||
- content_for :injection_data do
|
||||
= inject_enterprise_shopfront_list
|
||||
= inject_enterprise_shopfront_list
|
||||
|
||||
.map-container{"fill-vertical" => true}
|
||||
%map{"ng-controller" => "MapCtrl"}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
- content_for(:title) do
|
||||
= t :producers_title
|
||||
|
||||
- content_for :injection_data do
|
||||
= inject_enterprises(@enterprises)
|
||||
= inject_enterprises(@enterprises)
|
||||
|
||||
.producers{"ng-controller" => "EnterprisesCtrl", "ng-cloak" => true}
|
||||
.row
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
- content_for(:title) do
|
||||
= t :register_title
|
||||
|
||||
- content_for :injection_data do
|
||||
= inject_spree_api_key
|
||||
= inject_available_countries
|
||||
= inject_enterprise_attributes
|
||||
= inject_spree_api_key
|
||||
= inject_available_countries
|
||||
= inject_enterprise_attributes
|
||||
|
||||
- steps = %w{about contact details finished images introduction}
|
||||
- steps += %w{logo promo social steps type}
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
- content_for :scripts do
|
||||
%ordercycle{"ng-controller" => "OrderCycleCtrl"}
|
||||
:javascript
|
||||
angular.module('Darkswarm').value('orderCycleData', #{render "json/order_cycle"})
|
||||
|
||||
%ordercycle{"ng-controller" => "OrderCycleCtrl"}
|
||||
|
||||
- if @order_cycles and @order_cycles.empty?
|
||||
%h4
|
||||
%i.ofn-i_012-warning
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
- content_for(:title) do
|
||||
= t :shops_title
|
||||
|
||||
- content_for :injection_data do
|
||||
= inject_enterprises(@enterprises)
|
||||
= inject_enterprises(@enterprises)
|
||||
|
||||
#panes
|
||||
#shops.pane
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
- content_for(:title) do
|
||||
= t :orders_edit_title
|
||||
|
||||
- content_for :injection_data do
|
||||
= inject_enterprise_and_relatives
|
||||
= inject_enterprise_and_relatives
|
||||
|
||||
.darkswarm
|
||||
- content_for :order_cycle_form do
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
- content_for(:title) do
|
||||
= t :orders_show_title
|
||||
|
||||
- content_for :injection_data do
|
||||
= inject_enterprise_and_relatives if current_distributor.present?
|
||||
= inject_enterprise_and_relatives if current_distributor.present?
|
||||
|
||||
.darkswarm
|
||||
= render "shopping_shared/details" if current_distributor.present?
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
- content_for :injection_data do
|
||||
.darkswarm
|
||||
= inject_orders
|
||||
= inject_shops
|
||||
= inject_saved_credit_cards
|
||||
|
||||
- if Stripe.publishable_key
|
||||
:javascript
|
||||
angular.module('Darkswarm').value("stripeObject", Stripe("#{Stripe.publishable_key}"))
|
||||
|
||||
.darkswarm
|
||||
.row.pad-top
|
||||
.small-12.columns.pad-top
|
||||
%h2
|
||||
|
||||
Reference in New Issue
Block a user