// Display the full form if true, otherwise display the expandy.
showThyself = true;
+ showThyselfSetting = false;
constructor(
private renderer: Renderer2,
private route: ActivatedRoute,
private org: OrgService,
private cat: CatalogService,
+ private store: ServerStoreService,
private staffCat: StaffCatalogService
) {
this.copyLocations = [];
+ }
+
+ toggleFormDisplay() {
+ this.showThyself = !this.showThyself;
+ this.store.setItem('eg.catalog.search.form.open', this.showThyself);
+ }
+
+ ngOnInit() {
+ this.ccvmMap = this.cat.ccvmMap;
+ this.cmfMap = this.cat.cmfMap;
+ this.context = this.staffCat.searchContext;
+
+ // Start with advanced search options open
+ // if any filters are active.
+ this.showSearchFilters = this.filtersActive();
+
// Some search scenarios, like rendering a search template,
// will not be searchable and thus not resovle to a specific
// search tab. Check to see if a specific tab is requested
}
});
+ this.store.getItem('eg.catalog.search.form.open')
+ .then(value => this.showThyselfSetting = value);
+
this.router.events.subscribe(routeEvent => {
if (routeEvent instanceof NavigationEnd) {
this.showThyself = true;
- COLLAPSE_ON_PAGES.forEach(pageRegex => {
- if (routeEvent.url.match(pageRegex)) {
- this.showThyself = false;
- }
- });
+ if (!this.showThyselfSetting) {
+ COLLAPSE_ON_PAGES.forEach(pageRegex => {
+ if (routeEvent.url.match(pageRegex)) {
+ this.showThyself = false;
+ }
+ });
+ }
}
});
}
- ngOnInit() {
- this.ccvmMap = this.cat.ccvmMap;
- this.cmfMap = this.cat.cmfMap;
- this.context = this.staffCat.searchContext;
-
- // Start with advanced search options open
- // if any filters are active.
- this.showSearchFilters = this.filtersActive();
- }
-
ngAfterViewInit() {
// Query inputs are generated from search context data,
// so they are not available until after the first render.
--- /dev/null
+BEGIN;
+
+-- SELECT evergreen.upgrade_deps_block_check('TODO', :eg_version);
+
+INSERT INTO config.workstation_setting_type (name, grp, datatype, label)
+VALUES (
+ 'eg.catalog.search.form.open', 'gui', 'bool',
+ oils_i18n_gettext(
+ 'eg.catalog.search.form.open',
+ 'Catalog Search Form Visibility Sticky Setting',
+ 'cwst', 'label'
+ )
+);
+
+COMMIT;