Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 32 additions & 10 deletions resources/views/requests/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,14 +236,26 @@ class="tab-pane card card-body border-top-0 p-3">
<h4>
{{ __(':name In-Flight Map', ['name' => $request->process->name]) }}
</h4>
<div v-if="iframeLoading" class="d-flex justify-content-center">
<div v-if="isObjectLoading" class="d-flex justify-content-center">
<div class="spinner-border text-primary" role="status"></div>
</div>
<div v-show="!iframeLoading">
<iframe class="card"
src="{{ route('modeler.inflight', ['process' => $request->process->id, 'request' => $request->id]) }}"
width="100%" height="640px" frameborder="0" style="border-radius: 4px;"
@load="onLoadIframe"></iframe>
<div :class="{ 'hidden': isObjectLoading }">
<object ref="processMap" class="card"
data="{{ route('modeler.inflight', [
'process' => $request->process->id,
'request' => $request->id
]) }}"
width="100%"
:height="isObjectLoading ? 'auto' : '640px'"
frameborder="0"
type="text/html"
style="border-radius: 4px;"
@load="onLoadedObject">
<!-- Accessible Alternative Content -->
<p>
{{ __('Content not available. Check settings or try a different device.') }}
</p>
</object>
</div>
</div>
</div>
Expand Down Expand Up @@ -419,7 +431,7 @@ class="d-inline-flex pull-left align-items-center" :input-data="requestBy" displ
packages: [],
processId: @json($request->process->id),
canViewComments: @json($canViewComments),
iframeLoading: false,
isObjectLoading: false,
showTree: false,
};
},
Expand Down Expand Up @@ -543,12 +555,12 @@ classStatusCard() {
switchTab(tab) {
this.activeTab = tab;
if (tab === 'overview') {
this.iframeLoading = true;
this.isObjectLoading = true;
}
ProcessMaker.EventBus.$emit('tab-switched', tab);
},
onLoadIframe() {
this.iframeLoading = false;
onLoadedObject() {
this.isObjectLoading = false;
},
requestStatusClass(status) {
status = status.toLowerCase();
Expand Down Expand Up @@ -735,3 +747,13 @@ classStatusCard() {
});
</script>
@endsection

@section('css')
<style>
.hidden {
visibility: hidden;
opacity: 0;
pointer-events: none;
}
</style>
@endsection