Commit aedfa821 authored by ncastejon's avatar ncastejon
Browse files

Change colors for the file extension.

parent cd2ee489
{
"name": "webapp",
<<<<<<< HEAD
"version": "2.3.2",
=======
"version": "2.3.1",
>>>>>>> Change colors for the file extension.
"lockfileVersion": 1,
"requires": true,
"dependencies": {
......@@ -10887,7 +10891,11 @@
"dev": true,
"optional": true,
"requires": {
<<<<<<< HEAD
"commander": "~2.20.3",
=======
"commander": "~2.20.0",
>>>>>>> Change colors for the file extension.
"source-map": "~0.6.1"
},
"dependencies": {
......
......@@ -2,8 +2,8 @@
<div class="resource-download" *ngFor="let format of resource.formats">
<div class="resource-left">
<div class="resource-icon" [ngClass]="format.name">
<span>{{format.name}}</span>
<div class="resource-icon" [ngClass]="format.fileExtension">
<span>{{format.fileExtension}}</span>
</div>
<div class="resource-main">
<div class="resource-main-name">
......
......@@ -62,40 +62,47 @@
}
}
.resource-icon.PDF {
.resource-icon.pdf {
background-color: grey;
}
.resource-icon.pdf {
background-color: #ad4848;
}
.resource-icon.PNG {
background-color: #7c48ad;
.resource-icon.png {
background-color: #64768b;
}
.resource-icon.JPG {
background-color: #a448ad;
.resource-icon.jpg {
background-color: #bc8127;
}
.resource-icon.KML {
.resource-icon.kmz {
background-color: #e25909;
}
.resource-icon.SHP {
background-color: #3b9c65;
.resource-icon.shp {
background-color: #3b9c65
;
}
.resource-icon.ZIP {
background-color: #e5bb4e;
.resource-icon.zip {
background-color: #c9a958
;
}
.resource-icon.JSON,
.resource-icon.json,
.resource-icon.GeoJSON {
background-color: #296faf;
background-color: #296faf
;
}
.resource-icon.GML {
.resource-icon.gml {
background-color: #658ad2;
}
.resource-icon.CSV {
.resource-icon.csv {
background-color: #559d7f;
}
}
import { Component, OnInit, Input } from '@angular/core';
import { IMetadataLink, Resource } from '../../../../models';
import { NotificationService, FileService } from '../../../../../core/services';
import { Component, Input, OnInit } from '@angular/core';
import { notificationMessages } from '../../../../../../i18n/traductions';
import { NotificationService } from '../../../../../core/services';
import { Resource } from '../../../../models';
import { linkFormats } from '../../../../models/metadata.model';
import { Format } from '../../../../models/resource.model';
import { notificationMessages } from '../../../../../../i18n/traductions';
@Component({
selector: 'app-resource-custom-download',
......@@ -34,7 +34,7 @@ export class ResourceCustomDownloadableComponent implements OnInit {
}
saveFile(format: Format) {
saveAs(this.getQueryableUrl(format), `${this.resource.name}.${format.fileExtension}`);
saveAs(this.getQueryableUrl(format), `${this.resource.metadataLink.name}.${format.fileExtension}`);
this._notificationService.notify(
{
type: 'success',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment