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.