embedded groups layout changes

This commit is contained in:
Keir Osborn
2018-02-13 10:44:03 +00:00
committed by Maikel Linke
parent f626a21c5e
commit bd7e072938
12 changed files with 123 additions and 36 deletions

View File

@@ -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

View File

@@ -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")

View File

@@ -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)