Skip to content

Commit 6802a96

Browse files
authored
Merge pull request #2426 from crazyserver/MOBILE-3401
Mobile 3401
2 parents 5e9e9e7 + 8f21507 commit 6802a96

File tree

5 files changed

+37
-12
lines changed

5 files changed

+37
-12
lines changed

src/addon/mod/quiz/components/index/index.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ ion-app.app-root addon-mod-quiz-index {
4646
background-color: $blue-dark;
4747
color: $blue-light;
4848
}
49+
50+
.item.addon-mod_quiz-highlighted.activated,
51+
.item.addon-mod_quiz-highlighted.activated p {
52+
background-color: $blue;
53+
color: $blue-light;
54+
}
4955
}
5056
}
5157
}

src/app/app.scss

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,18 @@ ion-app.app-root {
441441
}
442442
}
443443
}
444+
@include darkmode() {
445+
@each $color-name, $color-base, $color-contrast in get-colors($colors-dark) {
446+
&.select-md-#{$color-name},
447+
&.select-ios-#{$color-name} {
448+
color: $color-base;
449+
450+
.select-icon .select-icon-inner {
451+
color: $color-base;
452+
}
453+
}
454+
}
455+
}
444456
}
445457

446458
.item-label-stacked ion-select[multiple="true"] {
@@ -1293,17 +1305,17 @@ ion-app.app-root {
12931305
// QR scan. The scanner is at the background of the app, we need to hide the elements that overlay it.
12941306
.core-scanning-qr {
12951307
ion-app.app-root {
1296-
background-color: transparent;
1308+
background-color: transparent !important;
12971309

12981310
.ion-page {
1299-
background-color: transparent;
1311+
background-color: transparent !important;
13001312
}
13011313
ion-content, ion-backdrop, ion-modal:not(.core-modal-fullscreen), core-ion-tabs {
1302-
display: none;
1314+
display: none !important;
13031315
}
13041316

13051317
&.ios .ion-page.show-page~.nav-decor {
1306-
display: none;
1318+
display: none !important;
13071319
}
13081320
}
13091321
}

src/core/search/components/search-box/core-search-box.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<ion-icon name="close"></ion-icon>
1010
</button>
1111
</ion-item>
12-
<ion-list class="core-search-history with-borders">
12+
<ion-list class="core-search-history with-borders" [hidden]="!historyShown">
1313
<a ion-item text-wrap *ngFor="let item of history" (click)="historyClicked($event, item.searchedtext)" class="core-clickable" tabindex="1">
1414
<core-icon name="fa-history" item-start></core-icon>
1515
{{item.searchedtext}}

src/core/search/components/search-box/search-box.scss

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ ion-app.app-root core-search-box {
2323
}
2424

2525
.core-search-history {
26-
display: none;
2726
max-height: calc(-120px + 80vh);
2827
overflow-y: auto;
2928

@@ -35,10 +34,4 @@ ion-app.app-root core-search-box {
3534
border-bottom: 0;
3635
}
3736
}
38-
39-
form:focus-within {
40-
.core-search-history {
41-
display: block;
42-
}
43-
}
4437
}

src/core/search/components/search-box/search-box.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,19 @@ export class CoreSearchBoxComponent implements OnInit {
7878
if (this.searchArea) {
7979
this.loadHistory();
8080
}
81+
82+
this.formElement.nativeElement.addEventListener('focus', () => {
83+
this.historyShown = true;
84+
}, true);
85+
86+
this.formElement.nativeElement.addEventListener('blur', () => {
87+
// Wait the new element to be focused.
88+
setTimeout(() => {
89+
if (document.activeElement.closest('form') != this.formElement.nativeElement) {
90+
this.historyShown = false;
91+
}
92+
});
93+
}, true);
8194
}
8295

8396
/**
@@ -100,6 +113,7 @@ export class CoreSearchBoxComponent implements OnInit {
100113

101114
this.domUtils.triggerFormSubmittedEvent(this.formElement, false, this.sitesProvider.getCurrentSiteId());
102115

116+
this.historyShown = false;
103117
this.searched = this.searchText;
104118
this.onSubmit.emit(this.searchText);
105119
}

0 commit comments

Comments
 (0)