mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-20 04:59:16 +00:00
embedded groups layout changes
This commit is contained in:
committed by
Maikel Linke
parent
f626a21c5e
commit
bd7e072938
@@ -19,3 +19,4 @@ Darkswarm.controller "GroupPageCtrl", ($scope, group_enterprises, Enterprises, M
|
||||
|
||||
$scope.map = angular.copy MapConfiguration.options
|
||||
$scope.mapMarkers = OfnMap.enterprise_markers visible_enterprises
|
||||
$scope.embedded_layout = window.location.search.indexOf("embedded_shopfront=true") != -1
|
||||
@@ -0,0 +1,6 @@
|
||||
Darkswarm.directive "embeddedTargetBlank", ->
|
||||
restrict: 'A'
|
||||
compile: (element) ->
|
||||
elems = (element.children().find("a"))
|
||||
if window.location.search.indexOf("embedded_shopfront=true") != -1
|
||||
elems.attr("target", "_blank")
|
||||
@@ -3,6 +3,7 @@ Darkswarm.factory "EnterpriseModal", ($modal, $rootScope)->
|
||||
new class EnterpriseModal
|
||||
open: (enterprise)->
|
||||
scope = $rootScope.$new(true) # Spawn an isolate to contain the enterprise
|
||||
scope.embedded_layout = window.location.search.indexOf("embedded_shopfront=true") != -1
|
||||
|
||||
scope.enterprise = enterprise
|
||||
$modal.open(templateUrl: "enterprise_modal.html", scope: scope)
|
||||
|
||||
Reference in New Issue
Block a user