webstaff: Add sounds for in house use and patron lookup
authorMike Rylander <mrylander@gmail.com>
Mon, 12 Dec 2016 15:36:27 +0000 (10:36 -0500)
committerKathy Lussier <klussier@masslnc.org>
Mon, 9 Jan 2017 15:59:00 +0000 (10:59 -0500)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/web/js/ui/default/staff/circ/in_house_use/app.js
Open-ILS/web/js/ui/default/staff/circ/patron/app.js

index 45e9e59..2183d96 100644 (file)
@@ -79,6 +79,7 @@ function($scope,  egCore,  egGridDataProvider , egConfirmDialog) {
             ).then(function(copy) {
 
                 if (!copy) {
+                    egCore.audio.play('error.in_house.copy_not_found');
                     $scope.copyNotFound = true;
                     return;
                 }
@@ -108,7 +109,12 @@ function($scope,  egCore,  egGridDataProvider , egConfirmDialog) {
             'open-ils.circ', method, egCore.auth.token(), args
 
         ).then(function(resp) {
-            if (evt = egCore.evt.parse(resp)) return alert(evt);
+            if (evt = egCore.evt.parse(resp)) {
+                egCore.audio.play('error.in_house');
+                return alert(evt);
+            }
+
+            egCore.audio.play('success.in_house');
 
             var item = {num_uses : resp.length};
             item.copy = data.copy;
index bc2f390..fcf195f 100644 (file)
@@ -694,6 +694,7 @@ function($scope , $location , egCore , egConfirmDialog , egUser , patronSvc) {
 
     // jump to the patron checkout UI
     function loadPatron(user_id) {
+        egCore.audio.play('success.patron.by_barcode');
         $location
         .path('/circ/patron/' + user_id + '/checkout')
         .search('card', $scope.args.barcode);
@@ -739,6 +740,7 @@ function($scope , $location , egCore , egConfirmDialog , egUser , patronSvc) {
             if (!resp || !resp[0]) {
                 $scope.bcNotFound = args.barcode;
                 $scope.selectMe = true;
+                egCore.audio.play('warning.patron.not_found');
                 return;
             }
 
@@ -760,6 +762,7 @@ function($scope , $location , egCore , egConfirmDialog , egUser , patronSvc) {
                 // opt-in disallowed at this location by patron's home library
                 $scope.optInRestricted = true;
                 $scope.selectMe = true;
+                egCore.audio.play('warning.patron.opt_in_restricted');
                 return;
             }