mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-27 06:05:19 +00:00
panel rows adjust to span the number of visible columns
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
angular.module("admin.indexUtils").directive "panelRow", (Panels) ->
|
||||
angular.module("admin.indexUtils").directive "panelRow", (Panels, Columns) ->
|
||||
restrict: "C"
|
||||
templateUrl: "admin/panel.html"
|
||||
scope:
|
||||
@@ -7,6 +7,10 @@ angular.module("admin.indexUtils").directive "panelRow", (Panels) ->
|
||||
link: (scope, element, attrs) ->
|
||||
scope.template = ""
|
||||
selected = null
|
||||
scope.columnCount = Columns.visibleCount
|
||||
|
||||
scope.$on "columnCount:changed", (event, count) ->
|
||||
scope.columnCount = count
|
||||
|
||||
setTemplate = ->
|
||||
if selected?
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
%td{ colspan: 4 }
|
||||
%td{ colspan: "{{columnCount}}" }
|
||||
.panel{ ng: { include: "template" } }
|
||||
|
||||
Reference in New Issue
Block a user