forked from CIT/Vmeda.Online
		
	MOBILE-3337 desktop: Hide 'My location' button in desktop
This commit is contained in:
		
							parent
							
								
									235a504065
								
							
						
					
					
						commit
						fb15df1481
					
				| @ -10,7 +10,7 @@ | ||||
|         <ion-input type="text" [formControlName]="'f_'+field.id+'_1'" maxlength="10"></ion-input> | ||||
|         <span class="placeholder-icon" item-right>°E</span> | ||||
|     </div> | ||||
|     <div *ngIf="mode == 'edit'" class="addon-data-lantlong"> | ||||
|     <div *ngIf="mode == 'edit' && showGeolocation" class="addon-data-lantlong"> | ||||
|         <button ion-button icon-left (click)="getLocation($event)"> | ||||
|             <ion-icon name="locate"></ion-icon> | ||||
|             {{ 'addon.mod_data.mylocation' | translate }} | ||||
|  | ||||
| @ -17,6 +17,7 @@ import { DomSanitizer, SafeUrl } from '@angular/platform-browser'; | ||||
| import { Platform } from 'ionic-angular'; | ||||
| import { Geolocation, GeolocationOptions } from '@ionic-native/geolocation'; | ||||
| import { AddonModDataFieldPluginComponent } from '../../../classes/field-plugin-component'; | ||||
| import { CoreAppProvider } from '@providers/app'; | ||||
| import { CoreDomUtilsProvider } from '@providers/utils/dom'; | ||||
| 
 | ||||
| /** | ||||
| @ -30,13 +31,17 @@ export class AddonModDataFieldLatlongComponent extends AddonModDataFieldPluginCo | ||||
| 
 | ||||
|     north: number; | ||||
|     east: number; | ||||
|     showGeolocation: boolean; | ||||
| 
 | ||||
|     constructor(protected fb: FormBuilder, | ||||
|             protected platform: Platform, | ||||
|             protected geolocation: Geolocation, | ||||
|             protected domUtils: CoreDomUtilsProvider, | ||||
|             protected sanitizer: DomSanitizer) { | ||||
|             protected sanitizer: DomSanitizer, | ||||
|             protected appProvider: CoreAppProvider) { | ||||
|         super(fb); | ||||
| 
 | ||||
|         this.showGeolocation = !this.appProvider.isDesktop(); | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user