Skip to content

Commit

Permalink
resource : back to bundle button
Browse files Browse the repository at this point in the history
  • Loading branch information
hprieur13 committed Oct 17, 2023
1 parent 3879c84 commit c6d230c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/fhirBrowser.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ class FhirBrowser extends HTMLElement {
this._shadow.getElementById('serverNewDialog').hidden = false;
});

this._shadow.getElementById("resource").addEventListener('showBundle', () => {
this._shadow.getElementById("bundle").hidden = false;
});

/*this._shadow.getElementById('serverNewToggle').addEventListener("click", () => {
this._shadow.getElementById('serverNewDialog').hidden = false;
});*/
Expand Down
10 changes: 8 additions & 2 deletions src/fhirResource.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,14 @@ class FhirResource extends HTMLElement {
this._resource = {};
}
connectedCallback() {
this._shadow.getElementById("back").addEventListener('click', () => {
location.hash = `#${this._resourceType.type}`;
this._shadow.getElementById("back").addEventListener('click', (event) => {
//location.hash = `#${this._resourceType.type}`;
event.preventDefault();
event.stopPropagation();
this.dispatchEvent(new CustomEvent("showBundle", {
bubbles: true,
cancelable: false
}));
});

this._shadow.getElementById("help").addEventListener('click', () => {
Expand Down

0 comments on commit c6d230c

Please sign in to comment.