Skip to content
Snippets Groups Projects
Commit 2ed6d147 authored by Damien's avatar Damien
Browse files

[FEAT] [PARA V2] Fix no pdf for incoming mail attachment + unlock document when close book

parent 4678c70c
No related branches found
No related tags found
No related merge requests found
...@@ -80,7 +80,15 @@ ...@@ -80,7 +80,15 @@
<sup *ngIf="!showTopLeftPanel" class="nbRes" style="position: absolute;right: 6px;top: 5px;">{{signatureBook.documents.length - 1}}</sup> <sup *ngIf="!showTopLeftPanel" class="nbRes" style="position: absolute;right: 6px;top: 5px;">{{signatureBook.documents.length - 1}}</sup>
<i *ngIf="showTopLeftPanel" class="fa fa-chevron-up" aria-hidden="true"></i> <i *ngIf="showTopLeftPanel" class="fa fa-chevron-up" aria-hidden="true"></i>
</div> </div>
<iframe *ngIf="leftViewerLink != ''" id="leftPanelShowDocumentIframe" [src]="leftViewerLink | safeUrl" [ngStyle]="{'height': showTopLeftPanel ? '84%' : '99%'}"></iframe> <iframe *ngIf="leftViewerLink != '' && (signatureBook.documents[leftSelectedThumbnail].format == 'pdf' || leftSelectedThumbnail == 0)" id="leftPanelShowDocumentIframe" [src]="leftViewerLink | safeUrl" [ngStyle]="{'height': showTopLeftPanel ? '84%' : '99%'}"></iframe>
<div *ngIf="signatureBook.documents[leftSelectedThumbnail].format != 'pdf' && leftSelectedThumbnail > 0" [ngStyle]="{'height': showTopLeftPanel ? '79%' : '96%'}" class="visaNoPdfWarning">
<div style="padding-top: 25%;">Aucun aperçu disponible<br/><sub>La version PDF de ce format n'a pas été trouvée.</sub></div>
<div class="visaPjView">
<a title="Télécharger la pièce jointe" href="index.php?display=true&module=attachments&page=view_attachment&res_id_master={{resId}}&id={{signatureBook.documents[leftSelectedThumbnail].res_id}}" target="_blank">
<i class="fa fa-download fa-2x"></i>
</a>
</div>
</div>
</div> </div>
<div *ngIf="headerTab == 2" class="contentShow" style="width:98%;"> <div *ngIf="headerTab == 2" class="contentShow" style="width:98%;">
<iframe [src]="notesViewerLink | safeUrl"></iframe> <iframe [src]="notesViewerLink | safeUrl"></iframe>
......
...@@ -388,10 +388,12 @@ var SignatureBookComponent = (function () { ...@@ -388,10 +388,12 @@ var SignatureBookComponent = (function () {
}); });
}; };
SignatureBookComponent.prototype.backToBasket = function () { SignatureBookComponent.prototype.backToBasket = function () {
unlockDocument(this.resId);
location.hash = ""; location.hash = "";
location.reload(); location.reload();
}; };
SignatureBookComponent.prototype.backToDetails = function () { SignatureBookComponent.prototype.backToDetails = function () {
unlockDocument(this.resId);
location.hash = ""; location.hash = "";
location.search = "?page=details&dir=indexing_searching&id=" + this.resId; location.search = "?page=details&dir=indexing_searching&id=" + this.resId;
}; };
......
...@@ -396,11 +396,13 @@ export class SignatureBookComponent implements OnInit { ...@@ -396,11 +396,13 @@ export class SignatureBookComponent implements OnInit {
} }
backToBasket() { backToBasket() {
unlockDocument(this.resId);
location.hash = ""; location.hash = "";
location.reload(); location.reload();
} }
backToDetails() { backToDetails() {
unlockDocument(this.resId);
location.hash = ""; location.hash = "";
location.search = "?page=details&dir=indexing_searching&id=" + this.resId; location.search = "?page=details&dir=indexing_searching&id=" + this.resId;
} }
......
Source diff could not be displayed: it is too large. Options to address this: view the blob.
...@@ -203,7 +203,7 @@ class VisaController ...@@ -203,7 +203,7 @@ class VisaController
$incomingMailAttachments = \ResModel::getAvailableLinkedAttachmentsIn([ $incomingMailAttachments = \ResModel::getAvailableLinkedAttachmentsIn([
'resIdMaster' => $resId, 'resIdMaster' => $resId,
'in' => ['incoming_mail_attachment'], 'in' => ['incoming_mail_attachment'],
'select' => ['res_id', 'title'] 'select' => ['res_id', 'title', 'format']
]); ]);
$documents = [ $documents = [
...@@ -217,7 +217,9 @@ class VisaController ...@@ -217,7 +217,9 @@ class VisaController
]; ];
foreach ($incomingMailAttachments as $value) { foreach ($incomingMailAttachments as $value) {
$documents[] = [ $documents[] = [
'res_id' => $value['res_id'],
'title' => $value['title'], 'title' => $value['title'],
'format' => $value['format'],
'viewerLink' => "index.php?display=true&module=visa&page=view_pdf_attachement&res_id_master={$resId}&id={$value['res_id']}", 'viewerLink' => "index.php?display=true&module=visa&page=view_pdf_attachement&res_id_master={$resId}&id={$value['res_id']}",
'thumbnailLink' => "index.php?page=doc_thumb&module=thumbnails&res_id={$value['res_id']}&coll_id=attachments_coll&display=true&advanced=true" 'thumbnailLink' => "index.php?page=doc_thumb&module=thumbnails&res_id={$value['res_id']}&coll_id=attachments_coll&display=true&advanced=true"
]; ];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment