diff --git a/src/addons/mod/book/components/index/addon-mod-book-index.html b/src/addons/mod/book/components/index/addon-mod-book-index.html index 8018382c7..4727f8e6c 100644 --- a/src/addons/mod/book/components/index/addon-mod-book-index.html +++ b/src/addons/mod/book/components/index/addon-mod-book-index.html @@ -33,7 +33,7 @@ -
+
{{ 'core.start' | translate }} diff --git a/src/addons/mod/folder/components/index/addon-mod-folder-index.html b/src/addons/mod/folder/components/index/addon-mod-folder-index.html index 9b5ac6cad..d9e0cf63d 100644 --- a/src/addons/mod/folder/components/index/addon-mod-folder-index.html +++ b/src/addons/mod/folder/components/index/addon-mod-folder-index.html @@ -32,6 +32,6 @@ - diff --git a/src/addons/mod/imscp/components/index/addon-mod-imscp-index.html b/src/addons/mod/imscp/components/index/addon-mod-imscp-index.html index c8916bc9b..67c59580d 100644 --- a/src/addons/mod/imscp/components/index/addon-mod-imscp-index.html +++ b/src/addons/mod/imscp/components/index/addon-mod-imscp-index.html @@ -30,7 +30,7 @@ -
+
{{ 'core.start' | translate }} diff --git a/src/addons/mod/page/components/index/addon-mod-page-index.html b/src/addons/mod/page/components/index/addon-mod-page-index.html index 0e92db006..b93d43391 100644 --- a/src/addons/mod/page/components/index/addon-mod-page-index.html +++ b/src/addons/mod/page/components/index/addon-mod-page-index.html @@ -32,5 +32,5 @@ - + diff --git a/src/addons/mod/resource/components/index/addon-mod-resource-index.html b/src/addons/mod/resource/components/index/addon-mod-resource-index.html index 9ce2df420..fd4d8b5b5 100644 --- a/src/addons/mod/resource/components/index/addon-mod-resource-index.html +++ b/src/addons/mod/resource/components/index/addon-mod-resource-index.html @@ -79,7 +79,7 @@ -
+
diff --git a/src/addons/mod/url/components/index/addon-mod-url-index.html b/src/addons/mod/url/components/index/addon-mod-url-index.html index 085321c3f..6b29fa18c 100644 --- a/src/addons/mod/url/components/index/addon-mod-url-index.html +++ b/src/addons/mod/url/components/index/addon-mod-url-index.html @@ -37,7 +37,7 @@ -
+
diff --git a/src/core/directives/collapsible-footer.ts b/src/core/directives/collapsible-footer.ts index 976e65827..b9dc775bd 100644 --- a/src/core/directives/collapsible-footer.ts +++ b/src/core/directives/collapsible-footer.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { Directive, ElementRef, OnDestroy, OnInit } from '@angular/core'; +import { Directive, ElementRef, Input, OnDestroy, OnInit } from '@angular/core'; import { ScrollDetail } from '@ionic/core'; import { IonContent } from '@ionic/angular'; import { CoreUtils } from '@services/utils/utils'; @@ -34,6 +34,8 @@ import { CoreEventLoadingChangedData, CoreEventObserver, CoreEvents } from '@sin }) export class CoreCollapsibleFooterDirective implements OnInit, OnDestroy { + @Input() appearOnBottom = false; + protected element: HTMLElement; protected initialHeight = 0; protected initialPaddingBottom = '0px'; @@ -127,7 +129,7 @@ export class CoreCollapsibleFooterDirective implements OnInit, OnDestroy { */ protected onScroll(scrollDetail: ScrollDetail, scrollElement: HTMLElement): void { const maxScroll = scrollElement.scrollHeight - scrollElement.offsetHeight; - if (scrollDetail.scrollTop <= 0 || scrollDetail.scrollTop >= maxScroll) { + if (scrollDetail.scrollTop <= 0 || (this.appearOnBottom && scrollDetail.scrollTop >= maxScroll)) { // Reset. this.setBarHeight(this.initialHeight); } else { @@ -181,6 +183,9 @@ export class CoreCollapsibleFooterDirective implements OnInit, OnDestroy { this.listenScrollEvents(); + // Only if not present or explicitly falsy it will be false. + this.appearOnBottom = !CoreUtils.isFalseOrZero(this.appearOnBottom); + // Recalculate the height if a parent core-loading displays the content. this.loadingChangedListener = CoreEvents.on(CoreEvents.CORE_LOADING_CHANGED, async (data: CoreEventLoadingChangedData) => { diff --git a/src/core/features/course/pages/module-preview/module-preview.html b/src/core/features/course/pages/module-preview/module-preview.html index 11cfb10da..2dfdb164f 100644 --- a/src/core/features/course/pages/module-preview/module-preview.html +++ b/src/core/features/course/pages/module-preview/module-preview.html @@ -45,6 +45,6 @@ - + diff --git a/src/core/features/siteplugins/components/module-index/core-siteplugins-module-index.html b/src/core/features/siteplugins/components/module-index/core-siteplugins-module-index.html index 287220e84..aeb66ed8c 100644 --- a/src/core/features/siteplugins/components/module-index/core-siteplugins-module-index.html +++ b/src/core/features/siteplugins/components/module-index/core-siteplugins-module-index.html @@ -14,5 +14,6 @@ (onLoadingContent)="contentLoading()"> - + diff --git a/src/core/features/siteplugins/components/module-index/module-index.ts b/src/core/features/siteplugins/components/module-index/module-index.ts index 3e15a13dc..bbaebb0d2 100644 --- a/src/core/features/siteplugins/components/module-index/module-index.ts +++ b/src/core/features/siteplugins/components/module-index/module-index.ts @@ -85,6 +85,8 @@ export class CoreSitePluginsModuleIndexComponent implements OnInit, OnDestroy, C */ size?: string; + collapsibleFooterAppearOnBottom = true; + displayOpenInBrowser = true; displayDescription = true; displayRefresh = true; @@ -133,6 +135,8 @@ export class CoreSitePluginsModuleIndexComponent implements OnInit, OnDestroy, C this.displaySize = !CoreUtils.isFalseOrZero(handlerSchema.displaysize); this.displayGrades = CoreUtils.isTrueOrOne(handlerSchema.displaygrades); // False by default. this.ptrEnabled = !CoreUtils.isFalseOrZero(handlerSchema.ptrenabled); + + this.collapsibleFooterAppearOnBottom = !CoreUtils.isFalseOrZero(handlerSchema.isresource); } // Get the data for the context menu.