From: Bill Erickson Date: Fri, 22 Jan 2016 02:43:05 +0000 (-0500) Subject: patron reg / angulur 1.4 etc experiment X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fuser%2Fberick%2Flp1452950-web-client-patron-reg-1.4-exp;p=working%2FEvergreen.git patron reg / angulur 1.4 etc experiment Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/templates/staff/circ/patron/index.tt2 b/Open-ILS/src/templates/staff/circ/patron/index.tt2 index df0cea5335..83e783e101 100644 --- a/Open-ILS/src/templates/staff/circ/patron/index.tt2 +++ b/Open-ILS/src/templates/staff/circ/patron/index.tt2 @@ -17,8 +17,8 @@ [% INCLUDE 'staff/circ/share/hold_strings.tt2' %] - + diff --git a/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2 b/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2 index 4a804f91f5..d1eec661eb 100644 --- a/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2 +++ b/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2 @@ -543,6 +543,13 @@
[% l('Statistical Categories') %]
+ +
+ +
+
diff --git a/Open-ILS/web/js/ui/default/staff/bower.json b/Open-ILS/web/js/ui/default/staff/bower.json index dc441267a9..b44a1e1187 100644 --- a/Open-ILS/web/js/ui/default/staff/bower.json +++ b/Open-ILS/web/js/ui/default/staff/bower.json @@ -17,15 +17,13 @@ "test", "tests" ], - "devDependencies": { - "bootstrap": "~3.1.1", - "jquery": "~2.1.3", - "angular": "~1.2.16", - "angular-route": "~1.2.16", - "angular-mocks": "~1.2.16", - "angular-bootstrap": "~0.11.0" - }, "dependencies": { - "angular-hotkeys": "chieffancypants/angular-hotkeys#~1.2.0" + "angular-latest": "~1.4.8", + "bootstrap": "~3.3.6", + "jquery": "~2.2.0", + "angular-route": "~1.4.8", + "angular-mocks": "~1.4.8", + "angular-bootstrap": "~1.1.0", + "angular-hotkeys": "chieffancypants/angular-hotkeys#~1.6.0" } } diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/app.js b/Open-ILS/web/js/ui/default/staff/circ/patron/app.js index 6a184ae263..73f45335b1 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/patron/app.js +++ b/Open-ILS/web/js/ui/default/staff/circ/patron/app.js @@ -1054,8 +1054,8 @@ function($scope, $q, $routeParams, $timeout, $window, $location, egCore, * 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; @@ -1280,8 +1280,8 @@ function($scope, $routeParams , $location , egCore , patronSvc) { }]) .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; @@ -1299,15 +1299,15 @@ function($scope, $routeParams , $location , egCore , patronSvc , $modal) { // 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) { @@ -1345,9 +1345,9 @@ function($scope, $routeParams , $location , egCore , patronSvc , $modal) { .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; @@ -1455,18 +1455,18 @@ function($scope, $routeParams , $q , $window , $timeout, $location , egCore , 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() { @@ -1588,3 +1588,8 @@ function($scope , $routeParams , $window , $location , egCore) { $scope.user_perms_url = url; }]) +// PatronRegCtrl function defined in regctl.js +.controller('PatronRegCtrl', +['$scope', '$routeParams', '$q', '$uibModal', '$window', 'egCore', + 'patronSvc', 'patronRegSvc', 'egUnloadPrompt', PatronRegCtrl]); + diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js b/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js index d9dc78ffd5..b62a8e3ac8 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js +++ b/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js @@ -682,7 +682,7 @@ angular.module('egCoreMod') function PatronRegCtrl($scope, $routeParams, - $q, $modal, $window, egCore, patronSvc, patronRegSvc, egUnloadPrompt) { + $q, $uibModal, $window, egCore, patronSvc, patronRegSvc, egUnloadPrompt) { $scope.page_data_loaded = false; $scope.clone_id = $routeParams.clone_id; @@ -969,15 +969,15 @@ function PatronRegCtrl($scope, $routeParams, } $scope.cards_dialog = function() { - $modal.open({ + $uibModal.open({ templateUrl: './circ/patron/t_patron_cards_dialog', controller: - ['$scope','$modalInstance','cards', - function($scope , $modalInstance , cards) { + ['$scope','$uibModalInstance','cards', + function($scope , $uibModalInstance , cards) { // scope here is the modal-level scope $scope.args = {cards : cards}; - $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() { @@ -1041,11 +1041,11 @@ function PatronRegCtrl($scope, $routeParams, // 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 = { @@ -1072,8 +1072,8 @@ function PatronRegCtrl($scope, $routeParams, $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 }, @@ -1153,6 +1153,8 @@ function PatronRegCtrl($scope, $routeParams, // 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']; +*/ diff --git a/Open-ILS/web/js/ui/default/staff/services/ui.js b/Open-ILS/web/js/ui/default/staff/services/ui.js index 1a706b6b87..c4f6a03e48 100644 --- a/Open-ILS/web/js/ui/default/staff/services/ui.js +++ b/Open-ILS/web/js/ui/default/staff/services/ui.js @@ -85,19 +85,19 @@ function($timeout , $parse) { */ .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() } } ] @@ -113,24 +113,24 @@ function($modal , $interpolate) { */ .factory('egConfirmDialog', - ['$modal','$interpolate', -function($modal, $interpolate) { + ['$uibModal','$interpolate', +function($uibModal, $interpolate) { var service = {}; service.open = function(title, message, msg_scope) { - 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 = 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(); } } ] @@ -153,25 +153,25 @@ function($modal, $interpolate) { */ .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(); } } ]