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:
Jean-Baptiste Bellet
2021-03-12 15:38:56 +01:00
parent 429cf4a5cb
commit 3fcbb1a5fe
6 changed files with 28 additions and 5 deletions

View File

@@ -1,17 +1,18 @@
Darkswarm.directive "questionMarkWithTooltip", ($tooltip)->
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 =
context: "="
tooltip.templateUrl = "question_mark_with_tooltip_icon.html"
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
Darkswarm.directive 'questionMarkWithTooltipPopup', ->
OFNShared.directive 'questionMarkWithTooltipPopup', ->
restrict: 'EA'
replace: true
templateUrl: 'question_mark_with_tooltip.html'
templateUrl: 'shared/question_mark_with_tooltip.html'
scope: false

View File

@@ -48,3 +48,5 @@
@import 'components/*';
@import 'pages/*';
@import '*';
@import "../shared/question-mark-icon";

View File

@@ -1,3 +1,5 @@
@import "variables/variables";
.unit-price {
display: flex;
align-items: center;
@@ -26,6 +28,10 @@
background-image: none;
background-color: $teal-500;
&:focus {
outline: 0;
}
&::before {
@include icon-font;
content: "";

View File

@@ -0,0 +1,14 @@
$padding-small: 0.5rem;
$radius-small: 0.25em;
$white: #fff;
$dynamic-blue: #3d8dd1;
$teal-500: #0096ad;
@import "../../darkswarm/style"; // Import "OFN" font
@mixin icon-font {
font-family: "OFN";
display: inline-block;
font-weight: normal;
font-style: normal;
font-variant: normal;
text-transform: none;
}