Commit 2af295cc authored by ext.sopra.ncastejon's avatar ext.sopra.ncastejon
Browse files

Fix icons size in download page.

parent 13644fb5
......@@ -72,15 +72,6 @@ export class DatasetAPIComponent implements OnInit, OnDestroy {
}
// Resources are organized on 2 levels :
// -> 1st level: by metadata link description
// -> 2nd level: for each link description in 3 categories:
// - queryable
// - downloadable
// - other
// How to organize: we compare the type of one resource from our resource service
// and the ES metadata link property. If there is a match, the service will let us know if the resource
// is queryable or downloadable. If there is no match and the ES resource cannot be found in the service,
// we put it in "others" resources catagory.
initialize() {
this.metadata = this._datasetDetailService.datasetMetadata;
if (this.metadata && this.resources.length > 0 && !this.hasBeenInitialized) {
......
......@@ -88,10 +88,13 @@
}
.options-icon {
display: flex;
justify-content: center;
align-items: center;
border: 1px solid $grey-super-light-color;
border-radius: 4px;
width: 2.5rem;
height: 2.5rem;
width: 2.75rem;
height: 2.75rem;
margin-right: 0.5rem;
&:hover {
......@@ -112,6 +115,19 @@
}
}
// Manage if the content is too long
.dropdown-trigger button {
span {
overflow: hidden;
text-overflow: ellipsis;
}
svg {
min-width: 1rem;
}
}
// Mobile: dropdown displays at 100%.
.dropdown,
.dropdown-trigger,
......
......@@ -86,9 +86,6 @@ export class ResourceDownloadItemComponent implements OnInit {
) { }
ngOnInit() {
console.log(this.resource);
console.log(this.format);
this.initItems();
// Retrieve the first data for the dataset (if exists). It will be used in the
// Data, Downloads and API tabs.
......
......@@ -3,7 +3,7 @@ import { Injectable } from '@angular/core';
import { map } from 'rxjs/operators';
import { APP_CONFIG } from '../../core/services/app-config.service';
import { IMetadataLink, linkFormats, Metadata } from '../../shared/models';
import { IFormat, IResource, Resource } from '../models';
import { IResource, Resource } from '../models';
import { IProjection, Projection } from '../models/projection.model';
@Injectable()
......@@ -54,7 +54,6 @@ export class ResourcesService {
const downloadableResources = [];
const staticResources = [];
const otherResources = [];
console.log(metadata.link);
metadata.link.forEach((link) => {
if (link.service) {
......@@ -96,8 +95,4 @@ export class ResourcesService {
return [downloadableResources, staticResources, otherResources];
}
getDownloadParametersByFormat(format: IFormat) {
}
}
......@@ -3,8 +3,16 @@
.resource-icon-download {
border: 1px solid $grey-super-light-color;
border-radius: 4px;
width: 2.5rem;
height: 2.5rem;
width: 2.75rem;
height: 2.75rem;
a {
height: 100%;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
}
svg {
height: 2.5rem;
......@@ -19,16 +27,11 @@
.resource-icon-cancel {
// padding: 0.4rem 0.4rem;
border: 1px solid $grey-super-light-color;
border-radius: 4px;
position: relative;
width: 2.5rem;
height: 2.5rem;
// a {
// display: flex;
// }
width: 2.75rem;
height: 2.75rem;
svg {
position: absolute;
......
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