diff --git a/src/addons/block/myoverview/components/myoverview/addon-block-myoverview.html b/src/addons/block/myoverview/components/myoverview/addon-block-myoverview.html index 87fb9b52f..2ff793fe5 100644 --- a/src/addons/block/myoverview/components/myoverview/addon-block-myoverview.html +++ b/src/addons/block/myoverview/components/myoverview/addon-block-myoverview.html @@ -16,7 +16,8 @@ [attr.aria-valuetext]="prefetchCoursesData[selectedFilter].badgeA11yText"> {{prefetchCoursesData[selectedFilter].badge}} - + + {{prefetchCoursesData.badge}} - + diff --git a/src/addons/block/starredcourses/components/starredcourses/addon-block-starredcourses.html b/src/addons/block/starredcourses/components/starredcourses/addon-block-starredcourses.html index b207895af..703863301 100644 --- a/src/addons/block/starredcourses/components/starredcourses/addon-block-starredcourses.html +++ b/src/addons/block/starredcourses/components/starredcourses/addon-block-starredcourses.html @@ -13,7 +13,8 @@ [attr.aria-valuenow]="prefetchCoursesData.count" [attr.aria-valuetext]="prefetchCoursesData.badgeA11yText"> {{prefetchCoursesData.badge}} - + diff --git a/src/addons/block/timeline/components/events/addon-block-timeline-events.html b/src/addons/block/timeline/components/events/addon-block-timeline-events.html index bc1e38ddb..022dcc211 100644 --- a/src/addons/block/timeline/components/events/addon-block-timeline-events.html +++ b/src/addons/block/timeline/components/events/addon-block-timeline-events.html @@ -54,7 +54,7 @@ {{ 'core.loadmore' | translate }} - + - + + + diff --git a/src/addons/messageoutput/airnotifier/pages/devices/devices.html b/src/addons/messageoutput/airnotifier/pages/devices/devices.html index de1e6f880..c58851492 100644 --- a/src/addons/messageoutput/airnotifier/pages/devices/devices.html +++ b/src/addons/messageoutput/airnotifier/pages/devices/devices.html @@ -17,10 +17,13 @@ {{ device.name }} {{ device.model }} {{ device.platform }} {{ device.version }} ({{ 'core.currentdevice' | translate }}) - - - + + + + diff --git a/src/addons/messages/pages/group-conversations/group-conversations.html b/src/addons/messages/pages/group-conversations/group-conversations.html index 8357d8d81..d1b7a587e 100644 --- a/src/addons/messages/pages/group-conversations/group-conversations.html +++ b/src/addons/messages/pages/group-conversations/group-conversations.html @@ -66,7 +66,7 @@ - + @@ -101,7 +101,7 @@ - + - + diff --git a/src/addons/messages/pages/search/search.html b/src/addons/messages/pages/search/search.html index 9ebab182e..71ea04fb4 100644 --- a/src/addons/messages/pages/search/search.html +++ b/src/addons/messages/pages/search/search.html @@ -76,7 +76,7 @@
- +
diff --git a/src/addons/messages/pages/settings/settings.html b/src/addons/messages/pages/settings/settings.html index e0c38e675..9a1721a24 100644 --- a/src/addons/messages/pages/settings/settings.html +++ b/src/addons/messages/pages/settings/settings.html @@ -66,14 +66,21 @@ {{ processor.displayname }} - - - - - {{ processor.lockedmessage }} - + + + + + {{ processor.lockedmessage }} + + {{ 'core.settings.disabled' | translate }} @@ -85,17 +92,20 @@ {{ processor.displayname }} - - - - -
- {{'core.settings.locked' | translate }} -
+ + + + +
+ {{'core.settings.locked' | translate }} +
+
{{ 'core.settings.disabled' | translate }}
@@ -108,17 +118,19 @@ If notifications are disabled, show "Disabled" instead of toggle. --> {{ 'core.settings.' + state | translate }} - - - - - - {{'core.settings.locked' | translate }} - + + + + + {{'core.settings.locked' | translate }} + + {{ 'core.settings.disabled' | translate }} diff --git a/src/addons/mod/feedback/pages/respondents/respondents.html b/src/addons/mod/feedback/pages/respondents/respondents.html index ecc01d72e..6b5b7319e 100644 --- a/src/addons/mod/feedback/pages/respondents/respondents.html +++ b/src/addons/mod/feedback/pages/respondents/respondents.html @@ -47,7 +47,7 @@ {{ 'core.loadmore' | translate }} - +
@@ -70,7 +70,7 @@ {{ 'core.loadmore' | translate }} - + diff --git a/src/addons/mod/h5pactivity/components/index/addon-mod-h5pactivity-index.html b/src/addons/mod/h5pactivity/components/index/addon-mod-h5pactivity-index.html index f8d5e23ae..a3a164dfb 100644 --- a/src/addons/mod/h5pactivity/components/index/addon-mod-h5pactivity-index.html +++ b/src/addons/mod/h5pactivity/components/index/addon-mod-h5pactivity-index.html @@ -83,7 +83,7 @@ - +

{{ progressMessage | translate }}

diff --git a/src/addons/mod/lesson/components/menu-modal/menu-modal.html b/src/addons/mod/lesson/components/menu-modal/menu-modal.html index 4904e7d5f..c70b46229 100644 --- a/src/addons/mod/lesson/components/menu-modal/menu-modal.html +++ b/src/addons/mod/lesson/components/menu-modal/menu-modal.html @@ -28,7 +28,7 @@

{{ 'addon.mod_lesson.lessonmenu' | translate }}

- +
diff --git a/src/addons/mod/quiz/components/index/addon-mod-quiz-index.html b/src/addons/mod/quiz/components/index/addon-mod-quiz-index.html index 4ba19bb75..3e3838662 100644 --- a/src/addons/mod/quiz/components/index/addon-mod-quiz-index.html +++ b/src/addons/mod/quiz/components/index/addon-mod-quiz-index.html @@ -218,7 +218,7 @@ - + diff --git a/src/addons/mod/scorm/components/index/addon-mod-scorm-index.html b/src/addons/mod/scorm/components/index/addon-mod-scorm-index.html index 77b2771ed..88c5cc1d0 100644 --- a/src/addons/mod/scorm/components/index/addon-mod-scorm-index.html +++ b/src/addons/mod/scorm/components/index/addon-mod-scorm-index.html @@ -143,7 +143,7 @@ - + @@ -240,7 +240,7 @@ - +

{{ progressMessage | translate }}

diff --git a/src/addons/mod/scorm/pages/player/player.html b/src/addons/mod/scorm/pages/player/player.html index f0bbd46b8..ffc225db0 100644 --- a/src/addons/mod/scorm/pages/player/player.html +++ b/src/addons/mod/scorm/pages/player/player.html @@ -8,11 +8,12 @@ - - - - + + + + + diff --git a/src/addons/notifications/pages/list/list.html b/src/addons/notifications/pages/list/list.html index 836702d62..1d2d7f10a 100644 --- a/src/addons/notifications/pages/list/list.html +++ b/src/addons/notifications/pages/list/list.html @@ -12,14 +12,13 @@
- - + + + {{ 'addon.notifications.markallread' | translate }} - - -
diff --git a/src/core/components/button-with-spinner/button-with-spinner.scss b/src/core/components/button-with-spinner/button-with-spinner.scss new file mode 100644 index 000000000..5c9d86ae3 --- /dev/null +++ b/src/core/components/button-with-spinner/button-with-spinner.scss @@ -0,0 +1,15 @@ +:host { + font-size: 1.4rem; + display: flex; + flex-flow: row; + align-items: center; + justify-content: space-around; + align-content: center; + min-height: var(--a11y-min-target-size); + min-width: var(--a11y-min-target-size); + position: relative; + + > * { + position: absolute; + } +} diff --git a/src/core/components/button-with-spinner/button-with-spinner.ts b/src/core/components/button-with-spinner/button-with-spinner.ts new file mode 100644 index 000000000..76cfa0c5c --- /dev/null +++ b/src/core/components/button-with-spinner/button-with-spinner.ts @@ -0,0 +1,37 @@ +// (C) Copyright 2015 Moodle Pty Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { Component, Input } from '@angular/core'; +import { CoreAnimations } from '@components/animations'; + +/** + * Component to show a button or a spinner when loading. + * + * Usage: + * + * ... + * + */ +@Component({ + selector: 'core-button-with-spinner', + templateUrl: 'core-button-with-spinner.html', + styleUrls: ['button-with-spinner.scss'], + animations: [CoreAnimations.SHOW_HIDE], +}) +export class CoreButtonWithSpinnerComponent { + + @Input() loading = true; + @Input() loadingLabel = 'core.loading'; + +} diff --git a/src/core/components/button-with-spinner/core-button-with-spinner.html b/src/core/components/button-with-spinner/core-button-with-spinner.html new file mode 100644 index 000000000..303eb0b3c --- /dev/null +++ b/src/core/components/button-with-spinner/core-button-with-spinner.html @@ -0,0 +1,6 @@ +
+ +
+ + + diff --git a/src/core/components/components.module.ts b/src/core/components/components.module.ts index 93c356a3c..ee3d02b2e 100644 --- a/src/core/components/components.module.ts +++ b/src/core/components/components.module.ts @@ -57,11 +57,13 @@ import { CoreUserAvatarComponent } from './user-avatar/user-avatar'; import { CoreComboboxComponent } from './combobox/combobox'; import { CoreSpacerComponent } from './spacer/spacer'; import { CoreHorizontalScrollControlsComponent } from './horizontal-scroll-controls/horizontal-scroll-controls'; +import { CoreButtonWithSpinnerComponent } from './button-with-spinner/button-with-spinner'; @NgModule({ declarations: [ CoreAttachmentsComponent, CoreBSTooltipComponent, + CoreButtonWithSpinnerComponent, CoreChartComponent, CoreChronoComponent, CoreContextMenuComponent, @@ -108,6 +110,7 @@ import { CoreHorizontalScrollControlsComponent } from './horizontal-scroll-contr exports: [ CoreAttachmentsComponent, CoreBSTooltipComponent, + CoreButtonWithSpinnerComponent, CoreChartComponent, CoreChronoComponent, CoreContextMenuComponent, diff --git a/src/core/components/context-menu/core-context-menu-popover.html b/src/core/components/context-menu/core-context-menu-popover.html index e9d0ad39d..b52365b81 100644 --- a/src/core/components/context-menu/core-context-menu-popover.html +++ b/src/core/components/context-menu/core-context-menu-popover.html @@ -13,7 +13,8 @@ - + {{item.badge}} diff --git a/src/core/components/iframe/core-iframe.html b/src/core/components/iframe/core-iframe.html index c8cf72ddc..ca6c2ecce 100644 --- a/src/core/components/iframe/core-iframe.html +++ b/src/core/components/iframe/core-iframe.html @@ -16,6 +16,6 @@ - +
diff --git a/src/core/components/infinite-loading/core-infinite-loading.html b/src/core/components/infinite-loading/core-infinite-loading.html index 94cd3663b..333c14f76 100644 --- a/src/core/components/infinite-loading/core-infinite-loading.html +++ b/src/core/components/infinite-loading/core-infinite-loading.html @@ -25,5 +25,5 @@
- +
diff --git a/src/core/components/loading/core-loading.html b/src/core/components/loading/core-loading.html index c5b6d803b..1c91e812e 100644 --- a/src/core/components/loading/core-loading.html +++ b/src/core/components/loading/core-loading.html @@ -1,5 +1,5 @@
- +

{{message}}

- + diff --git a/src/core/components/tabs/core-tabs.html b/src/core/components/tabs/core-tabs.html index 6f2edfc8b..acc5ce026 100644 --- a/src/core/components/tabs/core-tabs.html +++ b/src/core/components/tabs/core-tabs.html @@ -1,5 +1,5 @@ - + diff --git a/src/core/features/course/components/module/core-course-module.html b/src/core/features/course/components/module/core-course-module.html index b43f2eeec..fc93272c2 100644 --- a/src/core/features/course/components/module/core-course-module.html +++ b/src/core/features/course/components/module/core-course-module.html @@ -114,6 +114,6 @@ [ngClass]="['core-course-module-handler', 'core-module-loading', module.handlerData.class]" detail="false" > - + diff --git a/src/core/features/course/pages/preview/preview.html b/src/core/features/course/pages/preview/preview.html index 5110889f4..0a11f01c2 100644 --- a/src/core/features/course/pages/preview/preview.html +++ b/src/core/features/course/pages/preview/preview.html @@ -111,7 +111,8 @@ slot="start" [name]="prefetchCourseData.icon" color="success" aria-hidden="true" role="status"> - +

{{ 'core.course.downloadcourse' | translate }}

- +

{{ prefetch.statusTranslatable | translate }}

- + + [attr.aria-label]="'core.loading' | translate"> diff --git a/src/core/features/user/pages/profile/profile.html b/src/core/features/user/pages/profile/profile.html index 0b7059da2..85eaaa7a3 100644 --- a/src/core/features/user/pages/profile/profile.html +++ b/src/core/features/user/pages/profile/profile.html @@ -48,7 +48,7 @@
- +
@@ -61,7 +61,7 @@
- + {{ handler.title | translate }} - + diff --git a/src/theme/components/format-text.scss b/src/theme/components/format-text.scss index 06176a466..cd98501fb 100644 --- a/src/theme/components/format-text.scss +++ b/src/theme/components/format-text.scss @@ -690,3 +690,15 @@ core-rich-text-editor .core-rte-editor { } } } + +// h1 is too big and ugly, reduce size when loading. +ion-header.ios h1 core-format-text { + &.core-format-text-loading { + max-height: 30px; + margin-top: 10px; + } + &.core-format-text-content { + display: block; + margin-top: -10px; + } +}