mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-17 15:03:07 +00:00
Fixed chips tooltip and tag fields
This commit is contained in:
@@ -3,8 +3,13 @@
|
||||
<ng-container *ngFor="let c of chips.getChips(); let i = index">
|
||||
<ng-template #tipContent>{{tipText}}</ng-template>
|
||||
<li class="nav-item mr-2 mb-1"
|
||||
(dragstart)="onDragStart(i)"
|
||||
(dragend)="onDragEnd(i)">
|
||||
#t="ngbTooltip"
|
||||
triggers="manual"
|
||||
[ngbTooltip]="tipContent"
|
||||
(dragstart)="t.close();onDragStart(i)"
|
||||
(dragend)="onDragEnd(i)"
|
||||
(mouseover)="showTooltip(t, i)"
|
||||
(mouseout)="t.close()">
|
||||
<a class="flex-sm-fill text-sm-center nav-link active"
|
||||
href="#"
|
||||
[ngClass]="{'chip-selected disabled': (editable && c.editMode) || dragged == i}"
|
||||
|
@@ -7,6 +7,7 @@ import { isObject } from 'lodash';
|
||||
import { Chips } from './models/chips.model';
|
||||
import { ChipsItem } from './models/chips-item.model';
|
||||
import { UploaderService } from '../uploader/uploader.service';
|
||||
import { isNotNull } from '../empty.util';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-chips',
|
||||
@@ -88,7 +89,10 @@ export class ChipsComponent implements OnChanges {
|
||||
}
|
||||
|
||||
this.cdr.detectChanges();
|
||||
tooltip.open();
|
||||
if (!item.hasIcons() || field) {
|
||||
tooltip.open();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -3,7 +3,9 @@
|
||||
</ng-template>
|
||||
|
||||
|
||||
<ds-chips [chips]="chips" [wrapperClass]="'border-bottom border-light'">
|
||||
<ds-chips [chips]="chips"
|
||||
[editable]="false"
|
||||
[wrapperClass]="'border-bottom border-light'">
|
||||
|
||||
<input *ngIf="!searchOptions"
|
||||
class="border-0 form-control-plaintext tag-input flex-grow-1 mt-1 mb-1 chips-sort-ignore"
|
||||
|
@@ -28,6 +28,7 @@
|
||||
}
|
||||
|
||||
.tag-input {
|
||||
flex-grow: 1;
|
||||
outline: none;
|
||||
width: auto !important;
|
||||
}
|
||||
|
Reference in New Issue
Block a user