<script src="[% ctx.media_prefix %]/js/ui/default/staff/build/js/angular-location-update.min.js"></script>
<script src="[% ctx.media_prefix %]/js/ui/default/staff/build/js/angular-animate.min.js"></script>
<script src="[% ctx.media_prefix %]/js/ui/default/staff/build/js/angular-sanitize.min.js"></script>
+<script src="[% ctx.media_prefix %]/js/ui/default/staff/build/js/angular-cookies.min.js"></script>
<script src="[% ctx.media_prefix %]/js/ui/default/staff/build/js/ngToast.min.js"></script>
<script src="[% ctx.media_prefix %]/js/ui/default/staff/build/js/angular-tree-control.js"></script>
* Patron service
*/
.factory('patronSvc',
- ['$q','$timeout','$location','egCore','egUser','$locale',
-function($q , $timeout , $location , egCore, egUser , $locale) {
+ ['$q','$timeout','$location','$cookies','egCore','egUser','$locale',
+function($q , $timeout , $location , $cookies , egCore, egUser , $locale) {
var service = {
// cached patron search results
// when loading a new patron, update the last patron setting
if (!service.current || service.current.id() != user_id)
- egCore.hatch.setLocalItem('eg.circ.last_patron', user_id);
+ $cookies.put('eg.circ.last_patron', user_id);
// avoid running multiple retrievals for the same patron, which
// can happen during dbl-click by maintaining a single running
}])
.controller('PatronFetchLastCtrl',
- ['$scope','$location','egCore',
-function($scope , $location , egCore) {
+ ['$scope','$location','$cookies','egCore',
+function($scope , $location , $cookies, egCore) {
- var id = egCore.hatch.getLocalItem('eg.circ.last_patron');
+ var id = $cookies.get('eg.circ.last_patron');
if (id) return $location.path('/circ/patron/' + id + '/checkout');
$scope.no_last = true;
'bower_components/angular-file-saver/dist/angular-file-saver.bundle.min.js',
'build/js/ui-bootstrap.min.js',
'build/js/hotkeys.min.js',
+ 'build/js/angular-cookies.min.js',
/* OpenSRF must be installed first */
'/openils/lib/javascript/md5.js',
'/openils/lib/javascript/JSON_v1.js',