Add basic help modal directive

Useful for showing help text that is too long for a tool tip
This commit is contained in:
Rob Harrington
2018-06-22 13:57:21 +10:00
parent 6457a17fde
commit 32622c77bc
3 changed files with 28 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
Darkswarm.directive "helpModal", ($modal, $compile, $templateCache)->
restrict: 'A'
scope:
helpText: "@helpModal"
link: (scope, elem, attrs, ctrl)->
compiled = $compile($templateCache.get('help-modal.html'))(scope)
elem.on "click", =>
$modal.open(controller: ctrl, template: compiled, scope: scope, windowClass: 'help-modal small')

View File

@@ -0,0 +1,9 @@
.row.help-icon
.small-12.text-center
%i.ofn-i_013-help
.row.help-text
.small-12.columns.text-center
{{ helpText }}
.row.text-center
%button.primary.small{ ng: { click: '$close()' } }
= t(:ok)

View File

@@ -0,0 +1,9 @@
.help-modal {
.help-text {
font-size: 1rem;
margin: 20px 0px;
}
.help-icon {
font-size: 4rem;
}
}