Merge pull request #1600 from crazyserver/MOBILE-2722
MOBILE-2722 dashboard: Fix dashboard for 3.1main
commit
321af91cb3
|
@ -40,8 +40,10 @@ export class AddonBlockTimelineHandler extends CoreBlockBaseHandler {
|
||||||
* @return {boolean} Whether or not the handler is enabled on a site level.
|
* @return {boolean} Whether or not the handler is enabled on a site level.
|
||||||
*/
|
*/
|
||||||
isEnabled(): boolean | Promise<boolean> {
|
isEnabled(): boolean | Promise<boolean> {
|
||||||
return this.timelineProvider.isAvailable() && (this.sitesProvider.getCurrentSite().isVersionGreaterEqualThan('3.6') ||
|
return this.timelineProvider.isAvailable().then((enabled) => {
|
||||||
!this.coursesProvider.isMyCoursesDisabledInSite());
|
return enabled && (this.sitesProvider.getCurrentSite().isVersionGreaterEqualThan('3.6') ||
|
||||||
|
!this.coursesProvider.isMyCoursesDisabledInSite());
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -218,7 +218,8 @@ export class AddonBlockTimelineProvider {
|
||||||
*/
|
*/
|
||||||
isAvailable(siteId?: string): Promise<boolean> {
|
isAvailable(siteId?: string): Promise<boolean> {
|
||||||
return this.sitesProvider.getSite(siteId).then((site) => {
|
return this.sitesProvider.getSite(siteId).then((site) => {
|
||||||
return site.wsAvailable('core_calendar_get_action_events_by_courses');
|
return site.wsAvailable('core_calendar_get_action_events_by_courses') &&
|
||||||
|
site.wsAvailable('core_calendar_get_action_events_by_timesort');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -205,7 +205,7 @@ ion-app.app-root {
|
||||||
}
|
}
|
||||||
|
|
||||||
input {
|
input {
|
||||||
@include text-align('end');
|
@include text-align('start');
|
||||||
@include rtl() {
|
@include rtl() {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ export class CoreSiteHomeIndexComponent implements OnInit {
|
||||||
hasSupportedBlock: boolean;
|
hasSupportedBlock: boolean;
|
||||||
items: any[] = [];
|
items: any[] = [];
|
||||||
siteHomeId: number;
|
siteHomeId: number;
|
||||||
blocks: any[];
|
blocks = [];
|
||||||
|
|
||||||
constructor(private domUtils: CoreDomUtilsProvider, private sitesProvider: CoreSitesProvider,
|
constructor(private domUtils: CoreDomUtilsProvider, private sitesProvider: CoreSitesProvider,
|
||||||
private courseProvider: CoreCourseProvider, private courseHelper: CoreCourseHelperProvider,
|
private courseProvider: CoreCourseProvider, private courseHelper: CoreCourseHelperProvider,
|
||||||
|
|
Loading…
Reference in New Issue