[open-ils-commits] [GIT] Evergreen ILS branch master updated. e85fb2909381632ab114f0d923aeda5089e37467
Evergreen Git
git at git.evergreen-ils.org
Tue Jul 30 16:07:23 EDT 2019
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, master has been updated
via e85fb2909381632ab114f0d923aeda5089e37467 (commit)
from d731bb1a84a0b578da1600f594616edd0a504f99 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e85fb2909381632ab114f0d923aeda5089e37467
Author: Galen Charlton <gmc at equinoxinitiative.org>
Date: Tue Jun 4 10:01:27 2019 -0400
LP#1831783: improvements to the Angular org-select widget
- add reset() method
- add method for retrieve current selected OU. This can be invoked
from local template references in parent templates like this:
<button ... (click)="doAction(ousel.selectedOrg())" ...
...
<eg-org-select (onChange)="doAction($event)" #ousel></eg-org-select>
Sponsored-by: MassLNC
Sponsored-by: Georgia Public Library Service
Sponsored-by: Indiana State Library
Sponsored-by: CW MARS
Sponsored-by: King County Library System
Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>
Signed-off-by: Bill Erickson <berickxx at gmail.com>
diff --git a/Open-ILS/src/eg2/src/app/share/org-select/org-select.component.ts b/Open-ILS/src/eg2/src/app/share/org-select/org-select.component.ts
index f455c36bf3..dee3248939 100644
--- a/Open-ILS/src/eg2/src/app/share/org-select/org-select.component.ts
+++ b/Open-ILS/src/eg2/src/app/share/org-select/org-select.component.ts
@@ -100,6 +100,16 @@ export class OrgSelectComponent implements OnInit {
// Does not fire on initialOrg
@Output() onChange = new EventEmitter<IdlObject>();
+ // convenience method to get an IdlObject representing the current
+ // selected org unit. One way of invoking this is via a template
+ // reference variable.
+ selectedOrg(): IdlObject {
+ if (this.selected == null) {
+ return null;
+ }
+ return this.org.get(this.selected.id);
+ }
+
constructor(
private auth: AuthService,
private store: StoreService,
@@ -174,6 +184,11 @@ export class OrgSelectComponent implements OnInit {
// Remove the tree-padding spaces when matching.
formatter = (result: OrgDisplay) => result.label.trim();
+ // reset the state of the component
+ reset() {
+ this.selected = null;
+ }
+
filter = (text$: Observable<string>): Observable<OrgDisplay[]> => {
return text$.pipe(
debounceTime(200),
-----------------------------------------------------------------------
Summary of changes:
.../eg2/src/app/share/org-select/org-select.component.ts | 15 +++++++++++++++
1 file changed, 15 insertions(+)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list