From 2d44289452af97b3ce860e3c174876ecbae465fe Mon Sep 17 00:00:00 2001 From: bobzel Date: Mon, 6 Jun 2022 00:46:13 -0400 Subject: fixed audioBox to record to dictation file. fixed lightbox to make links to audio when new document is displayed. --- src/client/views/LightboxView.tsx | 6 ++++-- src/client/views/nodes/AudioBox.tsx | 14 ++++---------- 2 files changed, 8 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/client/views/LightboxView.tsx b/src/client/views/LightboxView.tsx index 43d75d55c..2543111b0 100644 --- a/src/client/views/LightboxView.tsx +++ b/src/client/views/LightboxView.tsx @@ -51,6 +51,10 @@ export class LightboxView extends React.Component { this._docFilters && (this._docFilters.length = 0); this._future = this._history = []; } else { + if (doc) { + const l = DocUtils.MakeLinkToActiveAudio(() => doc).lastElement(); + l && (Cast(l.anchor2, Doc, null).backgroundColor = "lightgreen"); + } //TabDocView.PinDoc(doc, { hidePresBox: true }); this._history ? this._history.push({ doc, target }) : this._history = [{ doc, target }]; if (doc !== LightboxView.LightboxDoc) { @@ -122,8 +126,6 @@ export class LightboxView extends React.Component { const target = LightboxView._docTarget = this._future?.pop(); const targetDocView = target && DocumentManager.Instance.getLightboxDocumentView(target); if (targetDocView && target) { - const l = DocUtils.MakeLinkToActiveAudio(() => targetDocView.ComponentView?.getAnchor?.() || target).lastElement(); - l && (Cast(l.anchor2, Doc, null).backgroundColor = "lightgreen"); targetDocView.focus(target, { originalTarget: target, willZoom: true, scale: 0.9 }); if (LightboxView._history?.lastElement().target !== target) LightboxView._history?.push({ doc, target }); } else { diff --git a/src/client/views/nodes/AudioBox.tsx b/src/client/views/nodes/AudioBox.tsx index 85dfd1e9a..9b92762a2 100644 --- a/src/client/views/nodes/AudioBox.tsx +++ b/src/client/views/nodes/AudioBox.tsx @@ -84,12 +84,12 @@ export class AudioBox extends ViewBoxAnnotatableComponent { - console.log("Data available", e); const [{ result }] = await Networking.UploadFilesToServer(e.data); - console.log("Data result", result); if (!(result instanceof Error)) { this.props.Document[this.fieldKey] = new AudioField(result.accessPaths.agnostic.client); } @@ -350,12 +348,8 @@ export class AudioBox extends ViewBoxAnnotatableComponent