From: Bill Erickson Date: Wed, 27 Nov 2013 19:16:01 +0000 (-0500) Subject: web staff: checkin copy alert msg dialog X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=42930137e793455023dd6d9c6effdb99de578f7a;p=working%2FEvergreen.git web staff: checkin copy alert msg dialog Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/templates/staff/circ/checkin/index.tt2 b/Open-ILS/src/templates/staff/circ/checkin/index.tt2 index 08095e530f..6ec79310e9 100644 --- a/Open-ILS/src/templates/staff/circ/checkin/index.tt2 +++ b/Open-ILS/src/templates/staff/circ/checkin/index.tt2 @@ -46,6 +46,12 @@ [% INCLUDE 'staff/parts/alert_dialog.tt2' dialog_body= l('Copy "{{args.copy_barcode}}" was mis-scanned or is not cataloged') %] + + [% END %] diff --git a/Open-ILS/src/templates/staff/parts/confirm_dialog.tt2 b/Open-ILS/src/templates/staff/parts/confirm_dialog.tt2 index 9502c73c78..3e4a118f18 100644 --- a/Open-ILS/src/templates/staff/parts/confirm_dialog.tt2 +++ b/Open-ILS/src/templates/staff/parts/confirm_dialog.tt2 @@ -2,24 +2,24 @@ Generic confirmation dialog User can click OK -> $scope.ok() or Cancel -> $scope.cancel() --> -
-
diff --git a/Open-ILS/web/js/ui/default/staff/circ/checkin/app.js b/Open-ILS/web/js/ui/default/staff/circ/checkin/app.js index ef496c5eca..587180e0c7 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/checkin/app.js +++ b/Open-ILS/web/js/ui/default/staff/circ/checkin/app.js @@ -101,6 +101,9 @@ function($scope, $q, $modal, egStartup, checkinSvc, egNet, egAuth, orgAdd case 'ASSET_COPY_NOT_FOUND': openAlertDialog('uncat_alert_dialog', evt, args); break; + case 'COPY_ALERT_MESSAGE': + openConfirmDialog('alert_msg_confirm_dialog', evt, args); + break; default: console.warn('unhandled checkin response : ' + evt.textcode); console.debug('checkin: ' + js2JSON(evt)); @@ -124,6 +127,29 @@ function($scope, $q, $modal, egStartup, checkinSvc, egNet, egAuth, orgAdd }).result.then(function() {$scope.focusMe = true}); } + function openConfirmDialog(id, evt, args) { + // avoid unintended checkins while the dialog is open + $scope.blurMe = true; + $modal.open({ + templateUrl: id, + controller: + ['$scope', '$modalInstance', + function($scope, $modalInstance) { + $scope.args = args; + $scope.evt = evt; + $scope.ok = function() { + performCheckin(args, true); + $modalInstance.close() + } + $scope.cancel = function() { + $modalInstance.close() + checkinSvc.checkins.items.push(evt); + } + }] + }).result.then(function() {$scope.focusMe = true}); + } + + function openRouteDialog(evt, args) { // avoid unintended checkins while the dialog is open $scope.blurMe = true; diff --git a/Open-ILS/web/js/ui/default/staff/services/list.js b/Open-ILS/web/js/ui/default/staff/services/list.js index 9f28fb90aa..a54340e179 100644 --- a/Open-ILS/web/js/ui/default/staff/services/list.js +++ b/Open-ILS/web/js/ui/default/staff/services/list.js @@ -253,11 +253,10 @@ angular.module('egListMod', ['egCoreMod']) var cls, clsobj; angular.forEach(parts, function(step, idx) { - + // object is not fleshed to the expected extent if (!obj || typeof obj != 'object') { - // there are valid reasons for paths to be cut - // short, e.g. when data sets have varying contents. - return obj; + obj = ''; + return; } cls = obj.classname;