commit
f719d8e9b1
|
@ -108,7 +108,7 @@
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<button ion-button block (click)="submitQuestion($event)" class="button-no-uppercase">{{ question.submitLabel }}</button>
|
<button ion-button block text-wrap (click)="submitQuestion($event)" class="button-no-uppercase">{{ question.submitLabel }}</button>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
</form>
|
</form>
|
||||||
</ion-card>
|
</ion-card>
|
||||||
|
@ -175,7 +175,7 @@
|
||||||
<core-format-text [text]="eolData.displayofgrade.message"></core-format-text>
|
<core-format-text [text]="eolData.displayofgrade.message"></core-format-text>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-item text-wrap *ngIf="eolData.reviewlesson">
|
<ion-item text-wrap *ngIf="eolData.reviewlesson">
|
||||||
<a ion-button block (click)="reviewLesson(eolData.reviewlesson.pageid)" class="button-no-uppercase">
|
<a ion-button block text-wrap (click)="reviewLesson(eolData.reviewlesson.pageid)" class="button-no-uppercase">
|
||||||
<core-format-text [text]="'addon.mod_lesson.reviewlesson' | translate"></core-format-text>
|
<core-format-text [text]="'addon.mod_lesson.reviewlesson' | translate"></core-format-text>
|
||||||
</a>
|
</a>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
|
@ -185,7 +185,7 @@
|
||||||
<ion-item text-wrap *ngIf="eolData.activitylink && eolData.activitylink.value">
|
<ion-item text-wrap *ngIf="eolData.activitylink && eolData.activitylink.value">
|
||||||
<ng-container *ngIf="eolData.activitylink.value.formatted">
|
<ng-container *ngIf="eolData.activitylink.value.formatted">
|
||||||
<!-- Activity link was successfully formatted, render the button. -->
|
<!-- Activity link was successfully formatted, render the button. -->
|
||||||
<a ion-button block color="light" [href]="eolData.activitylink.value.href" core-link [capture]="true" class="button-no-uppercase">
|
<a ion-button block text-wrap color="light" [href]="eolData.activitylink.value.href" core-link [capture]="true" class="button-no-uppercase">
|
||||||
<core-format-text [text]="eolData.activitylink.value.label"></core-format-text>
|
<core-format-text [text]="eolData.activitylink.value.label"></core-format-text>
|
||||||
</a>
|
</a>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
@ -212,8 +212,8 @@
|
||||||
</div>
|
</div>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-item text-wrap *ngIf="review || (processData.buttons && processData.buttons.length)">
|
<ion-item text-wrap *ngIf="review || (processData.buttons && processData.buttons.length)">
|
||||||
<a ion-button block color="light" *ngIf="review" (click)="changePage(LESSON_EOL)">{{ 'addon.mod_lesson.finish' | translate }}</a>
|
<a ion-button block text-wrap color="light" *ngIf="review" (click)="changePage(LESSON_EOL)">{{ 'addon.mod_lesson.finish' | translate }}</a>
|
||||||
<a ion-button block color="light" *ngFor="let button of processData.buttons" (click)="changePage(button.pageId, true)">{{ button.label | translate }}</a>
|
<a ion-button block text-wrap color="light" *ngFor="let button of processData.buttons" (click)="changePage(button.pageId, true)">{{ button.label | translate }}</a>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
</ion-list>
|
</ion-list>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -78,7 +78,7 @@
|
||||||
<!-- Content page, display a button and the content. -->
|
<!-- Content page, display a button and the content. -->
|
||||||
<ion-row>
|
<ion-row>
|
||||||
<ion-col>
|
<ion-col>
|
||||||
<button ion-button block color="light" [disabled]="true">{{ answer[0].buttonText }}</button>
|
<button ion-button block text-wrap color="light" [disabled]="true">{{ answer[0].buttonText }}</button>
|
||||||
</ion-col>
|
</ion-col>
|
||||||
<ion-col>
|
<ion-col>
|
||||||
<p [innerHTML]="answer[0].content"></p>
|
<p [innerHTML]="answer[0].content"></p>
|
||||||
|
|
|
@ -678,7 +678,7 @@ ion-app.app-root {
|
||||||
> ion-icon {
|
> ion-icon {
|
||||||
color: $color-base;
|
color: $color-base;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@include position(0, null, null, 16px)
|
@include position(0, null, null, 16px);
|
||||||
height: 100%;
|
height: 100%;
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -1103,3 +1103,52 @@ ion-app.platform-desktop {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Fix text wrapping in block buttons.
|
||||||
|
.button-block[text-wrap] {
|
||||||
|
height: auto;
|
||||||
|
|
||||||
|
// Changed from "strict" because the size depends on child elements.
|
||||||
|
contain: content;
|
||||||
|
|
||||||
|
// Add vertical padding, we cannot rely on a fixed height + centering like in normal buttons.
|
||||||
|
.item-md & {
|
||||||
|
padding-top: .5357em;
|
||||||
|
padding-bottom: .5357em;
|
||||||
|
}
|
||||||
|
.item-md &.item-button {
|
||||||
|
padding-top: .6em;
|
||||||
|
padding-bottom: .6em;
|
||||||
|
}
|
||||||
|
.item-ios & {
|
||||||
|
padding-top: .9em;
|
||||||
|
padding-bottom: .9em;
|
||||||
|
}
|
||||||
|
.item-ios &.item-button {
|
||||||
|
padding-top: .7846em;
|
||||||
|
padding-bottom: .7846em;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Keep a consistent height with normal buttons if text does not wrap.
|
||||||
|
display: flex;
|
||||||
|
flex-flow: row;
|
||||||
|
align-items: center;
|
||||||
|
&.button-md {
|
||||||
|
min-height: $button-md-height;
|
||||||
|
}
|
||||||
|
&.button-large-md {
|
||||||
|
min-height: $button-md-large-height;
|
||||||
|
}
|
||||||
|
&.button-small-md {
|
||||||
|
min-height: $button-md-small-height;
|
||||||
|
}
|
||||||
|
&.button-ios {
|
||||||
|
min-height: $button-ios-height;
|
||||||
|
}
|
||||||
|
&.button-large-ios {
|
||||||
|
min-height: $button-ios-large-height;
|
||||||
|
}
|
||||||
|
&.button-small-ios {
|
||||||
|
min-height: $button-ios-small-height;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -148,7 +148,10 @@ export class CoreRichTextEditorComponent implements AfterContentInit, OnDestroy
|
||||||
// Editor is ready, adjust Height if needed.
|
// Editor is ready, adjust Height if needed.
|
||||||
let height;
|
let height;
|
||||||
|
|
||||||
if (this.platform.is('ios') && this.kbHeight > 0) {
|
if (this.platform.is('android')) {
|
||||||
|
// Android, ignore keyboard height because web view is resized.
|
||||||
|
height = this.domUtils.getContentHeight(this.content) - this.getSurroundingHeight(this.element);
|
||||||
|
} else if (this.platform.is('ios') && this.kbHeight > 0) {
|
||||||
// Keyboard open in iOS.
|
// Keyboard open in iOS.
|
||||||
// In this case, the header disappears or is scrollable, so we need to adjust the calculations.
|
// In this case, the header disappears or is scrollable, so we need to adjust the calculations.
|
||||||
height = window.innerHeight - this.getSurroundingHeight(this.element);
|
height = window.innerHeight - this.getSurroundingHeight(this.element);
|
||||||
|
|
Loading…
Reference in New Issue