MOBILE-2888 login: Make url optional in multi site selector
parent
019c7ab73f
commit
6663fe0bb4
|
@ -36,13 +36,13 @@
|
||||||
<button ion-button block [disabled]="!siteForm.valid">{{ 'core.login.connect' | translate }}</button>
|
<button ion-button block [disabled]="!siteForm.valid">{{ 'core.login.connect' | translate }}</button>
|
||||||
</form>
|
</form>
|
||||||
<!-- Pick the site from a list of fixed sites. -->
|
<!-- Pick the site from a list of fixed sites. -->
|
||||||
<ion-list *ngIf="fixedSites && fixedDisplay == 'list'">
|
<ion-list *ngIf="fixedSites && (fixedDisplay == 'list' || fixedDisplay == 'listnourl')">
|
||||||
<p class="padding no-padding-bottom">{{ 'core.login.selectsite' | translate }}</p>
|
<p class="padding no-padding-bottom">{{ 'core.login.selectsite' | translate }}</p>
|
||||||
|
|
||||||
<ion-searchbar *ngIf="fixedSites.length > 4" [(ngModel)]="filter" (ionInput)="filterChanged($event)" (ionCancel)="filterChanged()" [placeholder]="'core.login.findyoursite' | translate"></ion-searchbar>
|
<ion-searchbar *ngIf="fixedSites.length > 4" [(ngModel)]="filter" (ionInput)="filterChanged($event)" (ionCancel)="filterChanged()" [placeholder]="'core.login.findyoursite' | translate"></ion-searchbar>
|
||||||
<ion-item *ngFor="let site of filteredSites" (click)="connect($event, site.url)" [title]="site.name" detail-push text-wrap>
|
<ion-item *ngFor="let site of filteredSites" (click)="connect($event, site.url)" [title]="site.name" detail-push text-wrap>
|
||||||
<h2>{{site.name}}</h2>
|
<h2>{{site.name}}</h2>
|
||||||
<p>{{site.url}}</p>
|
<p *ngIf="fixedDisplay == 'list'">{{site.url}}</p>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
</ion-list>
|
</ion-list>
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ export class CoreLoginSitePage {
|
||||||
this.fixedSites = <any[]> this.loginHelper.getFixedSites();
|
this.fixedSites = <any[]> this.loginHelper.getFixedSites();
|
||||||
this.fixedDisplay = CoreConfigConstants.multisitesdisplay;
|
this.fixedDisplay = CoreConfigConstants.multisitesdisplay;
|
||||||
// Autoselect if not defined.
|
// Autoselect if not defined.
|
||||||
if (['list', 'select', 'buttons'].indexOf(this.fixedDisplay) < 0) {
|
if (['list', 'listnourl', 'select', 'buttons'].indexOf(this.fixedDisplay) < 0) {
|
||||||
this.fixedDisplay = this.fixedSites.length > 8 ? 'list' : (this.fixedSites.length > 3 ? 'select' : 'buttons');
|
this.fixedDisplay = this.fixedSites.length > 8 ? 'list' : (this.fixedSites.length > 3 ? 'select' : 'buttons');
|
||||||
}
|
}
|
||||||
this.filteredSites = this.fixedSites;
|
this.filteredSites = this.fixedSites;
|
||||||
|
|
Loading…
Reference in New Issue