// Base path for cookie-based storage.
// Useful for limiting cookies to subsections of the application.
- loginSessionBasePath: string;
+ // Store cookies globally by default.
+ // Note cookies shared with /eg/staff must be stored at "/"
+ loginSessionBasePath: string = '/';
// Set of keys whose values should disappear at logout.
loginSessionKeys: string[] = [
fetchCopies(): void {
this.copies = [];
+
+ // "Show Result from All Libraries" i.e. global search displays
+ // copies from all branches, sorted by search/pref libs.
+ let copy_depth = this.staffCat.searchContext.global ?
+ this.org.root().ou_type().depth() :
+ this.staffCat.searchContext.searchOrg.ou_type().depth();
+
this.net.request(
'open-ils.search',
'open-ils.search.bib.copies.staff',
this.recId,
this.staffCat.searchContext.searchOrg.id(),
- this.staffCat.searchContext.searchOrg.ou_type().depth(), // TODO
+ copy_depth,
this.pager.limit,
this.pager.offset,
this.staffCat.prefOrg ? this.staffCat.prefOrg.id() : null
// NOTE: storing session data at '/' so it can be shared by
// Angularjs apps.
this.store.loginSessionBasePath = '/';
- //this.ngLocation.prepareExternalUrl('/staff');
+ // ^-- = this.ngLocation.prepareExternalUrl('/staff');
// Not sure how to get the path without params... using this for now.
let path = state.url.split('?')[0]