mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
Added sticky position for buttons used for editing item bitstream's metadata
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
<div class="float-left w-75">
|
<div class="float-left w-75">
|
||||||
<h3>{{fileName}} <span class="text-muted">({{fileData?.sizeBytes | dsFileSize}})</span></h3>
|
<h3>{{fileName}} <span class="text-muted">({{fileData?.sizeBytes | dsFileSize}})</span></h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="float-right w-15">
|
<div class="float-right w-15" [class.sticky-buttons]="!readMode">
|
||||||
<ng-container *ngIf="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>
|
<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>-->
|
<!--<a href="{{fileData.url}}" title="Download file" target="_blank"><i class="fa fa-download text-normal mr-3" aria-hidden="true"></i></a>-->
|
||||||
|
@@ -0,0 +1,8 @@
|
|||||||
|
@import '../../../../../styles/variables';
|
||||||
|
|
||||||
|
.sticky-buttons {
|
||||||
|
position: sticky;
|
||||||
|
top: 72px;
|
||||||
|
z-index: $submission-footer-z-index;
|
||||||
|
background-color: rgba($white, .97);
|
||||||
|
}
|
@@ -1,4 +1,4 @@
|
|||||||
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 { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
||||||
import { SectionUploadService } from '../section-upload.service';
|
import { SectionUploadService } from '../section-upload.service';
|
||||||
import { isNotEmpty, isNotNull, isNotUndefined } from '../../../../shared/empty.util';
|
import { isNotEmpty, isNotNull, isNotUndefined } from '../../../../shared/empty.util';
|
||||||
@@ -20,6 +20,7 @@ import { HALEndpointService } from '../../../../core/shared/hal-endpoint.service
|
|||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-submission-upload-section-file',
|
selector: 'ds-submission-upload-section-file',
|
||||||
|
styleUrls: ['./file.component.scss'],
|
||||||
templateUrl: './file.component.html',
|
templateUrl: './file.component.html',
|
||||||
})
|
})
|
||||||
export class UploadSectionFileComponent implements OnChanges, OnInit {
|
export class UploadSectionFileComponent implements OnChanges, OnInit {
|
||||||
@@ -122,7 +123,7 @@ export class UploadSectionFileComponent implements OnChanges, OnInit {
|
|||||||
const accessConditionsToSave = [];
|
const accessConditionsToSave = [];
|
||||||
formData.accessConditions
|
formData.accessConditions
|
||||||
.filter((accessCondition) => isNotEmpty(accessCondition))
|
.filter((accessCondition) => isNotEmpty(accessCondition))
|
||||||
.forEach((accessCondition, index) => {
|
.forEach((accessCondition) => {
|
||||||
let accessConditionOpt;
|
let accessConditionOpt;
|
||||||
|
|
||||||
this.availableAccessConditionOptions
|
this.availableAccessConditionOptions
|
||||||
@@ -130,7 +131,7 @@ export class UploadSectionFileComponent implements OnChanges, OnInit {
|
|||||||
.forEach((element) => accessConditionOpt = element);
|
.forEach((element) => accessConditionOpt = element);
|
||||||
|
|
||||||
if (accessConditionOpt) {
|
if (accessConditionOpt) {
|
||||||
const path = `accessConditions/${index}`;
|
|
||||||
if (accessConditionOpt.hasStartDate !== true && accessConditionOpt.hasEndDate !== true) {
|
if (accessConditionOpt.hasStartDate !== true && accessConditionOpt.hasEndDate !== true) {
|
||||||
accessConditionOpt = deleteProperty(accessConditionOpt, 'hasStartDate');
|
accessConditionOpt = deleteProperty(accessConditionOpt, 'hasStartDate');
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user