MOBILE-3814 calendar: Add collapsible footer save and discard buttons

main
Pau Ferrer Ocaña 2022-03-18 16:20:12 +01:00
parent b3ccad2b92
commit 9bcbdfd3c6
2 changed files with 14 additions and 19 deletions

View File

@ -183,7 +183,7 @@
</ion-item> </ion-item>
<ion-item class="ion-text-wrap"> <ion-item class="ion-text-wrap">
<ion-label position="stacked"> <ion-label position="stacked">
<p>{{ 'addon.calendar.repeatweeksl' | translate }}</p> <p class="item-heading">{{ 'addon.calendar.repeatweeksl' | translate }}</p>
</ion-label> </ion-label>
<ion-input type="number" name="repeats" formControlName="repeats" [disabled]="!form.controls.repeat.value"> <ion-input type="number" name="repeats" formControlName="repeats" [disabled]="!form.controls.repeat.value">
</ion-input> </ion-input>
@ -231,23 +231,17 @@
<ion-input type="text" name="location" [placeholder]="'core.location' | translate" formControlName="location"> <ion-input type="text" name="location" [placeholder]="'core.location' | translate" formControlName="location">
</ion-input> </ion-input>
</ion-item> </ion-item>
</form>
<ion-item> <div collapsible-footer appearOnBottom *ngIf="loaded && !error" slot="fixed">
<ion-label> <div class="list-item-limited-width adaptable-buttons-row">
<ion-row> <ion-button *ngIf="hasOffline && eventId && eventId < 0" expand="block" fill="outline" (click)="discard()"
<ion-col *ngIf="hasOffline && eventId && eventId < 0"> class="ion-margin ion-text-wrap">
<ion-button expand="block" fill="outline" (click)="discard()">
{{ 'core.discard' | translate }} {{ 'core.discard' | translate }}
</ion-button> </ion-button>
</ion-col> <ion-button expand="block" (click)="submit()" [disabled]="!form.valid" type="submit" class="ion-margin ion-text-wrap">
<ion-col>
<ion-button expand="block" (click)="submit()" [disabled]="!form.valid" type="submit">
{{ 'core.save' | translate }} {{ 'core.save' | translate }}
</ion-button> </ion-button>
</ion-col> </div>
</ion-row> </div>
</ion-label>
</ion-item>
</form>
</core-loading> </core-loading>
</ion-content> </ion-content>

View File

@ -146,7 +146,8 @@ export class CoreCollapsibleFooterDirective implements OnInit, OnDestroy {
? this.finalHeight ? this.finalHeight
: this.initialHeight; : this.initialHeight;
this.setBarHeight(newHeight); } this.setBarHeight(newHeight);
}
}); });
this.resizeListener = CoreDomUtils.onWindowResize(() => { this.resizeListener = CoreDomUtils.onWindowResize(() => {