holds shelf. detail view
authorBill Erickson <berick@esilibrary.com>
Wed, 9 Jul 2014 17:02:13 +0000 (13:02 -0400)
committerBill Erickson <berick@esilibrary.com>
Wed, 9 Jul 2014 17:02:13 +0000 (13:02 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/templates/staff/circ/holds/index.tt2
Open-ILS/src/templates/staff/navbar.tt2
Open-ILS/web/js/ui/default/staff/circ/holds/app.js
Open-ILS/web/js/ui/default/staff/circ/services/holds.js

index b11ae2e..b327738 100644 (file)
@@ -12,6 +12,7 @@
 [% INCLUDE 'staff/circ/share/circ_strings.tt2' %]
 <script src="[% ctx.media_prefix %]/js/ui/default/staff/circ/services/holds.js"></script>
 [% INCLUDE 'staff/circ/share/hold_strings.tt2' %]
+<script src="[% ctx.media_prefix %]/js/ui/default/staff/cat/services/record.js"></script>
 <script src="[% ctx.media_prefix %]/js/ui/default/staff/circ/holds/app.js"></script>
 <link rel="stylesheet" href="[% ctx.base_path %]/staff/css/circ.css" />
 <script>
index b51509e..917672f 100644 (file)
           <li>
             <a href="./circ/holds/shelf" target="_self">
               <span class="glyphicon glyphicon-tasks"></span>
-              <span>[% l('View Holds Shelf') %]</span>
+              <span>[% l('Holds Shelf') %]</span>
             </a>
           </li>
           <li class="divider"></li>
index 607febf..20915c7 100644 (file)
@@ -193,7 +193,6 @@ function($scope , $q , $routeParams , $window , $location , egCore , egHolds , e
 
     // udpate the in-grid hold with the clear-shelf cached response info.
     function handle_clear_cache_resp(resp) {
-        console.debug('clear shelf said: ' + js2JSON(resp));
         if (!angular.isArray(resp)) resp = [resp];
         angular.forEach(resp, function(info) {
             if (info.action) {
@@ -251,7 +250,6 @@ function($scope , $q , $routeParams , $window , $location , egCore , egHolds , e
         );
     }
 
-
     refresh_page();
 
 }]);
index 82d795a..6ae72fd 100644 (file)
@@ -436,14 +436,13 @@ function($modal , $q , egCore , egAlertDialog , egConfirmDialog , egAlertDialog)
                     }).result.then(function(args) {
                         var note = new egCore.idl.ahrn();
                         note.hold($scope.hold.id());
-                        // use t/f instead of bools here so template is happy
-                        note.staff('t'); 
-                        note.slip(args.slip ? 't' : 'f');
-                        note.pub(args.pub ? 't' : 'f');
+                        note.staff(true);
+                        note.slip(args.slip);
+                        note.pub(args.pub); 
                         note.title(args.title);
                         note.body(args.body);
-                        return egCore.pcrud.create(note).then(function() {
-                            $scope.hold.notes().push(note);
+                        return egCore.pcrud.create(note).then(function(n) {
+                            $scope.hold.notes().push(n);
                         });
                     });
                 }
@@ -471,8 +470,9 @@ function($modal , $q , egCore , egAlertDialog , egConfirmDialog , egAlertDialog)
                         note.note(args.note);
                         note.notify_staff(egCore.auth.user().id());
                         note.notify_time('now');
-                        return egCore.pcrud.create(note).then(function() {
-                            $scope.hold.notifications().push(note);
+                        return egCore.pcrud.create(note).then(function(n) {
+                            n.notify_staff(egCore.auth.user());
+                            $scope.hold.notifications().push(n);
                         });
                     });
                 }