ff ui : misc repairs
authorBill Erickson <berick@esilibrary.com>
Tue, 29 Oct 2013 13:33:15 +0000 (09:33 -0400)
committerBill Erickson <berick@esilibrary.com>
Tue, 29 Oct 2013 13:33:15 +0000 (09:33 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/templates/staff/fulfillment/index.tt2
Open-ILS/src/templates/staff/fulfillment/t_actions.tt2
Open-ILS/src/templates/staff/fulfillment/t_onshelf.tt2
Open-ILS/web/js/ui/default/staff/fulfillment/app.js

index 01f942e..8d52ba7 100644 (file)
@@ -81,7 +81,7 @@
               <b class="caret"></b>
             </a>
             <ul class="dropdown-menu" role="menu">
-              <li role="presentation" ng-repeat="org in orgSelector.orgList()">
+              <li role="presentation" ng-repeat="org in orgSelector.all()">
                 <a role="menuitem" tabindex="-1" ng-click="selectOrg(org.id())">
                   <div style="padding-left:{{org.ou_type().depth() * 10}}px">
                     {{org.shortname()}}
index b909e7b..17a9039 100644 (file)
     ng-show="itemList.offset" ng-click="prevPage()">&laquo;</button>
 
   <!-- next page -->
+  <!-- todo: paging needs a total count value to be fully functional -->
   <button type="button" class="btn btn-default" 
     ng-class="{disabled : action_pending}"
+    ng-show="itemList.items.length == itemList.limit" 
     ng-click="nextPage()">&raquo;</button>
 
   <div class="btn-group">
index 63fe41c..6278ef1 100644 (file)
@@ -4,7 +4,7 @@
     <div class="col-lg-6">
       <ul class="nav nav-pills">
         <li ng-class="{active : orientation_borrower}">
-          <a href="./fulfillment/borrower/{{tabname}}">For My Patrons</a>
+         <a href="./fulfillment/borrower/{{tabname}}">For My Patrons</a>
         </li>
         <li ng-class="{active : orientation_lender}">
           <a  href="./fulfillment/lender/{{tabname}}">For Other Libraries</a>
index 57f3d02..2e9a25f 100644 (file)
@@ -51,20 +51,19 @@ angular.module('ffMain',
 })
 
 /**
- * Data shared across FF controllers.
- * TODO: this call all live in FFMainCtrl
+ * orgSelector service
  */
 .factory('orgSelector', 
        ['$rootScope','egOrg','egAuth', 
 function($rootScope,  egOrg,  egAuth) {
     return {
-        orgList : function(newList) {
+        all : function(newList) {
             if (newList) {
-                this._orgList = newList;
-            } else if (!this._orgList) {
-                this._orgList = egOrg.list();
+                this._all = newList;
+            } else if (!this._all) {
+                this._all = egOrg.list();
             } 
-            return this._orgList;
+            return this._all;
         },
 
         // currently selected org unit
@@ -101,7 +100,7 @@ function ($scope,  $route,  egStartup,  orgSelector,  egAuth,  egUser) {
         // logged in user.  From there, we can drive the org selector
         egUser.hasPermAt('FULFILLMENT_ADMIN') 
         .then(function(orgList) {
-            orgSelector.orgList(orgList);
+            orgSelector.all(orgList);
             $scope.orgSelector = orgSelector;
         });
     });