Web Client: Make Patron Email Clickable
authorSam Link <slink@columbiacountyga.gov>
Fri, 6 Oct 2017 15:40:47 +0000 (11:40 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Wed, 8 Nov 2017 22:16:29 +0000 (17:16 -0500)
The patch is twofold. First, "mailto" has been added to
$compileProvider.aHrefSanitizationWhitelist() throughout the project.
Second, the patron email in the patron summary has been wrapped in an
anchor with ng-href="mailto:{{patron().emaio()}}" to enable the desired
functionality.

Signed-off-by: Sam Link <slink@columbiacountyga.gov>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
30 files changed:
Open-ILS/src/templates/staff/circ/patron/t_summary.tt2
Open-ILS/web/js/ui/default/staff/acq/app.js
Open-ILS/web/js/ui/default/staff/admin/acq/app.js
Open-ILS/web/js/ui/default/staff/admin/actor/app.js
Open-ILS/web/js/ui/default/staff/admin/actor/org_unit/app.js
Open-ILS/web/js/ui/default/staff/admin/local/app.js
Open-ILS/web/js/ui/default/staff/admin/serials/app.js
Open-ILS/web/js/ui/default/staff/admin/server/app.js
Open-ILS/web/js/ui/default/staff/admin/user_perms.js
Open-ILS/web/js/ui/default/staff/admin/workstation/app.js
Open-ILS/web/js/ui/default/staff/admin/workstation/log.js
Open-ILS/web/js/ui/default/staff/cat/bucket/copy/app.js
Open-ILS/web/js/ui/default/staff/cat/bucket/record/app.js
Open-ILS/web/js/ui/default/staff/cat/catalog/app.js
Open-ILS/web/js/ui/default/staff/cat/item/app.js
Open-ILS/web/js/ui/default/staff/cat/printlabels/app.js
Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js
Open-ILS/web/js/ui/default/staff/cat/z3950/app.js
Open-ILS/web/js/ui/default/staff/circ/checkin/app.js
Open-ILS/web/js/ui/default/staff/circ/in_house_use/app.js
Open-ILS/web/js/ui/default/staff/circ/patron/app.js
Open-ILS/web/js/ui/default/staff/circ/patron/bucket/app.js
Open-ILS/web/js/ui/default/staff/circ/patron/pending.js
Open-ILS/web/js/ui/default/staff/circ/patron/register.js
Open-ILS/web/js/ui/default/staff/circ/renew/app.js
Open-ILS/web/js/ui/default/staff/circ/transits/list.js
Open-ILS/web/js/ui/default/staff/offline.js
Open-ILS/web/js/ui/default/staff/reporter/template/app.js
Open-ILS/web/js/ui/default/staff/serials/app.js
Open-ILS/web/js/ui/default/staff/services/startup.js

index 9d55e17..b6ce3d4 100644 (file)
     </div>
     <div class="row">
       <div class="col-md-5">[% l('Email') %]</div>
-      <div class="col-md-7">{{patron().email()}}</div>
+         <!-- Bound href="mailto: patron().email()" to an anchor tag to allow the patron's email address to be clicked directly from the summary. -->
+      <div class="col-md-7"><a ng-href="mailto:{{patron().email()}}">{{patron().email()}}</a></div>
     </div>
     <div class="row" ng-repeat="map in summary_stat_cats()">
       <div class="col-md-5">{{map.stat_cat().name()}}</div>
index 92dc114..e97ea29 100644 (file)
@@ -5,7 +5,7 @@ angular.module('egAcquisitions',
  function($routeProvider , $locationProvider , $compileProvider) {
 
     $locationProvider.html5Mode(true);
-    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|blob):/); 
+    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|mailto|blob):/); 
     var resolver = {delay : function(egStartup) {return egStartup.go()}};
 
     var eframe_template = 
index 1ff496a..1d96be3 100644 (file)
@@ -5,7 +5,7 @@ angular.module('egAcqAdmin',
  function($routeProvider , $locationProvider , $compileProvider) {
 
     $locationProvider.html5Mode(true);
-    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|blob):/); 
+    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|mailto|blob):/); 
     var resolver = {delay : function(egStartup) {return egStartup.go()}};
 
     $routeProvider.when('/admin/acq/edi_attr_set', {
index 8fc04d1..859de55 100644 (file)
@@ -11,7 +11,7 @@ angular.module('egAdminActor',
  function($routeProvider , $locationProvider , $compileProvider) {
 
     $locationProvider.html5Mode(true);
-    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|blob):/); 
+    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|mailto|blob):/); 
     var resolver = {delay : function(egStartup) {return egStartup.go()}};
 
     $routeProvider.when('/admin/actor/address_alert', {
index f27f671..a0b6680 100644 (file)
@@ -10,8 +10,8 @@ angular.module('egOrgUnitApp',
 
 .config(function($routeProvider, $locationProvider, $compileProvider) {
     $locationProvider.html5Mode(true);
-    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|blob):/); // grid export
-
+    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|mailto|blob):/); // grid export
+       
     var resolver = {delay :
         ['egStartup', function(egStartup) {return egStartup.go()}]}
 
index afceb4d..f2b286f 100644 (file)
@@ -5,7 +5,8 @@ angular.module('egLocalAdmin',
  function($routeProvider , $locationProvider , $compileProvider) {
 
     $locationProvider.html5Mode(true);
-    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|blob):/); 
+    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|mailto|blob):/); 
+       
     var resolver = {delay : function(egStartup) {return egStartup.go()}};
 
     var eframe_template = 
index 6d53f33..d697f2a 100644 (file)
@@ -5,7 +5,7 @@ angular.module('egSerialsAdmin',
  function($routeProvider , $locationProvider , $compileProvider) {
 
     $locationProvider.html5Mode(true);
-    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|blob):/); 
+    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|mailto|blob):/); 
     var resolver = {delay : function(egStartup) {return egStartup.go()}};
 
     $routeProvider.when('/admin/serials/templates', {
index 962f0e5..979f177 100644 (file)
@@ -5,7 +5,7 @@ angular.module('egServerAdmin',
  function($routeProvider , $locationProvider , $compileProvider) {
 
     $locationProvider.html5Mode(true);
-    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|blob):/); 
+    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|mailto|blob):/); 
     var resolver = {delay : function(egStartup) {return egStartup.go()}};
 
     var eframe_template = 
index 460e8d1..54011a7 100644 (file)
@@ -11,7 +11,7 @@ angular.module('egUserPermsEditor',
  function($routeProvider , $locationProvider , $compileProvider) {
 
     $locationProvider.html5Mode(true);
-    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|blob):/); 
+    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|mailto|blob):/); 
     var resolver = {delay : function(egStartup) {return egStartup.go()}};
 
     $routeProvider.when('/admin/user_perms', {
index d3468af..d7af363 100644 (file)
@@ -11,7 +11,7 @@ angular.module('egWorkstationAdmin',
  function($routeProvider , $locationProvider , $compileProvider) {
 
     $locationProvider.html5Mode(true);
-    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|blob):/); 
+    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|mailto|blob):/); 
     var resolver = {delay : function(egStartup) {return egStartup.go()}};
 
     $routeProvider.when('/admin/workstation/workstations', {
index 9ef44f7..9161202 100644 (file)
@@ -3,8 +3,8 @@ angular.module('egWorkLogApp',
 
 .config(function($routeProvider, $locationProvider, $compileProvider) {
     $locationProvider.html5Mode(true);
-    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|blob):/); // grid export
-
+    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|mailto|blob):/); // grid export
+       
     var resolver = {delay : 
         ['egStartup', function(egStartup) {return egStartup.go()}]}
 
index 9b99670..a51eef4 100644 (file)
@@ -17,8 +17,8 @@ angular.module('egCatCopyBuckets',
 
 .config(function($routeProvider, $locationProvider, $compileProvider) {
     $locationProvider.html5Mode(true);
-    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|blob):/); // grid export
-
+    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|mailto|blob):/); // grid export
+       
     var resolver = {delay : function(egStartup) {return egStartup.go()}};
 
     $routeProvider.when('/cat/bucket/copy/pending/:id', {
index d7d3cc6..4637f00 100644 (file)
@@ -17,8 +17,8 @@ angular.module('egCatRecordBuckets',
 
 .config(function($routeProvider, $locationProvider, $compileProvider) {
     $locationProvider.html5Mode(true);
-    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|blob):/); // grid export
-
+    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|mailto|blob):/); // grid export
+       
     var resolver = {delay : function(egStartup) {return egStartup.go()}};
 
     $routeProvider.when('/cat/bucket/record/search/:id', {
index 90d7fd1..63b9c04 100644 (file)
@@ -19,8 +19,8 @@ angular.module('egCatalogApp', ['ui.bootstrap','ngRoute','ngLocationUpdate','egC
 
 .config(function($routeProvider, $locationProvider, $compileProvider) {
     $locationProvider.html5Mode(true);
-    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|blob):/); // grid export
-
+    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|mailto|blob):/); // grid export
+       
     var resolver = {delay : ['egCore','egStartup','egUser', function(egCore, egStartup, egUser) {
         egCore.env.classLoaders.aous = function() {
             return egCore.org.settings([
index 3624b2a..d1e8b5e 100644 (file)
@@ -13,8 +13,8 @@ angular.module('egItemStatus',
 
 .config(function($routeProvider, $locationProvider, $compileProvider) {
     $locationProvider.html5Mode(true);
-    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|blob):/); // grid export
-
+    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|mailto|blob):/); // grid export
+       
     var resolver = {delay : function(egStartup) {return egStartup.go()}};
 
     // search page shows the list view by default
index dbb7ac9..f6f02da 100644 (file)
@@ -7,8 +7,8 @@ angular.module('egPrintLabels',
 
 .config(function($routeProvider, $locationProvider, $compileProvider) {
     $locationProvider.html5Mode(true);
-    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|blob):/); // grid export
-
+    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|mailto|blob):/); // grid export
+       
     var resolver = {
         delay : ['egStartup', function(egStartup) { return egStartup.go(); }]
     };
index 2592be7..44007e1 100644 (file)
@@ -20,8 +20,8 @@ angular.module('egVolCopy',
 
 .config(function($routeProvider, $locationProvider, $compileProvider) {
     $locationProvider.html5Mode(true);
-    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|blob):/); // grid export
-
+    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|mailto|blob):/); // grid export
+       
     var resolver = {
         delay : ['egStartup', function(egStartup) { return egStartup.go(); }]
     };
index 911e4f6..09bf70f 100644 (file)
@@ -7,8 +7,8 @@ angular.module('egCatZ3950Search',
 
 .config(function($routeProvider, $locationProvider, $compileProvider) {
     $locationProvider.html5Mode(true);
-    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|blob):/); // grid export
-
+    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|mailto|blob):/); // grid export
+       
     var resolver = {delay : function(egStartup) {return egStartup.go()}};
 
     // search page shows the list view by default
index 7be19fb..0a71c3f 100644 (file)
@@ -3,8 +3,8 @@ angular.module('egCheckinApp', ['ngRoute', 'ui.bootstrap',
 
 .config(function($routeProvider, $locationProvider, $compileProvider) {
     $locationProvider.html5Mode(true);
-    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|blob):/); // grid export
-
+    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|mailto|blob):/); // grid export
+       
     var resolver = {delay : 
         ['egStartup', function(egStartup) {return egStartup.go()}]}
 
index 887e60b..6d0d352 100644 (file)
@@ -3,8 +3,7 @@ angular.module('egInHouseUseApp',
 
 .config(function($routeProvider, $locationProvider, $compileProvider) {
     $locationProvider.html5Mode(true);
-    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|blob):/); // grid export
-
+    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|mailto|blob):/); // grid export
 
 })
 
index eaaf9ba..3b5e364 100644 (file)
@@ -17,8 +17,8 @@ angular.module('egPatronApp', ['ngRoute', 'ui.bootstrap', 'egUserBucketMod',
 
 .config(function($routeProvider, $locationProvider, $compileProvider) {
     $locationProvider.html5Mode(true);
-    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|blob):/); // grid export
-
+    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|mailto|blob):/); // grid export
+       
     // data loaded at startup which only requires an authtoken goes
     // here. this allows the requests to be run in parallel instead of
     // waiting until startup has completed.
index 35396f4..4c3e5cc 100644 (file)
@@ -17,8 +17,8 @@ angular.module('egCatUserBuckets',
 
 .config(function($routeProvider, $locationProvider, $compileProvider) {
     $locationProvider.html5Mode(true);
-    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|blob):/); // grid export
-
+    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|mailto|blob):/); // grid export
+       
     var resolver = {delay : function(egStartup) {return egStartup.go()}};
 
     $routeProvider.when('/circ/patron/bucket/add/:id', {
index 9c2bc65..0690b3c 100644 (file)
@@ -3,8 +3,8 @@ angular.module('egPendingPatronsApp',
 
 .config(function($routeProvider, $locationProvider, $compileProvider) {
     $locationProvider.html5Mode(true);
-    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|blob):/); // grid export
-
+    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|mailto|blob):/); // grid export
+       
     var resolver = {delay : 
         ['egStartup', function(egStartup) {return egStartup.go()}]}
 
index 148cad2..58f0c98 100644 (file)
@@ -9,8 +9,8 @@ angular.module('egPatronRegApp', ['ui.bootstrap','ngRoute','egCoreMod', 'egUiMod
 
 .config(function($routeProvider, $locationProvider, $compileProvider) {
     $locationProvider.html5Mode(true);
-    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|blob):/); // grid export
-
+    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|mailto|blob):/); // grid export
+       
     var resolver = {delay : 
         ['egStartup', function(egStartup) {return egStartup.go()}]}
 
index 23df08d..2c907bd 100644 (file)
@@ -7,8 +7,9 @@ angular.module('egRenewApp',
 
 .config(function($routeProvider, $locationProvider, $compileProvider) {
     $locationProvider.html5Mode(true);
-    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|blob):/); // grid export
-    var resolver = {delay : function(egStartup) {return egStartup.go()}};
+    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|mailto|blob):/); // grid export    
+       
+       var resolver = {delay : function(egStartup) {return egStartup.go()}};
 
     $routeProvider.when('/circ/renew/renew', {
         templateUrl: './circ/renew/t_renew',
index 0c13f3e..b5b8379 100644 (file)
@@ -3,8 +3,8 @@ angular.module('egTransitListApp',
 
 .config(function($routeProvider, $locationProvider, $compileProvider) {
     $locationProvider.html5Mode(true);
-    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|blob):/); // grid export
-
+    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|mailto|blob):/); // grid export
+       
     var resolver = {delay : 
         ['egStartup', function(egStartup) {return egStartup.go()}]}
 
index bf2212e..c27360b 100644 (file)
@@ -11,7 +11,7 @@ angular.module('egOffline', ['ngRoute', 'ui.bootstrap', 'egCoreMod', 'egUiMod',
 function($routeProvider , $locationProvider , $compileProvider) {
 
     $locationProvider.html5Mode(true);
-    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|blob):/);
+    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|mailto|blob):/);
 
     /**
      * Route resolvers allow us to run async commands
index 272a0eb..69c433f 100644 (file)
@@ -14,8 +14,8 @@ angular.module('egReporter',
 
 .config(function($routeProvider, $locationProvider, $compileProvider) {
     $locationProvider.html5Mode(true);
-    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|blob):/); // grid export
-
+    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|mailto|blob):/); // grid export
+       
     var resolver = {delay : function(egStartup) {return egStartup.go()}};
 
     $routeProvider.when('/reporter/template/clone/:folder/:id', {
index 31f925e..a004625 100644 (file)
@@ -11,8 +11,8 @@ angular.module('egSerialsApp')
 
 .config(function($routeProvider, $locationProvider, $compileProvider) {
     $locationProvider.html5Mode(true);
-    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|blob):/); // grid export
-
+    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|mailto|blob):/); // grid export
+       
     var resolver = {delay : function(egStartup) {return egStartup.go()}};
 
     $routeProvider.when('/serials/:bib_id', {
index 07e1f8c..7792eb2 100644 (file)
@@ -16,7 +16,7 @@ angular.module('egCoreMod')
 .config(['$locationProvider','$compileProvider',
  function($locationProvider , $compileProvider) {
     $locationProvider.html5Mode(true);
-    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|blob):/);
+    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|mailto|blob):/);
 }])
 
 .factory('egStartup',