[% INCLUDE 'staff/parts/alert_dialog.tt2' dialog_body=
l('Copy "{{args.copy_barcode}}" was mis-scanned or is not cataloged') %]
</script>
+<script type="text/ng-template" id="alert_msg_confirm_dialog">
+ [% INCLUDE 'staff/parts/confirm_dialog.tt2'
+ dialog_title=l('Copy Alert Message for {{args.copy_barcode}}')
+ dialog_body='{{evt.payload}}' %]
+</script>
+
[% END %]
Generic confirmation dialog
User can click OK -> $scope.ok() or Cancel -> $scope.cancel()
-->
-<form class="form-validated" novalidate ng-submit="ok()">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close"
- ng-click="cancel()" aria-hidden="true">×</button>
- [% IF dialog_title %]
- <h4 class="modal-title">[% dialog_title %]</h4>
- [% END %]
- </div>
- [% IF dialog_body %]
- <div class="modal-body">[% dialog_body %]</div>
+<div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close"
+ ng-click="cancel()" aria-hidden="true">×</button>
+ [% IF dialog_title %]
+ <h4 class="modal-title alert alert-info">[% dialog_title %]</h4>
[% END %]
- <div class="modal-footer">
- [% dialog_footer %]
- <input type="submit" class="btn btn-primary" value="[% l('OK') %]"/>
- <button class="btn btn-warning" ng-click="cancel()">[% l('Cancel') %]</button>
- </div>
- </div> <!-- modal-content -->
- </div> <!-- modal-dialog -->
-</form>
+ </div>
+ [% IF dialog_body %]
+ <div class="modal-body">[% dialog_body %]</div>
+ [% END %]
+ <div class="modal-footer">
+ [% dialog_footer %]
+ <input type="submit" class="btn btn-primary"
+ ng-click="ok()" value="[% l('OK/Continue') %]"/>
+ <button class="btn btn-warning"
+ ng-click="cancel()">[% l('Cancel') %]</button>
+ </div>
+ </div> <!-- modal-content -->
+</div> <!-- modal-dialog -->
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));
}).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;
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;