diff --git a/htdocs/RoutePatientDocuments.vue b/htdocs/RoutePatientDocuments.vue index 3006170..dd93c39 100644 --- a/htdocs/RoutePatientDocuments.vue +++ b/htdocs/RoutePatientDocuments.vue @@ -2,10 +2,10 @@
-
+
record{{resultset.length == 1 ? '' : 's'}}
-
    +
    • @@ -22,7 +22,10 @@
      -
      {{doctitle(selection_text) || 'Document'}}
      +
      + {{doctitle(selection_text) || 'Document'}} + +
      {{selection_text}}
      @@ -35,7 +38,7 @@ top: 1.15rem; z-index: 1; } - ul.scroller { + ul.scroller.list-skinny { max-height: 25vh; overflow-y: auto; } @@ -59,6 +62,10 @@ text-overflow: ellipsis; white-space: nowrap; } + a.close { + cursor: default; + text-decoration: none; + } div.detail { font-family: monospace; white-space: pre-wrap; @@ -67,7 +74,7 @@ div.selector { position: static; } - ul.scroller { + ul.scroller.list-skinny { max-height: 75vh; } div.cell.secondary { @@ -105,7 +112,8 @@ resultset: [], selection: null, selection_text: null, - observer_bottom: null + observer_scroller: null, + observer_viewport: null }; }, watch: { @@ -164,9 +172,6 @@ } finally { this.is_loading = false; } - }, - handle_bottom([entry]) { - if((entry.isIntersecting) && (this.has_more) && (!this.is_loading)) this.load_more(); } }, created() { @@ -189,11 +194,14 @@ ); }, mounted() { - this.observer_bottom = new IntersectionObserver(this.handle_bottom, { root: this.$refs.scroller, rootMargin: '25%' }); - this.observer_bottom.observe(this.$refs.bottom); + this.observer_scroller = new IntersectionObserver(([entry]) => { if((entry.isIntersecting) && (this.selection_text) && (this.has_more) && (!this.is_loading)) this.load_more(); }, { root: this.$refs.scroller, rootMargin: '25%' }); + this.observer_scroller.observe(this.$refs.bottom); + this.observer_viewport = new IntersectionObserver(([entry]) => { if((entry.isIntersecting) && (!this.selection_text) && (this.has_more) && (!this.is_loading)) this.load_more(); }, { rootMargin: '25%' }); + this.observer_viewport.observe(this.$refs.bottom); }, destroyed() { - if(this.observer_bottom) this.observer_bottom.disconnect(); + if(this.observer_viewport) this.observer_viewport.disconnect(); + if(this.observer_scroller) this.observer_scroller.disconnect(); } };