<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()}}
ng-show="itemList.offset" ng-click="prevPage()">«</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()">»</button>
<div class="btn-group">
<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>
})
/**
- * 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
// 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;
});
});