Skip to content
Snippets Groups Projects
Commit 6bd78830 authored by Giuseppe's avatar Giuseppe
Browse files

Added sticky position for buttons used for editing item bitstream's metadata

parent 820e3909
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@
<div class="float-left w-75">
<h3>{{fileName}} <span class="text-muted">({{fileData?.sizeBytes | dsFileSize}})</span></h3>
</div>
<div class="float-right w-15">
<div class="float-right w-15" [class.sticky-buttons]="!readMode">
<ng-container *ngIf="readMode">
<button class="btn btn-link" (click)="downloadBitstreamFile(); $event.stopPropagation()"><i class="fa fa-download fa-2x text-normal" aria-hidden="true"></i></button>
<!--<a href="{{fileData.url}}" title="Download file" target="_blank"><i class="fa fa-download text-normal mr-3" aria-hidden="true"></i></a>-->
......
@import '../../../../../styles/variables';
.sticky-buttons {
position: sticky;
top: 72px;
z-index: $submission-footer-z-index;
background-color: rgba($white, .97);
}
import { ChangeDetectorRef, Component, Input, OnChanges, OnDestroy, OnInit } from '@angular/core';
import { ChangeDetectorRef, Component, Input, OnChanges, OnInit } from '@angular/core';
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
import { SectionUploadService } from '../section-upload.service';
import { isNotEmpty, isNotNull, isNotUndefined } from '../../../../shared/empty.util';
......@@ -20,6 +20,7 @@ import { HALEndpointService } from '../../../../core/shared/hal-endpoint.service
@Component({
selector: 'ds-submission-upload-section-file',
styleUrls: ['./file.component.scss'],
templateUrl: './file.component.html',
})
export class UploadSectionFileComponent implements OnChanges, OnInit {
......@@ -122,7 +123,7 @@ export class UploadSectionFileComponent implements OnChanges, OnInit {
const accessConditionsToSave = [];
formData.accessConditions
.filter((accessCondition) => isNotEmpty(accessCondition))
.forEach((accessCondition, index) => {
.forEach((accessCondition) => {
let accessConditionOpt;
this.availableAccessConditionOptions
......@@ -130,7 +131,7 @@ export class UploadSectionFileComponent implements OnChanges, OnInit {
.forEach((element) => accessConditionOpt = element);
if (accessConditionOpt) {
const path = `accessConditions/${index}`;
if (accessConditionOpt.hasStartDate !== true && accessConditionOpt.hasEndDate !== true) {
accessConditionOpt = deleteProperty(accessConditionOpt, 'hasStartDate');
......
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