diff --git a/src/addon/mod/glossary/components/index/addon-mod-glossary-index.html b/src/addon/mod/glossary/components/index/addon-mod-glossary-index.html index 95f710bb1..4ab42f08d 100644 --- a/src/addon/mod/glossary/components/index/addon-mod-glossary-index.html +++ b/src/addon/mod/glossary/components/index/addon-mod-glossary-index.html @@ -32,7 +32,7 @@ {{ 'core.hasdatatosync' | translate:{$a: moduleName} }} - + diff --git a/src/core/courses/pages/search/search.html b/src/core/courses/pages/search/search.html index cd5a1bd01..00475b3f9 100644 --- a/src/core/courses/pages/search/search.html +++ b/src/core/courses/pages/search/search.html @@ -4,7 +4,7 @@ - +
{{ 'core.courses.totalcoursesearchresults' | translate:{$a: total} }} diff --git a/src/core/courses/pages/search/search.ts b/src/core/courses/pages/search/search.ts index e3d56dcfb..e05a4a703 100644 --- a/src/core/courses/pages/search/search.ts +++ b/src/core/courses/pages/search/search.ts @@ -52,6 +52,18 @@ export class CoreCoursesSearchPage { }); } + /** + * Clear search box. + * + * @param e The event object. + */ + clearSearch(e: Event): void { + this.currentSearch = ''; + this.courses = undefined; + this.page = 0; + this.total = 0; + } + /** * Load more results. * diff --git a/src/core/search/components/search-box/search-box.ts b/src/core/search/components/search-box/search-box.ts index 5295790c5..2826043a1 100644 --- a/src/core/search/components/search-box/search-box.ts +++ b/src/core/search/components/search-box/search-box.ts @@ -117,7 +117,7 @@ export class CoreSearchBoxComponent implements OnInit, OnDestroy { */ protected async saveSearchToHistory(text: string): Promise { try { - await this.searchHistoryProvider.insertOrUpdateSearchText(this.searchArea, text); + await this.searchHistoryProvider.insertOrUpdateSearchText(this.searchArea, text.toLowerCase()); } finally { this.loadHistory(); }