From: Galen Charlton Date: Tue, 20 Jun 2017 22:10:46 +0000 (-0400) Subject: LP#1708291: add an egHelpPopover directive X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=fbfc664e843109a12ec950f0e47f6aca23a2792d;p=working%2FEvergreen.git LP#1708291: add an egHelpPopover directive This directive allows adding help text accessible by clicking on a question mark icon. Example usage: to create simple popover or to have the help text hyperlinked. Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/templates/staff/share/t_help_popover.tt2 b/Open-ILS/src/templates/staff/share/t_help_popover.tt2 new file mode 100644 index 0000000000..215400aa52 --- /dev/null +++ b/Open-ILS/src/templates/staff/share/t_help_popover.tt2 @@ -0,0 +1,10 @@ + + diff --git a/Open-ILS/web/js/ui/default/staff/services/ui.js b/Open-ILS/web/js/ui/default/staff/services/ui.js index f632478f1f..c2037cfd4b 100644 --- a/Open-ILS/web/js/ui/default/staff/services/ui.js +++ b/Open-ILS/web/js/ui/default/staff/services/ui.js @@ -980,6 +980,29 @@ function($window , egStrings) { } }) +/* + * egHelpPopover - a helpful widget + */ +.directive('egHelpPopover', function() { + return { + restrict : 'E', + transclude : true, + scope : { + helpText : '@', + helpLink : '@' + }, + templateUrl : './share/t_help_popover', + controller : ['$scope','$sce', function($scope , $sce) { + if ($scope.helpLink) { + $scope.helpHtml = $sce.trustAsHtml( + '' + + $scope.helpText + '' + ); + } + }] + } +}) + .factory('egWorkLog', ['egCore', function(egCore) { var service = {};