* Hosts functions needed by all controllers.
*/
.controller('CopyBucketCtrl',
- ['$scope','$location','$q','$timeout','$modal',
+ ['$scope','$location','$q','$timeout','$uibModal',
'$window','egCore','bucketSvc',
-function($scope, $location, $q, $timeout, $modal,
+function($scope, $location, $q, $timeout, $uibModal,
$window, egCore, bucketSvc) {
$scope.bucketSvc = bucketSvc;
}
$scope.openCreateBucketDialog = function() {
- $modal.open({
+ $uibModal.open({
templateUrl: './cat/bucket/copy/t_bucket_create',
controller:
- ['$scope', '$modalInstance', function($scope, $modalInstance) {
+ ['$scope', '$uibModalInstance', function($scope, $uibModalInstance) {
$scope.focusMe = true;
- $scope.ok = function(args) { $modalInstance.close(args) }
- $scope.cancel = function () { $modalInstance.dismiss() }
+ $scope.ok = function(args) { $uibModalInstance.close(args) }
+ $scope.cancel = function () { $uibModalInstance.dismiss() }
}]
}).result.then(function (args) {
if (!args || !args.name) return;
}
$scope.openEditBucketDialog = function() {
- $modal.open({
+ $uibModal.open({
templateUrl: './cat/bucket/copy/t_bucket_edit',
controller:
- ['$scope', '$modalInstance', function($scope, $modalInstance) {
+ ['$scope', '$uibModalInstance', function($scope, $uibModalInstance) {
$scope.focusMe = true;
$scope.args = {
name : bucketSvc.currentBucket.name(),
args.pub = args.pub ? 't' : 'f';
// close the dialog after edit has completed
bucketSvc.editBucket(args).then(
- function() { $modalInstance.close() });
+ function() { $uibModalInstance.close() });
}
- $scope.cancel = function () { $modalInstance.dismiss() }
+ $scope.cancel = function () { $uibModalInstance.dismiss() }
}]
})
}
// opens the delete confirmation and deletes the current
// bucket if the user confirms.
$scope.openDeleteBucketDialog = function() {
- $modal.open({
+ $uibModal.open({
templateUrl: './cat/bucket/copy/t_bucket_delete',
controller :
- ['$scope', '$modalInstance', function($scope, $modalInstance) {
+ ['$scope', '$uibModalInstance', function($scope, $uibModalInstance) {
$scope.bucket = function() { return bucketSvc.currentBucket }
- $scope.ok = function() { $modalInstance.close() }
- $scope.cancel = function() { $modalInstance.dismiss() }
+ $scope.ok = function() { $uibModalInstance.close() }
+ $scope.cancel = function() { $uibModalInstance.dismiss() }
}]
}).result.then(function () {
bucketSvc.deleteBucket(bucketSvc.currentBucket.id())
// retrieves the requested bucket by ID
$scope.openSharedBucketDialog = function() {
- $modal.open({
+ $uibModal.open({
templateUrl: './cat/bucket/copy/t_load_shared',
controller :
- ['$scope', '$modalInstance', function($scope, $modalInstance) {
+ ['$scope', '$uibModalInstance', function($scope, $uibModalInstance) {
$scope.focusMe = true;
$scope.ok = function(args) {
if (args && args.id) {
- $modalInstance.close(args.id)
+ $uibModalInstance.close(args.id)
}
}
- $scope.cancel = function() { $modalInstance.dismiss() }
+ $scope.cancel = function() { $uibModalInstance.dismiss() }
}]
}).result.then(function(id) {
// RecordBucketCtrl $scope is not inherited by the
}])
.controller('ViewCtrl',
- ['$scope','$q','$routeParams','$timeout','$window','$modal','bucketSvc','egCore','egUser',
+ ['$scope','$q','$routeParams','$timeout','$window','$uibModal','bucketSvc','egCore','egUser',
'egConfirmDialog',
-function($scope, $q , $routeParams , $timeout , $window , $modal , bucketSvc , egCore , egUser ,
+function($scope, $q , $routeParams , $timeout , $window , $uibModal , bucketSvc , egCore , egUser ,
egConfirmDialog) {
$scope.setTab('view');
if (copy_list.length == 0) return;
- return $modal.open({
+ return $uibModal.open({
templateUrl: './cat/catalog/t_request_items',
animation: true,
controller:
- ['$scope','$modalInstance',
- function($scope , $modalInstance) {
+ ['$scope','$uibModalInstance',
+ function($scope , $uibModalInstance) {
$scope.user = null;
$scope.first_user_fetch = true;
egCore.auth.token(), args, h.copy_list
);
- $modalInstance.close();
+ $uibModalInstance.close();
}
$scope.cancel = function($event) {
- $modalInstance.dismiss();
+ $uibModalInstance.dismiss();
$event.preventDefault();
}
}]
* Hosts functions needed by all controllers.
*/
.controller('RecordBucketCtrl',
- ['$scope','$location','$q','$timeout','$modal',
+ ['$scope','$location','$q','$timeout','$uibModal',
'$window','egCore','bucketSvc',
-function($scope, $location, $q, $timeout, $modal,
+function($scope, $location, $q, $timeout, $uibModal,
$window, egCore, bucketSvc) {
$scope.bucketSvc = bucketSvc;
}
$scope.openCreateBucketDialog = function() {
- $modal.open({
+ $uibModal.open({
templateUrl: './cat/bucket/record/t_bucket_create',
controller:
- ['$scope', '$modalInstance', function($scope, $modalInstance) {
+ ['$scope', '$uibModalInstance', function($scope, $uibModalInstance) {
$scope.focusMe = true;
- $scope.ok = function(args) { $modalInstance.close(args) }
- $scope.cancel = function () { $modalInstance.dismiss() }
+ $scope.ok = function(args) { $uibModalInstance.close(args) }
+ $scope.cancel = function () { $uibModalInstance.dismiss() }
}]
}).result.then(function (args) {
if (!args || !args.name) return;
}
$scope.openEditBucketDialog = function() {
- $modal.open({
+ $uibModal.open({
templateUrl: './cat/bucket/record/t_bucket_edit',
controller:
- ['$scope', '$modalInstance', function($scope, $modalInstance) {
+ ['$scope', '$uibModalInstance', function($scope, $uibModalInstance) {
$scope.focusMe = true;
$scope.args = {
name : bucketSvc.currentBucket.name(),
args.pub = args.pub ? 't' : 'f';
// close the dialog after edit has completed
bucketSvc.editBucket(args).then(
- function() { $modalInstance.close() });
+ function() { $uibModalInstance.close() });
}
- $scope.cancel = function () { $modalInstance.dismiss() }
+ $scope.cancel = function () { $uibModalInstance.dismiss() }
}]
})
}
// opens the delete confirmation and deletes the current
// bucket if the user confirms.
$scope.openDeleteBucketDialog = function() {
- $modal.open({
+ $uibModal.open({
templateUrl: './cat/bucket/record/t_bucket_delete',
controller :
- ['$scope', '$modalInstance', function($scope, $modalInstance) {
+ ['$scope', '$uibModalInstance', function($scope, $uibModalInstance) {
$scope.bucket = function() { return bucketSvc.currentBucket }
- $scope.ok = function() { $modalInstance.close() }
- $scope.cancel = function() { $modalInstance.dismiss() }
+ $scope.ok = function() { $uibModalInstance.close() }
+ $scope.cancel = function() { $uibModalInstance.dismiss() }
}]
}).result.then(function () {
bucketSvc.deleteBucket(bucketSvc.currentBucket.id())
// retrieves the requested bucket by ID
$scope.openSharedBucketDialog = function() {
- $modal.open({
+ $uibModal.open({
templateUrl: './cat/bucket/record/t_load_shared',
controller :
- ['$scope', '$modalInstance', function($scope, $modalInstance) {
+ ['$scope', '$uibModalInstance', function($scope, $uibModalInstance) {
$scope.focusMe = true;
$scope.ok = function(args) {
if (args && args.id) {
- $modalInstance.close(args.id)
+ $uibModalInstance.close(args.id)
}
}
- $scope.cancel = function() { $modalInstance.dismiss() }
+ $scope.cancel = function() { $uibModalInstance.dismiss() }
}]
}).result.then(function(id) {
// RecordBucketCtrl $scope is not inherited by the
// opens the record export dialog
$scope.openExportBucketDialog = function() {
- $modal.open({
+ $uibModal.open({
templateUrl: './cat/bucket/record/t_bucket_export',
controller :
- ['$scope', '$modalInstance', function($scope, $modalInstance) {
+ ['$scope', '$uibModalInstance', function($scope, $uibModalInstance) {
$scope.args = {format : 'XML', encoding : 'UTF-8'}; // defaults
- $scope.ok = function(args) { $modalInstance.close(args) }
- $scope.cancel = function() { $modalInstance.dismiss() }
+ $scope.ok = function(args) { $uibModalInstance.close(args) }
+ $scope.cancel = function() { $uibModalInstance.dismiss() }
}]
}).result.then(function (args) {
if (!args) return;
.controller('ViewCtrl',
['$scope','$q','$routeParams','bucketSvc','egCore','$window',
- '$timeout','egConfirmDialog','$modal','egHolds',
+ '$timeout','egConfirmDialog','$uibModal','egHolds',
function($scope, $q , $routeParams, bucketSvc, egCore, $window,
- $timeout, egConfirmDialog, $modal, egHolds) {
+ $timeout, egConfirmDialog, $uibModal, egHolds) {
$scope.setTab('view');
$scope.bucketId = $routeParams.id;
// opens the record merge dialog
$scope.openRecordMergeDialog = function(records) {
- $modal.open({
+ $uibModal.open({
templateUrl: './cat/bucket/record/t_merge_records',
size: 'lg',
windowClass: 'eg-wide-modal',
controller:
- ['$scope', '$modalInstance', function($scope, $modalInstance) {
+ ['$scope', '$uibModalInstance', function($scope, $uibModalInstance) {
$scope.records = [];
$scope.lead_id = 0;
$scope.editing_inplace = false;
$scope.records.push({ id : rec.id });
});
$scope.ok = function() {
- $modalInstance.close({
+ $uibModalInstance.close({
lead_id : $scope.lead_id,
records : $scope.records
});
}
- $scope.cancel = function () { $modalInstance.dismiss() }
+ $scope.cancel = function () { $uibModalInstance.dismiss() }
$scope.use_as_lead = function(rec) {
if ($scope.lead_id) {
$scope.records.push({ id : $scope.lead_id });
}
$scope.edit_lead = function() {
var lead_id = $scope.lead_id;
- $modal.open({
+ $uibModal.open({
templateUrl: './cat/bucket/record/t_edit_lead_record',
size: 'lg',
controller:
- ['$scope', '$modalInstance', function($scope, $modalInstance) {
+ ['$scope', '$uibModalInstance', function($scope, $uibModalInstance) {
$scope.focusMe = true;
$scope.record_id = lead_id;
$scope.dirty_flag = false;
- $scope.ok = function() { $modalInstance.close() }
- $scope.cancel = function () { $modalInstance.dismiss() }
+ $scope.ok = function() { $uibModalInstance.close() }
+ $scope.cancel = function () { $uibModalInstance.dismiss() }
}]
}).result.then(function() {
// TODO: need a way to force a refresh of the egRecordBreaker, as
}
});
if (failures.length) {
- $modal.open({
+ $uibModal.open({
templateUrl: './cat/bucket/record/t_records_not_deleted',
controller :
- ['$scope', '$modalInstance', function($scope, $modalInstance) {
+ ['$scope', '$uibModalInstance', function($scope, $uibModalInstance) {
$scope.failures = failures;
- $scope.ok = function() { $modalInstance.close() }
- $scope.cancel = function() { $modalInstance.dismiss() }
+ $scope.ok = function() { $uibModalInstance.close() }
+ $scope.cancel = function() { $uibModalInstance.dismiss() }
}]
});
}
.controller('CatalogCtrl',
['$scope','$routeParams','$location','$window','$q','egCore','egHolds','egCirc','egConfirmDialog','ngToast',
- 'egGridDataProvider','egHoldGridActions','$timeout','$modal','holdingsSvc','egUser','conjoinedSvc',
+ 'egGridDataProvider','egHoldGridActions','$timeout','$uibModal','holdingsSvc','egUser','conjoinedSvc',
function($scope , $routeParams , $location , $window , $q , egCore , egHolds , egCirc , egConfirmDialog , ngToast ,
- egGridDataProvider , egHoldGridActions , $timeout , $modal , holdingsSvc , egUser , conjoinedSvc) {
+ egGridDataProvider , egHoldGridActions , $timeout , $uibModal , holdingsSvc , egUser , conjoinedSvc) {
var holdingsSvcInst = new holdingsSvc();
$scope.add_to_record_bucket = function() {
var recId = $scope.record_id;
- return $modal.open({
+ return $uibModal.open({
templateUrl: './cat/catalog/t_add_to_bucket',
animation: true,
size: 'md',
controller:
- ['$scope','$modalInstance',
- function($scope , $modalInstance) {
+ ['$scope','$uibModalInstance',
+ function($scope , $uibModalInstance) {
$scope.bucket_id = 0;
$scope.newBucketName = '';
'open-ils.actor.container.item.create',
egCore.auth.token(), 'biblio', item
).then(function(resp) {
- $modalInstance.close();
+ $uibModalInstance.close();
});
}
}
$scope.cancel = function() {
- $modalInstance.dismiss();
+ $uibModalInstance.dismiss();
}
}]
});
var conjoinedGridDataProviderRef = $scope.conjoinedGridDataProvider;
- return $modal.open({
+ return $uibModal.open({
templateUrl: './cat/catalog/t_conjoined_selector',
animation: true,
controller:
- ['$scope','$modalInstance',
- function($scope , $modalInstance) {
+ ['$scope','$uibModalInstance',
+ function($scope , $uibModalInstance) {
$scope.update = true;
$scope.peer_type = null;
});
return $q.all(promises)
- .then(function(){$modalInstance.close()})
+ .then(function(){$uibModalInstance.close()})
.then(function(){return conjoinedSvc.fetch()})
.then(function(){conjoinedGridDataProviderRef.refresh()});
}
$scope.cancel = function($event) {
- $modalInstance.dismiss();
+ $uibModalInstance.dismiss();
$event.preventDefault();
}
}]
var copy_list = gatherSelectedHoldingsIds();
if (copy_list.length == 0) return;
- return $modal.open({
+ return $uibModal.open({
templateUrl: './cat/catalog/t_add_to_bucket',
animation: true,
size: 'md',
controller:
- ['$scope','$modalInstance',
- function($scope , $modalInstance) {
+ ['$scope','$uibModalInstance',
+ function($scope , $uibModalInstance) {
$scope.bucket_id = 0;
$scope.newBucketName = '';
);
return $q.all(promises).then(function() {
- $modalInstance.close();
+ $uibModalInstance.close();
});
});
}
}
$scope.cancel = function() {
- $modalInstance.dismiss();
+ $uibModalInstance.dismiss();
}
}]
});
var copy_list = gatherSelectedHoldingsIds();
if (copy_list.length == 0) return;
- return $modal.open({
+ return $uibModal.open({
templateUrl: './cat/catalog/t_request_items',
animation: true,
controller:
- ['$scope','$modalInstance',
- function($scope , $modalInstance) {
+ ['$scope','$uibModalInstance',
+ function($scope , $uibModalInstance) {
$scope.user = null;
$scope.first_user_fetch = true;
egCore.auth.token(), args, h.copy_list
);
- $modalInstance.close();
+ $uibModalInstance.close();
}
$scope.cancel = function($event) {
- $modalInstance.dismiss();
+ $uibModalInstance.dismiss();
$event.preventDefault();
}
}]
var holdingsGridDataProviderRef = $scope.holdingsGridDataProvider;
angular.forEach(copy_list, function (cp) {
- $modal.open({
+ $uibModal.open({
templateUrl: './cat/share/t_replace_barcode',
animation: true,
controller:
- ['$scope','$modalInstance',
- function($scope , $modalInstance) {
+ ['$scope','$uibModalInstance',
+ function($scope , $uibModalInstance) {
$scope.isModal = true;
$scope.focusBarcode = false;
$scope.focusBarcode2 = true;
});
});
- $modalInstance.close();
+ $uibModalInstance.close();
}
$scope.cancel = function($event) {
- $modalInstance.dismiss();
+ $uibModalInstance.dismiss();
$event.preventDefault();
}
}
}
$scope.markLibAsVolTarget = function() {
- return $modal.open({
+ return $uibModal.open({
templateUrl: './cat/catalog/t_choose_vol_target_lib',
animation: true,
controller:
- ['$scope','$modalInstance',
- function($scope , $modalInstance) {
+ ['$scope','$uibModalInstance',
+ function($scope , $uibModalInstance) {
var orgId = egCore.hatch.getLocalItem('eg.cat.volume_transfer_target') || 1;
$scope.org = egCore.org.get(orgId);
'eg.cat.volume_transfer_target',
org.id()
);
- $modalInstance.close();
+ $uibModalInstance.close();
}
$scope.cancel = function($event) {
- $modalInstance.dismiss();
+ $uibModalInstance.dismiss();
$event.preventDefault();
}
}]
egCore.hatch.getItem('eg.cat.marked_conjoined_record').then(function(target_record) {
if (!target_record) return;
- return $modal.open({
+ return $uibModal.open({
templateUrl: './cat/catalog/t_conjoined_selector',
animation: true,
controller:
- ['$scope','$modalInstance',
- function($scope , $modalInstance) {
+ ['$scope','$uibModalInstance',
+ function($scope , $uibModalInstance) {
$scope.update = false;
$scope.peer_type = null;
promises.push(egCore.pcrud.create(n));
});
- return $q.all(promises).then(function(){$modalInstance.close()});
+ return $q.all(promises).then(function(){$uibModalInstance.close()});
}
$scope.cancel = function($event) {
- $modalInstance.dismiss();
+ $uibModalInstance.dismiss();
$event.preventDefault();
}
}]
},
templateUrl: './cat/share/t_volume_list',
controller:
- ['$scope','holdingsSvc','egCore','egGridDataProvider','$modal',
- function($scope , holdingsSvc , egCore , egGridDataProvider, $modal) {
+ ['$scope','holdingsSvc','egCore','egGridDataProvider','$uibModal',
+ function($scope , holdingsSvc , egCore , egGridDataProvider, $uibModal) {
var holdingsSvcInst = new holdingsSvc();
$scope.holdingsGridControls = {};
}
).then(function(key) {
if (key) {
- $modal.open({
+ $uibModal.open({
templateUrl: './cat/share/t_embedded_volcopy',
size: 'lg',
windowClass: 'eg-wide-modal',
controller:
- ['$scope', '$modalInstance', function($scope, $modalInstance) {
+ ['$scope', '$uibModalInstance', function($scope, $uibModalInstance) {
$scope.volcopy_url =
egCore.env.basePath + 'cat/volcopy/' + key + '/embedded';
- $scope.ok = function(args) { $modalInstance.close(args) }
- $scope.cancel = function () { $modalInstance.dismiss() }
+ $scope.ok = function(args) { $uibModalInstance.close(args) }
+ $scope.cancel = function () { $uibModalInstance.dismiss() }
}]
}).result.then(function() {
load_holdings();
'</div>',
scope: { field: "=", onKeydown: '=', contextFunctions: '=' },
replace: true,
- controller : ['$scope','$modal',
- function ( $scope, $modal ) {
+ controller : ['$scope','$uibModal',
+ function ( $scope, $uibModal ) {
$scope.stackSubfields = $scope.$parent.$parent.stackSubfields;
$scope.isAuthorityControlled = function () {
return ($scope.$parent.$parent.record_type == 'bre') &&
});
var cs = $scope.$parent.$parent.controlSet;
var args = { changed : false };
- $modal.open({
+ $uibModal.open({
templateUrl: './cat/share/t_authority_link_dialog',
size: 'lg',
- controller: ['$scope', '$modalInstance', function($scope, $modalInstance) {
+ controller: ['$scope', '$uibModalInstance', function($scope, $uibModalInstance) {
$scope.controlSet = cs;
$scope.bibField = fieldCopy;
$scope.focusMe = true;
$scope.args = args;
- $scope.ok = function(args) { $modalInstance.close(args) };
- $scope.cancel = function () { $modalInstance.dismiss() };
+ $scope.ok = function(args) { $uibModalInstance.close(args) };
+ $scope.cancel = function () { $uibModalInstance.dismiss() };
}]
}).result.then(function (args) {
if (args.changed) {
'</button>'+
'</div>',
scope: { field: "=", onKeydown: '=', contextFunctions: '=' },
- controller : ['$scope','$modal',
- function ( $scope, $modal) {
+ controller : ['$scope','$uibModal',
+ function ( $scope, $uibModal) {
$scope.showPhysCharLink = function () {
return ($scope.$parent.$parent.record_type == 'bre')
&& $scope.field.tag == '007';
field : $scope.field,
orig_value : $scope.field.data
};
- $modal.open({
+ $uibModal.open({
templateUrl: './cat/share/t_physchar_dialog',
- controller: ['$scope','$modalInstance',
- function( $scope , $modalInstance) {
+ controller: ['$scope','$uibModalInstance',
+ function( $scope , $uibModalInstance) {
$scope.focusMe = true;
$scope.args = args;
- $scope.ok = function(args) { $modalInstance.close(args) };
+ $scope.ok = function(args) { $uibModalInstance.close(args) };
$scope.cancel = function () {
- $modalInstance.dismiss();
+ $uibModalInstance.dismiss();
args.field.data = args.orig_value;
};
}],
controlSet : '=',
changed : '='
},
- controller: ['$scope','$modal','egCore','egAuth',
- function ($scope , $modal, egCore, egAuth) {
+ controller: ['$scope','$uibModal','egCore','egAuth',
+ function ($scope , $uibModal, egCore, egAuth) {
$scope.searchStr = '';
var cni = egCore.env.aous['cat.marc_control_number_identifier'] ||
egAuth.token()
).then(function(newAuthority) {
if (spawn_editor) {
- $modal.open({
+ $uibModal.open({
templateUrl: './cat/share/t_edit_new_authority',
size: 'lg',
controller:
- ['$scope', '$modalInstance', function($scope, $modalInstance) {
+ ['$scope', '$uibModalInstance', function($scope, $uibModalInstance) {
$scope.focusMe = true;
$scope.args = args;
$scope.dirty_flag = false;
$scope.marc_xml = newAuthority,
- $scope.ok = function(args) { $modalInstance.close(args) }
- $scope.cancel = function () { $modalInstance.dismiss() }
+ $scope.ok = function(args) { $uibModalInstance.close(args) }
+ $scope.cancel = function () { $uibModalInstance.dismiss() }
}]
}).result.then(function (args) {
if (!args || !args.authority_id) return;
* Edit controller!
*/
.controller('EditCtrl',
- ['$scope','$q','$window','$routeParams','$location','$timeout','egCore','egNet','egGridDataProvider','itemSvc','$modal',
-function($scope , $q , $window , $routeParams , $location , $timeout , egCore , egNet , egGridDataProvider , itemSvc , $modal) {
+ ['$scope','$q','$window','$routeParams','$location','$timeout','egCore','egNet','egGridDataProvider','itemSvc','$uibModal',
+function($scope , $q , $window , $routeParams , $location , $timeout , egCore , egNet , egGridDataProvider , itemSvc , $uibModal) {
$scope.defaults = { // If defaults are not set at all, allow everything
barcode_checkdigit : false,
var default_pub = Boolean($scope.defaults.copy_notes_pub);
if (!angular.isArray(copy_list)) copy_list = [copy_list];
- return $modal.open({
+ return $uibModal.open({
templateUrl: './cat/volcopy/t_copy_notes',
animation: true,
controller:
- ['$scope','$modalInstance',
- function($scope , $modalInstance) {
+ ['$scope','$uibModalInstance',
+ function($scope , $uibModalInstance) {
$scope.focusNote = true;
$scope.note = {
creator : egCore.auth.user().id(),
cp.notes().push( n );
});
- $modalInstance.close();
+ $uibModalInstance.close();
}
$scope.cancel = function($event) {
- $modalInstance.dismiss();
+ $uibModalInstance.dismiss();
$event.preventDefault();
}
}]
* List view - grid stuff
*/
.controller('Z3950SearchCtrl',
- ['$scope','$q','$location','$timeout','$window','egCore','egGridDataProvider','egZ3950TargetSvc','$modal',
+ ['$scope','$q','$location','$timeout','$window','egCore','egGridDataProvider','egZ3950TargetSvc','$uibModal',
'egConfirmDialog',
-function($scope , $q , $location , $timeout , $window, egCore , egGridDataProvider, egZ3950TargetSvc, $modal,
+function($scope , $q , $location , $timeout , $window, egCore , egGridDataProvider, egZ3950TargetSvc, $uibModal,
egConfirmDialog) {
// get list of targets
return egZ3950TargetSvc.rawSearchImpossible();
}
$scope.showRawSearchForm = function() {
- $modal.open({
+ $uibModal.open({
templateUrl: './cat/z3950/t_raw_search',
size: 'md',
controller:
- ['$scope', '$modalInstance', function($scope, $modalInstance) {
+ ['$scope', '$uibModalInstance', function($scope, $uibModalInstance) {
egZ3950TargetSvc.setRawSearch('');
$scope.focusMe = true;
- $scope.ok = function(args) { $modalInstance.close(args) }
- $scope.cancel = function () { $modalInstance.dismiss() }
+ $scope.ok = function(args) { $uibModalInstance.close(args) }
+ $scope.cancel = function () { $uibModalInstance.dismiss() }
}]
}).result.then(function (args) {
if (!args || !args.raw_search) return;
$scope.spawn_editor = function() {
var items = $scope.gridControls.selectedItems();
var recId = 0;
- $modal.open({
+ $uibModal.open({
templateUrl: './cat/z3950/t_marc_edit',
size: 'lg',
controller:
- ['$scope', '$modalInstance', function($scope, $modalInstance) {
+ ['$scope', '$uibModalInstance', function($scope, $uibModalInstance) {
$scope.focusMe = true;
$scope.record_id = recId;
$scope.dirty_flag = false;
$scope.marc_xml = items[0]['marcxml'];
- $scope.ok = function(args) { $modalInstance.close(args) }
- $scope.cancel = function () { $modalInstance.dismiss() }
+ $scope.ok = function(args) { $uibModalInstance.close(args) }
+ $scope.cancel = function () { $uibModalInstance.dismiss() }
$scope.save_label = egCore.strings.IMPORT_BUTTON_LABEL;
$scope.import_record_callback = function (record_id) {
recId = record_id;
$scope.view_marc = function() {
var items = $scope.gridControls.selectedItems();
- $modal.open({
+ $uibModal.open({
templateUrl: './cat/z3950/t_marc_html',
size: 'lg',
controller:
- ['$scope', '$modalInstance', function($scope, $modalInstance) {
+ ['$scope', '$uibModalInstance', function($scope, $uibModalInstance) {
$scope.focusMe = true;
$scope.marc_xml = items[0]['marcxml'];
$scope.isbn = (items[0].isbn() || '').replace(/ .*/, '');
- $scope.ok = function(args) { $modalInstance.close(args) }
- $scope.cancel = function () { $modalInstance.dismiss() }
+ $scope.ok = function(args) { $uibModalInstance.close(args) }
+ $scope.cancel = function () { $uibModalInstance.dismiss() }
}]
}).result.then(function (args) {
if (!args || !args.name) return;
var args = {
'marc_xml' : items[0]['marcxml']
};
- $modal.open({
+ $uibModal.open({
templateUrl: './cat/z3950/t_overlay',
size: 'lg',
controller:
- ['$scope', '$modalInstance', function($scope, $modalInstance) {
+ ['$scope', '$uibModalInstance', function($scope, $uibModalInstance) {
$scope.focusMe = true;
$scope.overlay_target = overlay_target;
$scope.args = args;
- $scope.ok = function(args) { $modalInstance.close(args) };
- $scope.cancel = function () { $modalInstance.dismiss() };
+ $scope.ok = function(args) { $uibModalInstance.close(args) };
+ $scope.cancel = function () { $uibModalInstance.dismiss() };
$scope.editOverlayRecord = function() {
- $modal.open({
+ $uibModal.open({
templateUrl: './cat/z3950/t_edit_overlay_record',
size: 'lg',
controller:
- ['$scope', '$modalInstance', function($scope, $modalInstance) {
+ ['$scope', '$uibModalInstance', function($scope, $uibModalInstance) {
$scope.focusMe = true;
$scope.record_id = 0;
$scope.dirty_flag = false;
$scope.args = args;
- $scope.ok = function(args) { $modalInstance.close(args) }
- $scope.cancel = function () { $modalInstance.dismiss() }
+ $scope.ok = function(args) { $uibModalInstance.close(args) }
+ $scope.cancel = function () { $uibModalInstance.dismiss() }
}]
}).result.then(function (args) {
if (!args || !args.name) return;
* Manages messages
*/
.controller('PatronMessagesCtrl',
- ['$scope','$q','$routeParams','egCore','$modal','patronSvc','egCirc',
-function($scope , $q , $routeParams, egCore , $modal , patronSvc , egCirc) {
+ ['$scope','$q','$routeParams','egCore','$uibModal','patronSvc','egCirc',
+function($scope , $q , $routeParams, egCore , $uibModal , patronSvc , egCirc) {
$scope.initTab('messages', $routeParams.id);
var usr_id = $routeParams.id;
}])
.controller('PatronNotesCtrl',
- ['$scope','$routeParams','$location','egCore','patronSvc','$modal',
-function($scope, $routeParams , $location , egCore , patronSvc , $modal) {
+ ['$scope','$routeParams','$location','egCore','patronSvc','$uibModal',
+function($scope, $routeParams , $location , egCore , patronSvc , $uibModal) {
$scope.initTab('other', $routeParams.id);
var usr_id = $routeParams.id;
// open the new-note dialog and create the note
$scope.newNote = function() {
- $modal.open({
+ $uibModal.open({
templateUrl: './circ/patron/t_new_note_dialog',
controller:
- ['$scope', '$modalInstance',
- function($scope, $modalInstance) {
+ ['$scope', '$uibModalInstance',
+ function($scope, $uibModalInstance) {
$scope.focusNote = true;
$scope.args = {};
- $scope.ok = function(count) { $modalInstance.close($scope.args) }
- $scope.cancel = function () { $modalInstance.dismiss() }
+ $scope.ok = function(count) { $uibModalInstance.close($scope.args) }
+ $scope.cancel = function () { $uibModalInstance.dismiss() }
}],
}).result.then(
function(args) {
.controller('PatronGroupCtrl',
['$scope','$routeParams','$q','$window','$timeout','$location','egCore',
- 'patronSvc','$modal','egPromptDialog','egConfirmDialog',
+ 'patronSvc','$uibModal','egPromptDialog','egConfirmDialog',
function($scope, $routeParams , $q , $window , $timeout, $location , egCore ,
- patronSvc , $modal , egPromptDialog , egConfirmDialog) {
+ patronSvc , $uibModal , egPromptDialog , egConfirmDialog) {
var usr_id = $routeParams.id;
egCore.pcrud.retrieve('au', card.usr())
.then(function(user) {
user.card(card);
- $modal.open({
+ $uibModal.open({
templateUrl: './circ/patron/t_move_to_group_dialog',
controller: [
- '$scope','$modalInstance',
- function($scope , $modalInstance) {
+ '$scope','$uibModalInstance',
+ function($scope , $uibModalInstance) {
$scope.user = user;
$scope.selected = selected;
$scope.outbound = outbound;
$scope.ok =
- function(count) { $modalInstance.close() }
+ function(count) { $uibModalInstance.close() }
$scope.cancel =
- function () { $modalInstance.dismiss() }
+ function () { $uibModalInstance.dismiss() }
}
]
}).result.then(function() {
*/
.controller('PatronBillsCtrl',
['$scope','$q','$routeParams','egCore','egConfirmDialog','$location',
- 'egGridDataProvider','billSvc','patronSvc','egPromptDialog','$modal',
- 'egBilling',
+ 'egGridDataProvider','billSvc','patronSvc','egPromptDialog', 'egBilling',
function($scope , $q , $routeParams , egCore , egConfirmDialog , $location,
- egGridDataProvider , billSvc , patronSvc , egPromptDialog , $modal,
- egBilling) {
+ egGridDataProvider , billSvc , patronSvc , egPromptDialog, egBilling) {
$scope.initTab('bills', $routeParams.id);
billSvc.userId = $routeParams.id;
angular.module('egPatronApp').controller('PatronCheckoutCtrl',
- ['$scope','$q','$modal','$routeParams','egCore','egUser','patronSvc',
+ ['$scope','$q','$routeParams','egCore','egUser','patronSvc',
'egGridDataProvider','$location','$timeout','egCirc',
-function($scope , $q , $modal , $routeParams , egCore , egUser , patronSvc ,
+function($scope , $q , $routeParams , egCore , egUser , patronSvc ,
egGridDataProvider , $location , $timeout , egCirc) {
$scope.initTab('checkout', $routeParams.id).finally(function(){
.controller('PatronItemsOutCtrl',
['$scope','$q','$routeParams','$timeout','egCore','egUser','patronSvc','$location',
- 'egGridDataProvider','$modal','egCirc','egConfirmDialog','egBilling','$window',
+ 'egGridDataProvider','$uibModal','egCirc','egConfirmDialog','egBilling','$window',
function($scope, $q, $routeParams, $timeout, egCore , egUser, patronSvc , $location,
- egGridDataProvider , $modal , egCirc , egConfirmDialog , egBilling , $window) {
+ egGridDataProvider , $uibModal , egCirc , egConfirmDialog , egBilling , $window) {
// list of noncatatloged circulations. Define before initTab to
// avoid any possibility of race condition, since they are loaded
$scope.edit_due_date = function(items) {
if (!items.length) return;
- $modal.open({
+ $uibModal.open({
templateUrl : './circ/patron/t_edit_due_date_dialog',
controller : [
- '$scope','$modalInstance',
- function($scope , $modalInstance) {
+ '$scope','$uibModalInstance',
+ function($scope , $uibModalInstance) {
// if there is only one circ, default to the due date
// of that circ. Otherwise, default to today.
});
$q.all(promises).then(function() {
- $modalInstance.close();
+ $uibModalInstance.close();
provider.refresh();
});
}
$scope.cancel = function($event) {
- $modalInstance.dismiss();
+ $uibModalInstance.dismiss();
$event.preventDefault();
}
}
var barcodes = items.map(function(circ)
{ return circ.target_copy().barcode() });
- return $modal.open({
+ return $uibModal.open({
templateUrl : './circ/patron/t_edit_due_date_dialog',
templateUrl : './circ/patron/t_renew_with_date_dialog',
controller : [
- '$scope','$modalInstance',
- function($scope , $modalInstance) {
+ '$scope','$uibModalInstance',
+ function($scope , $uibModalInstance) {
$scope.args = {
barcodes : barcodes,
date : new Date()
}
- $scope.cancel = function() {$modalInstance.dismiss()}
+ $scope.cancel = function() {$uibModalInstance.dismiss()}
// Fire off the due-date updater for each circ.
// When all is done, close the dialog
egCirc.renew({copy_barcode : bc, due_date : due})
.finally(do_one);
} else {
- $modalInstance.close();
+ $uibModalInstance.close();
reset_page();
}
}
}]);
-function PatronRegCtrl($scope, $routeParams, $q, $modal, $window, egCore,
- patronSvc, patronRegSvc, egUnloadPrompt, egAlertDialog) {
+function PatronRegCtrl($scope, $routeParams, $q, $uibModal, $window,
+ egCore, patronSvc, patronRegSvc, egUnloadPrompt, egAlertDialog) {
$scope.page_data_loaded = false;
$scope.clone_id = patronRegSvc.clone_id = $routeParams.clone_id;
}
$scope.cards_dialog = function() {
- $modal.open({
+ $uibModal.open({
templateUrl: './circ/patron/t_patron_cards_dialog',
controller:
- ['$scope','$modalInstance','cards', 'perms',
- function($scope , $modalInstance , cards, perms) {
+ ['$scope','$uibModalInstance','cards','perms',
+ function($scope , $uibModalInstance , cards , perms) {
// scope here is the modal-level scope
$scope.args = {cards : cards};
$scope.perms = perms;
- $scope.ok = function() { $modalInstance.close($scope.args) }
- $scope.cancel = function () { $modalInstance.dismiss() }
+ $scope.ok = function() { $uibModalInstance.close($scope.args) }
+ $scope.cancel = function () { $uibModalInstance.dismiss() }
}],
resolve : {
cards : function() {
// dialog for selecting additional permission groups
$scope.secondary_groups_dialog = function() {
- $modal.open({
+ $uibModal.open({
templateUrl: './circ/patron/t_patron_groups_dialog',
controller:
- ['$scope','$modalInstance','linked_groups','pgt_depth',
- function($scope , $modalInstance , linked_groups , pgt_depth) {
+ ['$scope','$uibModalInstance','linked_groups','pgt_depth',
+ function($scope , $uibModalInstance , linked_groups , pgt_depth) {
$scope.pgt_depth = pgt_depth;
$scope.args = {
$event.preventDefault(); // avoid close
}
- $scope.ok = function() { $modalInstance.close($scope.args) }
- $scope.cancel = function () { $modalInstance.dismiss() }
+ $scope.ok = function() { $uibModalInstance.close($scope.args) }
+ $scope.cancel = function () { $uibModalInstance.dismiss() }
}],
resolve : {
linked_groups : function() { return $scope.patron.groups },
}
}
-// This controller may be loaded from different modules (patron edit vs.
-// register new patron), so we have to inject the controller params manually.
-PatronRegCtrl.$inject = ['$scope', '$routeParams', '$q', '$modal',
+PatronRegCtrl.$inject = ['$scope', '$routeParams', '$q', '$uibModal',
'$window', 'egCore', 'patronSvc', 'patronRegSvc', 'egUnloadPrompt', 'egAlertDialog'];
angular.module('egCoreMod')
.factory('egBilling',
- ['$modal','$q','egCore',
-function($modal , $q , egCore) {
+ ['$uibModal','$q','egCore',
+function($uibModal , $q , egCore) {
var service = {};
// patron OR patron_id
service.showBillDialog = function(args) {
- return $modal.open({
+ return $uibModal.open({
templateUrl: './circ/share/t_bill_patron_dialog',
controller:
- ['$scope','$modalInstance','$timeout','billingTypes','xact','patron',
- function($scope , $modalInstance , $timeout , billingTypes , xact , patron) {
+ ['$scope','$uibModalInstance','$timeout','billingTypes','xact','patron',
+ function($scope , $uibModalInstance , $timeout , billingTypes , xact , patron) {
console.debug('billing patron ' + patron.id());
$scope.focus = true;
if (xact && xact._isfieldmapper)
xact : xact,
patron_id : patron.id()
}
- $scope.ok = function(args) { $modalInstance.close(args) }
- $scope.cancel = function () { $modalInstance.dismiss() }
+ $scope.ok = function(args) { $uibModalInstance.close(args) }
+ $scope.cancel = function () { $uibModalInstance.dismiss() }
$scope.updateDefaultPrice = function() {
var type = billingTypes.filter(function(t) {
return t.id() == $scope.billArgs.billingType })[0];
.factory('egCirc',
- ['$modal','$q','egCore','egAlertDialog','egConfirmDialog',
-function($modal , $q , egCore , egAlertDialog , egConfirmDialog) {
+ ['$uibModal','$q','egCore','egAlertDialog','egConfirmDialog',
+function($uibModal , $q , egCore , egAlertDialog , egConfirmDialog) {
var service = {
// auto-override these events after the first override
// the returned event.
service.override_dialog = function(evt, params, options, action) {
if (!angular.isArray(evt)) evt = [evt];
- return $modal.open({
+ return $uibModal.open({
templateUrl: './circ/share/t_event_override_dialog',
controller:
- ['$scope', '$modalInstance',
- function($scope, $modalInstance) {
+ ['$scope', '$uibModalInstance',
+ function($scope, $uibModalInstance) {
$scope.events = evt;
$scope.auto_override =
evt.filter(function(e){
return service.checkout_auto_override_after_first.indexOf(evt.textcode) > -1;
}).length > 0;
$scope.copy_barcode = params.copy_barcode; // may be null
- $scope.ok = function() { $modalInstance.close() }
+ $scope.ok = function() { $uibModalInstance.close() }
$scope.cancel = function ($event) {
- $modalInstance.dismiss();
+ $uibModalInstance.dismiss();
$event.preventDefault();
}
}]
service.copy_not_avail_dialog = function(evt, params, options) {
if (angular.isArray(evt)) evt = evt[0];
- return $modal.open({
+ return $uibModal.open({
templateUrl: './circ/share/t_copy_not_avail_dialog',
controller:
- ['$scope','$modalInstance','copyStatus',
- function($scope , $modalInstance , copyStatus) {
+ ['$scope','$uibModalInstance','copyStatus',
+ function($scope , $uibModalInstance , copyStatus) {
$scope.copyStatus = copyStatus;
- $scope.ok = function() {$modalInstance.close()}
- $scope.cancel = function() {$modalInstance.dismiss()}
+ $scope.ok = function() {$uibModalInstance.close()}
+ $scope.cancel = function() {$uibModalInstance.dismiss()}
}],
resolve : {
copyStatus : function() {
params.noncat = true;
var type = egCore.env.cnct.map[params.noncat_type];
- return $modal.open({
+ return $uibModal.open({
templateUrl: './circ/share/t_noncat_dialog',
controller:
- ['$scope', '$modalInstance',
- function($scope, $modalInstance) {
+ ['$scope', '$uibModalInstance',
+ function($scope, $uibModalInstance) {
$scope.focusMe = true;
$scope.type = type;
$scope.count = 1;
$scope.noncatMax = noncatMax;
- $scope.ok = function(count) { $modalInstance.close(count) }
+ $scope.ok = function(count) { $uibModalInstance.close(count) }
$scope.cancel = function ($event) {
- $modalInstance.dismiss()
+ $uibModalInstance.dismiss()
$event.preventDefault();
}
}],
// Opens a dialog allowing the user to fill in pre-cat copy info.
service.precat_dialog = function(params, options) {
- return $modal.open({
+ return $uibModal.open({
templateUrl: './circ/share/t_precat_dialog',
controller:
- ['$scope', '$modalInstance', 'circMods',
- function($scope, $modalInstance, circMods) {
+ ['$scope', '$uibModalInstance', 'circMods',
+ function($scope, $uibModalInstance, circMods) {
$scope.focusMe = true;
$scope.precatArgs = {
copy_barcode : params.copy_barcode,
circ_modifier : circMods.length ? circMods[0].code() : null
};
$scope.circModifiers = circMods;
- $scope.ok = function(args) { $modalInstance.close(args) }
- $scope.cancel = function () { $modalInstance.dismiss() }
+ $scope.ok = function(args) { $uibModalInstance.close(args) }
+ $scope.cancel = function () { $uibModalInstance.dismiss() }
}],
resolve : {
circMods : function() {
service.copy_in_transit_dialog = function(evt, params, options) {
if (angular.isArray(evt)) evt = evt[0];
- return $modal.open({
+ return $uibModal.open({
templateUrl: './circ/share/t_copy_in_transit_dialog',
controller:
- ['$scope','$modalInstance','transit',
- function($scope , $modalInstance , transit) {
+ ['$scope','$uibModalInstance','transit',
+ function($scope , $uibModalInstance , transit) {
$scope.transit = transit;
- $scope.ok = function() { $modalInstance.close(transit) }
- $scope.cancel = function() { $modalInstance.dismiss() }
+ $scope.ok = function() { $uibModalInstance.close(transit) }
+ $scope.cancel = function() { $uibModalInstance.dismiss() }
}],
resolve : {
// fetch the conflicting open transit w/ fleshed copy
var openCirc = evt.payload.old_circ;
var sameUser = openCirc.usr() == params.patron_id;
- return $modal.open({
+ return $uibModal.open({
templateUrl: './circ/share/t_circ_exists_dialog',
controller:
- ['$scope','$modalInstance',
- function($scope , $modalInstance) {
+ ['$scope','$uibModalInstance',
+ function($scope , $uibModalInstance) {
$scope.args = {forgive_fines : false};
$scope.circDate = openCirc.xact_start();
$scope.sameUser = sameUser;
- $scope.ok = function() { $modalInstance.close($scope.args) }
+ $scope.ok = function() { $uibModalInstance.close($scope.args) }
$scope.cancel = function($event) {
- $modalInstance.dismiss();
+ $uibModalInstance.dismiss();
$event.preventDefault(); // form, avoid calling ok();
}
}]
}
service.backdate_dialog = function(circ_ids) {
- return $modal.open({
+ return $uibModal.open({
templateUrl: './circ/share/t_backdate_dialog',
controller:
- ['$scope','$modalInstance',
- function($scope , $modalInstance) {
+ ['$scope','$uibModalInstance',
+ function($scope , $uibModalInstance) {
var today = new Date();
$scope.dialog = {
$scope.cancel = function() {
- $modalInstance.dismiss();
+ $uibModalInstance.dismiss();
}
$scope.ok = function() {
service.batch_backdate(circ_ids, bd)
.then(
function() { // on complete
- $modalInstance.close({backdate : bd});
+ $uibModalInstance.close({backdate : bd});
},
null,
function(resp) { // on response
service.mark_claims_returned_dialog = function(copy_barcodes) {
if (!copy_barcodes.length) return;
- return $modal.open({
+ return $uibModal.open({
templateUrl: './circ/share/t_mark_claims_returned_dialog',
controller:
- ['$scope','$modalInstance',
- function($scope , $modalInstance) {
+ ['$scope','$uibModalInstance',
+ function($scope , $uibModalInstance) {
var today = new Date();
$scope.args = {
$scope.args.backdate = today;
});
- $scope.cancel = function() {$modalInstance.dismiss()}
+ $scope.cancel = function() {$uibModalInstance.dismiss()}
$scope.ok = function() {
var date = $scope.args.date.toISOString().replace(/T.*/,'');
var bc = copy_barcodes.pop();
if (!bc) {
deferred.resolve();
- $modalInstance.close();
+ $uibModalInstance.close();
return;
}
if (options.auto_print_holds_transits)
return print_transit();
- return $modal.open({
+ return $uibModal.open({
templateUrl: tmpl,
controller: [
- '$scope','$modalInstance',
- function($scope , $modalInstance) {
+ '$scope','$uibModalInstance',
+ function($scope , $uibModalInstance) {
$scope.today = new Date();
$scope[key] = val;
});
- $scope.ok = function() {$modalInstance.close()}
+ $scope.ok = function() {$uibModalInstance.close()}
$scope.print = function() {
- $modalInstance.close();
+ $uibModalInstance.close();
print_transit();
}
}]
var ok = service.check_barcode(bc);
if (ok) return $q.when();
- return $modal.open({
+ return $uibModal.open({
templateUrl: './circ/share/t_bad_barcode_dialog',
controller:
- ['$scope', '$modalInstance',
- function($scope, $modalInstance) {
+ ['$scope', '$uibModalInstance',
+ function($scope, $uibModalInstance) {
$scope.barcode = bc;
- $scope.ok = function() { $modalInstance.close() }
- $scope.cancel = function() { $modalInstance.dismiss() }
+ $scope.ok = function() { $uibModalInstance.close() }
+ $scope.cancel = function() { $uibModalInstance.dismiss() }
}]
}).result;
}
}
service.create_penalty = function(user_id) {
- return $modal.open({
+ return $uibModal.open({
templateUrl: './circ/share/t_new_message_dialog',
controller:
- ['$scope','$modalInstance','staffPenalties',
- function($scope , $modalInstance , staffPenalties) {
+ ['$scope','$uibModalInstance','staffPenalties',
+ function($scope , $uibModalInstance , staffPenalties) {
$scope.focusNote = true;
$scope.penalties = staffPenalties;
$scope.require_initials = service.require_initials;
$scope.setPenalty = function(id) {
args.penalty = id;
}
- $scope.ok = function(count) { $modalInstance.close($scope.args) }
+ $scope.ok = function(count) { $uibModalInstance.close($scope.args) }
$scope.cancel = function($event) {
- $modalInstance.dismiss();
+ $uibModalInstance.dismiss();
$event.preventDefault();
}
}],
// assumes, for now anyway, penalty type is fleshed onto usr_penalty.
service.edit_penalty = function(usr_penalty) {
- return $modal.open({
+ return $uibModal.open({
templateUrl: './circ/share/t_new_message_dialog',
controller:
- ['$scope','$modalInstance','staffPenalties',
- function($scope , $modalInstance , staffPenalties) {
+ ['$scope','$uibModalInstance','staffPenalties',
+ function($scope , $uibModalInstance , staffPenalties) {
$scope.focusNote = true;
$scope.penalties = staffPenalties;
$scope.require_initials = service.require_initials;
note : usr_penalty.note()
}
$scope.setPenalty = function(id) { args.penalty = id; }
- $scope.ok = function(count) { $modalInstance.close($scope.args) }
+ $scope.ok = function(count) { $uibModalInstance.close($scope.args) }
$scope.cancel = function($event) {
- $modalInstance.dismiss();
+ $uibModalInstance.dismiss();
$event.preventDefault();
}
}],
.factory('egHolds',
- ['$modal','$q','egCore','egConfirmDialog','egAlertDialog',
-function($modal , $q , egCore , egConfirmDialog , egAlertDialog) {
+ ['$uibModal','$q','egCore','egConfirmDialog','egAlertDialog',
+function($uibModal , $q , egCore , egConfirmDialog , egAlertDialog) {
var service = {};
service.cancel_holds = function(hold_ids) {
- return $modal.open({
+ return $uibModal.open({
templateUrl : './circ/share/t_cancel_hold_dialog',
controller :
- ['$scope', '$modalInstance', 'cancel_reasons',
- function($scope, $modalInstance, cancel_reasons) {
+ ['$scope', '$uibModalInstance', 'cancel_reasons',
+ function($scope, $uibModalInstance, cancel_reasons) {
$scope.args = {
cancel_reason : 5,
cancel_reasons : cancel_reasons,
};
$scope.cancel = function($event) {
- $modalInstance.dismiss();
+ $uibModalInstance.dismiss();
$event.preventDefault();
}
function cancel_one() {
var hold_id = hold_ids.pop();
if (!hold_id) {
- $modalInstance.close();
+ $uibModalInstance.close();
return;
}
egCore.net.request(
service.uncancel_holds = function(hold_ids) {
- return $modal.open({
+ return $uibModal.open({
templateUrl : './circ/share/t_uncancel_hold_dialog',
controller :
- ['$scope', '$modalInstance',
- function($scope, $modalInstance) {
+ ['$scope', '$uibModalInstance',
+ function($scope, $uibModalInstance) {
$scope.args = {
num_holds : hold_ids.length
};
$scope.cancel = function($event) {
- $modalInstance.dismiss();
+ $uibModalInstance.dismiss();
$event.preventDefault();
}
function uncancel_one() {
var hold_id = hold_ids.pop();
if (!hold_id) {
- $modalInstance.close();
+ $uibModalInstance.close();
return;
}
egCore.net.request(
service.set_copy_quality = function(hold_ids) {
if (!hold_ids.length) return $q.when();
- return $modal.open({
+ return $uibModal.open({
templateUrl : './circ/share/t_hold_copy_quality_dialog',
controller :
- ['$scope', '$modalInstance',
- function($scope, $modalInstance) {
+ ['$scope', '$uibModalInstance',
+ function($scope, $uibModalInstance) {
function update(val) {
var vals = hold_ids.map(function(hold_id) {
return {id : hold_id, mint_condition : val}})
service.update_holds(vals).finally(function() {
- $modalInstance.close();
+ $uibModalInstance.close();
});
}
$scope.good = function() { update(true) }
$scope.any = function() { update(false) }
- $scope.cancel = function() { $modalInstance.dismiss() }
+ $scope.cancel = function() { $uibModalInstance.dismiss() }
}
]
}).result;
service.edit_pickup_lib = function(hold_ids) {
if (!hold_ids.length) return $q.when();
- return $modal.open({
+ return $uibModal.open({
templateUrl : './circ/share/t_hold_edit_pickup_lib',
controller :
- ['$scope', '$modalInstance',
- function($scope, $modalInstance) {
+ ['$scope', '$uibModalInstance',
+ function($scope, $uibModalInstance) {
$scope.cant_be_pickup = function (id) { return !egCore.org.CanHaveUsers(id); };
$scope.args = {};
$scope.ok = function() {
}
});
service.update_holds(vals).finally(function() {
- $modalInstance.close();
+ $uibModalInstance.close();
});
}
- $scope.cancel = function() { $modalInstance.dismiss() }
+ $scope.cancel = function() { $uibModalInstance.dismiss() }
}
]
}).result;
service.edit_notify_prefs = function(hold_ids) {
if (!hold_ids.length) return $q.when();
- return $modal.open({
+ return $uibModal.open({
templateUrl : './circ/share/t_hold_notification_prefs',
controller :
- ['$scope', '$modalInstance', 'sms_carriers',
- function($scope, $modalInstance, sms_carriers) {
+ ['$scope', '$uibModalInstance', 'sms_carriers',
+ function($scope, $uibModalInstance, sms_carriers) {
$scope.args = {}
$scope.sms_carriers = sms_carriers;
$scope.num_holds = hold_ids.length;
});
service.update_holds(vals).finally(function() {
- $modalInstance.close();
+ $uibModalInstance.close();
});
}
- $scope.cancel = function() { $modalInstance.dismiss() }
+ $scope.cancel = function() { $uibModalInstance.dismiss() }
}
],
resolve : {
return service.update_holds(vals);
}
- return $modal.open({
+ return $uibModal.open({
templateUrl : './circ/share/t_hold_dates',
controller :
- ['$scope', '$modalInstance',
- function($scope, $modalInstance) {
+ ['$scope', '$uibModalInstance',
+ function($scope, $uibModalInstance) {
var today = new Date();
$scope.args = {
thaw_date : today,
}
$scope.num_holds = hold_ids.length;
$scope.ok = function() {
- relay_to_update($scope).then($modalInstance.close);
+ relay_to_update($scope).then($uibModalInstance.close);
}
- $scope.cancel = function() { $modalInstance.dismiss() }
+ $scope.cancel = function() { $uibModalInstance.dismiss() }
}
],
}).result;
showPatron : '='
},
controller : [
- '$scope','$modal','egCore','egHolds','egCirc',
- function($scope , $modal , egCore , egHolds , egCirc) {
+ '$scope','$uibModal','egCore','egHolds','egCirc',
+ function($scope , $uibModal , egCore , egHolds , egCirc) {
function draw() {
if (!$scope.holdId) return;
}
$scope.new_note = function() {
- return $modal.open({
+ return $uibModal.open({
templateUrl : './circ/share/t_hold_note_dialog',
controller :
- ['$scope', '$modalInstance',
- function($scope, $modalInstance) {
+ ['$scope', '$uibModalInstance',
+ function($scope, $uibModalInstance) {
$scope.args = {};
$scope.ok = function() {
- $modalInstance.close($scope.args)
+ $uibModalInstance.close($scope.args)
},
$scope.cancel = function($event) {
- $modalInstance.dismiss();
+ $uibModalInstance.dismiss();
$event.preventDefault();
}
}
}
$scope.new_notification = function() {
- return $modal.open({
+ return $uibModal.open({
templateUrl : './circ/share/t_hold_notification_dialog',
controller :
- ['$scope', '$modalInstance',
- function($scope, $modalInstance) {
+ ['$scope', '$uibModalInstance',
+ function($scope, $uibModalInstance) {
$scope.args = {};
$scope.ok = function() {
- $modalInstance.close($scope.args)
+ $uibModalInstance.close($scope.args)
},
$scope.cancel = function($event) {
- $modalInstance.dismiss();
+ $uibModalInstance.dismiss();
$event.preventDefault();
}
}
*/
.factory('egAlertDialog',
- ['$modal','$interpolate',
-function($modal , $interpolate) {
+ ['$uibModal','$interpolate',
+function($uibModal , $interpolate) {
var service = {};
service.open = function(message, msg_scope) {
- return $modal.open({
+ return $uibModal.open({
templateUrl: './share/t_alert_dialog',
- controller: ['$scope', '$modalInstance',
- function($scope, $modalInstance) {
+ controller: ['$scope', '$uibModalInstance',
+ function($scope, $uibModalInstance) {
$scope.message = $interpolate(message)(msg_scope);
$scope.ok = function() {
if (msg_scope && msg_scope.ok) msg_scope.ok();
- $modalInstance.close()
+ $uibModalInstance.close()
}
}
]
*/
.factory('egConfirmDialog',
- ['$modal','$interpolate',
-function($modal, $interpolate) {
+ ['$uibModal','$interpolate',
+function($uibModal, $interpolate) {
var service = {};
service.open = function(title, message, msg_scope, ok_button_label, cancel_button_label) {
- return $modal.open({
+ return $uibModal.open({
templateUrl: './share/t_confirm_dialog',
- controller: ['$scope', '$modalInstance',
- function($scope, $modalInstance) {
+ controller: ['$scope', '$uibModalInstance',
+ function($scope, $uibModalInstance) {
$scope.title = $interpolate(title)(msg_scope);
$scope.message = $interpolate(message)(msg_scope);
$scope.ok_button_label = $interpolate(ok_button_label || '')(msg_scope);
$scope.cancel_button_label = $interpolate(cancel_button_label || '')(msg_scope);
$scope.ok = function() {
if (msg_scope.ok) msg_scope.ok();
- $modalInstance.close()
+ $uibModalInstance.close()
}
$scope.cancel = function() {
if (msg_scope.cancel) msg_scope.cancel();
- $modalInstance.dismiss();
+ $uibModalInstance.dismiss();
}
}
]
*/
.factory('egPromptDialog',
- ['$modal','$interpolate',
-function($modal, $interpolate) {
+ ['$uibModal','$interpolate',
+function($uibModal, $interpolate) {
var service = {};
service.open = function(message, promptValue, msg_scope) {
- return $modal.open({
+ return $uibModal.open({
templateUrl: './share/t_prompt_dialog',
- controller: ['$scope', '$modalInstance',
- function($scope, $modalInstance) {
+ controller: ['$scope', '$uibModalInstance',
+ function($scope, $uibModalInstance) {
$scope.message = $interpolate(message)(msg_scope);
$scope.args = {value : promptValue || ''};
$scope.focus = true;
$scope.ok = function() {
if (msg_scope.ok) msg_scope.ok($scope.args.value);
- $modalInstance.close()
+ $uibModalInstance.close()
}
$scope.cancel = function() {
if (msg_scope.cancel) msg_scope.cancel();
- $modalInstance.dismiss();
+ $uibModalInstance.dismiss();
}
}
]