MOBILE-2795 course: Improve label rendering
parent
6ebd1c59fe
commit
bb9578b493
|
@ -1,3 +1,19 @@
|
|||
a.core-course-module-handler.addon-mod-label-handler {
|
||||
align-items: center;
|
||||
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.md a.core-course-module-handler.addon-mod-label-handler .item-inner {
|
||||
padding-bottom: $item-md-padding-bottom;
|
||||
}
|
||||
|
||||
.ios a.core-course-module-handler.addon-mod-label-handler .item-inner {
|
||||
padding-bottom: $item-ios-padding-bottom;
|
||||
}
|
||||
|
||||
.wp a.core-course-module-handler.addon-mod-label-handler .item-inner {
|
||||
padding-bottom: $item-wp-padding-bottom;
|
||||
}
|
||||
|
|
|
@ -66,6 +66,7 @@ export class AddonModLabelModuleHandler implements CoreCourseModuleHandler {
|
|||
return {
|
||||
icon: '',
|
||||
title: title,
|
||||
a11yTitle: '',
|
||||
class: 'addon-mod-label-handler'
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<a *ngIf="module && module.visibleoncoursepage !== 0" ion-item text-wrap id="core-course-module-{{module.id}}" class="core-course-module-handler {{module.handlerData.class}}" (click)="moduleClicked($event)" [ngClass]="{'item-media': module.handlerData.icon, 'core-not-clickable': !module.handlerData.action || !module.uservisible === false, 'item-dimmed': module.visible === 0 || module.uservisible === false}" title="{{ module.handlerData.title }}" detail-none>
|
||||
<a *ngIf="module && module.visibleoncoursepage !== 0" ion-item text-wrap id="core-course-module-{{module.id}}" class="core-course-module-handler {{module.handlerData.class}}" (click)="moduleClicked($event)" [ngClass]="{'item-media': module.handlerData.icon, 'core-not-clickable': !module.handlerData.action || !module.uservisible === false, 'item-dimmed': module.visible === 0 || module.uservisible === false}" [title]="module.handlerData.a11yTitle" detail-none>
|
||||
|
||||
<img item-start *ngIf="module.handlerData.icon" [src]="module.handlerData.icon" alt="" role="presentation" class="core-module-icon">
|
||||
<div class="core-module-title">
|
||||
|
|
|
@ -94,6 +94,9 @@ export class CoreCourseModuleComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
}, this.sitesProvider.getCurrentSiteId());
|
||||
}
|
||||
|
||||
this.module.handlerData.a11yTitle = typeof this.module.handlerData.a11yTitle != 'undefined' ?
|
||||
this.module.handlerData.a11yTitle : this.module.handlerData.title;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -98,6 +98,12 @@ export interface CoreCourseModuleHandlerData {
|
|||
*/
|
||||
title: string;
|
||||
|
||||
/**
|
||||
* The accessibility title to use in the module. If not provided, title will be used.
|
||||
* @type {string}
|
||||
*/
|
||||
a11yTitle?: string;
|
||||
|
||||
/**
|
||||
* The image to use as icon (path to the image).
|
||||
* @type {string}
|
||||
|
|
Loading…
Reference in New Issue