mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-15 23:57:48 +00:00
Move files from darkswarm to shared
- As this directive is now used by Darkswarm and admin, move files in shared/ folders - Needs some css variable in admin part : as question-mark-with-tooltip is used in admin part, it needs some css variable - Add own scss variables file with all needed variables for question-mark-icon. Some duplication, but now really independant and shared between both darkswarm and admin. - Remove strange border around the button, rendered by chrome when button is focused.
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
|
||||
OFNShared.directive "questionMarkWithTooltip", ($tooltip)->
|
||||
# We use the $tooltip service from Angular foundation to give us boilerplate
|
||||
# Subsequently we patch the scope, template and restrictions
|
||||
tooltip = $tooltip 'questionMarkWithTooltip', 'questionMarkWithTooltip', 'click'
|
||||
tooltip.scope =
|
||||
variant: "="
|
||||
tooltip.templateUrl = "shared/question_mark_with_tooltip_icon.html"
|
||||
tooltip.replace = true
|
||||
tooltip.restrict = 'E'
|
||||
tooltip
|
||||
|
||||
# This is automatically referenced via naming convention in $tooltip
|
||||
OFNShared.directive 'questionMarkWithTooltipPopup', ->
|
||||
restrict: 'EA'
|
||||
replace: true
|
||||
templateUrl: 'shared/question_mark_with_tooltip.html'
|
||||
scope: false
|
||||
Reference in New Issue
Block a user