MOBILE-4470 data: Improve styles applied in database

main
Pau Ferrer Ocaña 2024-05-22 16:48:23 +02:00
parent 413dbef142
commit 64cc206e19
5 changed files with 7 additions and 7 deletions

View File

@ -74,8 +74,8 @@
</ion-card> </ion-card>
</ng-container> </ng-container>
<div class="addon-data-contents addon-data-entries-{{database.id}}" *ngIf="!isEmpty && database"> <div class="addon-data-contents addon-data-entries addon-data-entries-{{database.id}}" *ngIf="!isEmpty && database">
<core-style [css]="database.csstemplate" prefix=".addon-data-entries-{{database.id}}" /> <core-style [css]="database.csstemplate" prefix="div.addon-data-entries.addon-data-entries-{{database.id}}" />
<core-compile-html [text]="entriesRendered" [jsData]="jsData" [extraImports]="extraImports" /> <core-compile-html [text]="entriesRendered" [jsData]="jsData" [extraImports]="extraImports" />
</div> </div>

View File

@ -16,7 +16,7 @@ $grid-column-paddings: (
--border-color: var(--stroke); --border-color: var(--stroke);
} }
.addon-data-contents { .addon-data-edit-entry {
overflow: visible; overflow: visible;
white-space: normal; white-space: normal;
word-break: break-word; word-break: break-word;

View File

@ -20,8 +20,8 @@
<core-group-selector [groupInfo]="groupInfo" [(selected)]="selectedGroup" (selectedChange)="setGroup(selectedGroup)" <core-group-selector [groupInfo]="groupInfo" [(selected)]="selectedGroup" (selectedChange)="setGroup(selectedGroup)"
[courseId]="database?.course" /> [courseId]="database?.course" />
<div class="addon-data-contents {{cssClass}}" *ngIf="database"> <div class="addon-data-contents addon-data-edit-entry {{cssClass}}" *ngIf="database">
<core-style [css]="database.csstemplate" prefix=".{{cssClass}}" /> <core-style [css]="database.csstemplate" prefix="div.addon-data-edit-entry.{{cssClass}}" />
<form (ngSubmit)="save($event)" [formGroup]="editForm" #editFormEl> <form (ngSubmit)="save($event)" [formGroup]="editForm" #editFormEl>
<core-compile-html [text]="editFormRender" [jsData]="jsData" [extraImports]="extraImports" /> <core-compile-html [text]="editFormRender" [jsData]="jsData" [extraImports]="extraImports" />

View File

@ -28,7 +28,7 @@
[courseId]="courseId" /> [courseId]="courseId" />
<div class="addon-data-contents addon-data-entry addon-data-entries-{{database.id}}" *ngIf="database && entry"> <div class="addon-data-contents addon-data-entry addon-data-entries-{{database.id}}" *ngIf="database && entry">
<core-style [css]="database.csstemplate" prefix=".addon-data-entries-{{database.id}}" /> <core-style [css]="database.csstemplate" prefix="div.addon-data-entry.addon-data-entries-{{database.id}}" />
<core-compile-html [text]="entryHtml" [jsData]="jsData" [extraImports]="extraImports" (compiling)="setRenderingEntry($event)" /> <core-compile-html [text]="entryHtml" [jsData]="jsData" [extraImports]="extraImports" (compiling)="setRenderingEntry($event)" />
</div> </div>

View File

@ -41,7 +41,7 @@ export class CoreStyleComponent implements OnChanges {
ngOnChanges(): void { ngOnChanges(): void {
if (this.element && this.element.nativeElement) { if (this.element && this.element.nativeElement) {
const style = document.createElement('style'); const style = document.createElement('style');
style.innerText = this.prefixCSS(this.css, this.prefix); style.innerHTML = this.prefixCSS(this.css, this.prefix);
this.element.nativeElement.innerHTML = ''; this.element.nativeElement.innerHTML = '';
this.element.nativeElement.appendChild(style); this.element.nativeElement.appendChild(style);