document icons
parent
b8ccc534ac
commit
ec51a7a3aa
|
|
@ -55,8 +55,9 @@
|
|||
.values {
|
||||
|
||||
.item {
|
||||
background: transparent url('~src/assets/images/icons/document/document_pdf_60dp.svg') 0 0 no-repeat;
|
||||
min-height: 60px;
|
||||
background: transparent url('~src/assets/images/icons/document/document_60dp.svg') 0 0 no-repeat;
|
||||
background-size: contain;
|
||||
height: 60px;
|
||||
padding-left: 72px;
|
||||
font-size: 20px;
|
||||
display: flex;
|
||||
|
|
|
|||
|
|
@ -10,8 +10,10 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="values" *ngIf="asset">
|
||||
<div class="item">
|
||||
<div class="item" [style.backgroundImage]="extension">
|
||||
<a href="{{asset.links?.open}}" target="_blank">{{asset.name}}</a>
|
||||
<button type="button" class="btn clear trash" (click)="clear()"></button>
|
||||
</div>
|
||||
</div>
|
||||
<pre>{{asset.extension}}</pre>
|
||||
<pre>{{extension}}</pre>
|
||||
|
|
@ -52,6 +52,9 @@ export class FieldDocumentSingleComponent {
|
|||
this.asset = asset;
|
||||
this.control?.setValue(asset?.id);
|
||||
}
|
||||
get extension(){
|
||||
return `url(/assets/images/icons/document/${ICON_TYPE[this.asset.extension]}.svg)`
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -87,3 +90,17 @@ export class FieldDocumentSingleComponent {
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
const ICON_TYPE:any={
|
||||
rtf:'DOC',
|
||||
docx:'DOC',
|
||||
doc:'DOC',
|
||||
xl:'XLS',
|
||||
xls:'XLS',
|
||||
xlsx:'XLS',
|
||||
ppt:'PPT',
|
||||
pptx:'PPT',
|
||||
jpg:'JPG',
|
||||
jpeg:'JPG',
|
||||
pdf:'PDF'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
align-items: flex-start;
|
||||
height: 60px;
|
||||
background: center no-repeat;
|
||||
background-image: url('~src/assets/images/icons/document/document_pdf_60dp.svg');
|
||||
background-image: url('~src/assets/images/icons/document/document_60dp.svg');
|
||||
background-size: contain;
|
||||
}
|
||||
a{
|
||||
|
|
|
|||
|
|
@ -29,12 +29,29 @@ export class DocumentSectionComponent {
|
|||
}
|
||||
|
||||
get docIcon(){
|
||||
const ext = this.section.groups.data[0].fields.data[0].value.data[0].extension.toUpperCase();
|
||||
const ext = ICON_TYPE[
|
||||
this.section.groups.data[0].fields.data[0].value.data[0].extension
|
||||
]
|
||||
return `url('/assets/images/icons/document/${ext}.svg')`
|
||||
// return `url('/assets/images/icons/document/document_pdf_60dp.svg')`
|
||||
|
||||
}
|
||||
|
||||
get download(){
|
||||
return this.section.groups.data[0].fields.data[0].value.data[0].links.download;
|
||||
}
|
||||
}
|
||||
|
||||
const ICON_TYPE:any={
|
||||
rtf:'DOC',
|
||||
docx:'DOC',
|
||||
doc:'DOC',
|
||||
xl:'XLS',
|
||||
xls:'XLS',
|
||||
xlsx:'XLS',
|
||||
ppt:'PPT',
|
||||
pptx:'PPT',
|
||||
jpg:'JPG',
|
||||
jpeg:'JPG',
|
||||
pdf:'PDF'
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
}
|
||||
.doc{
|
||||
display: block;
|
||||
background: url('~src/assets/images/icons/document/document_pdf_60dp.svg') top left no-repeat;
|
||||
background: url('~src/assets/images/icons/document/document_60dp.svg') top left no-repeat;
|
||||
padding-left: 62px;
|
||||
min-height: 60px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,10 +89,12 @@ export class MemberSectionListComponent {
|
|||
|
||||
|
||||
const ICON_TYPE:any={
|
||||
rtf:'DOC',
|
||||
docx:'DOC',
|
||||
doc:'DOC',
|
||||
xl:'XLS',
|
||||
xls:'XLS',
|
||||
xlsx:'XLS',
|
||||
ppt:'PPT',
|
||||
pptx:'PPT',
|
||||
jpg:'JPG',
|
||||
|
|
|
|||
Loading…
Reference in New Issue