patron reg / angulur 1.4 etc experiment user/berick/lp1452950-web-client-patron-reg-1.4-exp
authorBill Erickson <berickxx@gmail.com>
Fri, 22 Jan 2016 02:43:05 +0000 (21:43 -0500)
committerBill Erickson <berickxx@gmail.com>
Fri, 22 Jan 2016 02:43:05 +0000 (21:43 -0500)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/templates/staff/circ/patron/index.tt2
Open-ILS/src/templates/staff/circ/patron/t_edit.tt2
Open-ILS/web/js/ui/default/staff/bower.json
Open-ILS/web/js/ui/default/staff/circ/patron/app.js
Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js
Open-ILS/web/js/ui/default/staff/services/ui.js

index df0cea5..83e783e 100644 (file)
@@ -17,8 +17,8 @@
 <script src="[% ctx.media_prefix %]/js/ui/default/staff/circ/services/holds.js"></script>
 [% INCLUDE 'staff/circ/share/hold_strings.tt2' %]
 <script src="[% ctx.media_prefix %]/js/ui/default/staff/cat/services/record.js"></script>
-<script src="[% ctx.media_prefix %]/js/ui/default/staff/circ/patron/app.js"></script>
 <script src="[% ctx.media_prefix %]/js/ui/default/staff/circ/patron/regctl.js"></script>
+<script src="[% ctx.media_prefix %]/js/ui/default/staff/circ/patron/app.js"></script>
 
 <!-- load the rest on demand? -->
 
index 4a804f9..d1eec66 100644 (file)
     <div class="col-md-6">[% l('Statistical Categories') %]</div>
 </div>
 
+<!-- TESTING -->
+<div class="row reg-field-row">
+    <input type="text" ng-model="type_stuff" 
+      uib-typeahead="cat_name as cat.name() for cat in stat_cats | filter:$viewValue | limitTo:8" 
+      class="form-control">
+</div>
+
 <div class="row reg-field-row" 
     ng-show="show_field('stat_cats')" ng-repeat="cat in stat_cats">
   <div class="col-md-3 reg-field-label">
index dc44126..b44a1e1 100644 (file)
     "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"
   }
 }
index 6a184ae..73f4533 100644 (file)
@@ -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]);
+
index d9dc78f..b62a8e3 100644 (file)
@@ -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'];
+*/
 
index 1a706b6..c4f6a03 100644 (file)
@@ -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();
                     }
                 }
             ]